Package adams.gui.visualization.spectrum
Class SpectrumPaintletNumericField
- 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.SpectrumPaintlet
-
- adams.gui.visualization.spectrum.SpectrumPaintletNumericField
-
- 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.core.AntiAliasingSupporter,adams.gui.visualization.core.Paintlet,adams.gui.visualization.core.PaintletWithMarkers,Serializable
public class SpectrumPaintletNumericField extends SpectrumPaintlet
Paintlet for painting the spectral graph. Colors are determined by the value of the specified numeric field in the report.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.gui.visualization.spectrum.SpectrumPaintlet
SpectrumPaintlet.MarkerShape
-
-
Field Summary
Fields Modifier and Type Field Description protected Color[]m_Colorsthe colors.protected Colorm_DefaultColorthe default color if field is missing.protected adams.data.report.Fieldm_Fieldthe report field to get the numeric value from.protected adams.gui.visualization.core.ColorGradientGeneratorm_Generatorthe color gradient generator to use.-
Fields inherited from class adams.gui.visualization.spectrum.SpectrumPaintlet
m_AlwaysShowMarkers, m_AntiAliasingEnabled, m_MarkerExtent, m_MarkersEnabled, m_PaintAll
-
-
Constructor Summary
Constructors Constructor Description SpectrumPaintletNumericField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdefaultColorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringfieldTipText()Returns the tip text for this property.StringgeneratorTipText()Returns the tip text for this property.ColorgetColor(int index)Returns the color for the data with the given index.ColorgetDefaultColor()Returns the default color to use when then report field is missing or invalid.adams.data.report.FieldgetField()Returns the numeric field to determine the color with.adams.gui.visualization.core.ColorGradientGeneratorgetGenerator()Returns the color gradient generator to use.StringglobalInfo()Returns a string describing the object.protected voidreset()Resets the scheme.voidsetDefaultColor(Color value)Sets the default color to use when then report field is missing or invalid.voidsetField(adams.data.report.Field value)Sets the numeric field to determine the color with.voidsetGenerator(adams.gui.visualization.core.ColorGradientGenerator value)Sets the color gradient generator to use.-
Methods inherited from class adams.gui.visualization.spectrum.SpectrumPaintlet
alwaysShowMarkersTipText, antiAliasingEnabledTipText, doPerformPaint, drawData, getAlwaysShowMarkers, getMarkerExtent, getMarkerShape, getPaintAll, getPaintMoment, getSpectrumPanel, isAntiAliasingEnabled, isMarkersDisabled, markerExtentTipText, markersDisabledTipText, paintAllTipText, setAlwaysShowMarkers, setAntiAliasingEnabled, setMarkerExtent, setMarkersDisabled, setPaintAll
-
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, initialize, 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, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Field
protected adams.data.report.Field m_Field
the report field to get the numeric value from.
-
m_Generator
protected adams.gui.visualization.core.ColorGradientGenerator m_Generator
the color gradient generator to use.
-
m_DefaultColor
protected Color m_DefaultColor
the default color if field is missing.
-
m_Colors
protected transient Color[] m_Colors
the colors.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Overrides:
globalInfoin classSpectrumPaintlet- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classSpectrumPaintlet
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classadams.core.option.AbstractOptionHandler
-
setField
public void setField(adams.data.report.Field value)
Sets the numeric field to determine the color with.- Parameters:
value- the numeric field
-
getField
public adams.data.report.Field getField()
Returns the numeric field to determine the color with.- Returns:
- the numeric field
-
fieldTipText
public String fieldTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setGenerator
public void setGenerator(adams.gui.visualization.core.ColorGradientGenerator value)
Sets the color gradient generator to use.- Parameters:
value- the generator
-
getGenerator
public adams.gui.visualization.core.ColorGradientGenerator getGenerator()
Returns the color gradient generator to use.- Returns:
- the generator
-
generatorTipText
public String generatorTipText()
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 then report field is missing or invalid.- Parameters:
value- the color
-
getDefaultColor
public Color getDefaultColor()
Returns the default color to use when then report field is missing or invalid.- 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.
-
getColor
public Color getColor(int index)
Returns the color for the data with the given index.- Overrides:
getColorin classSpectrumPaintlet- Parameters:
index- the index of the spectrum- Returns:
- the color for the spectrum
-
-