net.claribole.zgrviewer.dot
Class SubGraph

java.lang.Object
  extended bynet.claribole.zgrviewer.dot.Node
      extended bynet.claribole.zgrviewer.dot.SubGraph
Direct Known Subclasses:
Cluster

public class SubGraph
extends Node

A SubGraph may be considered as a graph inside another. Its elements (nodes, subgraphs ou cluster) can point or be pointed with edges.

Author:
Eric Mounhem

Constructor Summary
SubGraph(java.lang.Object root)
           
SubGraph(java.lang.Object root, java.lang.String id)
          Create a new SubGraph
 
Method Summary
 void addEdge(Edge edge)
          Add an edge to the edges list
 void addNode(Node node)
          Add a node to the nodes list
 void changeOption(java.lang.String name, java.lang.String value)
           
 void removeEdge(Edge edge)
          Remove an edge to the edges list
 void removeNode(Node node)
          Remove a node to the nodes list
 java.lang.String toString()
           
 
Methods inherited from class net.claribole.zgrviewer.dot.Node
addInEdge, addOutEdge, getIn, getOut, getRootGraph, nodeOptions, printOption, printOption, printOption, printOption, removeInEdge, removeOutEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubGraph

public SubGraph(java.lang.Object root,
                java.lang.String id)
         throws java.lang.Exception
Create a new SubGraph

Parameters:
root - root of the graph
id - identificator of the subGraph
Throws:
java.lang.Exception

SubGraph

public SubGraph(java.lang.Object root)
         throws java.lang.Exception
Method Detail

addNode

public void addNode(Node node)
Add a node to the nodes list

Parameters:
node - New node to add

addEdge

public void addEdge(Edge edge)
Add an edge to the edges list

Parameters:
edge - New edge to add

removeNode

public void removeNode(Node node)
Remove a node to the nodes list

Parameters:
node - Node to remove (if it's in the list)

removeEdge

public void removeEdge(Edge edge)
Remove an edge to the edges list

Parameters:
edge - Edge to remove (if it's in the list)

toString

public java.lang.String toString()
Overrides:
toString in class Node
See Also:
Node.toString()

changeOption

public void changeOption(java.lang.String name,
                         java.lang.String value)
                  throws java.lang.Exception
Overrides:
changeOption in class Node
Throws:
java.lang.Exception


Copyright © 2004-2005 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.