Package adams.flow.core
Class AbstractDataPlotUpdater<P extends DataContainerPanel,C>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractDataPlotUpdater<P,C>
-
- Type Parameters:
P
- the type of panel this updater handlesC
- the type of container this updater handles
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,DataPlotUpdater<P,C>
,Serializable
- Direct Known Subclasses:
AbstractInstancePanelUpdater
,AbstractPlotUpdater
,AbstractPlotUpdater
,AbstractSpreadSheetRowPanelUpdater
public abstract class AbstractDataPlotUpdater<P extends DataContainerPanel,C> extends AbstractOptionHandler implements DataPlotUpdater<P,C>
Ancestor for classes that determine when to update the data container panel, i.e., repaint all of it.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
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 AbstractDataPlotUpdater()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
canNotify(P panel, C cont)
Checks whether all conditions are met to notify the listeners for changes in the data container panel.protected void
doUpdate(P panel, boolean notify)
Updates the data container panel regardless, with optional notification of listeners.void
update(P panel)
Updates the data container panel regardless, notifying the listeners.boolean
update(P panel, C cont)
Updates the data container panel if necessary.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
canNotify
protected abstract boolean canNotify(P panel, C cont)
Checks whether all conditions are met to notify the listeners for changes in the data container panel.- Parameters:
panel
- the data container panel to potentially updatecont
- the current plot container- Returns:
- true if the listeners can be notified
-
doUpdate
protected void doUpdate(P panel, boolean notify)
Updates the data container panel regardless, with optional notification of listeners.- Parameters:
panel
- the data container panel to updatenotify
- whether to notify listeners
-
update
public boolean update(P panel, C cont)
Updates the data container panel if necessary.- Specified by:
update
in interfaceDataPlotUpdater<P extends DataContainerPanel,C>
- Parameters:
panel
- the data container panel to potentially updatecont
- the current data container- Returns:
- true if the change listeners were notified
-
update
public void update(P panel)
Updates the data container panel regardless, notifying the listeners.- Specified by:
update
in interfaceDataPlotUpdater<P extends DataContainerPanel,C>
- Parameters:
panel
- the data container panel to update
-
-