Class ReportColorInstancePaintlet

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, ShallowCopySupporter<Paintlet>, SizeOfHandler, AntiAliasingSupporter, Paintlet, PaintletWithMarkers, Serializable

    public class ReportColorInstancePaintlet
    extends InstanceLinePaintlet
    Paintlet for generating a line plot using the color stored in the report.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -stroke-thickness <float> (property: strokeThickness)
        The thickness of the stroke.
        default: 1.0
        minimum: 0.01
     
    -markers-extent <int> (property: markerExtent)
        The size of the markers in pixels.
        default: 7
        minimum: 0
     
    -markers-disabled <boolean> (property: markersDisabled)
        If set to true, the markers are disabled.
        default: false
     
    -always-show-markers <boolean> (property: alwaysShowMarkers)
        If set to true, the markers are always displayed, not just when zoomed in.
        default: true
     
    -anti-aliasing-enabled <boolean> (property: antiAliasingEnabled)
        If enabled, uses anti-aliasing for drawing lines.
        default: true
     
    -color-field <adams.data.report.Field> (property: colorField)
        The report field that contains the color information.
        default: Color[S]
     
    -default-color <java.awt.Color> (property: defaultColor)
        The default color to use if no color information in the report.
        default: #000000
     
    -update-container-color <boolean> (property: updateContainerColor)
        If enabled, the color of the container gets updated with the color determined 
        by this paintlet.
        default: false
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ColorField

        protected Field m_ColorField
        the report field to get the color from.
      • m_DefaultColor

        protected Color m_DefaultColor
        the default color to use if no color found in report.
      • m_UpdateContainerColor

        protected boolean m_UpdateContainerColor
        whether to update the color of the container.
    • Constructor Detail

      • ReportColorInstancePaintlet

        public ReportColorInstancePaintlet()
    • Method Detail

      • setColorField

        public void setColorField​(Field value)
        Sets the report field that contains the color.
        Parameters:
        value - the field
      • getColorField

        public Field getColorField()
        Returns the report field that contains the color.
        Returns:
        the field
      • colorFieldTipText

        public String colorFieldTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setDefaultColor

        public void setDefaultColor​(Color value)
        Sets the default color to use when no color information in the report.
        Parameters:
        value - the color
      • getDefaultColor

        public Color getDefaultColor()
        Returns the default color to use when no color information in the report.
        Returns:
        the color
      • defaultColorTipText

        public String defaultColorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setUpdateContainerColor

        public void setUpdateContainerColor​(boolean value)
        Sets whether to update the container's color with the color determined by this paintlet.
        Parameters:
        value - true if to update
      • getUpdateContainerColor

        public boolean getUpdateContainerColor()
        Returns whether to update the container's color with the color determined by this paintlet.
        Returns:
        true if to update
      • updateContainerColorTipText

        public String updateContainerColorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getColor

        public Color getColor​(int index)
        Returns the color for the data with the given index.
        Overrides:
        getColor in class InstanceLinePaintlet
        Parameters:
        index - the index of the spectrum
        Returns:
        the color for the spectrum