Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.undo: Javadoc index of package javax.swing.undo.

Package Samples:



StateEdit: A helper class, making it easy to support undo and redo. The following example shows how to use this class. Foo foo; // class Foo implements StateEditable StateEdit edit; edit = new StateEdit(foo, "Name Change"); foo.setName("Jane Doe"); edit.end(); undoManager.addEdit(edit); If Foo ’s implementation of StateEditable considers the name as part of the editable state, the user can now choose “Undo Name Change” or “Redo Name Change” from the respective menu. No further undo support is needed from the application. The following explains what happens in the example. ...
UndoManager: A manager for providing an application’s undo/redo functionality. Tyipcally, an application will create only one single instance of UndoManager. When the user performs an undoable action, for instance changing the color of an object from green to blue, the application registers an UndoableEdit object with the UndoManager . To implement the “undo” and “redo” menu commands, the application invokes the UndoManager’s undo() 55 and redo() 55 methods. The human-readable text of these menu commands is provided by getUndoPresentationName() 55 and getRedoPresentationName() ...
CompoundEdit: An editing action that consists of multiple UndoableEdits . The use of a CompoundEdit is divided in two separate phases. In the first phase, the CompoundEdit is initialized. After a new instance of CompoundEdit has been created, addEdit(UndoableEdit) 55 is called for each element of the compound. To terminate the initialization phase, call end() 55 . In the second phase, the the CompoundEdit can be used, typically by invoking undo() 55 and redo() 55 .
StateEditable: The interface for objects whose state can be undone or redone by a StateEdit action. The following example shows how to write a class that implements this interface. class Foo implements StateEditable { private String name; public void setName(String n) { name = n; } public void restoreState(Hashtable h) { if (h.containsKey("name")) setName((String) h.get("name")); } public void storeState(Hashtable s) { s.put("name", name); } }
UndoableEditSupport: A helper class for supporting javax.swing.event.UndoableEditListener .
AbstractUndoableEdit: A default implementation of UndoableEdit that can be used as a base for implementing editing operations.
CannotRedoException: An exception which indicates that an editing action cannot be redone.
CannotUndoException: An exception which indicates that an editing action cannot be undone.
UndoableEdit: An editing operation that supports undo/redoability.

Home | Contact Us | Privacy Policy | Terms of Service