All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnet.display.GraphGeometry

java.lang.Object
   |
   +----java.util.Observable
           |
           +----vnet.display.GraphGeometry

public abstract class GraphGeometry
extends Observable
Abstract class to manage the output layout of a net. This classes has to give, for each NodeId, a position (GraphPoint), that is a number (two numbers) between 0 and 1. It is also able to get the line (GraphLine) that will join two NodeIds Finally, it also manage the size of each node (its radius) This class is observable; if the class considers that the positions that have been returned are not longer valid, it will notify to its observers

Version:
0.2, august-1997
Author:
LuisM Pena

Constructor Index

 o GraphGeometry()

Method Index

 o getPosition(NodeId)
Gets the position (relative position, between 0 and 1) for a Node
 o getPosition(NodeId, NodeId)
Gets the line (relative sizes, between 0 and 1) for a link between two nodes
 o getRadiusX()
Gets the radiusX (relative size, between 0 and 1) for each node.
 o getRadiusY()
Gets the radiusY (relative size, between 0 and 1) for each node.
 o reset(NodeId[])
A geometry can calculate the position of a node in function of the nodes already present.

Constructors

 o GraphGeometry
 public GraphGeometry()

Methods

 o reset
 public abstract synchronized void reset(NodeId nodes[])
A geometry can calculate the position of a node in function of the nodes already present. This method allows to say to the GeometryClass which are the nodes.

 o getRadiusX
 public abstract synchronized double getRadiusX()
Gets the radiusX (relative size, between 0 and 1) for each node.

Returns:
the radiusX of the nodes
 o getRadiusY
 public abstract synchronized double getRadiusY()
Gets the radiusY (relative size, between 0 and 1) for each node.

Returns:
the radiusY of the nodes
 o getPosition
 public abstract synchronized GraphPoint getPosition(NodeId Id)
Gets the position (relative position, between 0 and 1) for a Node

Parameters:
Id - the Node identity
Returns:
the position for the node
 o getPosition
 public GraphLine getPosition(NodeId IdA,
                              NodeId IdB)
Gets the line (relative sizes, between 0 and 1) for a link between two nodes

Parameters:
IdA - the Node identity of the first node
IdB - the Node identity of the second node
Returns:
the line that joins both nodes

All Packages  Class Hierarchy  This Package  Previous  Next  Index