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.
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.
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,
MouseEvent e)
Handles a mouse dragged event by updating the zoom rectangle displayed
in the ChartViewer.
|
void |
handleMousePressed(ChartCanvas canvas,
MouseEvent e)
Handles a mouse pressed event by recording the initial mouse pointer
location.
|
void |
handleMouseReleased(ChartCanvas canvas,
MouseEvent e)
Handles a mouse released event.
|
getID, handleMouseClicked, handleMouseMoved, handleScroll, hasMatchingModifiers, isEnabled, setEnabled
public 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, MouseEvent e)
handleMousePressed
in interface MouseHandlerFX
handleMousePressed
in class AbstractMouseHandlerFX
canvas
- the JavaFX canvas (null
not permitted).e
- the mouse event (null
not permitted).public void handleMouseDragged(ChartCanvas canvas, MouseEvent e)
handleMouseDragged
in interface MouseHandlerFX
handleMouseDragged
in class AbstractMouseHandlerFX
canvas
- the JavaFX canvas (null
not permitted).e
- the mouse event (null
not permitted).public void handleMouseReleased(ChartCanvas canvas, MouseEvent e)
AbstractMouseHandlerFX
handleMouseReleased
in interface MouseHandlerFX
handleMouseReleased
in class AbstractMouseHandlerFX
canvas
- the canvas (null
not permitted).e
- the event (null
not permitted).Jas4pp 1.5 © Java Analysis Studio for Particle Physics