|
||||||||||
| 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
org.freehep.swing.undo.AnimatedCompoundEdit
public class AnimatedCompoundEdit
| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
AnimatedCompoundEdit()
Create an AnimatedCompoundEdit that still needs to be "(re)done". |
|
AnimatedCompoundEdit(boolean done)
|
|
AnimatedCompoundEdit(String name)
|
|
AnimatedCompoundEdit(String name,
boolean done)
Create an AnimatedCompoundEdit that can be in either "done" or "undone" state. |
|
| Method Summary | |
|---|---|
boolean |
addEdit(LinkableEdit edit)
If this edit is inProgress,
accepts anEdit and returns true. |
boolean |
addEdit(UndoableEdit edit)
Returns false since only LinkableEdits can be added. |
boolean |
canRedo()
Returns false if isInProgress. |
boolean |
canUndo()
Returns false if isInProgress. |
void |
die()
Sends die to each subedit,
in the reverse of the order that they were added. |
void |
end()
Sets inProgress to false. |
LinkableEdit |
getFirstEdit()
|
LinkableEdit |
getLastEdit()
|
String |
getName()
Returns name (if set). |
LinkableEdit |
getNextEdit()
Returns the next edit. |
LinkableEdit |
getParent()
Returns the parent. |
String |
getPresentationName()
Returns getPresentationName from the
last LinkableEdit added. |
LinkableEdit |
getPreviousEdit()
Returns the previous edit. |
String |
getRedoPresentationName()
Returns getRedoPresentationName
from the last LinkableEdit
added. |
String |
getUndoPresentationName()
Returns getUndoPresentationName
from the last LinkableEdit
added. |
boolean |
isInProgress()
Returns true if this edit is in progress--that is, it has not received end. |
boolean |
isSignificant()
Returns true if any of the LinkableEdits
in edits do. |
protected UndoableEdit |
lastEdit()
Returns the last LinkableEdit, or null. |
void |
redo()
Sends redo to all contained
LinkableEdits in the order in
which they were added. |
void |
setNextEdit(LinkableEdit edit)
Connects to the next edit. |
void |
setParent(LinkableEdit parent)
Sets the parent, can only be called once. |
void |
setPreviousEdit(LinkableEdit edit)
Connext to the previous edit. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
void |
undo()
Sends undo to all contained
LinkableEdits in the reverse of
the order in which they were added. |
| 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 javax.swing.undo.UndoableEdit |
|---|
replaceEdit |
| Methods inherited from interface javax.swing.undo.UndoableEdit |
|---|
replaceEdit |
| Constructor Detail |
|---|
public AnimatedCompoundEdit()
public AnimatedCompoundEdit(String name)
public AnimatedCompoundEdit(boolean done)
public AnimatedCompoundEdit(String name,
boolean done)
| Method Detail |
|---|
public LinkableEdit getParent()
LinkableEdit
getParent in interface LinkableEditpublic void setParent(LinkableEdit parent)
LinkableEdit
setParent in interface LinkableEditpublic LinkableEdit getFirstEdit()
public LinkableEdit getLastEdit()
public LinkableEdit getNextEdit()
LinkableEdit
getNextEdit in interface LinkableEditpublic void setNextEdit(LinkableEdit edit)
LinkableEdit
setNextEdit in interface LinkableEditpublic LinkableEdit getPreviousEdit()
LinkableEdit
getPreviousEdit in interface LinkableEditpublic void setPreviousEdit(LinkableEdit edit)
LinkableEdit
setPreviousEdit in interface LinkableEdit
public void undo()
throws CannotUndoException
undo to all contained
LinkableEdits in the reverse of
the order in which they were added.
undo in interface UndoableEditundo in class CompoundEditCannotUndoException
public void redo()
throws CannotRedoException
redo to all contained
LinkableEdits in the order in
which they were added.
redo in interface UndoableEditredo in class CompoundEditCannotRedoExceptionprotected UndoableEdit lastEdit()
LinkableEdit, or null.
lastEdit in class CompoundEditpublic void die()
die to each subedit,
in the reverse of the order that they were added.
die in interface UndoableEditdie in class CompoundEditpublic boolean addEdit(UndoableEdit edit)
addEdit in interface UndoableEditaddEdit in class CompoundEditpublic boolean addEdit(LinkableEdit edit)
inProgress,
accepts anEdit and returns true.
The last edit added to this CompoundEdit
is given a chance to addEdit(anEdit).
If it refuses (returns false), anEdit is
given a chance to replaceEdit the last edit.
If anEdit returns false here,
it is added to edits.
edit - the edit to be added
inProgress;
otherwise returns falsepublic void end()
inProgress to false.
end in class CompoundEditcanUndo(),
canRedo()public boolean canUndo()
isInProgress.
canUndo in interface UndoableEditcanUndo in class CompoundEditisInProgress()public boolean canRedo()
isInProgress.
canRedo in interface UndoableEditcanRedo in class CompoundEditisInProgress()public boolean isInProgress()
isInProgress in class CompoundEditend()public boolean isSignificant()
LinkableEdits
in edits do.
Returns false if they all return false.
isSignificant in interface UndoableEditisSignificant in class CompoundEditpublic String getName()
public String getPresentationName()
getPresentationName from the
last LinkableEdit added. If this edit is empty,
calls super.
getPresentationName in interface UndoableEditgetPresentationName in class CompoundEditpublic String getUndoPresentationName()
getUndoPresentationName
from the last LinkableEdit
added.
If edit is empty, calls super.
getUndoPresentationName in interface UndoableEditgetUndoPresentationName in class CompoundEditpublic String getRedoPresentationName()
getRedoPresentationName
from the last LinkableEdit
added.
If edit is empty, calls super.
getRedoPresentationName in interface UndoableEditgetRedoPresentationName in class CompoundEditpublic String toString()
toString in class CompoundEdit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||