com.jzy3d.surfedit.controllers
Class MouseController
java.lang.Object
org.jzy3d.chart.controllers.mouse.AbstractChartMouseSelector
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:
- when the chart is rendered for the first time
- when the chart is resized
- when the camera mouse controller is released
- when the surface morphology changes
- Author:
- Martin Pernollet
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 |
MouseController
public MouseController(IInteractiveSurface surface)
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:
- 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.
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)