Class AbstractUndoScriptlet

    • Constructor Detail

      • AbstractUndoScriptlet

        public AbstractUndoScriptlet()
    • 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 class AbstractScriptlet
        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 interface UndoHandler
        Parameters:
        value - the undo manager to use
      • getUndo

        public Undo getUndo()
        Returns the current undo manager, can be null.
        Specified by:
        getUndo in interface UndoHandler
        Returns:
        the undo manager, if any
      • isUndoSupported

        public boolean isUndoSupported()
        Returns whether an Undo manager is currently available.
        Specified by:
        isUndoSupported in interface UndoHandler
        Returns:
        true if an undo manager is set
      • addUndoPoint

        protected void addUndoPoint​(String statusMsg,
                                    String undoComment)
        Adds an undo point, if possible.
        Parameters:
        statusMsg - the status message to display while adding the undo point
        undoComment - the comment for the undo point