|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
templates.diagram.actions.AbstractDiagramUndoableEdit
templates.diagram.actions.DiagramUndoableEdits.MovedSelectionEdit
public static class DiagramUndoableEdits.MovedSelectionEdit
Edit which does and undoes the relocation of DiagramElements in a
TemplateDiagram.
| Field Summary | |
|---|---|
protected java.awt.Point |
delta
The displacement of the relocation. |
protected TemplateDiagram |
diagram
The TemplateDiagram which contains the DiagramElement
s to be relocated. |
protected java.util.Collection<DiagramElement> |
selection
The DiagramElements to be relocated. |
| Fields inherited from class templates.diagram.actions.AbstractDiagramUndoableEdit |
|---|
usePluralDescription |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
DiagramUndoableEdits.MovedSelectionEdit(TemplateDiagram diagram,
java.util.Collection<DiagramElement> selection,
java.awt.Point delta)
Constructs an edit with the given parameters. |
|
| Method Summary | |
|---|---|
boolean |
canRedo()
|
boolean |
canUndo()
|
java.lang.String |
getPresentationName()
Returns the name that should be displayed besides the Undo/Redo menu items, so the user knows which action will be undone/redone. |
void |
redo()
Has to be called once after the instantiation of the edit, in order to enact it. |
void |
undo()
|
| Methods inherited from class templates.diagram.actions.AbstractDiagramUndoableEdit |
|---|
setLastOfMultiple |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
addEdit, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TemplateDiagram diagram
TemplateDiagram which contains the DiagramElement
s to be relocated.
protected java.awt.Point delta
protected java.util.Collection<DiagramElement> selection
DiagramElements to be relocated.
| Constructor Detail |
|---|
public DiagramUndoableEdits.MovedSelectionEdit(TemplateDiagram diagram,
java.util.Collection<DiagramElement> selection,
java.awt.Point delta)
diagram - the TemplateDiagram which contains the
DiagramElements to be relocatedselection - the DiagramElements to be relocateddelta - the displacement of the relocation| Method Detail |
|---|
public void redo()
throws javax.swing.undo.CannotRedoException
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotRedoException
public void undo()
throws javax.swing.undo.CannotUndoException
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotUndoExceptionpublic boolean canUndo()
canUndo in interface javax.swing.undo.UndoableEditcanUndo in class javax.swing.undo.AbstractUndoableEditpublic boolean canRedo()
canRedo in interface javax.swing.undo.UndoableEditcanRedo in class javax.swing.undo.AbstractUndoableEditpublic java.lang.String getPresentationName()
getPresentationName in interface javax.swing.undo.UndoableEditgetPresentationName in class javax.swing.undo.AbstractUndoableEdit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||