Package adams.flow.sink.sequenceplotter
Class NamedPlotUpdater
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractDataPlotUpdater<SequencePlotterPanel,SequencePlotterContainer>
-
- adams.flow.sink.sequenceplotter.AbstractPlotUpdater
-
- adams.flow.sink.sequenceplotter.NamedPlotUpdater
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,DataPlotUpdater<SequencePlotterPanel,SequencePlotterContainer>
,Serializable
public class NamedPlotUpdater extends AbstractPlotUpdater
Updates the flow after the specified number of tokens per named plot have been processed.
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
-update-interval <int> (property: updateInterval) Specifies the number of tokens per plot after which the display is being updated (markers excluded). default: 1 minimum: 1
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected NamedCounter
m_NumTokensAccepted
the number of tokens received.protected int
m_UpdateInterval
the interval of tokens processed after which to update the display.-
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 NamedPlotUpdater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canNotify(SequencePlotterPanel panel, SequencePlotterContainer cont)
Checks whether all conditions are met to notify the listeners for changes in the plot.void
defineOptions()
Adds options to the internal list of options.int
getUpdateInterval()
Returns the number of tokens after which the display is being updated.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.protected void
reset()
Resets the actor.void
setUpdateInterval(int value)
Sets the number of tokens after which the display is being updated.String
updateIntervalTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.sink.sequenceplotter.AbstractPlotUpdater
doUpdate
-
Methods inherited from class adams.flow.core.AbstractDataPlotUpdater
update, update
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_UpdateInterval
protected int m_UpdateInterval
the interval of tokens processed after which to update the display.
-
m_NumTokensAccepted
protected NamedCounter m_NumTokensAccepted
the number of tokens received.
-
-
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
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionHandler
-
reset
protected void reset()
Resets the actor.- Overrides:
reset
in classAbstractOptionHandler
-
setUpdateInterval
public void setUpdateInterval(int value)
Sets the number of tokens after which the display is being updated.- Parameters:
value
- the number of tokens
-
getUpdateInterval
public int getUpdateInterval()
Returns the number of tokens after which the display is being updated.- Returns:
- the number of tokens
-
updateIntervalTipText
public String updateIntervalTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
canNotify
protected boolean canNotify(SequencePlotterPanel panel, SequencePlotterContainer cont)
Checks whether all conditions are met to notify the listeners for changes in the plot.- Specified by:
canNotify
in classAbstractDataPlotUpdater<SequencePlotterPanel,SequencePlotterContainer>
- Parameters:
panel
- the plotter to potentially updatecont
- the current plot container- Returns:
- true if the listeners can be notified
-
-