Java Swing O Reilly 18.1.9 The UndoableEditSupport Class (Graphic web design)
Java Swing O Reilly 18.1.9 The UndoableEditSupport Class UndoableEditSupport is a simple utility class for classes that need to support undo.[9] It provides methods for adding and removing UndoableEditListeners, as well as a postEdit() method used to send an UndoableEditEvent to the added listeners. Additionally, it allows multiple edits to be added to it and then fired as a single CompoundEdit. [9] Presently, none of the Swing classes that support undo actually use this class. Instead, they manage their edits and listeners themselves. 18.1.9.1 Property UndoableEditSupport is a direct subclass of Object and defines the updateLevel property shown in Table 18.8. updateLevel reflects the current level of nesting of beginUpdate() calls. See the discussion of Section 18.1.9.5 for more information on this property. Table 18.8, UndoableEditSupport Property Property Data Type get (get) is set (set) bound Default Value updateLevel int 0 18.1.9.2 Protected Fields The following fields are available to subclasses of UndoableEditSupport. protected CompoundEdit compoundEdit This is the edit used to group together multiple edits that are added between beginUpdate() and endUpdate() calls. See the discussion of Section 18.1.9.5 later in this section. protected Vector listeners This is where the list of listeners is stored. protected Object realSource Holds the event source used for all events fired by this object. If the source is set when the UndoableEditSupport is created, that object will be sent as the source of all events. Otherwise, the UndoableEditSupport itself will become the source. protected int updateLevel This is where the updateLevel property is stored. 18.1.9.3 Constructors public UndoableEditSupport() Creates a new support object, which will use itself as the source object for any events it fires. public UndoableEditSupport(Object r) - 571 -
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.