Class 
Use 
SUMMARY: NESTED | FIELD | CONSTR | METHOD      DETAIL: FIELD | CONSTR | METHOD
FlexDoc/Javadoc 2.0
Demo Java Doc

java.desktop / javax.swing.undo
Class UndoableEditSupport
java.lang.Object
  javax.swing.undo.UndoableEditSupport

public class UndoableEditSupport
extends Object
A support class used for managing UndoableEdit listeners.
Author:
Ray Ryan

Field Summary
protected CompoundEdit
The compound edit.
The list of listeners.
protected Object
The real source.
protected int
The update level.
Constructor Summary
Constructs an UndoableEditSupport object.
Constructs an UndoableEditSupport object.
Method Summary
protected void
Called only from postEdit and endUpdate.
void
Registers an UndoableEditListener.
void
protected CompoundEdit
Called only from beginUpdate.
void
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
Returns an array of all the UndoableEditListeners added to this UndoableEditSupport with addUndoableEditListener().
int
Returns the update level value.
void
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
void
Removes an UndoableEditListener.
Returns a string that displays and identifies this object's properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
updateLevel
protected int updateLevel
The update level.

compoundEdit
protected CompoundEdit compoundEdit
The compound edit.

listeners
protected Vector<UndoableEditListener> listeners
The list of listeners.

realSource
protected Object realSource
The real source.
Constructor Detail
UndoableEditSupport
public UndoableEditSupport
()
Constructs an UndoableEditSupport object.

UndoableEditSupport
public UndoableEditSupport
(Object r)
Constructs an UndoableEditSupport object.
Parameters:
r - an Object
Method Detail
addUndoableEditListener
public void addUndoableEditListener
Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone.
Parameters:
l - an UndoableEditListener object
See Also:
removeUndoableEditListener(UndoableEditListener)

removeUndoableEditListener
public void removeUndoableEditListener
Removes an UndoableEditListener.
Parameters:
l - the UndoableEditListener object to be removed
See Also:
addUndoableEditListener(UndoableEditListener)

getUndoableEditListeners
public UndoableEditListener[] getUndoableEditListeners
()
Returns an array of all the UndoableEditListeners added to this UndoableEditSupport with addUndoableEditListener().
Returns:
all of the UndoableEditListeners added or an empty array if no listeners have been added
Since:
1.4

_postEdit
protected void _postEdit
Called only from postEdit and endUpdate. Calls undoableEditHappened in all listeners. No synchronization is performed here, since the two calling methods are synchronized.
Parameters:
e - edit to be verified

postEdit
public void postEdit
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.
Parameters:
e - edit to be posted

getUpdateLevel
public int getUpdateLevel
()
Returns the update level value.
Returns:
an integer representing the update level

beginUpdate
public void beginUpdate
()

createCompoundEdit
protected CompoundEdit createCompoundEdit
()
Called only from beginUpdate. Exposed here for subclasses' use.
Returns:
new created CompoundEdit object

endUpdate
public 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.

toString
public String toString
()
Returns a string that displays and identifies this object's properties.
Overrides:
toString in class Object
Returns:
a String representation of this object

 Class 
Use 
SUMMARY: NESTED | FIELD | CONSTR | METHOD      DETAIL: FIELD | CONSTR | METHOD
FlexDoc/Javadoc 2.0
Demo Java Doc

Java API documentation generated with FlexDoc/Javadoc 2.0 using JavadocClassic 3.0 template set.
FlexDoc/Javadoc is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch, FlexDoc/Javadoc may be the only tool able to help you! Find out more at www.flexdoc.xyz