org.graffiti.util
Class EditorGraphEditing

java.lang.Object
  extended by org.graffiti.util.EditorGraphEditing

public class EditorGraphEditing
extends Object

This class offers some static methods for graph editing.

Version:
$Revision: 5768 $ $Date: 2009-04-15 14:08:30 +0200 (Mi, 15 Apr 2009) $
Author:
Marek Piorkowski

Method Summary
static void labelNodesByDegree(Collection<Node> nodes)
          Sets the node labels to the particular node degree (= number of incident edges).
static void labelNodesByInDegree(Collection<Node> nodes)
          Sets the node labels to the particular node in-degree (= number of incoming edges).
static void labelNodesByOutDegree(Collection<Node> nodes)
          Sets the node labels to the particular node out-degree (= number of outgoing edges).
static void removeBends(Collection<Edge> edges)
          Removes all bends of the specified edges.
static void removeEdgeLabels(Collection<Edge> edges)
          Removes all labels of the specified edges.
static void removeNodeLabels(Collection<Node> nodes)
          Removes all labels of the specified nodes.
static void setDistinctIntegerNodeLabels(Collection<Node> nodes)
          Sets distinct integer node labels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeBends

public static void removeBends(Collection<Edge> edges)
Removes all bends of the specified edges.

Parameters:
edges - These edges' bends will be removed.

removeEdgeLabels

public static void removeEdgeLabels(Collection<Edge> edges)
Removes all labels of the specified edges.

Parameters:
edges - These edges' labels will be removed.

removeNodeLabels

public static void removeNodeLabels(Collection<Node> nodes)
Removes all labels of the specified nodes.

Parameters:
nodes - These nodes' labels will be removed.

labelNodesByDegree

public static void labelNodesByDegree(Collection<Node> nodes)
Sets the node labels to the particular node degree (= number of incident edges).

Parameters:
nodes - These nodes' labels will be set to their node degree.

labelNodesByInDegree

public static void labelNodesByInDegree(Collection<Node> nodes)
Sets the node labels to the particular node in-degree (= number of incoming edges).

Parameters:
nodes - These nodes' labels will be set to their node in-degree.

labelNodesByOutDegree

public static void labelNodesByOutDegree(Collection<Node> nodes)
Sets the node labels to the particular node out-degree (= number of outgoing edges).

Parameters:
nodes - These nodes' labels will be set to their node out-degree.

setDistinctIntegerNodeLabels

public static void setDistinctIntegerNodeLabels(Collection<Node> nodes)
Sets distinct integer node labels

Parameters:
nodes - These nodes will be labeled.


Generated at 2012-05-30 11:00:36 PM CEST