Package adams.gui.visualization.report
Class ReportDateFieldRangePaintlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AbstractPaintlet
-
- adams.gui.visualization.report.ReportDateFieldRangePaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,TechnicalInformationHandler
,Paintlet
,Serializable
public class ReportDateFieldRangePaintlet extends AbstractPaintlet implements TechnicalInformationHandler
Paintlet for painting a background region based on the date stored in a report.
For more details on the date format, see:
Javadoc. java.text.SimpleDateFormat.
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
-start <adams.data.report.Field> (property: start) The date field in the report to use as start of the region. default:
-end <adams.data.report.Field> (property: end) The date field in the report to use as end of the region. default:
-format <java.lang.String> (property: format) The date format to use for parsing the value stored in the report. default: yyyy-MM-dd HH:mm:ss
-color <java.awt.Color> (property: color) The color to use for the background region. default: #c0c0c0
- 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 to paint the point with.protected DateFormat
m_DateFormat
the date formatter.protected Field
m_End
the date field in the report (end).protected String
m_Format
the date format.protected Field
m_Start
the date field in the report (start).-
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 ReportDateFieldRangePaintlet()
-
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.String
endTipText()
Returns the tip text for this property.String
formatTipText()
Returns the tip text for this property.Color
getColor()
Returns the currently set color to paint the background with.protected DateFormat
getDateFormat()
Returns the formatter/parser.Field
getEnd()
Returns the currently set date field in use for the end of the region.String
getFormat()
Returns the currently set date format.PaintEvent.PaintMoment
getPaintMoment()
Returns when this paintlet is to be executed.Field
getStart()
Returns the currently set date field in use for the start of the region.TechnicalInformation
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.String
globalInfo()
Returns a string describing the object.void
performPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.void
setColor(Color value)
Sets the color to paint the background with.void
setEnd(Field value)
Sets the date field in the report to use for the end of the region.void
setFormat(String value)
Sets the date format.void
setPanel(PaintablePanel value)
Sets the panel to use, null to disable painting.void
setStart(Field value)
Sets the date field in the report to use for the start of the region.String
startTipText()
Returns the tip text for this property.-
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, 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_Start
protected Field m_Start
the date field in the report (start).
-
m_End
protected Field m_End
the date field in the report (end).
-
m_Format
protected String m_Format
the date format.
-
m_Color
protected Color m_Color
the color to paint the point with.
-
m_DateFormat
protected transient DateFormat m_DateFormat
the date formatter.
-
-
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 classAbstractOptionHandler
-
getTechnicalInformation
public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- Specified by:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- Returns:
- the technical information about this class
-
setStart
public void setStart(Field value)
Sets the date field in the report to use for the start of the region.- Parameters:
value
- the date field
-
getStart
public Field getStart()
Returns the currently set date field in use for the start of the region.- Returns:
- the date field
-
startTipText
public String startTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEnd
public void setEnd(Field value)
Sets the date field in the report to use for the end of the region.- Parameters:
value
- the date field
-
getEnd
public Field getEnd()
Returns the currently set date field in use for the end of the region.- Returns:
- the date field
-
endTipText
public String endTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFormat
public void setFormat(String value)
Sets the date format.- Parameters:
value
- the date format
-
getFormat
public String getFormat()
Returns the currently set date format.- Returns:
- the date format
-
formatTipText
public String formatTipText()
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 background with.- Parameters:
value
- the color
-
getColor
public Color getColor()
Returns the currently set color to paint the background 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.
-
setPanel
public void setPanel(PaintablePanel value)
Sets the panel to use, null to disable painting.- Specified by:
setPanel
in interfacePaintlet
- Overrides:
setPanel
in classAbstractPaintlet
- Parameters:
value
- the panel to paint on
-
getDateFormat
protected DateFormat getDateFormat()
Returns the formatter/parser.- Returns:
- the formatter/parser
-
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
-
performPaint
public void performPaint(Graphics g, PaintEvent.PaintMoment moment)
The paint routine of the paintlet.- Specified by:
performPaint
in interfacePaintlet
- Specified by:
performPaint
in classAbstractPaintlet
- Parameters:
g
- the graphics context to use for paintingmoment
- whatPaintEvent.PaintMoment
is currently being painted
-
-