Class SelectedWaveNumberPaintlet

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.gui.visualization.core.Paintlet>, adams.core.SizeOfHandler, adams.gui.visualization.core.Paintlet, Serializable

    public class SelectedWaveNumberPaintlet
    extends AbstractSpectrumPaintlet
    Paintlet for highlighting a selected SpectrumPoint point on a panel.

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
     
    -stroke-thickness <float> (property: strokeThickness)
        The thickness of the stroke.
        default: 1.0
        minimum: 0.01
     
    -color <java.awt.Color> (property: color)
        The color of the selected wave number.
        default: #ff0000
     
    Version:
    $Revision: 2242 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Color m_Color
      the color to paint the point with.
      protected SpectrumPoint m_Point
      the point to paint.
      • Fields inherited from class adams.gui.visualization.core.AbstractStrokePaintlet

        m_StrokeThickness
      • Fields inherited from class adams.gui.visualization.core.AbstractPaintlet

        m_Enabled, m_Initializing, m_Panel, m_RepaintOnChange
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String colorTipText()
      Returns the tip text for this property.
      void defineOptions()
      Adds options to the internal list of options.
      protected void doPerformPaint​(Graphics g, adams.gui.event.PaintEvent.PaintMoment moment)
      The paint routine of the paintlet.
      Color getColor()
      Returns the currently set color to paint the point with.
      adams.gui.event.PaintEvent.PaintMoment getPaintMoment()
      Returns when this paintlet is to be executed.
      SpectrumPoint getPoint()
      Returns the currently set point to highlight.
      String globalInfo()
      Returns a string describing the object.
      protected void initialize()
      Initializes the members.
      void setColor​(Color value)
      Sets the color to paint the point with.
      void setPoint​(SpectrumPoint value)
      Sets the point to highlight, automatically repaints the panel.
      • Methods inherited from class adams.gui.visualization.container.AbstractDataContainerPaintlet

        getDataContainerPanel
      • Methods inherited from class adams.gui.visualization.core.AbstractStrokePaintlet

        applyStroke, getStrokeThickness, getStrokeWidth, performPaint, setStrokeThickness, strokeThicknessTipText
      • Methods inherited from class adams.gui.visualization.core.AbstractPaintlet

        canPaint, finishInit, forCommandLine, forName, getPaintlets, getPanel, getPlot, getRepaintOnChange, hasPanel, isEnabled, isInitializing, memberChanged, memberChanged, paint, repaint, setEnabled, setPanel, setPanel, setRepaintOnChange, shallowCopy, shallowCopy, updatePanel
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Color

        protected Color m_Color
        the color to paint the point with.
    • Constructor Detail

      • SelectedWaveNumberPaintlet

        public SelectedWaveNumberPaintlet()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.gui.visualization.core.AbstractStrokePaintlet
      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.visualization.core.AbstractPaintlet
      • setPoint

        public void setPoint​(SpectrumPoint value)
        Sets the point to highlight, automatically repaints the panel.
        Parameters:
        value - the point to highlight
      • getPoint

        public SpectrumPoint getPoint()
        Returns the currently set point to highlight.
        Returns:
        the point
      • setColor

        public void setColor​(Color value)
        Sets the color to paint the point with.
        Parameters:
        value - the color
      • getColor

        public Color getColor()
        Returns the currently set color to paint the point with.
        Returns:
        the color
      • colorTipText

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

        public adams.gui.event.PaintEvent.PaintMoment getPaintMoment()
        Returns when this paintlet is to be executed.
        Specified by:
        getPaintMoment in interface adams.gui.visualization.core.Paintlet
        Specified by:
        getPaintMoment in class adams.gui.visualization.core.AbstractPaintlet
        Returns:
        when this paintlet is to be executed
      • doPerformPaint

        protected void doPerformPaint​(Graphics g,
                                      adams.gui.event.PaintEvent.PaintMoment moment)
        The paint routine of the paintlet.
        Specified by:
        doPerformPaint in class adams.gui.visualization.core.AbstractStrokePaintlet
        Parameters:
        g - the graphics context to use for painting
        moment - what PaintEvent.PaintMoment is currently being painted