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 Colorm_Colorthe color to paint the point with.protected DateFormatm_DateFormatthe date formatter.protected Fieldm_Endthe date field in the report (end).protected Stringm_Formatthe date format.protected Fieldm_Startthe 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 StringcolorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringendTipText()Returns the tip text for this property.StringformatTipText()Returns the tip text for this property.ColorgetColor()Returns the currently set color to paint the background with.protected DateFormatgetDateFormat()Returns the formatter/parser.FieldgetEnd()Returns the currently set date field in use for the end of the region.StringgetFormat()Returns the currently set date format.PaintEvent.PaintMomentgetPaintMoment()Returns when this paintlet is to be executed.FieldgetStart()Returns the currently set date field in use for the start of the region.TechnicalInformationgetTechnicalInformation()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.StringglobalInfo()Returns a string describing the object.voidperformPaint(Graphics g, PaintEvent.PaintMoment moment)The paint routine of the paintlet.voidsetColor(Color value)Sets the color to paint the background with.voidsetEnd(Field value)Sets the date field in the report to use for the end of the region.voidsetFormat(String value)Sets the date format.voidsetPanel(PaintablePanel value)Sets the panel to use, null to disable painting.voidsetStart(Field value)Sets the date field in the report to use for the start of the region.StringstartTipText()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:
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 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:
getTechnicalInformationin 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:
setPanelin interfacePaintlet- Overrides:
setPanelin 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:
getPaintMomentin interfacePaintlet- Specified by:
getPaintMomentin 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:
performPaintin interfacePaintlet- Specified by:
performPaintin classAbstractPaintlet- Parameters:
g- the graphics context to use for paintingmoment- whatPaintEvent.PaintMomentis currently being painted
-
-