org.jfree.chart.fx.interaction
Class ZoomHandlerFX
- java.lang.Object
-
- org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
-
- org.jfree.chart.fx.interaction.ZoomHandlerFX
-
- All Implemented Interfaces:
- MouseHandlerFX
public class ZoomHandlerFX extends AbstractMouseHandlerFX
Handles drag zooming of charts on aChartCanvas. This handler should be configured with the required modifier keys and installed as a live handler (not an auxiliary handler). This handler only works for a ChartCanvas that is embedded in aChartViewer, since it relies on the ChartViewer for drawing the zoom rectangle.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 ZoomHandlerFX(java.lang.String id, ChartViewer parent)Creates a new instance with no modifier keys required.ZoomHandlerFX(java.lang.String id, ChartViewer parent, 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 updating the zoom rectangle displayed in the ChartViewer.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
-
ZoomHandlerFX
public ZoomHandlerFX(java.lang.String id, ChartViewer parent)Creates a new instance with no modifier keys required.- Parameters:
id- the handler ID (nullnot permitted).parent- the chart viewer.
-
ZoomHandlerFX
public ZoomHandlerFX(java.lang.String id, ChartViewer parent, 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 handler ID (nullnot permitted).parent- the chart viewer.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 updating the zoom rectangle displayed in the ChartViewer.- 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