org.jfree.chart.fx.interaction
Class AbstractMouseHandlerFX
- java.lang.Object
-
- org.jfree.chart.fx.interaction.AbstractMouseHandlerFX
-
- All Implemented Interfaces:
- MouseHandlerFX
- Direct Known Subclasses:
- AnchorHandlerFX, DispatchHandlerFX, PanHandlerFX, ScrollHandlerFX, TooltipHandlerFX, ZoomHandlerFX
public class AbstractMouseHandlerFX extends java.lang.Object implements MouseHandlerFX
A base class that can be used to implement theMouseHandlerFXinterface.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 AbstractMouseHandlerFX(java.lang.String id, boolean altKey, boolean ctrlKey, boolean metaKey, boolean shiftKey)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetID()Returns the ID for the handler.voidhandleMouseClicked(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse clicked event.voidhandleMouseDragged(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse dragged event.voidhandleMouseMoved(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse moved event.voidhandleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse pressed event.voidhandleMouseReleased(ChartCanvas canvas, javafx.scene.input.MouseEvent e)Handles a mouse released event.voidhandleScroll(ChartCanvas canvas, javafx.scene.input.ScrollEvent e)Handles a scroll event.booleanhasMatchingModifiers(javafx.scene.input.MouseEvent e)Returnstrueif the specified mouse event has modifier keys that match this handler.booleanisEnabled()Returns the flag that controls whether or not the handler is enabled.voidsetEnabled(boolean enabled)Sets the flag that controls the enabled/disabled state of the handler.
-
-
-
Constructor Detail
-
AbstractMouseHandlerFX
public AbstractMouseHandlerFX(java.lang.String id, boolean altKey, boolean ctrlKey, boolean metaKey, boolean shiftKey)Creates a new instance. The modifier keys are used to select a mouse handler to be the current "live" handler (when a handler is used as an auxiliary handler, the modifier keys are not relevant).- Parameters:
id- the handler id (nullnot permitted).altKey- require ALT key modifier?ctrlKey- require ALT key modifier?metaKey- require ALT key modifier?shiftKey- require ALT key modifier?
-
-
Method Detail
-
getID
public java.lang.String getID()
Returns the ID for the handler.- Specified by:
getIDin interfaceMouseHandlerFX- Returns:
- The ID (never
null).
-
isEnabled
public boolean isEnabled()
Returns the flag that controls whether or not the handler is enabled.- Specified by:
isEnabledin interfaceMouseHandlerFX- Returns:
- A boolean.
-
setEnabled
public void setEnabled(boolean enabled)
Sets the flag that controls the enabled/disabled state of the handler.- Parameters:
enabled- the new flag value.
-
hasMatchingModifiers
public boolean hasMatchingModifiers(javafx.scene.input.MouseEvent e)
Returnstrueif the specified mouse event has modifier keys that match this handler.- Specified by:
hasMatchingModifiersin interfaceMouseHandlerFX- Parameters:
e- the mouse event (nullnot permitted).- Returns:
- A boolean.
-
handleMouseMoved
public void handleMouseMoved(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse moved event. This implementation does nothing, override the method if required.- Specified by:
handleMouseMovedin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
handleMouseClicked
public void handleMouseClicked(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse clicked event. This implementation does nothing, override the method if required.- Specified by:
handleMouseClickedin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
handleMousePressed
public void handleMousePressed(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse pressed event. This implementation does nothing, override the method if required.- Specified by:
handleMousePressedin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
handleMouseDragged
public void handleMouseDragged(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse dragged event. This implementation does nothing, override the method if required.- Specified by:
handleMouseDraggedin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
handleMouseReleased
public void handleMouseReleased(ChartCanvas canvas, javafx.scene.input.MouseEvent e)
Handles a mouse released event. This implementation does nothing, override the method if required.- Specified by:
handleMouseReleasedin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
handleScroll
public void handleScroll(ChartCanvas canvas, javafx.scene.input.ScrollEvent e)
Handles a scroll event. This implementation does nothing, override the method if required.- Specified by:
handleScrollin interfaceMouseHandlerFX- Parameters:
canvas- the canvas (nullnot permitted).e- the event (nullnot permitted).
-
-
DMelt 3.0 © DataMelt by jWork.ORG