Package adams.gui.visualization.spectrum
Class SelectedWaveNumberPaintlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AbstractPaintlet
-
- adams.gui.visualization.core.AbstractStrokePaintlet
-
- adams.gui.visualization.container.AbstractDataContainerPaintlet
-
- adams.gui.visualization.spectrum.AbstractSpectrumPaintlet
-
- adams.gui.visualization.spectrum.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.
-
Constructor Summary
Constructors Constructor Description SelectedWaveNumberPaintlet()
-
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.spectrum.AbstractSpectrumPaintlet
getSequencePanel
-
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
-
-
-
-
Field Detail
-
m_Point
protected SpectrumPoint m_Point
the point to paint.
-
m_Color
protected Color m_Color
the color to paint the point with.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.gui.visualization.core.AbstractStrokePaintlet
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.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 interfaceadams.gui.visualization.core.Paintlet
- Specified by:
getPaintMoment
in classadams.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 classadams.gui.visualization.core.AbstractStrokePaintlet
- Parameters:
g
- the graphics context to use for paintingmoment
- whatPaintEvent.PaintMoment
is currently being painted
-
-