net.sourceforge.combean.adapters.jgraph
Class JGraphUtils

Package class diagram package JGraphUtils
java.lang.Object
  extended by net.sourceforge.combean.adapters.jgraph.JGraphUtils

public final class JGraphUtils
extends Object

Utilities for working with JGraph classes


Constructor Summary
JGraphUtils()
           
 
Method Summary
static org.jgraph.graph.DefaultEdge createEdge(org.jgraph.graph.DefaultGraphCell[] nodes, int from, int to)
           
static org.jgraph.graph.DefaultEdge[] createEdges(org.jgraph.graph.DefaultGraphCell[] nodes, int[][] edges)
           
static org.jgraph.graph.DefaultGraphCell[] createGraphCells(int num)
           
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGraphUtils

public JGraphUtils()
Method Detail

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 located
attributeKey - the attribute which is used for matching the node
queryValue - 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)