| |
|
| java.lang.Object javax.swing.undo.AbstractUndoableEdit
All known Subclasses: javax.swing.undo.StateEdit, javax.swing.undo.CompoundEdit,
AbstractUndoableEdit | public class AbstractUndoableEdit implements UndoableEdit,Serializable(Code) | | An abstract implementation of UndoableEdit ,
implementing simple responses to all boolean methods in
that interface.
version: 1.37 05/05/07 author: Ray Ryan |
Field Summary | |
final protected static String | RedoName String returned by getRedoPresentationName ;
as of Java 2 platform v1.3.1 this field is no longer used. | final protected static String | UndoName String returned by getUndoPresentationName ;
as of Java 2 platform v1.3.1 this field is no longer used. | boolean | alive True if this edit has not received die ; defaults
to true . | boolean | hasBeenDone Defaults to true; becomes false if this edit is undone, true
again if it is redone. |
Constructor Summary | |
public | AbstractUndoableEdit() Creates an AbstractUndoableEdit which defaults
hasBeenDone and alive to true . |
Method Summary | |
public boolean | addEdit(UndoableEdit anEdit) This default implementation returns false. | public boolean | canRedo() Returns true if this edit is alive
and hasBeenDone is false . | public boolean | canUndo() Returns true if this edit is alive
and hasBeenDone is true . | public void | die() Sets alive to false. | public String | getPresentationName() This default implementation returns "". | public String | getRedoPresentationName() Retreives the value from the defaults table with key
AbstractUndoableEdit.redoText and returns
that value followed by a space, followed by
getPresentationName . | public String | getUndoPresentationName() Retreives the value from the defaults table with key
AbstractUndoableEdit.undoText and returns
that value followed by a space, followed by
getPresentationName . | public boolean | isSignificant() This default implementation returns true. | public void | redo() Throws CannotRedoException if canRedo
returns false. | public boolean | replaceEdit(UndoableEdit anEdit) This default implementation returns false. | public String | toString() Returns a string that displays and identifies this
object's properties. | public void | undo() Throws CannotUndoException if canUndo
returns false . |
RedoName | final protected static String RedoName(Code) | | String returned by getRedoPresentationName ;
as of Java 2 platform v1.3.1 this field is no longer used. This value
is now localized and comes from the defaults table with key
AbstractUndoableEdit.redoText .
See Also: javax.swing.UIDefaults |
UndoName | final protected static String UndoName(Code) | | String returned by getUndoPresentationName ;
as of Java 2 platform v1.3.1 this field is no longer used. This value
is now localized and comes from the defaults table with key
AbstractUndoableEdit.undoText .
See Also: javax.swing.UIDefaults |
alive | boolean alive(Code) | | True if this edit has not received die ; defaults
to true .
|
hasBeenDone | boolean hasBeenDone(Code) | | Defaults to true; becomes false if this edit is undone, true
again if it is redone.
|
AbstractUndoableEdit | public AbstractUndoableEdit()(Code) | | Creates an AbstractUndoableEdit which defaults
hasBeenDone and alive to true .
|
die | public void die()(Code) | | 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 .
|
getRedoPresentationName | public String getRedoPresentationName()(Code) | | 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.
the value from the defaults table with keyAbstractUndoableEdit.redoText , followedby a space, followed by getPresentationName unless getPresentationName is "" in whichcase, the defaults value is returned alone. See Also: AbstractUndoableEdit.getPresentationName |
getUndoPresentationName | public String getUndoPresentationName()(Code) | | 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.
the value from the defaults table with keyAbstractUndoableEdit.undoText , followedby a space, followed by getPresentationName unless getPresentationName is "" in whichcase, the defaults value is returned alone. See Also: AbstractUndoableEdit.getPresentationName |
toString | public String toString()(Code) | | Returns a string that displays and identifies this
object's properties.
a String representation of this object |
|
|
|