|
||||||||||
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
com.jaxfront.core.util.undo.UndoManagerWrapper
com.jaxfront.core.util.undo.JAXFrontUndoManager
public class JAXFrontUndoManager
Constructor Summary | |
---|---|
JAXFrontUndoManager(Document dom)
|
Method Summary | |
---|---|
void |
abortCompoundEdit()
|
void |
addChangeSerializationUndoableEditEvent(java.lang.Object eventSource,
Type target,
boolean newValue,
boolean oldValue)
|
void |
addChoiceChangeUndoableEditEvent(java.lang.Object eventSource,
Type target,
Type newValue,
Type oldValue,
boolean isTemporary)
|
void |
addListChangeEditEvent(java.lang.Object eventSource,
ListType target,
Type listItem,
int index,
short action)
|
void |
addListItemMovedEvent(java.lang.Object eventSource,
ListType target,
int from,
int to)
|
void |
addListSortEvent(java.lang.Object eventSource,
ListType target,
int direction,
int inverseDirection,
java.lang.String actionName)
|
void |
addMacroEdit(javax.swing.undo.UndoableEdit edit)
|
void |
addPasteUndoableEditEvent(java.lang.Object eventSource,
Type target,
java.lang.String newValue,
java.lang.String oldValue,
boolean isTemporary)
|
void |
addPropertyChangeEditEvent(java.lang.Object eventSource,
SimpleType target,
java.lang.String newValue,
java.lang.String oldValue)
|
void |
addRecursionEventUndoableEditWrapper(java.lang.Object eventSource,
Type recursionType,
short action)
|
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Adds an undo listener for notification of any changes. |
void |
blockInput(boolean blocked)
|
boolean |
canMacroRedo()
|
boolean |
canMacroRedo(int from)
|
boolean |
canMacroUndo()
|
boolean |
canMacroUndo(int from)
|
void |
createFromSerialize(org.w3c.dom.Document serialDom)
|
void |
discardAllEdits()
Empty the undo manager, sending each edit a die message in the process. |
java.util.List |
getEditSteps()
|
int |
getMaxEditIndex()
|
int |
getNextEditIndex()
|
javax.swing.event.UndoableEditListener[] |
getUndoableEditListeners()
Returns an array of all the undoable edit listeners registered on this document. |
boolean |
isBlocked()
|
boolean |
isInCompoundEditState()
|
boolean |
isRedoing()
|
boolean |
isUndoing()
|
void |
macroRedo()
|
void |
macroRedo(int from)
|
void |
macroUndo()
|
void |
macroUndo(int from)
|
static JAXFrontUndoableEdit |
parseEventObject(JAXFrontUndoManager manager,
javax.swing.undo.UndoableEdit edit,
Document dom,
org.w3c.dom.Element event,
java.util.List edits)
|
void |
redo()
If this UndoManager is inProgress ,
redoes the last significant UndoableEdit at
indexOfNextAdd or after, and all insignificant
edits up to it. |
void |
release()
|
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Removes an undo listener. |
java.lang.String |
serializeUndoManager()
|
void |
serializeUndoManager(java.io.File location)
|
void |
serializeUndoManager(java.io.File location,
java.util.List editList)
|
void |
serializeUndoManager(java.io.PrintWriter writer)
|
void |
serializeUndoManager(java.io.PrintWriter writer,
java.util.List editList)
|
void |
startCompoundEdit()
|
void |
stopCompoundEdit()
|
void |
undo()
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it. |
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
Called by the UndoabledEdit sources this UndoManager listens to. |
void |
write(java.lang.String url)
|
Methods inherited from class com.jaxfront.core.util.undo.UndoManagerWrapper |
---|
addEdit, canRedo, canUndo, canUndoOrRedo, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, setLimit, toString, undoOrRedo |
Methods inherited from class javax.swing.undo.CompoundEdit |
---|
die, getPresentationName, isInProgress, isSignificant |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
replaceEdit |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JAXFrontUndoManager(Document dom)
Method Detail |
---|
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
UndoManagerWrapper
undoableEditHappened
in interface javax.swing.event.UndoableEditListener
undoableEditHappened
in class UndoManagerWrapper
UndoManagerWrapper.addEdit(javax.swing.undo.UndoableEdit)
public void addPropertyChangeEditEvent(java.lang.Object eventSource, SimpleType target, java.lang.String newValue, java.lang.String oldValue)
public void addListChangeEditEvent(java.lang.Object eventSource, ListType target, Type listItem, int index, short action)
public void addListItemMovedEvent(java.lang.Object eventSource, ListType target, int from, int to)
public void addListSortEvent(java.lang.Object eventSource, ListType target, int direction, int inverseDirection, java.lang.String actionName)
public void addChoiceChangeUndoableEditEvent(java.lang.Object eventSource, Type target, Type newValue, Type oldValue, boolean isTemporary)
public void addChangeSerializationUndoableEditEvent(java.lang.Object eventSource, Type target, boolean newValue, boolean oldValue)
public void addRecursionEventUndoableEditWrapper(java.lang.Object eventSource, Type recursionType, short action)
public void addPasteUndoableEditEvent(java.lang.Object eventSource, Type target, java.lang.String newValue, java.lang.String oldValue, boolean isTemporary)
public void addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
UndoableEdit
will cause the
appropriate DocumentEvent to be fired to keep the view(s) in sync with
the model.
listener
- the UndoableEditListener
to addDocument#addUndoableEditListener
public void removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
listener
- the UndoableEditListener
to removeDocument#removeDocumentListener
public javax.swing.event.UndoableEditListener[] getUndoableEditListeners()
UndoableEditListener
s or
an empty array if no undoable edit listeners are currently
registeredaddUndoableEditListener(javax.swing.event.UndoableEditListener)
,
removeUndoableEditListener(javax.swing.event.UndoableEditListener)
public void startCompoundEdit()
public boolean isInCompoundEditState()
public void undo() throws javax.swing.undo.CannotUndoException
UndoManagerWrapper
If not inProgress, indexOfNextAdd is ignored and super's routine is called.
undo
in interface javax.swing.undo.UndoableEdit
undo
in class UndoManagerWrapper
javax.swing.undo.CannotUndoException
CompoundEdit.end()
public void redo() throws javax.swing.undo.CannotRedoException
UndoManagerWrapper
UndoManager
is inProgress
,
redoes the last significant UndoableEdit
at
indexOfNextAdd
or after, and all insignificant
edits up to it. Updates indexOfNextAdd
accordingly.
If not inProgress
, indexOfNextAdd
is ignored and super's routine is called.
redo
in interface javax.swing.undo.UndoableEdit
redo
in class UndoManagerWrapper
javax.swing.undo.CannotRedoException
CompoundEdit.end()
public void stopCompoundEdit()
public void abortCompoundEdit()
public void blockInput(boolean blocked)
public boolean isBlocked()
public void release()
public java.lang.String serializeUndoManager()
public void serializeUndoManager(java.io.PrintWriter writer)
public void serializeUndoManager(java.io.PrintWriter writer, java.util.List editList)
public void serializeUndoManager(java.io.File location) throws java.io.IOException
java.io.IOException
public void serializeUndoManager(java.io.File location, java.util.List editList) throws java.io.IOException
java.io.IOException
public void createFromSerialize(org.w3c.dom.Document serialDom)
public void write(java.lang.String url)
public void discardAllEdits()
UndoManagerWrapper
discardAllEdits
in class UndoManagerWrapper
public static JAXFrontUndoableEdit parseEventObject(JAXFrontUndoManager manager, javax.swing.undo.UndoableEdit edit, Document dom, org.w3c.dom.Element event, java.util.List edits)
public boolean canMacroUndo() throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public boolean canMacroRedo()
public void macroUndo() throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public void macroRedo()
public boolean canMacroUndo(int from) throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public boolean canMacroRedo(int from)
public void macroUndo(int from) throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public void macroRedo(int from)
public int getNextEditIndex()
public int getMaxEditIndex()
public java.util.List getEditSteps()
public void addMacroEdit(javax.swing.undo.UndoableEdit edit)
public boolean isUndoing()
public boolean isRedoing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |