|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
templates.diagram.actions.AbstractDiagramAction
public abstract class AbstractDiagramAction
Provides functionality common to all undoable actions working on
TemplateDiagrams.
| Field Summary | |
|---|---|
protected javax.swing.undo.CompoundEdit |
parentEdit
If this action is not independent, the UndoableEdit the action is
part of. |
protected boolean |
usePluralDescription
Specifies if the user-readable description of the UndoableEdit
for this action should use the plural form. |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
AbstractDiagramAction()
Calls super. |
|
AbstractDiagramAction(java.lang.String arg0)
Calls super with the given arguments. |
|
AbstractDiagramAction(java.lang.String arg0,
javax.swing.Icon arg1)
Calls super with the given arguments. |
|
| Method Summary | |
|---|---|
protected javax.swing.undo.UndoableEdit |
addBoundsAdjust(TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
Translate the given TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates) and add the
information necessary to undo the translation to the given
UndoableEdit. |
void |
execute()
Perform the action. |
protected void |
postEdit(ides.api.plugin.model.DESModel model,
javax.swing.undo.UndoableEdit edit)
Posts the given UndoableEdit to the undo stack of the given
DESModel (if this action is independent), or adds the given
UndoableEdit to the UndoableEdit this action is part of. |
protected void |
postEdit(javax.swing.undo.UndoableEdit edit)
Posts the given UndoableEdit to the undo stack of the active
DESModel in the workspace (if this action is independent), or
adds the given UndoableEdit to the UndoableEdit this
action is part of. |
protected void |
postEditAdjustCanvas(ides.api.plugin.model.DESModel model,
TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
Translate the given TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates), add the information
necessary to undo the translation to the given UndoableEdit, and
post the given UndoableEdit to the undo stack of the given
DESModel (if this action is independent) or add the given
UndoableEdit to the UndoableEdit this action is part of
(if this action is not independent). |
protected void |
postEditAdjustCanvas(TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
Translate the given TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates), add the information
necessary to undo the translation to the given UndoableEdit, and
post the given UndoableEdit to the undo stack of the active
DESModel in the workspace (if this action is independent) or add
the given UndoableEdit to the UndoableEdit this action is
part of (if this action is not independent). |
void |
setLastOfMultiple(boolean b)
Specify if the action is the last one of a multiple similar action, in effect specifying if the the plural form of the user-readable description should be used. |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.ActionListener |
|---|
actionPerformed |
| Field Detail |
|---|
protected javax.swing.undo.CompoundEdit parentEdit
UndoableEdit the action is
part of. null if this action is independent.
protected boolean usePluralDescription
UndoableEdit
for this action should use the plural form.
| Constructor Detail |
|---|
public AbstractDiagramAction()
super.
public AbstractDiagramAction(java.lang.String arg0,
javax.swing.Icon arg1)
super with the given arguments.
arg0 - arg1 - public AbstractDiagramAction(java.lang.String arg0)
super with the given arguments.
arg0 - | Method Detail |
|---|
protected void postEdit(javax.swing.undo.UndoableEdit edit)
UndoableEdit to the undo stack of the active
DESModel in the workspace (if this action is independent), or
adds the given UndoableEdit to the UndoableEdit this
action is part of. The setting for the use of a plural user-readable
description is respected.
This method is called internally by the action to post the information required to undo the modifications made by the action.
edit - the UndoableEdit to be posted
protected void postEdit(ides.api.plugin.model.DESModel model,
javax.swing.undo.UndoableEdit edit)
UndoableEdit to the undo stack of the given
DESModel (if this action is independent), or adds the given
UndoableEdit to the UndoableEdit this action is part of.
The setting for the use of a plural user-readable description is
respected.
model - the DESModel to whose undo stack the
UndoableEdit should be addededit - the UndoableEdit to be posted
protected void postEditAdjustCanvas(TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates), add the information
necessary to undo the translation to the given UndoableEdit, and
post the given UndoableEdit to the undo stack of the active
DESModel in the workspace (if this action is independent) or add
the given UndoableEdit to the UndoableEdit this action is
part of (if this action is not independent). The setting for the use of a
plural user-readable description is respected.
This method is called internally by the action to shift the
TemplateDiagram into view after executing the action and to post
the information required to undo the modifications made by the action.
diagram - the TemplateDiagram to be shifted into viewedit - the UndoableEdit to be posted
protected void postEditAdjustCanvas(ides.api.plugin.model.DESModel model,
TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates), add the information
necessary to undo the translation to the given UndoableEdit, and
post the given UndoableEdit to the undo stack of the given
DESModel (if this action is independent) or add the given
UndoableEdit to the UndoableEdit this action is part of
(if this action is not independent). The setting for the use of a plural
user-readable description is respected.
This method is called internally by the action to shift the
TemplateDiagram into view after executing the action and to post
the information required to undo the modifications made by the action.
model - the DESModel to whose undo stack the
UndoableEdit should be addeddiagram - the TemplateDiagram to be shifted into viewedit - the UndoableEdit to be posted
protected javax.swing.undo.UndoableEdit addBoundsAdjust(TemplateDiagram diagram,
javax.swing.undo.UndoableEdit edit)
TemplateDiagram so that all of its elements
are completely in view (have positive co-ordinates) and add the
information necessary to undo the translation to the given
UndoableEdit.
diagram - the TemplateDiagram to be shifted into viewedit - the UndoableEdit where the addition undo information
has to be included
UndoableEdit which includes both the original
undo information from the given UndoableEdit and the new
undo information from the TemplateDiagram translationpublic void setLastOfMultiple(boolean b)
b - true if this is the last action of a multiple and
the plural form of the user-readable description has to be
used; otherwise falsepublic void execute()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||