org.tbee.swing
Class CentralUndoManager

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by org.tbee.swing.CentralUndoManager
All Implemented Interfaces:
KeyListener, EventListener, UndoableEditListener

public class CentralUndoManager
extends KeyAdapter
implements UndoableEditListener

This class is used to implement undo and redo on all textfields. One could use the UndoManager which can handle all kinds of objects, like trees: UndoableTree tree = new UndoableTree(rootNode); UndoManager manager = new UndoManager(); tree.addUndoableEditListener(manager);


Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
CentralUndoManager()
           
 
Method Summary
static void install(JFormattedTextField jTextField)
           
static void install(JTextArea jTextField)
           
static void install(JTextField jTextField)
           
 void keyPressed(KeyEvent e)
           
 void undoableEditHappened(UndoableEditEvent e)
           
 
Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

CentralUndoManager

public CentralUndoManager()
Method Detail

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent e)
Specified by:
undoableEditHappened in interface UndoableEditListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener
Overrides:
keyPressed in class KeyAdapter

install

public static void install(JTextField jTextField)

install

public static void install(JFormattedTextField jTextField)

install

public static void install(JTextArea jTextField)


Copyright © 2012 KnowledgePlaza. All Rights Reserved.