Class PeriodicityPaintlet
- 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.PeriodicityPaintlet
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Paintlet>
,SizeOfHandler
,ColorProviderHandler
,Paintlet
,Serializable
public class PeriodicityPaintlet extends AbstractTimeseriesPaintlet implements ColorProviderHandler
Paintlet for painting the spectral graph.
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
-markers-extent <int> (property: markerExtent) The size of the markers in pixels. default: 7 minimum: 0
-markers-disabled (property: markersDisabled) If set to true, the markers are disabled.
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ColorProvider
m_ColorProvider
the color provider in use.protected PeriodicityType
m_Periodicity
the periodicity type.-
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 PeriodicityPaintlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected gnu.trove.list.array.TIntArrayList
calculatePositions(AxisPanel axisX)
Calculates the positions for the periodicity.boolean
canPaint(PaintEvent.PaintMoment moment)
Checks whether the paintlet is supposed to paint for thisPaintEvent.PaintMoment
.String
colorProviderTipText()
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.ColorProvider
getColorProvider()
Returns the color provider in use.PaintEvent.PaintMoment
getPaintMoment()
Returns when this paintlet is to be executed.PeriodicityType
getPeriodicity()
Returns the type of periodicity to use.String
globalInfo()
Returns a string describing the object.String
periodicityTipText()
Returns the tip text for this property.void
setColorProvider(ColorProvider value)
Sets the color provider to use.void
setPeriodicity(PeriodicityType value)
Sets the type of periodicity to use.-
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
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_Periodicity
protected PeriodicityType m_Periodicity
the periodicity type.
-
m_ColorProvider
protected ColorProvider m_ColorProvider
the color provider in use.
-
-
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
-
canPaint
public boolean canPaint(PaintEvent.PaintMoment moment)
Checks whether the paintlet is supposed to paint for thisPaintEvent.PaintMoment
. Does not paint anything ifPeriodicityType.NONE
.- Specified by:
canPaint
in interfacePaintlet
- Overrides:
canPaint
in classAbstractPaintlet
- Returns:
- true if painting should occur
- See Also:
AbstractPaintlet.getPaintMoment()
-
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
-
setPeriodicity
public void setPeriodicity(PeriodicityType value)
Sets the type of periodicity to use.- Parameters:
value
- the type
-
getPeriodicity
public PeriodicityType getPeriodicity()
Returns the type of periodicity to use.- Returns:
- the type
-
periodicityTipText
public String periodicityTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColorProvider
public void setColorProvider(ColorProvider value)
Sets the color provider to use.- Specified by:
setColorProvider
in interfaceColorProviderHandler
- Parameters:
value
- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider in use.- Specified by:
getColorProvider
in interfaceColorProviderHandler
- Returns:
- the color provider
-
colorProviderTipText
public String colorProviderTipText()
Returns the tip text for this property.- Specified by:
colorProviderTipText
in interfaceColorProviderHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
calculatePositions
protected gnu.trove.list.array.TIntArrayList calculatePositions(AxisPanel axisX)
Calculates the positions for the periodicity.- Parameters:
axisX
- the X axis- Returns:
- the positions
-
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
-
-