Class SWTMousePickingController

java.lang.Object
org.jzy3d.chart.controllers.AbstractController
org.jzy3d.chart.controllers.camera.AbstractCameraController
org.jzy3d.chart.controllers.mouse.picking.SWTMousePickingController
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.MouseListener, org.eclipse.swt.internal.SWTEventListener, ICameraMouseController, IMousePickingController

public class SWTMousePickingController extends org.jzy3d.chart.controllers.camera.AbstractCameraController implements org.eclipse.swt.events.MouseListener, IMousePickingController
Pick Pickable objects when the mouse is pressed on an SWT canvas, and notify listeners of the PickingSupport.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected PickingSupport
     
    protected org.jzy3d.maths.Coord3d
     

    Fields inherited from class org.jzy3d.chart.controllers.camera.AbstractCameraController

    perf, threadController, updateViewDefault

    Fields inherited from class org.jzy3d.chart.controllers.AbstractController

    controllerListeners, target
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
    SWTMousePickingController(Chart chart, int brushSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    void
    mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
     
    void
    mouseDown(org.eclipse.swt.events.MouseEvent e)
     
    void
    mouseUp(org.eclipse.swt.events.MouseEvent e)
     
    void
    pick(int x, int y)
    Pick objects at the given mouse coordinates, in pixels from the top left of the canvas.
    void
    register(Chart chart)
     
    void
     

    Methods inherited from class org.jzy3d.chart.controllers.camera.AbstractCameraController

    addSlaveThreadController, addThread, getLODPerf, getSlaveThreadController, getThread, isUpdateViewDefault, removeSlaveThreadController, rotate, rotate, rotate, setLODPerf, setUpdateViewDefault, shift, shift, startThreadController, stopThreadController, zoomX, zoomX, zoomY, zoomY, zoomZ, zoomZ

    Methods inherited from class org.jzy3d.chart.controllers.AbstractController

    addControllerEventListener, fireControllerEvent, getChart, getCharts, removeControllerEventListener, unregister

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • picking

      protected PickingSupport picking
    • prevMouse3d

      protected org.jzy3d.maths.Coord3d prevMouse3d
  • Constructor Details

    • SWTMousePickingController

      public SWTMousePickingController()
    • SWTMousePickingController

      public SWTMousePickingController(Chart chart)
    • SWTMousePickingController

      public SWTMousePickingController(Chart chart, int brushSize)
  • Method Details

    • register

      public void register(Chart chart)
      Overrides:
      register in class org.jzy3d.chart.controllers.AbstractController
    • dispose

      public void dispose()
      Overrides:
      dispose in class org.jzy3d.chart.controllers.camera.AbstractCameraController
    • getPickingSupport

      public PickingSupport getPickingSupport()
      Specified by:
      getPickingSupport in interface IMousePickingController
    • setPickingSupport

      public void setPickingSupport(PickingSupport picking)
      Specified by:
      setPickingSupport in interface IMousePickingController
    • mouseDown

      public void mouseDown(org.eclipse.swt.events.MouseEvent e)
      Specified by:
      mouseDown in interface org.eclipse.swt.events.MouseListener
    • mouseUp

      public void mouseUp(org.eclipse.swt.events.MouseEvent e)
      Specified by:
      mouseUp in interface org.eclipse.swt.events.MouseListener
    • mouseDoubleClick

      public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
      Specified by:
      mouseDoubleClick in interface org.eclipse.swt.events.MouseListener
    • pick

      public void pick(int x, int y)
      Pick objects at the given mouse coordinates, in pixels from the top left of the canvas. Must be invoked by the thread rendering the canvas.