Class FixedTimestampPaintlet
- 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.timeseries.AbstractTimeseriesPaintlet
-
- adams.gui.visualization.timeseries.FixedTimestampPaintlet
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<Paintlet>,SizeOfHandler,Paintlet,Serializable
public class FixedTimestampPaintlet extends AbstractTimeseriesPaintlet
Paintlet for highlighting a specific timestamp with a vertical indicator line.
-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
-timestamp <adams.core.base.BaseDateTime> (property: timestamp) The timestamp to indicate. default: NOW
-prefix <java.lang.String> (property: prefix) The prefix to use for the date label printed next to the indicator. default:
-offset-x <int> (property: offsetX) The number of pixels to offset the string from the left of the indicator. default: 10
-offset-y <int> (property: offsetY) The number of pixels to offset the string from the top of the panel. default: 10 minimum: 0
-color <java.awt.Color> (property: color) The color of the indicator/text. default: #ff0000
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe color to paint the point with.protected intm_OffsetXthe pixel offset from the left.protected intm_OffsetYthe pixel offset from the top.protected Stringm_Prefixthe prefix for the date label.protected BaseDateTimem_Timestampthe timestamp to indicate.-
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 FixedTimestampPaintlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected voiddoPerformPaint(Graphics g, PaintEvent.PaintMoment moment)The paint routine of the paintlet.ColorgetColor()Returns the currently set color to paint the point with.intgetOffsetX()Returns the pixel offset from the left.intgetOffsetY()Returns the pixel offset from the top.PaintEvent.PaintMomentgetPaintMoment()Returns when this paintlet is to be executed.StringgetPrefix()Returns the currently set prefix for the date label.BaseDateTimegetTimestamp()Returns the currently set timestamp to indicate.StringglobalInfo()Returns a string describing the object.StringoffsetXTipText()Returns the tip text for this property.StringoffsetYTipText()Returns the tip text for this property.StringprefixTipText()Returns the tip text for this property.voidsetColor(Color value)Sets the color to paint the point with.voidsetOffsetX(int value)Sets the pixel offset from the left.voidsetOffsetY(int value)Sets the pixel offset from the top.voidsetPrefix(String value)Sets the prefix for the date label.voidsetTimestamp(BaseDateTime value)Sets the timestamp to indicate.StringtimestampTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.timeseries.AbstractTimeseriesPaintlet
getTimeseriesPanel
-
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
-
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_Timestamp
protected BaseDateTime m_Timestamp
the timestamp to indicate.
-
m_Prefix
protected String m_Prefix
the prefix for the date label.
-
m_OffsetY
protected int m_OffsetY
the pixel offset from the top.
-
m_OffsetX
protected int m_OffsetX
the pixel offset from the left.
-
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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractStrokePaintlet
-
setTimestamp
public void setTimestamp(BaseDateTime value)
Sets the timestamp to indicate.- Parameters:
value- the timestamp
-
getTimestamp
public BaseDateTime getTimestamp()
Returns the currently set timestamp to indicate.- Returns:
- the timestamp
-
timestampTipText
public String timestampTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPrefix
public void setPrefix(String value)
Sets the prefix for the date label.- Parameters:
value- the prefix
-
getPrefix
public String getPrefix()
Returns the currently set prefix for the date label.- Returns:
- the prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOffsetX
public void setOffsetX(int value)
Sets the pixel offset from the left.- Parameters:
value- the offset
-
getOffsetX
public int getOffsetX()
Returns the pixel offset from the left.- Returns:
- the offset
-
offsetXTipText
public String offsetXTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOffsetY
public void setOffsetY(int value)
Sets the pixel offset from the top.- Parameters:
value- the offset
-
getOffsetY
public int getOffsetY()
Returns the pixel offset from the top.- Returns:
- the offset
-
offsetYTipText
public String offsetYTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
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 PaintEvent.PaintMoment getPaintMoment()
Returns when this paintlet is to be executed.- Specified by:
getPaintMomentin interfacePaintlet- Specified by:
getPaintMomentin 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:
doPerformPaintin classAbstractStrokePaintlet- Parameters:
g- the graphics context to use for paintingmoment- whatPaintEvent.PaintMomentis currently being painted
-
-