public class Panner extends ChartPlugin
Reacts on MouseEvent.DRAG_DETECTED event accepted by mouse filter.
Panner works properly only if both X and Y axis are instances of DefaultNumericAxis.
| Type | Property and Description |
|---|---|
ObjectProperty<AxisMode> |
axisMode
The mode defining axis along which the pan operation is allowed.
|
ObjectProperty<Cursor> |
dragCursor
Mouse cursor to be used during drag operation.
|
addButtonsToToolBarProperty, chartProperty| Modifier and Type | Field and Description |
|---|---|
static Predicate<MouseEvent> |
DEFAULT_MOUSE_FILTER
Default pan mouse filter passing on left mouse button with
control key down. |
| Constructor and Description |
|---|
Panner()
|
Panner(AxisMode panMode)
Creates a new instance of Panner class.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectProperty<AxisMode> |
axisModeProperty()
The mode defining axis along which the pan operation is allowed.
|
ObjectProperty<Cursor> |
dragCursorProperty()
Mouse cursor to be used during drag operation.
|
AxisMode |
getAxisMode()
Returns the value of the
axisModeProperty(). |
Cursor |
getDragCursor()
Returns the value of the
dragCursorProperty() |
Predicate<MouseEvent> |
getMouseFilter()
Returns MouseEvent filter triggering pan operation.
|
void |
setAxisMode(AxisMode mode)
Sets the value of the
axisModeProperty(). |
void |
setDragCursor(Cursor cursor)
Sets value of the
dragCursorProperty(). |
void |
setMouseFilter(Predicate<MouseEvent> mouseFilter)
Sets the filter determining whether given MouseEvent triggered on
event type
should start the panning operation. |
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, layoutChildren, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPointpublic final ObjectProperty<AxisMode> axisModeProperty
AxisMode.XY.getAxisMode(),
setAxisMode(AxisMode)public final ObjectProperty<Cursor> dragCursorProperty
getDragCursor(),
setDragCursor(Cursor)public static final Predicate<MouseEvent> DEFAULT_MOUSE_FILTER
control key down.public final ObjectProperty<AxisMode> axisModeProperty()
AxisMode.XY.getAxisMode(),
setAxisMode(AxisMode)public final ObjectProperty<Cursor> dragCursorProperty()
getDragCursor(),
setDragCursor(Cursor)public final AxisMode getAxisMode()
axisModeProperty().public final Cursor getDragCursor()
dragCursorProperty()public Predicate<MouseEvent> getMouseFilter()
setMouseFilter(Predicate)public final void setAxisMode(AxisMode mode)
axisModeProperty().mode - the mode to be usedpublic final void setDragCursor(Cursor cursor)
dragCursorProperty().cursor - the cursor to be used by the pluginpublic void setMouseFilter(Predicate<MouseEvent> mouseFilter)
event type
should start the panning operation.
By default it is initialized to DEFAULT_MOUSE_FILTER.
mouseFilter - the mouse filter to be used. Can be set to null to start panning on any
DRAG_DETECTED event.Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.