|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kwebs.util.Graphs
public final class Graphs
Utility class for duplicating layout information between structurally identical graphs. Every graph element gets annotated with an unique identifier. This is used to duplicate the calculated layout information from a graph which was layout done on back to the original graph.
Method Summary | ||
---|---|---|
static void |
annotateGraphWithUniqueID(KNode graph)
Annotates each element of a KGraph instance with an unique id. |
|
static int |
countEdges(KNode graph)
Determines the total number of edges in the given graph. |
|
static int |
countElements(KNode graph)
Determines the total number of elements in the given graph. |
|
static int |
countLabels(KNode graph)
Determines the total number of labels in the given graph. |
|
static int |
countNodes(KNode graph)
Determines the total number of nodes in the given graph. |
|
static int |
countPorts(KNode graph)
Determines the total number of ports in the given graph. |
|
static void |
duplicateGraphLayoutByUniqueID(KNode sourceGraph,
KNode targetGraph)
Duplicates layout information from source model to target model. |
|
static
|
getAllElementsOfType(KNode graph,
Class<T> type)
Returns a list containing all the elements from a given graph which are of the specified type or sub classes of it. |
|
static
|
getAllElementsOfType(KNode graph,
Class<T> type,
boolean maySubclass)
Returns a list containing all the elements from a given graph which are of the specified type or sub classes of it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void duplicateGraphLayoutByUniqueID(KNode sourceGraph, KNode targetGraph)
sourceGraph
- the model which contains the layout informationtargetGraph
- the model which gets the layout informationpublic static void annotateGraphWithUniqueID(KNode graph)
graph
- the graph to be annotatedpublic static int countElements(KNode graph)
graph
- parent layout node to examine
public static int countNodes(KNode graph)
graph
- parent layout node to examine
public static int countEdges(KNode graph)
graph
- parent layout node to examine
public static int countPorts(KNode graph)
graph
- parent layout node to examine
public static int countLabels(KNode graph)
graph
- parent layout node to examine
public static <T> List<T> getAllElementsOfType(KNode graph, Class<T> type)
T
- the type of the elementsgraph
- the graph of which the elements of the defined type shall be returnedtype
- class defining the type of the elements which are to be returned
public static <T> List<T> getAllElementsOfType(KNode graph, Class<T> type, boolean maySubclass)
T
- the type of the elementsgraph
- the graph of which the elements of the defined type shall be returnedtype
- class defining the type of the elements which are to be returnedmaySubclass
- whether the returned list may contain subclass instances
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |