public class ActorEditorGraphController.NewRelationAction extends FigureAction
FigureAction.SourceType
CANVAS_TYPE, CONTEXTMENU_TYPE, HOTKEY_TYPE, MENUBAR_TYPE, PASTE_OFFSET, TOOLBAR_TYPE
Constructor and Description |
---|
NewRelationAction()
Create an action that creates a new relation.
|
NewRelationAction(java.lang.String[][] iconRoles)
Create an action that creates a new relation.
|
Modifier and Type | Method and Description |
---|---|
protected double[] |
_offsetVertex(double[] point)
Offset a figure if another figure is already at that location.
|
void |
actionPerformed(java.awt.event.ActionEvent e)
Determine the target Ptolemy II object, the originating frame,
and the X, Y position of the action, if possible.
|
getFigure, getFrame, getSourceType, getTarget, getX, getY, offsetFigure
public NewRelationAction()
public NewRelationAction(java.lang.String[][] iconRoles)
iconRoles
- A matrix of Strings, where each element
consists of two Strings, the absolute URL of the icon
and the key that represents the role of the icon. The keys
are usually static fields from this class, such as
GUIUtilities.LARGE_ICON
,
GUIUtilities.ROLLOVER_ICON
,
GUIUtilities.ROLLOVER_SELECTED_ICON
or
GUIUtilities.SELECTED_ICON
.
If this parameter is null, then the icon comes from
the calling getNodeRenderer() on the WithIconGraphController._portController
.GUIUtilities.addIcons(Action, String[][])
public void actionPerformed(java.awt.event.ActionEvent e)
FigureAction
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class FigureAction
e
- The event.protected double[] _offsetVertex(double[] point)
point
- An array of two doubles (x and y)