Class ErrorArrayForm

  • All Implemented Interfaces:
    ModePlotter.Form, ShapeForm

    public class ErrorArrayForm
    extends java.lang.Object
    implements ShapeForm
    Form for drawing an array of error bars per row, given array-valued X, Y and X/Y error offsets. Currently only supports X-Y plotting.
    Since:
    27 Jan 2021
    Author:
    Mark Taylor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ErrorArrayForm XY
      ErrorArrayForm instance for X, Y error bars.
      static ErrorArrayForm Y
      ErrorArrayForm instance for Y-only error bars.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ErrorArrayForm​(boolean hasX)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DataGeom adjustGeom​(DataGeom geom)
      Provides a DataGeom to be used by the layer this form makes, given a DataGeom that characterises the plotting environment.
      Outliner createOutliner​(ConfigMap config)
      Returns an object which will do the work of drawing shapes when supplied with the appropriate style information and data.
      ConfigKey<?>[] getConfigKeys()
      Returns style configuration keys specific to this form.
      Coord[] getExtraCoords()
      Returns data coordinates additional to the basic position which are required to plot a point.
      java.lang.String getFormDescription()
      Returns a description of this mode as an XML string.
      javax.swing.Icon getFormIcon()
      Returns an icon to identify this form in the GUI.
      java.lang.String getFormName()
      Returns the user-directed name for this form.
      int getPositionCount()
      Returns the number of data positions per tuple used by this form.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Y

        public static final ErrorArrayForm Y
        ErrorArrayForm instance for Y-only error bars.
      • XY

        public static final ErrorArrayForm XY
        ErrorArrayForm instance for X, Y error bars.
    • Constructor Detail

      • ErrorArrayForm

        protected ErrorArrayForm​(boolean hasX)
        Constructor.
        Parameters:
        hasX - whether error bars on the X axis are provided as well as on the Y axis
    • Method Detail

      • getPositionCount

        public int getPositionCount()
        Description copied from interface: ShapeForm
        Returns the number of data positions per tuple used by this form.
        Specified by:
        getPositionCount in interface ShapeForm
        Returns:
        number of sets of positional coordinates
      • getFormName

        public java.lang.String getFormName()
        Description copied from interface: ModePlotter.Form
        Returns the user-directed name for this form.
        Specified by:
        getFormName in interface ModePlotter.Form
        Returns:
        form name
      • getFormDescription

        public java.lang.String getFormDescription()
        Description copied from interface: ShapeForm
        Returns a description of this mode as an XML string. The return value should be one or more <p> elements.
        Specified by:
        getFormDescription in interface ShapeForm
        Returns:
        XML description of form
      • getFormIcon

        public javax.swing.Icon getFormIcon()
        Description copied from interface: ModePlotter.Form
        Returns an icon to identify this form in the GUI.
        Specified by:
        getFormIcon in interface ModePlotter.Form
        Returns:
        form icon
      • getExtraCoords

        public Coord[] getExtraCoords()
        Description copied from interface: ShapeForm
        Returns data coordinates additional to the basic position which are required to plot a point.
        Specified by:
        getExtraCoords in interface ShapeForm
        Returns:
        additional plot coordinates
      • adjustGeom

        public DataGeom adjustGeom​(DataGeom geom)
        Description copied from interface: ShapeForm
        Provides a DataGeom to be used by the layer this form makes, given a DataGeom that characterises the plotting environment. The output should be similar to the input, for instance implementing the same plotType-specific DataGeom subtype.

        In most cases the supplied instance can be returned unchanged, but instances with special requirements may want to adjust how the data is interpreted.

        Specified by:
        adjustGeom in interface ShapeForm
        Parameters:
        geom - context geom
        Returns:
        geom to use for data interpretation, the same or similar to the input
      • createOutliner

        public Outliner createOutliner​(ConfigMap config)
        Description copied from interface: ShapeForm
        Returns an object which will do the work of drawing shapes when supplied with the appropriate style information and data. The significant keys in the supplied config map are those given by ShapeForm.getConfigKeys().
        Specified by:
        createOutliner in interface ShapeForm
        Parameters:
        config - configuration map from which values for this form's config keys will be extracted
        Returns:
        new outliner object