public class DispatchHandlerFX extends AbstractMouseHandlerFX
ChartCanvas
by
dispatching ChartMouseEventFX
events to listeners that are
registered with the ChartCanvas
(listeners can also be registered
with a ChartViewer
control).
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 |
---|
DispatchHandlerFX(java.lang.String id)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
handleMouseClicked(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse clicked event by setting the anchor point for the
canvas and redrawing the chart (the anchor point is a reference point
used by the chart to determine crosshair lines).
|
void |
handleMouseMoved(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse moved event.
|
void |
handleMousePressed(ChartCanvas canvas,
javafx.scene.input.MouseEvent e)
Handles a mouse pressed event by recording the location of the mouse
pointer (so that later we can check that the click isn't part of a
drag).
|
getID, handleMouseDragged, handleMouseReleased, handleScroll, hasMatchingModifiers, isEnabled, setEnabled
public DispatchHandlerFX(java.lang.String id)
id
- the id (null
not permitted).public void handleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
handleMousePressed
in interface MouseHandlerFX
handleMousePressed
in class AbstractMouseHandlerFX
canvas
- the chart canvas.e
- the mouse event.public void handleMouseMoved(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
AbstractMouseHandlerFX
handleMouseMoved
in interface MouseHandlerFX
handleMouseMoved
in class AbstractMouseHandlerFX
canvas
- the canvas (null
not permitted).e
- the event (null
not permitted).public void handleMouseClicked(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
handleMouseClicked
in interface MouseHandlerFX
handleMouseClicked
in class AbstractMouseHandlerFX
canvas
- the chart canvas (null
not permitted).e
- the mouse event (null
not permitted).