javax.swing.undo
Class UndoableEditSupport

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.undo.UndoableEditSupport

public class UndoableEditSupport
extends Object sample code for java.lang.Object definition code for java.lang.Object

A support class used for managing UndoableEdit listeners.


Field Summary
protected  CompoundEdit sample code for javax.swing.undo.CompoundEdit definition code for javax.swing.undo.CompoundEdit compoundEdit sample code for javax.swing.undo.UndoableEditSupport.compoundEdit definition code for javax.swing.undo.UndoableEditSupport.compoundEdit
           
protected  Vector sample code for java.util.Vector definition code for java.util.Vector <UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener > listeners sample code for javax.swing.undo.UndoableEditSupport.listeners definition code for javax.swing.undo.UndoableEditSupport.listeners
           
protected  Object sample code for java.lang.Object definition code for java.lang.Object realSource sample code for javax.swing.undo.UndoableEditSupport.realSource definition code for javax.swing.undo.UndoableEditSupport.realSource
           
protected  int updateLevel sample code for javax.swing.undo.UndoableEditSupport.updateLevel definition code for javax.swing.undo.UndoableEditSupport.updateLevel
           
 
Constructor Summary
UndoableEditSupport sample code for javax.swing.undo.UndoableEditSupport.UndoableEditSupport() definition code for javax.swing.undo.UndoableEditSupport.UndoableEditSupport() ()
          Constructs an UndoableEditSupport object.
UndoableEditSupport sample code for javax.swing.undo.UndoableEditSupport.UndoableEditSupport(java.lang.Object) definition code for javax.swing.undo.UndoableEditSupport.UndoableEditSupport(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  r)
          Constructs an UndoableEditSupport object.
 
Method Summary
protected  void _postEdit sample code for javax.swing.undo.UndoableEditSupport._postEdit(javax.swing.undo.UndoableEdit) definition code for javax.swing.undo.UndoableEditSupport._postEdit(javax.swing.undo.UndoableEdit) (UndoableEdit sample code for javax.swing.undo.UndoableEdit definition code for javax.swing.undo.UndoableEdit  e)
          Called only from postEdit and endUpdate.
 void addUndoableEditListener sample code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener) (UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener  l)
          Registers an UndoableEditListener.
 void beginUpdate sample code for javax.swing.undo.UndoableEditSupport.beginUpdate() definition code for javax.swing.undo.UndoableEditSupport.beginUpdate() ()
           
protected  CompoundEdit sample code for javax.swing.undo.CompoundEdit definition code for javax.swing.undo.CompoundEdit createCompoundEdit sample code for javax.swing.undo.UndoableEditSupport.createCompoundEdit() definition code for javax.swing.undo.UndoableEditSupport.createCompoundEdit() ()
          Called only from beginUpdate.
 void endUpdate sample code for javax.swing.undo.UndoableEditSupport.endUpdate() definition code for javax.swing.undo.UndoableEditSupport.endUpdate() ()
          DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
 UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener [] getUndoableEditListeners sample code for javax.swing.undo.UndoableEditSupport.getUndoableEditListeners() definition code for javax.swing.undo.UndoableEditSupport.getUndoableEditListeners() ()
          Returns an array of all the UndoableEditListeners added to this UndoableEditSupport with addUndoableEditListener().
 int getUpdateLevel sample code for javax.swing.undo.UndoableEditSupport.getUpdateLevel() definition code for javax.swing.undo.UndoableEditSupport.getUpdateLevel() ()
          Returns the update level value.
 void postEdit sample code for javax.swing.undo.UndoableEditSupport.postEdit(javax.swing.undo.UndoableEdit) definition code for javax.swing.undo.UndoableEditSupport.postEdit(javax.swing.undo.UndoableEdit) (UndoableEdit sample code for javax.swing.undo.UndoableEdit definition code for javax.swing.undo.UndoableEdit  e)
          DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
 void removeUndoableEditListener sample code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener) (UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener  l)
          Removes an UndoableEditListener.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.swing.undo.UndoableEditSupport.toString() definition code for javax.swing.undo.UndoableEditSupport.toString() ()
          Returns a string that displays and identifies this object's properties.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

updateLevel sample code for javax.swing.undo.UndoableEditSupport.updateLevel

protected int updateLevel

compoundEdit sample code for javax.swing.undo.UndoableEditSupport.compoundEdit

protected CompoundEdit sample code for javax.swing.undo.CompoundEdit definition code for javax.swing.undo.CompoundEdit  compoundEdit

listeners sample code for javax.swing.undo.UndoableEditSupport.listeners

protected Vector sample code for java.util.Vector definition code for java.util.Vector <UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener > listeners

realSource sample code for javax.swing.undo.UndoableEditSupport.realSource

protected Object sample code for java.lang.Object definition code for java.lang.Object  realSource
Constructor Detail

UndoableEditSupport sample code for javax.swing.undo.UndoableEditSupport() definition code for javax.swing.undo.UndoableEditSupport()

public UndoableEditSupport()
Constructs an UndoableEditSupport object.


UndoableEditSupport sample code for javax.swing.undo.UndoableEditSupport(java.lang.Object) definition code for javax.swing.undo.UndoableEditSupport(java.lang.Object)

public UndoableEditSupport(Object sample code for java.lang.Object definition code for java.lang.Object  r)
Constructs an UndoableEditSupport object.

Parameters:
r - an Object
Method Detail

addUndoableEditListener sample code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener)

public void addUndoableEditListener(UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener  l)
Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone.

Parameters:
l - an UndoableEditListener object
See Also:
removeUndoableEditListener(javax.swing.event.UndoableEditListener) sample code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener)

removeUndoableEditListener sample code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.removeUndoableEditListener(javax.swing.event.UndoableEditListener)

public void removeUndoableEditListener(UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.UndoableEditListener  l)
Removes an UndoableEditListener.

Parameters:
l - the UndoableEditListener object to be removed
See Also:
addUndoableEditListener(javax.swing.event.UndoableEditListener) sample code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.undo.UndoableEditSupport.addUndoableEditListener(javax.swing.event.UndoableEditListener)

getUndoableEditListeners sample code for javax.swing.undo.UndoableEditSupport.getUndoableEditListeners() definition code for javax.swing.undo.UndoableEditSupport.getUndoableEditListeners()

public UndoableEditListener sample code for javax.swing.event.UndoableEditListener definition code for javax.swing.event.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 sample code for javax.swing.undo.UndoableEditSupport._postEdit(javax.swing.undo.UndoableEdit) definition code for javax.swing.undo.UndoableEditSupport._postEdit(javax.swing.undo.UndoableEdit)

protected void _postEdit(UndoableEdit sample code for javax.swing.undo.UndoableEdit definition code for javax.swing.undo.UndoableEdit  e)
Called only from postEdit and endUpdate. Calls undoableEditHappened in all listeners. No synchronization is performed here, since the two calling methods are synchronized.


postEdit sample code for javax.swing.undo.UndoableEditSupport.postEdit(javax.swing.undo.UndoableEdit) definition code for javax.swing.undo.UndoableEditSupport.postEdit(javax.swing.undo.UndoableEdit)

public void postEdit(UndoableEdit sample code for javax.swing.undo.UndoableEdit definition code for javax.swing.undo.UndoableEdit  e)
DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners. It is unwise to call this method from one of its listeners.


getUpdateLevel sample code for javax.swing.undo.UndoableEditSupport.getUpdateLevel() definition code for javax.swing.undo.UndoableEditSupport.getUpdateLevel()

public int getUpdateLevel()
Returns the update level value.

Returns:
an integer representing the update level

beginUpdate sample code for javax.swing.undo.UndoableEditSupport.beginUpdate() definition code for javax.swing.undo.UndoableEditSupport.beginUpdate()

public void beginUpdate()

createCompoundEdit sample code for javax.swing.undo.UndoableEditSupport.createCompoundEdit() definition code for javax.swing.undo.UndoableEditSupport.createCompoundEdit()

protected CompoundEdit sample code for javax.swing.undo.CompoundEdit definition code for javax.swing.undo.CompoundEdit  createCompoundEdit()
Called only from beginUpdate. Exposed here for subclasses' use.


endUpdate sample code for javax.swing.undo.UndoableEditSupport.endUpdate() definition code for javax.swing.undo.UndoableEditSupport.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 sample code for javax.swing.undo.UndoableEditSupport.toString() definition code for javax.swing.undo.UndoableEditSupport.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string that displays and identifies this object's properties.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a String representation of this object