public class Panner extends XYChartPlugin<Number,Number>
Reacts on MouseEvent.DRAG_DETECTED
event accepted by mouse filter
.
Panner
works properly only if both X and Y axis are instances of NumericAxis
.
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.
|
chartPaneProperty
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. |
chartPaneProperty, getChartChildren, getChartPane, getCharts, getLocationInPlotArea, layoutChildren, registerMouseEventHandler, setChartPane, toDataPoint, toDisplayPoint
public 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 Predicate<MouseEvent> getMouseFilter()
setMouseFilter(Predicate)
public 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.public final ObjectProperty<AxisMode> axisModeProperty()
AxisMode.XY
.getAxisMode()
,
setAxisMode(AxisMode)
public final void setAxisMode(AxisMode mode)
axisModeProperty()
.mode
- the mode to be usedpublic final AxisMode getAxisMode()
axisModeProperty()
.public final ObjectProperty<Cursor> dragCursorProperty()
getDragCursor()
,
setDragCursor(Cursor)
public final void setDragCursor(Cursor cursor)
dragCursorProperty()
.cursor
- the cursor to be used by the pluginpublic final Cursor getDragCursor()
dragCursorProperty()
Copyright © 2019 CERN. All rights reserved.