public class ZoomHandlerFX extends AbstractMouseHandlerFX
ChartCanvas. 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 a ChartViewer, since it
relies on the ChartViewer for drawing the zoom rectangle.| Constructor and Description |
|---|
ZoomHandlerFX(String id,
ChartViewer parent)
Creates a new instance with no modifier keys required.
|
ZoomHandlerFX(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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleMouseDragged(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse dragged event by updating the zoom rectangle displayed
in the ChartViewer.
|
void |
handleMousePressed(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse pressed event by recording the initial mouse pointer
location.
|
void |
handleMouseReleased(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse released event.
|
getID, handleMouseClicked, handleMouseMoved, handleScroll, hasMatchingModifiers, isEnabled, setEnabledpublic ZoomHandlerFX(String id, ChartViewer parent)
id - the handler ID (null not permitted).parent - the chart viewer.public ZoomHandlerFX(String id, ChartViewer parent, boolean altKey, boolean ctrlKey, boolean metaKey, boolean shiftKey)
id - the handler ID (null not permitted).parent - the chart viewer.altKey - require ALT key?ctrlKey - require CTRL key?metaKey - require META key?shiftKey - require SHIFT key?public void handleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
handleMousePressed in interface MouseHandlerFXhandleMousePressed in class AbstractMouseHandlerFXcanvas - the JavaFX canvas (null not permitted).e - the mouse event (null not permitted).public void handleMouseDragged(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
handleMouseDragged in interface MouseHandlerFXhandleMouseDragged in class AbstractMouseHandlerFXcanvas - the JavaFX canvas (null not permitted).e - the mouse event (null not permitted).public void handleMouseReleased(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
AbstractMouseHandlerFXhandleMouseReleased in interface MouseHandlerFXhandleMouseReleased in class AbstractMouseHandlerFXcanvas - the canvas (null not permitted).e - the event (null not permitted).Copyright © 2017 JFree.org. All rights reserved.