Package adams.gui.visualization.core
Class HorizontalIndicatorPaintlet
- 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.core.HorizontalIndicatorPaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,Paintlet
,Serializable
- Direct Known Subclasses:
HorizontalIndicator
public class HorizontalIndicatorPaintlet extends AbstractStrokePaintlet
Paintlet for painting a horizontal indicator line.- Version:
- $Revision$
- 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 of the indicator.protected boolean
m_Percentage
whether the value represents a percentage (0-1).protected double
m_Value
the value where to paint the indicator.-
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
-
-
Constructor Summary
Constructors Constructor Description HorizontalIndicatorPaintlet()
-
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, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.Color
getColor()
Returns the indicator for the indicator.PaintEvent.PaintMoment
getPaintMoment()
Returns when this paintlet is to be executed.boolean
getPercentage()
Returns whether the y-value represents a percentage (0-1) instead of an absolute value.double
getValue()
Returns the y-value the indicator to paint on.String
globalInfo()
Returns a string describing the object.String
percentageTipText()
Returns the tip text for this property.void
setColor(Color value)
Sets the color for the indicator.void
setPercentage(boolean value)
Sets whether the y-value represents a percentage (0-1) instead of an absolute value.void
setValue(double value)
Sets the y-value the indicator paints.String
valueTipText()
Returns the tip text for this property.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Color
protected Color m_Color
the color of the indicator.
-
m_Value
protected double m_Value
the value where to paint the indicator.
-
m_Percentage
protected boolean m_Percentage
whether the value represents a percentage (0-1).
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractStrokePaintlet
-
setColor
public void setColor(Color value)
Sets the color for the indicator.- Parameters:
value
- the color
-
getColor
public Color getColor()
Returns the indicator for the indicator.- 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.
-
setValue
public void setValue(double value)
Sets the y-value the indicator paints.- Parameters:
value
- the y-value
-
getValue
public double getValue()
Returns the y-value the indicator to paint on.- Returns:
- the y-value
-
valueTipText
public String valueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPercentage
public void setPercentage(boolean value)
Sets whether the y-value represents a percentage (0-1) instead of an absolute value.- Parameters:
value
- true if percentage
-
getPercentage
public boolean getPercentage()
Returns whether the y-value represents a percentage (0-1) instead of an absolute value.- Returns:
- true if percentage
-
percentageTipText
public String percentageTipText()
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 PaintEvent.PaintMoment getPaintMoment()
Returns when this paintlet is to be executed.- Specified by:
getPaintMoment
in interfacePaintlet
- Specified by:
getPaintMoment
in classAbstractPaintlet
- Returns:
- when this paintlet is to be executed
-
doPerformPaint
protected void doPerformPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.- Specified by:
doPerformPaint
in classAbstractStrokePaintlet
- Parameters:
g
- the graphics context to use for paintingmoment
- whatPaintEvent.PaintMoment
is currently being painted
-
-