All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vnet.display.GraphGeometryNet

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

public class GraphGeometryNet
extends GraphGeometry
Class to manage the output layout of a net, that disposes in a net form. This geometry creates a net of squares of 4 rows and 4 columns, and disposes the nodes from left to right, from up to down. The squares are disposed with the next layout:
41 39 37 36 38 40 42
32 19 17 16 18 20 33
28 12 05 04 06 13 29
26 10 02 01 03 11 27
30 14 08 07 09 15 31
34 24 22 21 23 25 35
48 46 44 43 45 47 49
...and so on

Version:
0.2, august-1997
Author:
LuisM Pena

Constructor Index

 o GraphGeometryNet()

Method Index

 o getPosition(NodeId)
Gets the position (relative position, between 0 and 1) for a Node
 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 GraphGeometryNet
 public GraphGeometryNet()

Methods

 o reset
 public 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.

Overrides:
reset in class GraphGeometry
 o getRadiusX
 public synchronized double getRadiusX()
Gets the radiusX (relative size, between 0 and 1) for each node.

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

Returns:
the radiusY of the nodes
Overrides:
getRadiusY in class GraphGeometry
 o getPosition
 public 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
Overrides:
getPosition in class GraphGeometry

All Packages  Class Hierarchy  This Package  Previous  Next  Index