An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
(->abstract-undoable-edit)
Constructor.
Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.
Constructor. Creates an AbstractUndoableEdit which defaults hasBeenDone and alive to true.
(add-edit this an-edit)
This default implementation returns false.
an-edit - the edit to be added - javax.swing.undo.UndoableEdit
returns: false - boolean
This default implementation returns false. an-edit - the edit to be added - `javax.swing.undo.UndoableEdit` returns: false - `boolean`
(can-redo? this)
Returns true if this edit is alive and hasBeenDone is false.
returns: true if this edit is alive
and hasBeenDone is false - boolean
Returns true if this edit is alive and hasBeenDone is false. returns: true if this edit is alive and hasBeenDone is false - `boolean`
(can-undo? this)
Returns true if this edit is alive and hasBeenDone is true.
returns: true if this edit is alive
and hasBeenDone is true - boolean
Returns true if this edit is alive and hasBeenDone is true. returns: true if this edit is alive and hasBeenDone is true - `boolean`
(die this)
Sets alive to false. Note that this is a one way operation; dead edits cannot be resurrected. Sending undo or redo to a dead edit results in an exception being thrown.
Typically an edit is killed when it is consolidated by another edit's addEdit or replaceEdit method, or when it is dequeued from an UndoManager.
Sets alive to false. Note that this is a one way operation; dead edits cannot be resurrected. Sending undo or redo to a dead edit results in an exception being thrown. Typically an edit is killed when it is consolidated by another edit's addEdit or replaceEdit method, or when it is dequeued from an UndoManager.
(get-presentation-name this)
This default implementation returns "". Used by getUndoPresentationName and getRedoPresentationName to construct the strings they return. Subclasses should override to return an appropriate description of the operation this edit represents.
returns: the empty string "" - java.lang.String
This default implementation returns "". Used by getUndoPresentationName and getRedoPresentationName to construct the strings they return. Subclasses should override to return an appropriate description of the operation this edit represents. returns: the empty string "" - `java.lang.String`
(get-redo-presentation-name this)
Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone.
returns: the value from the defaults table with key
AbstractUndoableEdit.redoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone. - java.lang.String
Retreives the value from the defaults table with key AbstractUndoableEdit.redoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone. returns: the value from the defaults table with key AbstractUndoableEdit.redoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone. - `java.lang.String`
(get-undo-presentation-name this)
Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone.
returns: the value from the defaults table with key
AbstractUndoableEdit.undoText, followed
by a space, followed by getPresentationName
unless getPresentationName is "" in which
case, the defaults value is returned alone. - java.lang.String
Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName. If getPresentationName returns "", then the defaults value is returned alone. returns: the value from the defaults table with key AbstractUndoableEdit.undoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone. - `java.lang.String`
(redo this)
Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.
throws: javax.swing.undo.CannotRedoException - if canRedo returns false
Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super. throws: javax.swing.undo.CannotRedoException - if canRedo returns false
(replace-edit this an-edit)
This default implementation returns false.
an-edit - the edit to replace - javax.swing.undo.UndoableEdit
returns: false - boolean
This default implementation returns false. an-edit - the edit to replace - `javax.swing.undo.UndoableEdit` returns: false - `boolean`
(significant? this)
This default implementation returns true.
returns: true - boolean
This default implementation returns true. returns: true - `boolean`
(to-string this)
Returns a string that displays and identifies this object's properties.
returns: a String representation of this object - java.lang.String
Returns a string that displays and identifies this object's properties. returns: a String representation of this object - `java.lang.String`
(undo this)
Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.
throws: javax.swing.undo.CannotUndoException - if canUndo returns false
Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super. throws: javax.swing.undo.CannotUndoException - if canUndo returns false
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close