|
Graph Common | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.psnc.graph.util.GraphHelper
public abstract class GraphHelper
GraphHelper
class - set of utility methods for managing graph.
Constructor Summary | |
---|---|
GraphHelper()
|
Method Summary | |
---|---|
static void |
connect(org.jgraph.JGraph graph,
org.jgraph.graph.PortView source,
org.jgraph.graph.PortView target)
Connect two ports |
static int |
countConcreteVerticles(CustomGraph graph)
Get number of vertices with defined resource. |
static org.jgraph.graph.Port |
getPort(org.jgraph.graph.PortView portView)
Get port from the given port view |
static org.jgraph.graph.PortView |
getSourcePortAt(java.awt.geom.Point2D point,
org.jgraph.JGraph graph)
Get source port at the given point |
static org.jgraph.graph.PortView |
getTargetPortAt(java.awt.geom.Point2D point,
org.jgraph.JGraph graph)
Get target port at the given point |
static GraphCellObject |
getUserObject(java.lang.Object cell)
Get the user object from the given cell |
static boolean |
isEdge(java.lang.Object cell)
Test whether the given cell is edge |
static boolean |
isEmpty(org.jgraph.JGraph graph)
Specifies whether graph is empty. |
static boolean |
isPort(java.lang.Object cell)
Test whether the given cell is port |
static boolean |
isVertex(java.lang.Object cell)
Test whether the given cell is vertex type |
static void |
validateEdges(CustomGraph graph)
Checks all the edges. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphHelper()
Method Detail |
---|
public static boolean isEmpty(org.jgraph.JGraph graph)
graph
- instance of JGraph
TRUE
when there are no nodes in the graph, false
otherwisepublic static GraphCellObject getUserObject(java.lang.Object cell)
cell
- cell object
public static void validateEdges(CustomGraph graph)
graph
- public static boolean isVertex(java.lang.Object cell)
cell
- graph cell
public static boolean isEdge(java.lang.Object cell)
cell
- graph cell
public static boolean isPort(java.lang.Object cell)
cell
- graph cell
public static int countConcreteVerticles(CustomGraph graph)
graph
- instance of CustomGraph
public static org.jgraph.graph.Port getPort(org.jgraph.graph.PortView portView)
portView
- instance of PortView
public static org.jgraph.graph.PortView getSourcePortAt(java.awt.geom.Point2D point, org.jgraph.JGraph graph)
point
- point instancegraph
- jgraph instance
PortView
at the given pointpublic static org.jgraph.graph.PortView getTargetPortAt(java.awt.geom.Point2D point, org.jgraph.JGraph graph)
point
- point instancegraph
- jgraph instance
PortView
at the given pointpublic static void connect(org.jgraph.JGraph graph, org.jgraph.graph.PortView source, org.jgraph.graph.PortView target)
graph
- jgraph instancesource
- source port, instance of Port
target
- target port, instance of Port
|
Graph Common | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |