This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.undo
class UndoableEditSupport

java.lang.Object extended by javax.swing.undo.UndoableEditSupport

public class UndoableEditSupport
extends Object

A support class used for managing UndoableEdit listeners.


Field Summary
protected CompoundEdit compoundEdit
          
protected Vector listeners
          
protected Object realSource
          
protected int updateLevel
          
 
Constructor Summary

          Constructs an UndoableEditSupport object.

          Constructs an UndoableEditSupport object.
 
Method Summary
 void

          Registers an UndoableEditListener.
 void

          
protected CompoundEdit

          Called only from beginUpdate.
 void

          DEADLOCK WARNING: Calling this method may call undoableEditHappened in all listeners.
 UndoableEditListener[]

          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.
 String

          Returns a string that displays and identifies this object's properties.
protected void

          Called only from postEdit and endUpdate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compoundEdit

protected CompoundEdit compoundEdit

listeners

protected Vector listeners

realSource

protected Object realSource

updateLevel

protected int updateLevel
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 synchronized void addUndoableEditListener(UndoableEditListener l)
Registers an UndoableEditListener. The listener is notified whenever an edit occurs which can be undone.

Parameters:
l - an UndoableEditListener object

beginUpdate

public synchronized void beginUpdate()

createCompoundEdit

protected CompoundEdit createCompoundEdit()
Called only from beginUpdate. Exposed here for subclasses' use.


endUpdate

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


getUndoableEditListeners

public synchronized 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

getUpdateLevel

public int getUpdateLevel()
Returns the update level value.

Returns:
an integer representing the update level

postEdit

public synchronized void postEdit(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.

Parameters:
e

removeUndoableEditListener

public synchronized void removeUndoableEditListener(UndoableEditListener l)
Removes an UndoableEditListener.

Parameters:
l - the UndoableEditListener object to be removed

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

_postEdit

protected void _postEdit(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.

Parameters:
e


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.