| com.jgraph.editor.JGraphEditorAction com.jgraph.pad.action.JGraphpadFormatAction com.jgraph.pad.action.JGraphpadCellAction
JGraphpadCellAction | public class JGraphpadCellAction extends JGraphpadFormatAction (Code) | | Implements all actions of the cell menu. Extends format action to use some of
the helper methods.
|
Inner Class :public static class AllActions implements Bundle | |
Method Summary | |
public 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(JGraph graph, int constraint) Aligns the selection vertices according to constraint . | protected void | doCellProperty(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(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(JGraph graph, Object prototype) Connects the selection vertices using clones of prototype
as edges. | protected void | doDisconnect(JGraph graph) Disconnects the selection vertices by removing all edges between them. | protected void | doGroup(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(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(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. |
KEY_PROTOTYPE | final public static String KEY_PROTOTYPE(Code) | | Key under which the cell prototype is stored in the actions values. This
is used to store the prototype for connect and group actions, which
require to create new edges and groups respectively.
|
NAME_ADDPROPERTY | final public static String NAME_ADDPROPERTY(Code) | | Specifies the name for the addProperty action.
|
NAME_ALLSELECTABLE | final public static String NAME_ALLSELECTABLE(Code) | | Specifies the name for the allSelectable action.
|
NAME_CELLSALIGNBOTTOM | final public static String NAME_CELLSALIGNBOTTOM(Code) | | Specifies the name for the cellsAlignBottom action.
|
NAME_CELLSALIGNCENTER | final public static String NAME_CELLSALIGNCENTER(Code) | | Specifies the name for the cellsAlignCenter action.
|
NAME_CELLSALIGNLEFT | final public static String NAME_CELLSALIGNLEFT(Code) | | Specifies the name for the cellsAlignLeft action.
|
NAME_CELLSALIGNMIDDLE | final public static String NAME_CELLSALIGNMIDDLE(Code) | | Specifies the name for the cellsAlignMiddle action.
|
NAME_CELLSALIGNRIGHT | final public static String NAME_CELLSALIGNRIGHT(Code) | | Specifies the name for the cellsAlignRight action.
|
NAME_CELLSALIGNTOP | final public static String NAME_CELLSALIGNTOP(Code) | | Specifies the name for the cellsAlignTop action.
|
NAME_CLONEATTRIBUTES | final public static String NAME_CLONEATTRIBUTES(Code) | | Specifies the name for the cloneAttributes action.
|
NAME_CLONESIZE | final public static String NAME_CLONESIZE(Code) | | Specifies the name for the cloneSize action.
|
NAME_CLONEVALUE | final public static String NAME_CLONEVALUE(Code) | | Specifies the name for the cloneValue action.
|
NAME_COLLAPSE | final public static String NAME_COLLAPSE(Code) | | Specifies the name for the collapse action.
|
NAME_CONNECT | final public static String NAME_CONNECT(Code) | | Specifies the name for the connect action.
|
NAME_DISCONNECT | final public static String NAME_DISCONNECT(Code) | | Specifies the name for the disconnect action.
|
NAME_EXPAND | final public static String NAME_EXPAND(Code) | | Specifies the name for the expand action.
|
NAME_EXPANDALL | final public static String NAME_EXPANDALL(Code) | | Specifies the name for the expandAll action.
|
NAME_GROUP | final public static String NAME_GROUP(Code) | | Specifies the name for the group action.
|
NAME_GROUPASEDGE | final public static String NAME_GROUPASEDGE(Code) | | Specifies the name for the groupAsEdge action.
|
NAME_INVERT | final public static String NAME_INVERT(Code) | | Specifies the name for the invert action.
|
NAME_REMOVEFROMGROUP | final public static String NAME_REMOVEFROMGROUP(Code) | | Specifies the name for the removeFromGroup action.
|
NAME_REMOVEPROPERTY | final public static String NAME_REMOVEPROPERTY(Code) | | Specifies the name for the removeProperty action.
|
NAME_TOBACK | final public static String NAME_TOBACK(Code) | | Specifies the name for the toBack action.
|
NAME_TOFRONT | final public static String NAME_TOFRONT(Code) | | Specifies the name for the toFront action.
|
NAME_TOGGLECHILDRENSELECTABLE | final public static String NAME_TOGGLECHILDRENSELECTABLE(Code) | | Specifies the name for the toggleChildrenSelectable
action.
|
NAME_TOGGLECOLLAPSED | final public static String NAME_TOGGLECOLLAPSED(Code) | | Specifies the name for the collapse action.
|
NAME_TOGGLESELECTABLE | final public static String NAME_TOGGLESELECTABLE(Code) | | Specifies the name for the toggleSelectable action.
|
NAME_UNGROUP | final public static String NAME_UNGROUP(Code) | | Specifies the name for the ungroup action.
|
JGraphpadCellAction | public JGraphpadCellAction(String name)(Code) | | Constructs a new cell action for the specified name. If the action name
starts with toggle or switch then the
action is configured to be a toggle action.
Parameters: name - The name of the action to be created. |
actionPerformed | public void actionPerformed(ActionEvent e)(Code) | | Executes the action based on the action name.
Parameters: e - The object that describes the event. |
alignRectangle2D | protected void alignRectangle2D(Rectangle2D cellBounds, Rectangle2D outerBounds, int constraint)(Code) | | Helper methods that aligns cellBounds inside
outerBounds according to constraint .
|
doCellProperty | protected void doCellProperty(JGraph graph, boolean add)(Code) | | Displays a value dialog and adds or removes the entered value as a
property to/from the user objects of the selection cells.
Parameters: graph - The graph to perform the operation in. Parameters: add - Whether the property should be added or removed. |
doClone | protected void doClone(JGraph graph, boolean value, boolean size)(Code) | | Clones the value, size or attributes of the first selection cell to the
other selection cells. If value is true then the value is cloned, if size
if true then the size is cloned. If both are false, then the attributes
(except the bounds and points) are cloned.
Note: If value and size are true at the same time, then the value is
cloned.
Parameters: graph - The graph to perform the operation in. Parameters: value - Whether to clone the value. Parameters: size - Whether to clone the size. |
doConnect | protected void doConnect(JGraph graph, Object prototype)(Code) | | Connects the selection vertices using clones of prototype
as edges.
JGraph.getDefaultPortForCell(Object) is used to find
the connection points of the vertices.
Parameters: graph - The graph to perform the operation in. Parameters: prototype - The cell to be cloned for creating edges. See Also: GraphLayoutCache.getCells(booleanbooleanbooleanboolean) See Also: DefaultGraphModel.cloneCell(GraphModelObject) See Also: DefaultGraphModel.containsEdgeBetween(GraphModelObjectObject) |
doDisconnect | protected void doDisconnect(JGraph graph)(Code) | | Disconnects the selection vertices by removing all edges between them.
Parameters: graph - The graph to perform the operation in. See Also: GraphLayoutCache.getCells(booleanbooleanbooleanboolean) See Also: DefaultGraphModel.getEdgesBetween(GraphModelObjectObjectboolean) |
doGroup | protected void doGroup(JGraph graph, Object prototype)(Code) | | Creates a new group cell that contains the selection cells as children
using a clone of prototype as the group cell.
Parameters: graph - The graph to perform the operation in. Parameters: prototype - The cell to be cloned for creating groups. See Also: DefaultGraphModel.cloneCell(GraphModelObject) See Also: JGraph.order(Object[]) See Also: GraphLayoutCache.insertGroup(ObjectObject[]) |
doGroupAsEdge | protected void doGroupAsEdge(JGraph graph, Object prototype)(Code) | | Creates a new group cell that contains the selection cells as children
using a clone of prototype as the group cell. The
prototype is assumed to be an edge.
Parameters: graph - The graph to perform the operation in. Parameters: prototype - The cell to be cloned for creating groups. |
doInvert | protected void doInvert(JGraph graph)(Code) | | 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.
Parameters: graph - The graph to perform the operation in. |
Methods inherited from com.jgraph.pad.action.JGraphpadFormatAction | public void actionPerformed(ActionEvent event)(Code)(Java Doc) protected void doAskColorAttribute(JGraph graph, String key)(Code)(Java Doc) protected void doAskColorAttribute(JGraph graph, String key, boolean setOpaque)(Code)(Java Doc) protected void doAskFloatAttribute(JGraph graph, String key, float defaultValue)(Code)(Java Doc) protected void doAskImageAttribute(JGraph graph, String key, boolean urlDialog) throws MalformedURLException, FileNotFoundException, IOException(Code)(Java Doc) protected void doAskIntAttribute(JGraph graph, String key, int defaultValue)(Code)(Java Doc) protected void doSetDashPattern(JGraph graph)(Code)(Java Doc) protected void doSetFont(Component component, Object change, boolean plain, int style, float size) throws BadLocationException(Code)(Java Doc) protected void doSetHorizontalAlignment(Component component, int align)(Code)(Java Doc) protected void doToggleAttribute(JGraph graph, String key, boolean defaultValue)(Code)(Java Doc) public Font fontDialog(Component component, String title, Font font)(Code)(Java Doc) public static Object getAttribute(JGraph graph, String key)(Code)(Java Doc) public static boolean getBooleanAttribute(JGraph graph, String key, boolean defaultValue)(Code)(Java Doc) public static int getIntAttribute(JGraph graph, String key, int defaultValue)(Code)(Java Doc) protected void setAttribute(JGraph graph, String key, Object value)(Code)(Java Doc) protected void setAttributes(JGraph graph, String[] keys, Object[] values, boolean all)(Code)(Java Doc) protected void setRouting(JGraph graph, Edge.Routing routing)(Code)(Java Doc)
|
|
|