com.jzy3d.surfedit.controllers
Class MouseController

java.lang.Object
  extended by org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector
      extended by com.jzy3d.surfedit.controllers.MouseController
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class MouseController
extends org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

Updates the highlighted status of each surface cell, and query a chart repaint when the selection changes. The implementation of the MouseController tool relies on View.toScreen() which project all the surface data to 2d. The projection is updated after a call to prepareProjection(), so:

Author:
Martin Pernollet

Constructor Summary
MouseController(IInteractiveSurface surface)
           
 
Method Summary
 boolean addCellSelectedEventListener(CellSelectedEventListener listener)
           
 void addControllerEventListener(org.jzy3d.events.ControllerEventListener listener)
           
 void clearLastSelection()
           
 java.util.List<CellSelectedEventListener> getCellSelectedEventListeners()
           
 com.jzy3d.surfedit.controllers.CellReference getCellUnderMouse()
           
 SelectionMode getSelectionMode()
           
 boolean isTooltipOn()
           
 boolean isUseShiftToMakeRectangle()
           
 boolean isWheelOn()
          If wheel is on, then the wheel can be used to scale the graph.
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
           
 boolean removeCellSelectedEventListener(CellSelectedEventListener listener)
           
 void removeControllerEventListener(org.jzy3d.events.ControllerEventListener listener)
           
 void reset()
           
 void setCellSelectedEventListeners(java.util.List<CellSelectedEventListener> listeners)
           
 void setSelectionMode(SelectionMode mode)
           
 void setTooltipOn(boolean tooltipOn)
           
 void setUseShiftToMakeRectangle(boolean useShiftToMakeRectangle)
          If true, uses the following commands: mouse only allows cell by cell selection - mouse + shift allows rectangular selection If false, uses the following commands: mouse only allows rectangular selection mouse + control selection allows cell by cell selection All selections are additive until one presses the ESC key.
 void setWheelOn(boolean wheelOn)
           
 
Methods inherited from class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector
attachChart, dispose, mouseClicked, mouseEntered, mouseExited, releaseChart
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseController

public MouseController(IInteractiveSurface surface)
Method Detail

isTooltipOn

public boolean isTooltipOn()

setTooltipOn

public void setTooltipOn(boolean tooltipOn)

getCellUnderMouse

public com.jzy3d.surfedit.controllers.CellReference getCellUnderMouse()

setSelectionMode

public void setSelectionMode(SelectionMode mode)

getSelectionMode

public SelectionMode getSelectionMode()

setUseShiftToMakeRectangle

public void setUseShiftToMakeRectangle(boolean useShiftToMakeRectangle)
If true, uses the following commands: If false, uses the following commands: All selections are additive until one presses the ESC key.


isUseShiftToMakeRectangle

public boolean isUseShiftToMakeRectangle()

isWheelOn

public boolean isWheelOn()
If wheel is on, then the wheel can be used to scale the graph.


setWheelOn

public void setWheelOn(boolean wheelOn)

clearLastSelection

public void clearLastSelection()

reset

public void reset()

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener
Overrides:
mouseWheelMoved in class org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector

addCellSelectedEventListener

public boolean addCellSelectedEventListener(CellSelectedEventListener listener)

removeCellSelectedEventListener

public boolean removeCellSelectedEventListener(CellSelectedEventListener listener)

getCellSelectedEventListeners

public java.util.List<CellSelectedEventListener> getCellSelectedEventListeners()

setCellSelectedEventListeners

public void setCellSelectedEventListeners(java.util.List<CellSelectedEventListener> listeners)

addControllerEventListener

public void addControllerEventListener(org.jzy3d.events.ControllerEventListener listener)

removeControllerEventListener

public void removeControllerEventListener(org.jzy3d.events.ControllerEventListener listener)