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 a
ChartCanvas. This handler
should be configured with the required modifier keys and installed as a
live handler (not an auxiliary handler).-
Constructor Summary
Constructors Constructor Description PanHandlerFX(String id)Creates a new instance that requires no modifier keys.PanHandlerFX(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
Modifier and Type Method 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 Details
-
PanHandlerFX
Creates a new instance that requires no modifier keys.- Parameters:
id- the id (nullnot permitted).
-
PanHandlerFX
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 Details
-
handleMousePressed
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
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
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).
-