Package adams.gui.scripting
Class AbstractUndoScriptlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.scripting.AbstractScriptlet
-
- adams.gui.scripting.AbstractUndoScriptlet
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,UndoHandler
,Serializable
,Comparable
- Direct Known Subclasses:
AbstractDataContainerPanelScriptlet
,DisableUndo
,EnableUndo
public abstract class AbstractUndoScriptlet extends AbstractScriptlet implements UndoHandler
Ancestor for scriptlets that allow undo (if available).- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.scripting.AbstractScriptlet
m_DataProvider, m_Owner, m_Parameters, m_Stopped
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractUndoScriptlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUndoPoint(String statusMsg, String undoComment)
Adds an undo point, if possible.Class[]
getRequirements()
Returns the class(es) of an object that must be present for this action to be executed.Undo
getUndo()
Returns the current undo manager, can be null.boolean
isUndoSupported()
Returns whether an Undo manager is currently available.void
setUndo(Undo value)
Sets the undo manager to use, can be null if no undo-support wanted.-
Methods inherited from class adams.gui.scripting.AbstractScriptlet
compareTo, doProcess, equals, forName, getAction, getBasePanel, getDataProvider, getDescription, getOptionsDescription, getOwner, getParameter, getParameterDescription, getScriptlets, hashCode, hasOwner, hasParameter, initialize, isStopped, process, setDataProvider, setOwner, setParameter, showStatus, stopExecution, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
getRequirements
public Class[] getRequirements()
Returns the class(es) of an object that must be present for this action to be executed.- Overrides:
getRequirements
in classAbstractScriptlet
- Returns:
- the class(es) of which an instance must be present for execution, null if none necessary
-
setUndo
public void setUndo(Undo value)
Sets the undo manager to use, can be null if no undo-support wanted.- Specified by:
setUndo
in interfaceUndoHandler
- Parameters:
value
- the undo manager to use
-
getUndo
public Undo getUndo()
Returns the current undo manager, can be null.- Specified by:
getUndo
in interfaceUndoHandler
- Returns:
- the undo manager, if any
-
isUndoSupported
public boolean isUndoSupported()
Returns whether an Undo manager is currently available.- Specified by:
isUndoSupported
in interfaceUndoHandler
- Returns:
- true if an undo manager is set
-
-