- java.lang.Object
-
- eu.ess.xaos.ui.plot.Plugin
-
- eu.ess.xaos.ui.plot.plugins.AbstractNamedPlugin
-
- eu.ess.xaos.ui.plot.plugins.AbstractBoundedPlugin
-
- eu.ess.xaos.ui.plot.plugins.AbstractCursorPlugin
-
public abstract class AbstractCursorPlugin extends AbstractBoundedPlugin
Abstract class base of all cursor plugins.- Author:
- claudio.rosati@esss.se
-
-
Constructor Summary
Constructors Constructor Description AbstractCursorPlugin(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
chartConnected(Chart chart)
Called when the plugin is added to a chart.protected void
chartDisconnected(Chart chart)
Called when the plugin has been removed from the chart.protected abstract void
dragDetected(MouseEvent e)
Called when a drag gesture is detected.protected Point2D
getSceneMouseLocation()
protected void
mouseEntered(MouseEvent e)
Called when mouse enters the chart.protected void
mouseExited(MouseEvent e)
Called when mouse exits the chart.protected void
mouseMove(MouseEvent e)
Called when mouse moves inside the chart.-
Methods inherited from class eu.ess.xaos.ui.plot.plugins.AbstractBoundedPlugin
boundsChanged
-
Methods inherited from class eu.ess.xaos.ui.plot.plugins.AbstractNamedPlugin
getName
-
Methods inherited from class eu.ess.xaos.ui.plot.Plugin
formattedValue, getChart, getChartLegend, getFailureMessage, getLocationInPlotArea, getLocationInPlotArea, getPlotAreaBounds, getPlotChildren, getXAxis, getXAxis, getXValueAxis, getXValueAxis, getXValueForDisplay, getXValueForDisplayAsDouble, getYAxis, getYAxis, getYValueAxis, getYValueAxis, getYValueForDisplay, getYValueForDisplayAsDouble, isBindFailed, isInsidePlotArea, isInsidePlotArea, isSeriesVisible, seriesVisibilityUpdated, setChart, toDataPoint, toDisplayPoint
-
-
-
-
Constructor Detail
-
AbstractCursorPlugin
public AbstractCursorPlugin(String name)
- Parameters:
name
- The display name of this plugin.
-
-
Method Detail
-
chartConnected
protected void chartConnected(Chart chart)
Description copied from class:Plugin
Called when the plugin is added to a chart.Can be overridden by concrete implementations to register e.g. mouse listeners or perform any other initializations.
- Overrides:
chartConnected
in classAbstractBoundedPlugin
- Parameters:
chart
- The chart to which the plugin has been added.
-
chartDisconnected
protected void chartDisconnected(Chart chart)
Description copied from class:Plugin
Called when the plugin has been removed from the chart.Can be overridden by concrete implementations to unbind listeners and perform any other cleanup operations.
- Overrides:
chartDisconnected
in classAbstractBoundedPlugin
- Parameters:
chart
- The chart from which the plugin has been removed.
-
dragDetected
protected abstract void dragDetected(MouseEvent e)
Called when a drag gesture is detected.- Parameters:
e
- TheMouseEvent
associated with the gesture.
-
getSceneMouseLocation
protected Point2D getSceneMouseLocation()
- Returns:
- The current mouse location in scene coordinate system or
null
if the mouse cursor is not inside the chart.
-
mouseEntered
protected void mouseEntered(MouseEvent e)
Called when mouse enters the chart. Current implementation adds themouseMoveHandler
to the chart.- Parameters:
e
- TheMouseEvent
when mouse entered the chart.
-
mouseExited
protected void mouseExited(MouseEvent e)
Called when mouse exits the chart. Current implementation removes themouseMoveHandler
from the chart.- Parameters:
e
- TheMouseEvent
when mouse exited the chart.
-
mouseMove
protected void mouseMove(MouseEvent e)
Called when mouse moves inside the chart. Current implementation stores intosceneMouseLocation
the current mouse location in scene coordinate system.- Parameters:
e
- TheMouseEvent
when mouse moved inside the chart.
-
-