Generated by
JDiff

javax.swing.undo Documentation Differences

This file contains all the changes in documentation in the package javax.swing.undo as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AbstractUndoableEdit

An abstract implementation of UndoableEdit implementing simple responses to all boolean methods in that interface. @version 1.24 0226 12/1403/01 @author Ray Ryan
Class AbstractUndoableEdit, boolean addEdit(UndoableEdit)

This default implementation returns false. @param anEdit the edit to be added @return false @see UndoableEdit#addEdit
Class AbstractUndoableEdit, boolean canRedo()

Returns true if this edit is alive and hasBeenDone is false. @return true if this edit is alive and hasBeenDone is false @see #die @see #undo @see #redo
Class AbstractUndoableEdit, boolean canUndo()

Returns true if this edit is alive and hasBeenDone is true. @return true if this edit is alive and hasBeenDone is true @see #die @see #undo @see #redo
Class AbstractUndoableEdit, void die()

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.

Class AbstractUndoableEdit, String getPresentationName()

This default implementation returns "". Used by getUndoPresentationName() and getRedoPresentationName() to construct the strings they return. Subclasses shoulshould override to return an appropriate description of the operation this edit represents. @return the empty string "" @see #getUndoPresentationName @see #getRedoPresentationName
Class AbstractUndoableEdit, String getRedoPresentationName()

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 "" returnsthen AbstractUndoableEdit.RedoNamethe defaults value is returned alone. Otherwise@return returnsthe value from the defaults table with key AbstractUndoableEdit.RedoNameredoText followed by a space andfollowed by getPresentationName() unless getPresentationName is "" in which case the defaults value is returned alone. @see #getPresentationName
Class AbstractUndoableEdit, String getUndoPresentationName()

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 "" returnsthen AbstractUndoableEdit.UndoNamethe defaults value is returned alone. Otherwise@return returnsthe value from the defaults table with key AbstractUndoableEdit.UndoNameundoText followed by a space andfollowed by getPresentationName() unless getPresentationName is "" in which case the defaults value is returned alone. @see #getPresentationName
Class AbstractUndoableEdit, boolean isSignificant()

This default implementation returns true. @return true @see UndoableEdit#isSignificant
Class AbstractUndoableEdit, void redo()

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. @exception CannotRedoException if canRedo returns false @see #canRedo
Class AbstractUndoableEdit, boolean replaceEdit(UndoableEdit)

This default implementation returns false. @param anEdit the edit to replace @return false @see UndoableEdit#replaceEdit
Class AbstractUndoableEdit, void undo()

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. @exception CannotUndoException if canUndo returns false @see #canUndo
Class AbstractUndoableEdit, String RedoName

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 javax.swing.UIDefaults
Class AbstractUndoableEdit, String UndoName

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 javax.swing.UIDefaults

Class CannotRedoException

Thrown when an UndoableEdit is told to redo() and can't.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. AAs future release of Swing will provide1.4 support for long term persistencestorage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder @version 1.5 07/16/97 @author Ray Ryan


Class CannotUndoException

Thrown when an UndoableEdit is told to undo() and can't.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. AAs future release of Swing will provide1.4 support for long term persistencestorage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder @version 1.5 07/16/97 @author Ray Ryan


Class CompoundEdit

A concrete subclass of AbstractUndoableEdit used to assemble little UndoableEdits into great big ones. @version 1.17 0220 12/0203/0001 @author Ray Ryan
Class CompoundEdit, boolean addEdit(UndoableEdit)

If this edit is inProgress accepts anEdit and returns true.

The last edit added to this CompoundEdit is given a chance to addEdit(anEdit). If it refuses (returns false) anEdit is given a chance to replaceEdit the last edit. If anEdit returns false here it is added to edits. @param anEdit the edit to be added @return true if the edit is inProgress; otherwise returns false

Class CompoundEdit, boolean canRedo()

Returns false if isInProgress or if super doesreturns false. @see #isInProgress
Class CompoundEdit, boolean canUndo()

Returns false if isInProgress or if super doesreturns false. @see #isInProgress
Class CompoundEdit, void die()

SendSends die to each subedit in the reverse of the order that they were added.
Class CompoundEdit, void end()

Sets inProgress to false. @see #canUndo @see #canRedo
Class CompoundEdit, String getPresentationName()

Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty calls super.
Class CompoundEdit, String getRedoPresentationName()

Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty calls super.
Class CompoundEdit, String getUndoPresentationName()

Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty calls super.
Class CompoundEdit, boolean isSignificant()

Returns true if any of the UndoableEditsUndoableEdits in edits do. Returns false if they all return false.
Class CompoundEdit, UndoableEdit lastEdit()

Returns the last UndoableEdit in edits or null if edits is empty.
Class CompoundEdit, void redo()

Sends redo() to all contained UndoableEditsUndoableEdits in the order in which they were added.
Class CompoundEdit, void undo()

Sends undo()undoK/code> to all contained UndoableEdits in the reverse of the order in which they were added.
Class CompoundEdit, Vector edits

The collection of UndoableEditsUndoableEdits undone/redone en masse by this CompoundEdit.

Class StateEdit

StateEdit is a general edit for objects that change state. Objects being edited must conform to the StateEditable interface.

This edit class works by asking an object to store it's state in Hashtables before and after editing occurs. Upon undo or redo the object is told to restore it's state from these Hashtables.

A state edit is used as follows:
 // Create the edit during the "before" state of the object StateEdit newEdit = new StateEdit(myObject); // Modify the object myObject.someStateModifyingMethod(); // "end" the edit when you are done modifying the object newEdit.end(); 

Note that when a StateEdit ends it removes redundant state from the Hashtables - A state Hashtable is not guaranteed to contain all keys/values placed into it when the state is stored

@see StateEditable @version 1.10 0211 12/0203/0001 @author Ray Ryan

Class UndoManager

Concrete subclass of CompoundEdit which can serve as ana UndoableEditListener consolidating the UndoableEditEvents from a variety of sources and undoing or redoing them one at a time. Unlike AbstractUndoableEdit and CompoundEdit the public methods of this class are synchronized and should be safe to call from multiple threads. This should make UndoManager a convenient marshall for sets of undoable JavaBeans.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future releaseAs of Swing will provide1.4 support for long term persistencestorage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder @author Ray Ryan @version 1.28 0432 12/2103/01

Class UndoManager, boolean addEdit(UndoableEdit)

If inProgress inserts anEdit at indexOfNextAdd and removes any old edits that were at indexOfNextAdd or later. The die method is called on each edit that is removed is sent in the reverse of the order the edits were added. Updates indexOfNextAdd.

If not inProgress acts as a CompoundEdit. @param anEdit the edit to be added @see CompoundEdit#end @see CompoundEdit#addEdit

Class UndoManager, void redo()

If this UndoManager is inProgress redoes the last significant UndoableEdit at indexOfNextAdd or after and all insignificant edits up to it. Updates indexOfNextAdd accordingly.

If not inProgress indexOfNextAdd is ignored and super's routine is called.

@see CompoundEdit#end

Class UndoableEdit

An object representing an edit that has been done and that can be undone and redone. @version 1.14 0217 12/0203/0001 @author Ray Ryan
Class UndoableEdit, boolean addEdit(UndoableEdit)

This UndoableEdit should absorb anEdit if it can. ReturnReturns true if anEdit has been incoporatedincorporated false if it has not.

Typically the receiver is already in the queue of a UndoManager (or other UndoableEditListener) and is being given a chance to incorporate anEdit rather than letting it be added to the queue in turn.

If true is returned from now on anEdit must return false from canUndo() and canRedo() and must throw the appropriate exception on undo() or redo().

@param anEdit the edit to be added
Class UndoableEdit, boolean canRedo()

True if it is still possible to redo this operation.
Class UndoableEdit, boolean canUndo()

True if it is still possible to undo this operation.
Class UndoableEdit, void die()

May be sent to inform an edit that it should no longer be used. This is a useful hook for cleaning up state no longer needed once undoing or redoing is impossible--for example deleting file resources used by objects that can no longer be undeleted. UndoManager calls this before it dequeues edits. Note that this is a one-way operation. There is no "undieun-die" method. @see CompoundEdit#die
Class UndoableEdit, String getPresentationName()

ProvideProvides a localized human readable description of this edit suitable for use in say a change log.
Class UndoableEdit, String getRedoPresentationName()

ProvideProvides a localized human readable description of the redoable form of this edit e.g. for use as a Redo menu item. Typically derived from getPresentationName();.
Class UndoableEdit, String getUndoPresentationName()

ProvideProvides a localized human readable description of the undoable form of this edit e.g. for use as an Undo menu item. Typically derived from getDescription();.
Class UndoableEdit, boolean isSignificant()

ReturnReturns false if this edit is insignificant--for example one that maintains the user's selection but does not change any model state. This status can be used by an UndoableEditListener (like UndoManager) when deciding which UndoableEdits to present to the user as Undo/Redo options and which to perform as side effects of undoing or redoing other events.
Class UndoableEdit, boolean replaceEdit(UndoableEdit)

ReturnReturns true if this UndoableEdit should replace anEdit. The receiver should incorporate anEdit's state before returning true.

This message is the opposite of addEdit--anEdit has typically already been queued in a UndoManager (or other UndoableEditListener) and the receiver is being given a chance to take its place.

If true is returned from now on anEdit must return false from canUndo() and canRedo() and must throw the appropriate exception on undo() or redo().


Class UndoableEditSupport

A support class used for managing UndoableEdit listeners. @author Ray Ryan @version 1.11 0217 12/0203/0001
Class UndoableEditSupport, constructor UndoableEditSupport()

Constructs an UndoableEditSupport object.
Class UndoableEditSupport, constructor UndoableEditSupport(Object)

Constructs an UndoableEditSupport object. @param r an Object
Class UndoableEditSupport, void _postEdit(UndoableEdit)

Called only from postEdit and endUpdate. Calls undoableEditHappened in all listeners. No synchronization is performed here since the two calling methods are synchonizedsynchronized.
Class UndoableEditSupport, void addUndoableEditListener(UndoableEditListener)

Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone. @param l an UndoableEditListener object @see #removeUndoableEditListener
Class UndoableEditSupport, CompoundEdit createCompoundEdit()

Called only from beginUpdate. Exposed here for subclasses' use.
Class UndoableEditSupport, void endUpdate()

DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.
Class UndoableEditSupport, int getUpdateLevel()

Returns the update level value. @return an intinteger representing the update level
Class UndoableEditSupport, void postEdit(UndoableEdit)

DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.
Class UndoableEditSupport, void removeUndoableEditListener(UndoableEditListener)

Removes an UndoableEditListener. @param l anthe UndoableEditListener object to be removed @see #addUndoableEditListener
Class UndoableEditSupport, String toString()

Returns a string that displays and identifies this object's properties. @return a String representation of this object