Class AbstractImageViewerPluginWithRestore
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.plugin.AbstractToolPlugin<ImagePanel>
-
- adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
-
- adams.gui.visualization.image.plugins.AbstractImageViewerPluginWithRestore
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
Brightness
public abstract class AbstractImageViewerPluginWithRestore extends AbstractImageViewerPlugin
Ancestor for plugins that allow restore of original state of image.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List
m_Backup
the backup of the current state.-
Fields inherited from class adams.gui.plugin.AbstractToolPlugin
m_CanceledByUser, m_CurrentPanel, m_LastSetup
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractImageViewerPluginWithRestore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List
backup()
Backs up the current image state.protected String
doExecute()
Executes the plugin.protected abstract String
doInteract()
The actual interaction with the user.List
getBackup()
Returns the current backup.void
restore(List state)
Restores the image state.-
Methods inherited from class adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
doLog
-
Methods inherited from class adams.gui.plugin.AbstractToolPlugin
canExecute, createLogEntry, execute, getCanceledByUser, getCaption, getIcon, getIconName, getLastSetup, getMenu, hasLastSetup, log, setLastSetup
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Backup
protected List m_Backup
the backup of the current state.
-
-
Method Detail
-
backup
public List backup()
Backs up the current image state.- Returns:
- the backup
-
restore
public void restore(List state)
Restores the image state.- Parameters:
state
- the state backup
-
getBackup
public List getBackup()
Returns the current backup.- Returns:
- the backup, null if none present
-
doInteract
protected abstract String doInteract()
The actual interaction with the user.- Returns:
- null if OK, otherwise error message
-
doExecute
protected String doExecute()
Executes the plugin.- Specified by:
doExecute
in classAbstractToolPlugin<ImagePanel>
- Returns:
- null if OK, otherwise error message
-
-