API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.undo. StateEdit View Source
Author(s)
Ray Ryan
Since
Version
1.15 11/17/05
Serial
Hierarchy
 Object
      AbstractUndoableEdit
          StateEdit
Implements
Subclasses
Description
public class StateEdit
  StateEdit is a general edit for objects that change state.
See also:    StateEditable
Constructors
public StateEdit (StateEditable anObject)
  Create and return a new StateEdit.
public StateEdit (StateEditable anObject, String name)
  Create and return a new StateEdit with a presentation name.
Methods
Hide/Show inherited methods
public boolean addEdit (UndoableEdit anEdit) [Inherited From AbstractUndoableEdit]
  This default implementation returns false.
public boolean canRedo () [Inherited From AbstractUndoableEdit]
  Returns true if this edit is alive and hasBeenDone is false.
public boolean canUndo () [Inherited From AbstractUndoableEdit]
  Returns true if this edit is alive and hasBeenDone is true.
public void die () [Inherited From AbstractUndoableEdit]
  Sets alive to false.
public void end ()
Gets the post-edit state of the StateEditable object and ends the edit.
public String getPresentationName () [Overrides AbstractUndoableEdit]
Gets the presentation name for this edit
public String getRedoPresentationName () [Inherited From AbstractUndoableEdit]
  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 () [Inherited From AbstractUndoableEdit]
  Retreives the value from the defaults table with key AbstractUndoableEdit.undoText and returns that value followed by a space, followed by getPresentationName.
protected void init (StateEditable anObject, String name)
public boolean isSignificant () [Inherited From AbstractUndoableEdit]
  This default implementation returns true.
public void redo () [Overrides AbstractUndoableEdit]
Tells the edited object to apply the state after the edit
protected void removeRedundantState ()
Remove redundant key/values in state hashtables.
public boolean replaceEdit (UndoableEdit anEdit) [Inherited From AbstractUndoableEdit]
  This default implementation returns false.
public String toString () [Inherited From AbstractUndoableEdit]
  Returns a string that displays and identifies this object's properties.
public void undo () [Overrides AbstractUndoableEdit]
Tells the edited object to apply the state prior to the edit
Fields
Hide/Show inherited fields
pack-private boolean alive [Inherited From AbstractUndoableEdit]
True if this edit has not received die; defaults to true.
pack-private boolean hasBeenDone [Inherited From AbstractUndoableEdit]
Defaults to true; becomes false if this edit is undone, true again if it is redone.
protected StateEditable object
The object being edited
protected Hashtable<Object, Object> postState
The state information after the edit
protected Hashtable<Object, Object> preState
The state information prior to the edit
protectedfinalstatic String RCSID = "$Id: StateEdit.java,v 1.6 1997/10/01 20:05:51 sandipc Exp $"
protectedfinalstatic String RedoName = "Redo" [Inherited From AbstractUndoableEdit]
  String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
protectedfinalstatic String UndoName = "Undo" [Inherited From AbstractUndoableEdit]
  String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
protected String undoRedoName
The undo/redo presentation name
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar