public class ChartPanManager extends Object
XYChart
by translating them to panning
actions on the chart's axes.Modifier and Type | Field and Description |
---|---|
static javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
DEFAULT_FILTER
The default mouse filter for the
ChartPanManager filters events unless only primary
mouse button (usually left) is depressed. |
Constructor and Description |
---|
ChartPanManager(javafx.scene.chart.XYChart<?,?> chart) |
Modifier and Type | Method and Description |
---|---|
AxisConstraintStrategy |
getAxisConstraintStrategy()
Returns the current strategy in use.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getMouseFilter()
Returns the mouse filter.
|
void |
setAxisConstraintStrategy(AxisConstraintStrategy axisConstraintStrategy)
Sets the
AxisConstraintStrategy to use, which determines which axis is allowed for panning. |
void |
setMouseFilter(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> mouseFilter)
Sets the mouse filter for starting the pan action.
|
void |
start() |
void |
stop() |
public static final javafx.event.EventHandler<javafx.scene.input.MouseEvent> DEFAULT_FILTER
ChartPanManager
filters events unless only primary
mouse button (usually left) is depressed.public AxisConstraintStrategy getAxisConstraintStrategy()
public void setAxisConstraintStrategy(AxisConstraintStrategy axisConstraintStrategy)
AxisConstraintStrategy
to use, which determines which axis is allowed for panning. The default
implementation is AxisConstraintStrategies.getDefault()
.AxisConstraintStrategies
public javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getMouseFilter()
setMouseFilter(EventHandler)
public void setMouseFilter(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> mouseFilter)
Event.consume()
, then the event is ignored. If the filter is null, all events are
passed through. The default filter is DEFAULT_FILTER
.public void start()
public void stop()
Copyright © 2013–2016 Jason Winnebeck. All rights reserved.