|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
ca.sqlpower.architect.undo.UndoManager
public class UndoManager
| Nested Class Summary | |
|---|---|
class |
UndoManager.SQLObjectUndoableEventAdapter
Converts received SQLObjectEvents into UndoableEdits, PropertyChangeEvents into specific edits and adds them to an UndoManager. |
| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
UndoManager(PlayPen playPen)
Creates a new UndoManager and attaches it to the given PlayPen's component and SQL Object model events. |
|
UndoManager(SQLObject sqlObjectRoot)
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds the given change listener, which will be notified with a ChangeEvent every time this undo manager's state has changed. |
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
Adds then given edit to this undo manager. |
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
fireStateChanged()
Notifies listeners that the undo/redo list might have changed. |
UndoManager.SQLObjectUndoableEventAdapter |
getEventAdapter()
Returns the event adapter for SQLObjects and compound events. |
int |
getRedoableEditCount()
|
int |
getUndoableEditCount()
|
boolean |
isRedoing()
|
boolean |
isUndoing()
|
boolean |
isUndoOrRedoing()
|
java.lang.String |
printUndoVector()
|
void |
redo()
Calls super.redo() then refreshes the undo/redo actions. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the given change listener, so it will no longer be notified when this manager's state changes. |
void |
undo()
Calls super.undo() then refreshes the undo/redo actions. |
| Methods inherited from class javax.swing.undo.UndoManager |
|---|
canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
die, getPresentationName, isInProgress, isSignificant, lastEdit |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
replaceEdit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ca.sqlpower.architect.undo.NotifyingUndoManager |
|---|
getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName |
| Constructor Detail |
|---|
public UndoManager(PlayPen playPen)
throws ArchitectException
playPen - The play pen to track undo/redo history for.
ArchitectException - If the manager fails to listen to all objects in the play
pen's database hierarchy.
public UndoManager(SQLObject sqlObjectRoot)
throws ArchitectException
ArchitectException| Method Detail |
|---|
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
Warning: Edits added here do not respect compounding. You can add a whole CompoundEdit here, but if the current state of the undo manager is that it's in a compound edit, it doesn't matter. You will get individual edits when you add individual edits.
addEdit in interface javax.swing.undo.UndoableEditaddEdit in class javax.swing.undo.UndoManager
public void undo()
throws javax.swing.undo.CannotUndoException
undo in interface NotifyingUndoManagerundo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.UndoManagerjavax.swing.undo.CannotUndoException
public void redo()
throws javax.swing.undo.CannotRedoException
redo in interface NotifyingUndoManagerredo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.UndoManagerjavax.swing.undo.CannotRedoExceptionpublic boolean canUndo()
canUndo in interface NotifyingUndoManagercanUndo in interface javax.swing.undo.UndoableEditcanUndo in class javax.swing.undo.UndoManagerpublic boolean canRedo()
canRedo in interface NotifyingUndoManagercanRedo in interface javax.swing.undo.UndoableEditcanRedo in class javax.swing.undo.UndoManagerpublic int getUndoableEditCount()
public int getRedoableEditCount()
public boolean isRedoing()
public boolean isUndoing()
public boolean isUndoOrRedoing()
public UndoManager.SQLObjectUndoableEventAdapter getEventAdapter()
public void addChangeListener(javax.swing.event.ChangeListener l)
NotifyingUndoManager
addChangeListener in interface NotifyingUndoManagerpublic void removeChangeListener(javax.swing.event.ChangeListener l)
NotifyingUndoManager
removeChangeListener in interface NotifyingUndoManagerpublic void fireStateChanged()
public java.lang.String printUndoVector()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||