|
||||||||||
| 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.CreateConnectorEdit
public static class DiagramUndoableEdits.CreateConnectorEdit
Edit which does and undoes the creation of a Connector in a
TemplateDiagram.
| Field Summary | |
|---|---|
protected Connector |
connector
Holds the new Connector once it is created. |
protected TemplateDiagram |
diagram
The TemplateDiagram where the Connector should be
created. |
protected Entity |
left
The first Entity to be linked. |
protected Entity |
right
The second Entity 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.CreateConnectorEdit(TemplateDiagram diagram,
Entity left,
Entity right)
Constructs an edit with the given parameters. |
|
| Method Summary | |
|---|---|
boolean |
canRedo()
|
boolean |
canUndo()
|
Connector |
getConnector()
Retrieves the Connector created by the edit. |
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 where the Connector should be
created.
protected Entity left
Entity to be linked.
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked entities separately.
protected Entity right
Entity to be linked.
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked entities separately.
protected Connector connector
Connector once it is created.
| Constructor Detail |
|---|
public DiagramUndoableEdits.CreateConnectorEdit(TemplateDiagram diagram,
Entity left,
Entity right)
A connector is symmetric. "Left" and "right" are used only to enable addressing the two linked entities separately.
diagram - the TemplateDiagram where the Connector
should be createdleft - the first Entity to be linkedright - the second Entity to be linked| Method Detail |
|---|
public Connector getConnector()
Connector created by the edit.
Connector created by the edit
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 | |||||||||