Module xaos.ui.plot

Class Plugins


  • public class Plugins
    extends Object
    This class consists exclusively of static methods that return Chart's plugins.
    Author:
    claudio.rosati@esss.se
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Plugin abscissaCursorDisplay()
      Returns a plugin displaying at the CursorDisplay.Position.BOTTOM the abscissa value at mouse cursor position.
      static Plugin abscissaCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
      Returns a plugin displaying at the given position the abscissa value at mouse cursor position.
      static Plugin abscissaCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position, Format formatter)
      Returns a plugin displaying at the given position the abscissa value at mouse cursor position, using the given formatter to format the abscissa value.
      static Plugin[] all()
      Returns all available Plugins, in the right order.
      static Plugin areaValueCursorDisplay()
      Returns a plugin displaying at the CursorDisplay.Position.TOP the chart area value under mouse cursor position.
      static Plugin areaValueCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
      Returns a plugin displaying at the given position the chart area value under mouse cursor position.
      static Plugin areaValueCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position, Format formatter)
      Returns a plugin displaying at the given position the chart area value under mouse cursor position, using the given formatter to format the area value.
      static Plugin cursorLines()
      Returns a plugin that shows horizontal and vertical lines drawn on the plot area, crossing at the mouse cursor location.
      static Plugin dataPointCursorDisplay()
      Returns a plugin displaying at the CursorDisplay.Position.CENTER the coordinates of the closest chart data point at mouse cursor position.
      static Plugin dataPointCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
      Returns a plugin displaying at the given position the coordinates of the closest chart data point at mouse cursor position.
      static Plugin dataPointCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position, Format formatter)
      Returns a plugin displaying at the given position the coordinates of the closest chart data point at mouse cursor position, using the given formatter to format the abscissa and ordinate values of the picked chart data point.
      static <X,​Y>
      Plugin
      errorBars​(ErrorSeries<X,​Y> data, int seriesIndex)
      Returns a plugin that shows horizontal and vertical error bars around chart data points.
      static Plugin keyboardAccelerators()
      Returns a plugin that allow panner and zoom operations to be performed using keyboards accelerators (Shortcut stands for Ctrl on Windows or Linux, and Command on macOS):   Panner DownShortcut+DOWN Panner LeftShortcut+LEFT Panner RightShortcut+RIGHT Panner UpShortcut+UP RedoShift+Shortcut+Z UndoShortcut+Z Zoom InShift+Shortcut+UP Zoom OutShift+Shortcut+DOWN Zoom To OneShortcut+EQUALS
      static Plugin navigator()
      Returns a plugin that opens a NavigatorPopup when ALT key is pressed within the chart.
      static Plugin ordinateCursorDisplay()
      Returns a plugin displaying at the CursorDisplay.Position.BOTTOM the ordinate value at mouse cursor position.
      static Plugin ordinateCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
      Returns a plugin displaying at the given position the ordinate value at mouse cursor position.
      static Plugin ordinateCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position, Format formatter)
      Returns a plugin displaying at the given position the ordinate value at mouse cursor position, using the given formatter to format the ordinate value.
      static Plugin panner()
      Return a plugin that allows panning-by-dragging operation on both axis.
      static Plugin panner​(AxisConstrained.AxisConstraints constraints)
      Return a plugin that allows panning-by-dragging operation along the specified axis.
      static Plugin zoomer()
      Return a plugin that allows zooming-by-dragging operation along the specified axis.
      static Plugin zoomer​(AxisConstrained.AxisConstraints constraints)
      Return a plugin that allows zooming-by-dragging operation along the specified axis.
      static Plugin zoomer​(AxisConstrained.AxisConstraints constraints, boolean animated)
      Return a plugin that allows zooming-by-dragging operation along the specified axis.
    • Method Detail

      • abscissaCursorDisplay

        public static Plugin abscissaCursorDisplay()
        Returns a plugin displaying at the CursorDisplay.Position.BOTTOM the abscissa value at mouse cursor position.
        Returns:
        An abscissa cursor display.
      • abscissaCursorDisplay

        public static Plugin abscissaCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
        Returns a plugin displaying at the given position the abscissa value at mouse cursor position.
        Parameters:
        position - Where the abscissa value must be displayed.
        Returns:
        An abscissa cursor display.
      • abscissaCursorDisplay

        public static Plugin abscissaCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position,
                                                   Format formatter)
        Returns a plugin displaying at the given position the abscissa value at mouse cursor position, using the given formatter to format the abscissa value.
        Parameters:
        position - Where the abscissa value must be displayed.
        formatter - The formatter used to format the abscissa value.
        Returns:
        An abscissa cursor display.
      • areaValueCursorDisplay

        public static Plugin areaValueCursorDisplay()
        Returns a plugin displaying at the CursorDisplay.Position.TOP the chart area value under mouse cursor position.
        Returns:
        An abscissa cursor display.
      • areaValueCursorDisplay

        public static Plugin areaValueCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
        Returns a plugin displaying at the given position the chart area value under mouse cursor position.
        Parameters:
        position - Where the chart area value must be displayed.
        Returns:
        An abscissa cursor display.
      • areaValueCursorDisplay

        public static Plugin areaValueCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position,
                                                    Format formatter)
        Returns a plugin displaying at the given position the chart area value under mouse cursor position, using the given formatter to format the area value.
        Parameters:
        position - Where the chart area value must be displayed.
        formatter - The formatter used to format the abscissa and ordinate values of the picked chart data point.
        Returns:
        An abscissa cursor display.
      • cursorLines

        public static Plugin cursorLines()
        Returns a plugin that shows horizontal and vertical lines drawn on the plot area, crossing at the mouse cursor location.
        Returns:
        A cursor lines plugin.
      • dataPointCursorDisplay

        public static Plugin dataPointCursorDisplay()
        Returns a plugin displaying at the CursorDisplay.Position.CENTER the coordinates of the closest chart data point at mouse cursor position.
        Returns:
        An abscissa cursor display.
      • dataPointCursorDisplay

        public static Plugin dataPointCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
        Returns a plugin displaying at the given position the coordinates of the closest chart data point at mouse cursor position.
        Parameters:
        position - Where the chart data point must be displayed.
        Returns:
        An abscissa cursor display.
      • dataPointCursorDisplay

        public static Plugin dataPointCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position,
                                                    Format formatter)
        Returns a plugin displaying at the given position the coordinates of the closest chart data point at mouse cursor position, using the given formatter to format the abscissa and ordinate values of the picked chart data point.
        Parameters:
        position - Where the chart data point must be displayed.
        formatter - The formatter used to format the abscissa and ordinate values of the picked chart data point.
        Returns:
        An abscissa cursor display.
      • errorBars

        public static <X,​Y> Plugin errorBars​(ErrorSeries<X,​Y> data,
                                                   int seriesIndex)
        Returns a plugin that shows horizontal and vertical error bars around chart data points.
        Type Parameters:
        X - Type of X values.
        Y - Type of Y values.
        Parameters:
        data - List of error data to be displayed in chart.
        seriesIndex - Index of the series to which the error data should be added to.
        Returns:
        An error bar plugin.
      • keyboardAccelerators

        public static Plugin keyboardAccelerators()
        Returns a plugin that allow panner and zoom operations to be performed using keyboards accelerators (Shortcut stands for Ctrl on Windows or Linux, and Command on macOS):
         
        Panner DownShortcut+DOWN
        Panner LeftShortcut+LEFT
        Panner RightShortcut+RIGHT
        Panner UpShortcut+UP
        RedoShift+Shortcut+Z
        UndoShortcut+Z
        Zoom InShift+Shortcut+UP
        Zoom OutShift+Shortcut+DOWN
        Zoom To OneShortcut+EQUALS
        Returns:
        A navigator plugin.
      • navigator

        public static Plugin navigator()
        Returns a plugin that opens a NavigatorPopup when ALT key is pressed within the chart.

        The popup can be opened pressing ALT on a focused chart. If the popup is still opened, pressing ALT again will move it under the current mouse cursor position. The popup can be closed pressing ESC or clicking outside it.

        Once the popup is open, buttons can be navigated with TAB, and pressing SPACE/ENTER will press the button. Button can be activated pressing keyboard accelerators (Shortcut stands for Ctrl on Windows or Linux, and Command on macOS):

         
        Panner DownShortcut+DOWN
        Panner LeftShortcut+LEFT
        Panner RightShortcut+RIGHT
        Panner UpShortcut+UP
        RedoShift+Shortcut+Z
        UndoShortcut+Z
        Zoom InShift+Shortcut+UP
        Zoom OutShift+Shortcut+DOWN
        Zoom To OneShortcut+EQUALS
        Returns:
        A navigator plugin.
      • ordinateCursorDisplay

        public static Plugin ordinateCursorDisplay()
        Returns a plugin displaying at the CursorDisplay.Position.BOTTOM the ordinate value at mouse cursor position.
        Returns:
        An ordinate cursor display.
      • ordinateCursorDisplay

        public static Plugin ordinateCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position)
        Returns a plugin displaying at the given position the ordinate value at mouse cursor position.
        Parameters:
        position - Where the ordinate value must be displayed.
        Returns:
        An ordinate cursor display.
      • ordinateCursorDisplay

        public static Plugin ordinateCursorDisplay​(eu.ess.xaos.ui.plot.plugins.impl.CursorDisplay.Position position,
                                                   Format formatter)
        Returns a plugin displaying at the given position the ordinate value at mouse cursor position, using the given formatter to format the ordinate value.
        Parameters:
        position - Where the ordinate value must be displayed.
        formatter - The formatter used to format the ordinate value.
        Returns:
        An ordinate cursor display.
      • panner

        public static Plugin panner()
        Return a plugin that allows panning-by-dragging operation on both axis.

        Pressing SHIFT when panning will restrict the movements to X_ONLY or Y_ONLY according to the direction of the initial movement of the gesture.

        Scroll can be performed with a track-pad or a mouse wheel. Shift will lock the scroll on the prominent axis, while Shortcut (Command on macOS, Ctrl on Windows and Linux) will swap the axis (so with a mouse wheel will be possible to scroll on both axis).

        Returns:
        A panner plugin.
      • panner

        public static Plugin panner​(AxisConstrained.AxisConstraints constraints)
        Return a plugin that allows panning-by-dragging operation along the specified axis.

        If constraints parameter is set to X_AND_Y, then pressing SHIFT when panning will restrict the movement to X_ONLY or Y_ONLY according to the direction of the initial movement of the gesture.

        Scroll can be performed with a track-pad or a mouse wheel. Shift will lock the scroll on the prominent axis, while Shortcut (Command on macOS, Ctrl on Windows and Linux) will swap the axis (so with a mouse wheel will be possible to scroll on both axis).

        Parameters:
        constraints - Initial value for the panner plugin's constraints property.
        Returns:
        A panner plugin.
      • zoomer

        public static Plugin zoomer()
        Return a plugin that allows zooming-by-dragging operation along the specified axis.

        The plugin is activated by pressing SHORTCUT (COMMAND on macOS, CTRL on Windows and Linux) and then dragging the rectangle to zoom in, or double-clicking to auto-scale.

        Pressing also SHIFT will constrain zooming on a single axis according to the longest side of the drawn rectangle.

        Returns:
        A zoomer plugin.
      • zoomer

        public static Plugin zoomer​(AxisConstrained.AxisConstraints constraints)
        Return a plugin that allows zooming-by-dragging operation along the specified axis.

        The plugin is activated by pressing SHORTCUT (COMMAND on macOS, CTRL on Windows and Linux) and then dragging the rectangle to zoom in, or double-clicking to auto-scale.

        Pressing also SHIFT will constrain zooming on a single axis according to the longest side of the drawn rectangle.

        Parameters:
        constraints - Initial value for the constraints property.
        Returns:
        A zoomer plugin.
      • zoomer

        public static Plugin zoomer​(AxisConstrained.AxisConstraints constraints,
                                    boolean animated)
        Return a plugin that allows zooming-by-dragging operation along the specified axis.

        The plugin is activated by pressing SHORTCUT (COMMAND on macOS, CTRL on Windows and Linux) and then dragging the rectangle to zoom in, or double-clicking to auto-scale.

        Pressing also SHIFT will constrain zooming on a single axis according to the longest side of the drawn rectangle.

        Parameters:
        constraints - Initial value for the constraints property.
        animated - true if the zoom must be animated, false otherwise.
        Returns:
        A zoomer plugin.