|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.developpez.ydisanto.swing.undo.UndoableJTextManager
public class UndoableJTextManager
UndoableJTextManager
provides methods to implement undo and
redo on JTextComponent
s using UndoMapping
.
UndoMapping
Field Summary | |
---|---|
static javax.swing.KeyStroke |
DEFAULT_REDO_KEYSTROKE
The Default redo KeyStroke builded with the
KeyEvent.VK_Y key code and the
InputEvent.CTRL_MASK modifier . |
static javax.swing.KeyStroke |
DEFAULT_UNDO_KEYSTROKE
The Default undo KeyStroke builded with the
KeyEvent.VK_Z key code and the
InputEvent.CTRL_MASK modifier . |
Method Summary | |
---|---|
javax.swing.Action |
getRedoAction(javax.swing.text.JTextComponent component)
Returns the redo Action associated with the specified
JTextComponent . |
static UndoableJTextManager |
getUndoableJTextManager()
Returns the UndoableJTextManager object associated
with the current Java application. |
javax.swing.Action |
getUndoAction(javax.swing.text.JTextComponent component)
Returns the undo Action associated with the specified
JTextComponent . |
javax.swing.undo.UndoManager |
getUndoManager(javax.swing.text.JTextComponent component)
Returns the UndoManager associated with the specified
JTextComponent . |
UndoMapping |
getUndoMapping(javax.swing.text.JTextComponent component)
Returns the UndoMapping associated with the specified
JTextComponent . |
boolean |
isUndoable(javax.swing.text.JTextComponent component)
Returns true if the specified JTextComponent is undoable. |
UndoMapping |
makesUndoable(javax.swing.text.JTextComponent component)
Makes the specified JTextComponent undoable. |
UndoMapping |
makesUndoable(javax.swing.text.JTextComponent component,
javax.swing.KeyStroke undoKeyStroke,
javax.swing.KeyStroke redoKeyStroke)
Makes the specified JTextComponent undoable. |
UndoMapping |
makesUndoable(javax.swing.text.JTextComponent component,
javax.swing.KeyStroke undoKeyStroke,
javax.swing.KeyStroke redoKeyStroke,
UndoListener listener)
Makes the specified JTextComponent undoable. |
UndoMapping |
makesUndoable(javax.swing.text.JTextComponent component,
UndoListener listener)
Makes the specified JTextComponent undoable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final javax.swing.KeyStroke DEFAULT_REDO_KEYSTROKE
KeyStroke
builded with the
KeyEvent.VK_Y
key code and the
InputEvent.CTRL_MASK modifier
.
public static final javax.swing.KeyStroke DEFAULT_UNDO_KEYSTROKE
KeyStroke
builded with the
KeyEvent.VK_Z
key code and the
InputEvent.CTRL_MASK modifier
.
Method Detail |
---|
public javax.swing.Action getRedoAction(javax.swing.text.JTextComponent component)
Action
associated with the specified
JTextComponent
.
Action
associated with the specified
JTextComponent
.
(null if the specified JTextComponent
is not undoable).public static UndoableJTextManager getUndoableJTextManager()
UndoableJTextManager
object associated
with the current Java application.
UndoableJTextManager
object associated
with the current Java application.public javax.swing.Action getUndoAction(javax.swing.text.JTextComponent component)
Action
associated with the specified
JTextComponent
.
Action
associated with the specified
JTextComponent
.
(null if the specified JTextComponent
is not undoable).public javax.swing.undo.UndoManager getUndoManager(javax.swing.text.JTextComponent component)
UndoManager
associated with the specified
JTextComponent
.
UndoManager
associated with the specified
JTextComponent
.
(null if the specified JTextComponent
is not undoable).public UndoMapping getUndoMapping(javax.swing.text.JTextComponent component)
UndoMapping
associated with the specified
JTextComponent
.
UndoMapping
associated with the specified
JTextComponent
.
(null if the specified JTextComponent
is not undoable).public boolean isUndoable(javax.swing.text.JTextComponent component)
JTextComponent
is undoable.
JTextComponent
is undoable.public UndoMapping makesUndoable(javax.swing.text.JTextComponent component)
JTextComponent
undoable. Also maps undo
to CTRL + Z keystroke and redo to CTRL + Y keystroke.
component
- the JTextComponent
.
UndoMapping
associated with the specified
JTextComponent.public UndoMapping makesUndoable(javax.swing.text.JTextComponent component, UndoListener listener)
JTextComponent
undoable. Also maps undo
to CTRL + Z keystroke and redo to CTRL + Y keystroke.
component
- the JTextComponent
.listener
- a UndoListener
.
UndoMapping
associated with the specified
JTextComponent.public UndoMapping makesUndoable(javax.swing.text.JTextComponent component, javax.swing.KeyStroke undoKeyStroke, javax.swing.KeyStroke redoKeyStroke)
JTextComponent
undoable. Also maps undo
and redo to the specified KeyStroke
s (null can be specified
for no mapping).
component
- the JTextComponent
.undoKeyStroke
- KeyStroke
to maps undo on.redoKeyStroke
- KeyStroke
to maps redo on.
UndoMapping
associated with the specified
JTextComponent
.public UndoMapping makesUndoable(javax.swing.text.JTextComponent component, javax.swing.KeyStroke undoKeyStroke, javax.swing.KeyStroke redoKeyStroke, UndoListener listener)
JTextComponent
undoable. Also maps undo
and redo to the specified KeyStroke
s (null can be specified
for no undoMapping).
component
- the JTextComponent
.undoKeyStroke
- KeyStroke
to maps undo on.redoKeyStroke
- KeyStroke
to maps redo on.listener
- a UndoListener
.
UndoMapping
associated with the specified
JTextComponent
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |