net.sourceforge.combean.adapters.jgraph
Class JGraphUtils
java.lang.Object
net.sourceforge.combean.adapters.jgraph.JGraphUtils
public final class JGraphUtils
- extends Object
Utilities for working with JGraph classes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JGraphUtils
public JGraphUtils()
locateFirstNodeWithAttribute
public static JGraphCellAsNode locateFirstNodeWithAttribute(JGraphModelAsGraph g,
Object attributeKey,
Object queryValue)
- Locate the first node in a JGraphModelAsGraph for which a
given attribute has a specified value
- Parameters:
g
- the graph where the first matching node shall be locatedattributeKey
- the attribute which is used for matching the nodequeryValue
- a node matches if the given attribute has this value
- Returns:
- the first matching node
createGraphCells
public static org.jgraph.graph.DefaultGraphCell[] createGraphCells(int num)
createEdges
public static org.jgraph.graph.DefaultEdge[] createEdges(org.jgraph.graph.DefaultGraphCell[] nodes,
int[][] edges)
createEdge
public static org.jgraph.graph.DefaultEdge createEdge(org.jgraph.graph.DefaultGraphCell[] nodes,
int from,
int to)