org.jfree.chart.fx.interaction
Class PanHandlerFX
- java.lang.Object
-
- org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
-
- org.jfree.chart.fx.interaction.PanHandlerFX
-
- All Implemented Interfaces:
- MouseHandlerFX
public class PanHandlerFX extends AbstractMouseHandlerFX
Handles panning of charts on aChartCanvas. This handler should be configured with the required modifier keys and installed as a live handler (not an auxiliary handler).THE API FOR THIS CLASS IS SUBJECT TO CHANGE IN FUTURE RELEASES. This is so that we can incorporate feedback on the (new) JavaFX support in JFreeChart.
- Since:
- 1.0.18
-
-
Constructor Summary
Constructors Constructor and Description PanHandlerFX(java.lang.String id)Creates a new instance that requires no modifier keys.PanHandlerFX(java.lang.String id, boolean altKey, boolean ctrlKey, boolean metaKey, boolean shiftKey)Creates a new instance that will be activated using the specified combination of modifier keys.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidhandleMouseDragged(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse dragged event by calculating the distance panned and updating the axes accordingly.voidhandleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse pressed event by recording the initial mouse pointer location.voidhandleMouseReleased(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse released event.-
Methods inherited from class org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
getID, handleMouseClicked, handleMouseMoved, handleScroll, hasMatchingModifiers, isEnabled, setEnabled
-
-
-
-
Constructor Detail
-
PanHandlerFX
public PanHandlerFX(java.lang.String id)
Creates a new instance that requires no modifier keys.- Parameters:
id- the id (nullnot permitted).
-
PanHandlerFX
public PanHandlerFX(java.lang.String id, boolean altKey, boolean ctrlKey, boolean metaKey, boolean shiftKey)Creates a new instance that will be activated using the specified combination of modifier keys.- Parameters:
id- the id (nullnot permitted).altKey- require ALT key?ctrlKey- require CTRL key?metaKey- require META key?shiftKey- require SHIFT key?
-
-
Method Detail
-
handleMousePressed
public void handleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse pressed event by recording the initial mouse pointer location.- Specified by:
handleMousePressedin interfaceMouseHandlerFX- Overrides:
handleMousePressedin classAbstractMouseHandlerFX- Parameters:
canvas- the JavaFX canvas (nullnot permitted).e- the mouse event (nullnot permitted).
-
handleMouseDragged
public void handleMouseDragged(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse dragged event by calculating the distance panned and updating the axes accordingly.- Specified by:
handleMouseDraggedin interfaceMouseHandlerFX- Overrides:
handleMouseDraggedin classAbstractMouseHandlerFX- Parameters:
canvas- the JavaFX canvas (nullnot permitted).e- the mouse event (nullnot permitted).
-
handleMouseReleased
public void handleMouseReleased(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Description copied from class:AbstractMouseHandlerFXHandles a mouse released event. This implementation does nothing, override the method if required.- Specified by:
handleMouseReleasedin interfaceMouseHandlerFX- Overrides:
handleMouseReleasedin classAbstractMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
-
DMelt 3.0 © DataMelt by jWork.ORG