|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagejavax.swing.undo
as colored differences. Deletions are shownlike 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.
An abstract implementation ofClass AbstractUndoableEdit, boolean addEdit(UndoableEdit)UndoableEdit
implementing simple responses to all boolean methods in that interface. @version 1.24 0226 12/1403/01 @author Ray Ryan
This default implementation returns false. @param anEdit the edit to be added @return false @see UndoableEdit#addEditClass AbstractUndoableEdit, boolean canRedo()
ReturnsClass AbstractUndoableEdit, boolean canUndo()true
if this edit isalive
andhasBeenDone
isfalse
. @returntrue
if this edit isalive
andhasBeenDone
isfalse
@see #die @see #undo @see #redo
Returns true if this edit isClass AbstractUndoableEdit, void die()alive
andhasBeenDone
istrue
. @return true if this edit isalive
andhasBeenDone
istrue
@see #die @see #undo @see #redo
SetsClass AbstractUndoableEdit, String getPresentationName()alive
to false. Note that this is a one way operation:; dead edits cannot be resurrected. Sendingundo
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
.
This default implementation returns "". Used byClass AbstractUndoableEdit, String getRedoPresentationName()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
Retreives the value from the defaults table with keyClass AbstractUndoableEdit, String getUndoPresentationName()AbstractUndoableEdit.redoText
and returns that value followed by a space followed bygetPresentationName
. IfgetPresentationName
returns ""()returnsthenAbstractUndoableEdit.RedoNamethe defaults value is returned alone.Otherwise@returnreturnsthe value from the defaults table with keyAbstractUndoableEdit.
RedoNameredoText followed by a spaceandfollowed bygetPresentationName
unless()getPresentationName
is "" in which case the defaults value is returned alone. @see #getPresentationName
Retreives the value from the defaults table with keyClass AbstractUndoableEdit, boolean isSignificant()AbstractUndoableEdit.undoText
and returns that value followed by a space followed bygetPresentationName
. IfgetPresentationName
returns ""()returnsthenAbstractUndoableEdit.UndoNamethe defaults value is returned alone.Otherwise@returnreturnsthe value from the defaults table with keyAbstractUndoableEdit.
UndoNameundoText followed by a spaceandfollowed bygetPresentationName
unless()getPresentationName
is "" in which case the defaults value is returned alone. @see #getPresentationName
This default implementation returns true. @return true @see UndoableEdit#isSignificantClass AbstractUndoableEdit, void redo()
ThrowsClass AbstractUndoableEdit, boolean replaceEdit(UndoableEdit)CannotRedoException
ifcanRedo
returns false. Sets()hasBeenDone
totrue
. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super. @exception CannotRedoException ifcanRedo
returnsfalse
@see #canRedo
This default implementation returns false. @param anEdit the edit to replace @return false @see UndoableEdit#replaceEditClass AbstractUndoableEdit, void undo()
ThrowsClass AbstractUndoableEdit, String RedoNameCannotUndoException
ifcanUndo
returns()false
. SetshasBeenDone
tofalse
. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super. @exception CannotUndoException ifcanUndo
returnsfalse
@see #canUndo
String returned byClass AbstractUndoableEdit, String UndoNamegetRedoPresentationName
; 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
String returned bygetUndoPresentationName
; 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
Thrown when an UndoableEdit is told toredo()
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.
AAsfuture releaseofSwing will provide1.4 support for long termpersistencestorage of all JavaBeansTM has been added to thejava.beans
package. Please see java.beans.XMLEncoder @version 1.5 07/16/97 @author Ray Ryan
Thrown when an UndoableEdit is told toundo()
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.
AAsfuture releaseofSwing will provide1.4 support for long termpersistencestorage of all JavaBeansTM has been added to thejava.beans
package. Please see java.beans.XMLEncoder @version 1.5 07/16/97 @author Ray Ryan
A concrete subclass of AbstractUndoableEdit used to assemble little UndoableEdits into great big ones. @version 1.Class CompoundEdit, boolean addEdit(UndoableEdit)17 0220 12/0203/0001 @author Ray Ryan
If this edit isClass CompoundEdit, boolean canRedo()inProgress
acceptsanEdit
and returns true.The last edit added to this
CompoundEdit
is given a chance toaddEdit(anEdit)
. If it refuses (returns false)anEdit
is given a chance toreplaceEdit
the last edit. IfanEdit
returns false here it is added toedits
. @param anEdit the edit to be added @return true if the edit isinProgress
; otherwise returns false
Returns false ifClass CompoundEdit, boolean canUndo()isInProgress
or if superdoesreturns false. @see #isInProgress
Returns false ifClass CompoundEdit, void die()isInProgress
or if superdoesreturns false. @see #isInProgress
Class CompoundEdit, void end()SendSendsdie
to each subedit in the reverse of the order that they were added.
Sets inProgress
to false. @see #canUndo @see #canRedo
Class CompoundEdit, String getPresentationName()ReturnsClass CompoundEdit, String getRedoPresentationName()getPresentationName
from the lastUndoableEdit
added toedits
. Ifedits
is empty calls super.
ReturnsClass CompoundEdit, String getUndoPresentationName()getRedoPresentationName
from the lastUndoableEdit
added toedits
. Ifedits
is empty calls super.
ReturnsClass CompoundEdit, boolean isSignificant()getUndoPresentationName
from the lastUndoableEdit
added toedits
. Ifedits
is empty calls super.
Returns true if any of theClass CompoundEdit, UndoableEdit lastEdit()UndoableEditsUndoableEdit
s inedits
do. Returns false if they all return false.
Returns the lastClass CompoundEdit, void redo()UndoableEdit
inedits
ornull
ifedits
is empty.
SendsClass CompoundEdit, void undo()redo
to all contained()UndoableEditsUndoableEdit
s in the order in which they were added.
SendsClass CompoundEdit, Vector editsundo()undoK/code> to all contained
UndoableEdits
in the reverse of the order in which they were added.
The collection ofUndoableEditsUndoableEdit
s undone/redone en masse by thisCompoundEdit
.
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
Concrete subclass ofClass UndoManager, boolean addEdit(UndoableEdit)CompoundEdit
which can serve asanaUndoableEditListener
consolidating theUndoableEditEvents
from a variety of sources and undoing or redoing them one at a time. UnlikeAbstractUndoableEdit
andCompoundEdit
the public methods of this class are synchronized and should be safe to call from multiple threads. This should makeUndoManager
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 ofSwing will provide1.4 support for long termpersistencestorage of all JavaBeansTM has been added to thejava.beans
package. Please see java.beans.XMLEncoder @author Ray Ryan @version 1.28 0432 12/2103/01
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.Class UndoManager, void redo()If not
inProgress
acts as aCompoundEdit
. @param anEdit the edit to be added @see CompoundEdit#end @see CompoundEdit#addEdit
If thisUndoManager
isinProgress
redoes the last significantUndoableEdit
atindexOfNextAdd
or after and all insignificant edits up to it. UpdatesindexOfNextAdd
accordingly.If not
@see CompoundEdit#endinProgress
indexOfNextAdd
is ignored and super's routine is called.
An object representing an edit that has been done and that can be undone and redone. @version 1.Class UndoableEdit, boolean addEdit(UndoableEdit)14 0217 12/0203/0001 @author Ray Ryan
ThisClass UndoableEdit, boolean canRedo()UndoableEdit
should absorbanEdit
if it can.ReturnReturns true ifanEdithas been incoporatedincorporated false if it has not.Typically the receiver is already in the queue of a
UndoManager
(or otherUndoableEditListener
) and is being given a chance to incorporateanEdit
rather than letting it be added to the queue in turn.If true is returned from now on
@param anEdit the edit to be addedanEdit
must return false fromcanUndo
and()canRedo
and must throw the appropriate exception on()undo
or()redo
.()
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.Class UndoableEdit, String getPresentationName()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 getRedoPresentationName()ProvideProvides a localized human readable description of this edit suitable for use in say a change log.
Class UndoableEdit, String getUndoPresentationName()ProvideProvides a localized human readable description of the redoable form of this edit e.g. for use as a Redo menu item. Typically derived fromgetPresentationName
.();
Class UndoableEdit, boolean isSignificant()ProvideProvides a localized human readable description of the undoable form of this edit e.g. for use as an Undo menu item. Typically derived fromgetDescription
.();
Class UndoableEdit, boolean replaceEdit(UndoableEdit)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 anUndoableEditListener
(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.
ReturnReturns true if thisUndoableEdit
should replaceanEdit
. The receiver should incorporateanEdit
'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().
A support class used for managingClass UndoableEditSupport, constructor UndoableEditSupport()UndoableEdit
listeners. @author Ray Ryan @version 1.11 0217 12/0203/0001
Constructs an UndoableEditSupport
object.
Class UndoableEditSupport, constructor UndoableEditSupport(Object)Constructs anClass UndoableEditSupport, void _postEdit(UndoableEdit)UndoableEditSupport
object. @param r anObject
Called only fromClass UndoableEditSupport, void addUndoableEditListener(UndoableEditListener)postEdit
andendUpdate
. CallsundoableEditHappened
in all listeners. No synchronization is performed here since the two calling methods aresynchonizedsynchronized.
Registers anClass UndoableEditSupport, CompoundEdit createCompoundEdit()UndoableEditListener
. The listener is notified whenever an edit occurs which can be undone. @param l anUndoableEditListener
object @see #removeUndoableEditListener
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 anClass UndoableEditSupport, void postEdit(UndoableEdit)intinteger representing the update level
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 anClass UndoableEditSupport, String toString()UndoableEditListener
. @param lantheUndoableEditListener
object to be removed @see #addUndoableEditListener
Returns a string that displays and identifies this object's properties. @return a String
representation of this object