public class CompoundUndoManager extends Object implements UndoableEditListener
| Modifier and Type | Field and Description |
|---|---|
protected CompoundEdit |
compoundEdit |
protected static Vector |
docs |
protected Document |
document |
protected static Vector |
lsts |
static Action |
REDO
Static undo action that works across all documents with a
CompoundUndoManager registered as an UndoableEditListener
|
static Action |
UNDO
Static undo action that works across all documents with a
CompoundUndoManager registered as an UndoableEditListener
|
protected UndoManager |
undoer |
protected static Vector |
undoers |
| Constructor and Description |
|---|
CompoundUndoManager(Document doc)
Creates a new CompoundUndoManager
|
CompoundUndoManager(Document doc,
UndoManager um)
Creates a new CompoundUndoManager
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginCompoundEdit() |
static void |
beginCompoundEdit(Document doc)
Notifies the CompoundUndoManager for the specified Document that a
compound edit is about to begin.
|
static void |
discardAllEdits(Document doc)
Discards all edits for the specified Document
|
protected void |
endCompoundEdit() |
static void |
endCompoundEdit(Document doc)
Notifies the CompoundUndoManager for the specified Document that a
compound edit is complete.
|
static UndoManager |
getUndoManagerForDocument(Document doc)
Gets the undo manager for a document that has a CompoundUndoManager as an
UndoableEditListener
|
protected static void |
registerDocument(Document doc,
CompoundUndoManager lst,
UndoManager um) |
void |
undoableEditHappened(UndoableEditEvent evt) |
static void |
updateUndo(Document doc)
Updates the enabled states of the UNDO and REDO actions for the specified
document
|
public static Action UNDO
public static Action REDO
protected UndoManager undoer
protected CompoundEdit compoundEdit
protected Document document
protected static Vector docs
protected static Vector lsts
protected static Vector undoers
public CompoundUndoManager(Document doc, UndoManager um)
doc - um - The UndoManager to use for this documentpublic CompoundUndoManager(Document doc)
doc - protected static void registerDocument(Document doc, CompoundUndoManager lst, UndoManager um)
public static UndoManager getUndoManagerForDocument(Document doc)
doc - public static void beginCompoundEdit(Document doc)
doc - public static void endCompoundEdit(Document doc)
doc - public static void updateUndo(Document doc)
doc - public static void discardAllEdits(Document doc)
doc - public void undoableEditHappened(UndoableEditEvent evt)
undoableEditHappened in interface UndoableEditListenerprotected void beginCompoundEdit()
protected void endCompoundEdit()
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.