Module xaos.ui.plot

Class AbstractCursorPlugin


  • public abstract class AbstractCursorPlugin
    extends AbstractBoundedPlugin
    Abstract class base of all cursor plugins.
    Author:
    claudio.rosati@esss.se
    • 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 class AbstractBoundedPlugin
        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 class AbstractBoundedPlugin
        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 - The MouseEvent 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 the mouseMoveHandler to the chart.
        Parameters:
        e - The MouseEvent when mouse entered the chart.
      • mouseExited

        protected void mouseExited​(MouseEvent e)
        Called when mouse exits the chart. Current implementation removes the mouseMoveHandler from the chart.
        Parameters:
        e - The MouseEvent when mouse exited the chart.
      • mouseMove

        protected void mouseMove​(MouseEvent e)
        Called when mouse moves inside the chart. Current implementation stores into sceneMouseLocation the current mouse location in scene coordinate system.
        Parameters:
        e - The MouseEvent when mouse moved inside the chart.