Package adams.gui.visualization.instance
Class ReportColorInstancePaintlet
- 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.instance.AbstractInstancePaintlet
-
- adams.gui.visualization.instance.InstanceLinePaintlet
-
- adams.gui.visualization.instance.ReportColorInstancePaintlet
-
- 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 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.gui.visualization.instance.InstanceLinePaintlet
InstanceLinePaintlet.MarkerShape
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.data.report.Field
m_ColorField
the report field to get the color from.protected Color
m_DefaultColor
the default color to use if no color found in report.protected boolean
m_UpdateContainerColor
whether to update the color of the container.-
Fields inherited from class adams.gui.visualization.instance.InstanceLinePaintlet
m_AlwaysShowMarkers, m_AntiAliasingEnabled, m_MarkerExtent, m_MarkersEnabled
-
-
Constructor Summary
Constructors Constructor Description ReportColorInstancePaintlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
colorFieldTipText()
Returns the tip text for this property.String
defaultColorTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.Color
getColor(int index)
Returns the color for the data with the given index.adams.data.report.Field
getColorField()
Returns the report field that contains the color.Color
getDefaultColor()
Returns the default color to use when no color information in the report.boolean
getUpdateContainerColor()
Returns whether to update the container's color with the color determined by this paintlet.String
globalInfo()
Returns a string describing the object.void
setColorField(adams.data.report.Field value)
Sets the report field that contains the color.void
setDefaultColor(Color value)
Sets the default color to use when no color information in the report.void
setUpdateContainerColor(boolean value)
Sets whether to update the container's color with the color determined by this paintlet.String
updateContainerColorTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.instance.InstanceLinePaintlet
alwaysShowMarkersTipText, antiAliasingEnabledTipText, doPerformPaint, drawData, getAlwaysShowMarkers, getMarkerExtent, getMarkerShape, isAntiAliasingEnabled, isMarkersDisabled, markerExtentTipText, markersDisabledTipText, setAlwaysShowMarkers, setAntiAliasingEnabled, setMarkerExtent, setMarkersDisabled
-
Methods inherited from class adams.gui.visualization.instance.AbstractInstancePaintlet
getInstancePanel, getPaintMoment
-
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, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_ColorField
protected adams.data.report.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.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Overrides:
globalInfo
in classInstanceLinePaintlet
- 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 classInstanceLinePaintlet
-
setColorField
public void setColorField(adams.data.report.Field value)
Sets the report field that contains the color.- Parameters:
value
- the field
-
getColorField
public adams.data.report.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 classInstanceLinePaintlet
- Parameters:
index
- the index of the spectrum- Returns:
- the color for the spectrum
-
-