Package adams.flow.sink.spectrumdisplay
Class SimplePlotUpdater
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractDataPlotUpdater<SpectrumPanel,SpectrumContainer>
-
- adams.flow.sink.spectrumdisplay.AbstractPlotUpdater
-
- adams.flow.sink.spectrumdisplay.SimplePlotUpdater
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,adams.flow.core.DataPlotUpdater<SpectrumPanel,SpectrumContainer>
,Serializable
public class SimplePlotUpdater extends AbstractPlotUpdater
Updates the display after the specified number of tokens have been processed.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-update-interval <int> (property: updateInterval) Specifies the number of tokens after which the display is being updated; <= 0 means no update until flow finished. default: 1 minimum: -1
- Version:
- $Revision: 10855 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_NumTokensAccepted
the number of tokens accepted.protected int
m_UpdateInterval
the interval of tokens processed after which to update the display.
-
Constructor Summary
Constructors Constructor Description SimplePlotUpdater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canNotify(SpectrumPanel panel, SpectrumContainer 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
reset()
Resets the object.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.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- 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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
reset
protected void reset()
Resets the object.- Overrides:
reset
in classadams.core.option.AbstractOptionHandler
-
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(SpectrumPanel panel, SpectrumContainer cont)
Checks whether all conditions are met to notify the listeners for changes in the plot.- Specified by:
canNotify
in classadams.flow.core.AbstractDataPlotUpdater<SpectrumPanel,SpectrumContainer>
- Parameters:
panel
- the plotter to potentially updatecont
- the current plot container- Returns:
- true if the listeners can be notified
-
-