|
||||||||||
| 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.AddLinkEdit
public static class DiagramUndoableEdits.AddLinkEdit
Edit which does and undoes the addition of a TemplateLink between
two events from the TemplateComponents linked by a
Connector.
| Field Summary | |
|---|---|
protected Connector |
connector
The Connector to which the TemplateLink should be
added. |
protected TemplateDiagram |
diagram
The TemplateDiagram which contains the Connector to
which the TemplateLink should be added. |
protected java.lang.String |
leftEvent
The event (from the "left" TemplateComponent) which has to be
linked. |
protected TemplateLink |
link
Holds the new TemplateLink once it is created. |
protected java.lang.String |
rightEvent
The event (from the "right" TemplateComponent) which has to
be linked. |
| Fields inherited from class templates.diagram.actions.AbstractDiagramUndoableEdit |
|---|
usePluralDescription |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
DiagramUndoableEdits.AddLinkEdit(TemplateDiagram diagram,
Connector connector,
java.lang.String leftEvent,
java.lang.String rightEvent)
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 Connector to
which the TemplateLink should be added.
protected Connector connector
Connector to which the TemplateLink should be
added.
protected java.lang.String leftEvent
TemplateComponent) which has to be
linked.
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked components separately.
protected java.lang.String rightEvent
TemplateComponent) which has to
be linked.
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked components separately.
protected TemplateLink link
TemplateLink once it is created.
| Constructor Detail |
|---|
public DiagramUndoableEdits.AddLinkEdit(TemplateDiagram diagram,
Connector connector,
java.lang.String leftEvent,
java.lang.String rightEvent)
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked components separately.
diagram - the TemplateDiagram which contains the
Connector to which the TemplateLink should
be addedconnector - the Connector to which the TemplateLink
should be addedleftEvent - the event (from the "left" TemplateComponent)
which has to be linkedrightEvent - the event (from the "right" TemplateComponent)
which has to be linked| 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 | |||||||||