|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.AbstractAction
com.jgraph.editor.JGraphEditorAction
com.jgraph.pad.action.JGraphpadFormatAction
com.jgraph.pad.action.JGraphpadCellAction
Implements all actions of the cell menu. Extends format action to use some of the helper methods.
| Nested Class Summary | |
static class |
JGraphpadCellAction.AllActions
Bundle of all actions in this class. |
| Nested classes inherited from class com.jgraph.editor.JGraphEditorAction |
JGraphEditorAction.Bundle |
| Field Summary | |
static int |
ALIGN_BOTTOM
Defines the constants to be passed to doAlignCells(JGraph, int). |
static int |
ALIGN_CENTER
Defines the constants to be passed to doAlignCells(JGraph, int). |
static int |
ALIGN_LEFT
Defines the constants to be passed to doAlignCells(JGraph, int). |
static int |
ALIGN_MIDDLE
Defines the constants to be passed to doAlignCells(JGraph, int). |
static int |
ALIGN_RIGHT
Defines the constants to be passed to doAlignCells(JGraph, int). |
static int |
ALIGN_TOP
Defines the constants to be passed to doAlignCells(JGraph, int). |
static String |
KEY_PROTOTYPE
Key under which the cell prototype is stored in the actions values. |
static String |
NAME_ADDPROPERTY
Specifies the name for the addProperty action. |
static String |
NAME_ALLSELECTABLE
Specifies the name for the allSelectable action. |
static String |
NAME_CELLSALIGNBOTTOM
Specifies the name for the cellsAlignBottom action. |
static String |
NAME_CELLSALIGNCENTER
Specifies the name for the cellsAlignCenter action. |
static String |
NAME_CELLSALIGNLEFT
Specifies the name for the cellsAlignLeft action. |
static String |
NAME_CELLSALIGNMIDDLE
Specifies the name for the cellsAlignMiddle action. |
static String |
NAME_CELLSALIGNRIGHT
Specifies the name for the cellsAlignRight action. |
static String |
NAME_CELLSALIGNTOP
Specifies the name for the cellsAlignTop action. |
static String |
NAME_CLONEATTRIBUTES
Specifies the name for the cloneAttributes action. |
static String |
NAME_CLONESIZE
Specifies the name for the cloneSize action. |
static String |
NAME_CLONEVALUE
Specifies the name for the cloneValue action. |
static String |
NAME_COLLAPSE
Specifies the name for the collapse action. |
static String |
NAME_CONNECT
Specifies the name for the connect action. |
static String |
NAME_DISCONNECT
Specifies the name for the disconnect action. |
static String |
NAME_EXPAND
Specifies the name for the expand action. |
static String |
NAME_EXPANDALL
Specifies the name for the expandAll action. |
static String |
NAME_GROUP
Specifies the name for the group action. |
static String |
NAME_GROUPASEDGE
Specifies the name for the groupAsEdge action. |
static String |
NAME_INVERT
Specifies the name for the invert action. |
static String |
NAME_REMOVEFROMGROUP
Specifies the name for the removeFromGroup action. |
static String |
NAME_REMOVEPROPERTY
Specifies the name for the removeProperty action. |
static String |
NAME_TOBACK
Specifies the name for the toBack action. |
static String |
NAME_TOFRONT
Specifies the name for the toFront action. |
static String |
NAME_TOGGLECHILDRENSELECTABLE
Specifies the name for the toggleChildrenSelectable
action. |
static String |
NAME_TOGGLECOLLAPSED
Specifies the name for the collapse action. |
static String |
NAME_TOGGLESELECTABLE
Specifies the name for the toggleSelectable action. |
static String |
NAME_UNGROUP
Specifies the name for the ungroup action. |
| Fields inherited from class com.jgraph.editor.JGraphEditorAction |
isToggleAction, PROPERTY_ISSELECTED, PROPERTY_ISVISIBLE |
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
JGraphpadCellAction(String name)
Constructs a new cell action for the specified name. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
Executes the action based on the action name. |
protected void |
alignRectangle2D(Rectangle2D cellBounds,
Rectangle2D outerBounds,
int constraint)
Helper methods that aligns cellBounds inside
outerBounds according to constraint. |
protected void |
doAlignCells(org.jgraph.JGraph graph,
int constraint)
Aligns the selection vertices according to constraint. |
protected void |
doCellProperty(org.jgraph.JGraph graph,
boolean add)
Displays a value dialog and adds or removes the entered value as a property to/from the user objects of the selection cells. |
protected void |
doClone(org.jgraph.JGraph graph,
boolean value,
boolean size)
Clones the value, size or attributes of the first selection cell to the other selection cells. |
protected void |
doConnect(org.jgraph.JGraph graph,
Object prototype)
Connects the selection vertices using clones of prototype
as edges. |
protected void |
doDisconnect(org.jgraph.JGraph graph)
Disconnects the selection vertices by removing all edges between them. |
protected void |
doGroup(org.jgraph.JGraph graph,
Object prototype)
Creates a new group cell that contains the selection cells as children using a clone of prototype as the group cell. |
protected void |
doGroupAsEdge(org.jgraph.JGraph graph,
Object prototype)
Creates a new group cell that contains the selection cells as children using a clone of prototype as the group cell. |
protected void |
doInvert(org.jgraph.JGraph graph)
Inverts all selected cells by swapping the source and target of edges and inverting all control points, or by swapping width and height of vertices. |
| Methods inherited from class com.jgraph.pad.action.JGraphpadFormatAction |
doAskColorAttribute, doAskColorAttribute, doAskFloatAttribute, doAskImageAttribute, doAskIntAttribute, doSetDashPattern, doSetFont, doSetHorizontalAlignment, doToggleAttribute, fontDialog, getAttribute, getBooleanAttribute, getIntAttribute, setAttribute, setAttributes, setRouting |
| Methods inherited from class com.jgraph.editor.JGraphEditorAction |
getActiveFrame, getFrame, getJGraphpadPane, getJGraphpadPane, getName, getParentGraph, getPermanentFocusOwner, getPermanentFocusOwnerDiagram, getPermanentFocusOwnerDiagramPane, getPermanentFocusOwnerGraph, getPermanentFocusOwnerOrParent, getString, isSelected, isToggleAction, isVisible, setEnabled, setSelected, setToggleAction, setVisible |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ALIGN_LEFT
doAlignCells(JGraph, int).
public static final int ALIGN_RIGHT
doAlignCells(JGraph, int).
public static final int ALIGN_TOP
doAlignCells(JGraph, int).
public static final int ALIGN_BOTTOM
doAlignCells(JGraph, int).
public static final int ALIGN_CENTER
doAlignCells(JGraph, int).
public static final int ALIGN_MIDDLE
doAlignCells(JGraph, int).
public static final String KEY_PROTOTYPE
public static final String NAME_CLONEVALUE
cloneValue action.
public static final String NAME_CLONESIZE
cloneSize action.
public static final String NAME_CLONEATTRIBUTES
cloneAttributes action.
public static final String NAME_CELLSALIGNTOP
cellsAlignTop action.
public static final String NAME_CELLSALIGNMIDDLE
cellsAlignMiddle action.
public static final String NAME_CELLSALIGNBOTTOM
cellsAlignBottom action.
public static final String NAME_CELLSALIGNLEFT
cellsAlignLeft action.
public static final String NAME_CELLSALIGNCENTER
cellsAlignCenter action.
public static final String NAME_CELLSALIGNRIGHT
cellsAlignRight action.
public static final String NAME_TOGGLESELECTABLE
toggleSelectable action.
public static final String NAME_ALLSELECTABLE
allSelectable action.
public static final String NAME_TOGGLECHILDRENSELECTABLE
toggleChildrenSelectable
action.
public static final String NAME_COLLAPSE
collapse action.
public static final String NAME_TOGGLECOLLAPSED
collapse action.
public static final String NAME_EXPAND
expand action.
public static final String NAME_EXPANDALL
expandAll action.
public static final String NAME_TOBACK
toBack action.
public static final String NAME_TOFRONT
toFront action.
public static final String NAME_GROUP
group action.
public static final String NAME_GROUPASEDGE
groupAsEdge action.
public static final String NAME_UNGROUP
ungroup action.
public static final String NAME_REMOVEFROMGROUP
removeFromGroup action.
public static final String NAME_CONNECT
connect action.
public static final String NAME_DISCONNECT
disconnect action.
public static final String NAME_ADDPROPERTY
addProperty action.
public static final String NAME_REMOVEPROPERTY
removeProperty action.
public static final String NAME_INVERT
invert action.
| Constructor Detail |
public JGraphpadCellAction(String name)
toggle or switch then the
action is configured to be a toggle action.
name - The name of the action to be created.| Method Detail |
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListeneractionPerformed in class JGraphpadFormatActione - The object that describes the event.protected void doInvert(org.jgraph.JGraph graph)
graph - The graph to perform the operation in.
protected void doCellProperty(org.jgraph.JGraph graph,
boolean add)
graph - The graph to perform the operation in.add - Whether the property should be added or removed.
protected void doClone(org.jgraph.JGraph graph,
boolean value,
boolean size)
graph - The graph to perform the operation in.value - Whether to clone the value.size - Whether to clone the size.
protected void doConnect(org.jgraph.JGraph graph,
Object prototype)
prototype
as edges. JGraph.getDefaultPortForCell(Object) is used to find
the connection points of the vertices.
graph - The graph to perform the operation in.prototype - The cell to be cloned for creating edges.GraphLayoutCache.getCells(boolean, boolean, boolean, boolean),
DefaultGraphModel.cloneCell(GraphModel, Object),
DefaultGraphModel.containsEdgeBetween(GraphModel, Object, Object)protected void doDisconnect(org.jgraph.JGraph graph)
graph - The graph to perform the operation in.GraphLayoutCache.getCells(boolean, boolean, boolean, boolean),
DefaultGraphModel.getEdgesBetween(GraphModel, Object, Object,
boolean)
protected void doGroup(org.jgraph.JGraph graph,
Object prototype)
prototype as the group cell.
graph - The graph to perform the operation in.prototype - The cell to be cloned for creating groups.DefaultGraphModel.cloneCell(GraphModel, Object),
JGraph.order(Object[]),
GraphLayoutCache.insertGroup(Object, Object[])
protected void doGroupAsEdge(org.jgraph.JGraph graph,
Object prototype)
prototype as the group cell. The
prototype is assumed to be an edge.
graph - The graph to perform the operation in.prototype - The cell to be cloned for creating groups.
protected void doAlignCells(org.jgraph.JGraph graph,
int constraint)
constraint.
Valid constraints are: ALIGN_TOP, ALIGN_MIDDLE,
ALIGN_BOTTOM, ALIGN_LEFT, ALIGN_CENTER and
ALIGN_RIGHT.
graph - The graph to perform the operation in.constraint - The constraint that describes the alignment.alignRectangle2D(Rectangle2D, Rectangle2D, int),
GraphLayoutCache.getCells(boolean, boolean, boolean, boolean)
protected void alignRectangle2D(Rectangle2D cellBounds,
Rectangle2D outerBounds,
int constraint)
cellBounds inside
outerBounds according to constraint.
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||