Class AbstractTrailPaintlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.paintlet.AbstractPaintlet
-
- adams.gui.visualization.trail.paintlet.AbstractTrailPaintlet
-
- 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.image.paintlet.Paintlet>
,adams.core.SizeOfHandler
,adams.gui.visualization.image.paintlet.Paintlet
,TrailPaintlet
,Serializable
public abstract class AbstractTrailPaintlet extends adams.gui.visualization.image.paintlet.AbstractPaintlet implements TrailPaintlet
Ancestor for trail paintlets.- 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
Color of the stroke for the paintletprotected TrailPanel
m_TrailPanel
the trail panel.
-
Constructor Summary
Constructors Constructor Description AbstractTrailPaintlet()
-
Method Summary
All Methods Static Methods Instance Methods Abstract 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.static TrailPaintlet
forCommandLine(String cmdline)
Instantiates the paintlet from the given commandline (i.e., classname and optional options).static TrailPaintlet
forName(String classname, String[] options)
Instantiates the paintlet with the given options.Color
getColor()
Get the stroke color for the paintlet.protected Color
getDefaultColor()
Returns the default color for the stroke.static String[]
getPaintlets()
Returns a list with classnames of paintlets.TrailPanel
getTrailPanel()
Returns the underlying trail panel.protected void
initialize()
Initializes the members.abstract void
paintData(Graphics g, Trail trail)
Paints the given data.protected void
performPaint(Graphics g)
The paint routine of the paintlet.void
setColor(Color value)
Set the stroke color for the paintlet.void
setPanel(TrailPanel value)
Sets the panel to use, null to disable painting.-
Methods inherited from class adams.gui.visualization.image.paintlet.AbstractPaintlet
finishInit, getPaintPanel, getPanel, getPlot, getRepaintOnChange, hasPanel, isEnabled, isInitializing, memberChanged, memberChanged, paint, repaint, setEnabled, setPanel, setPanel, setRepaintOnChange, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
-
-
-
Field Detail
-
m_TrailPanel
protected TrailPanel m_TrailPanel
the trail panel.
-
m_Color
protected Color m_Color
Color of the stroke for the paintlet
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.gui.visualization.image.paintlet.AbstractPaintlet
-
getDefaultColor
protected Color getDefaultColor()
Returns the default color for the stroke.- Returns:
- the default
-
getColor
public Color getColor()
Get the stroke color for the paintlet.- Returns:
- Color of the stroke
-
setColor
public void setColor(Color value)
Set the stroke color for the paintlet.- Parameters:
value
- Color of the stroke
-
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(TrailPanel value)
Sets the panel to use, null to disable painting.- Specified by:
setPanel
in interfaceTrailPaintlet
- Parameters:
value
- the panel to paint on
-
getTrailPanel
public TrailPanel getTrailPanel()
Returns the underlying trail panel.- Specified by:
getTrailPanel
in interfaceTrailPaintlet
- Returns:
- the panel, null if not set
-
paintData
public abstract void paintData(Graphics g, Trail trail)
Paints the given data.- Specified by:
paintData
in interfaceTrailPaintlet
- Parameters:
g
- the graphics context to use for paintingtrail
- the data to paint
-
performPaint
protected void performPaint(Graphics g)
The paint routine of the paintlet.- Specified by:
performPaint
in classadams.gui.visualization.image.paintlet.AbstractPaintlet
- Parameters:
g
- the graphics context to use for painting
-
getPaintlets
public static String[] getPaintlets()
Returns a list with classnames of paintlets.- Returns:
- the paintlet classnames
-
forName
public static TrailPaintlet forName(String classname, String[] options)
Instantiates the paintlet with the given options.- Parameters:
classname
- the classname of the paintlet to instantiateoptions
- the options for the paintlet- Returns:
- the instantiated paintlet or null if an error occurred
-
forCommandLine
public static TrailPaintlet forCommandLine(String cmdline)
Instantiates the paintlet from the given commandline (i.e., classname and optional options).- Parameters:
cmdline
- the classname (and optional options) of the paintlet to instantiate- Returns:
- the instantiated paintlet or null if an error occurred
-
-