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
-
GraphGeometry()
-
-
getPosition(NodeId)
- Gets the position (relative position, between 0 and 1) for a Node
-
getPosition(NodeId, NodeId)
- Gets the line (relative sizes, between 0 and 1) for a link between two nodes
-
getRadiusX()
- Gets the radiusX (relative size, between 0 and 1) for each node.
-
getRadiusY()
- Gets the radiusY (relative size, between 0 and 1) for each node.
-
reset(NodeId[])
- A geometry can calculate the position of a node in function of the nodes
already present.
GraphGeometry
public GraphGeometry()
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.
getRadiusX
public abstract synchronized double getRadiusX()
- Gets the radiusX (relative size, between 0 and 1) for each node.
- Returns:
- the radiusX of the nodes
getRadiusY
public abstract synchronized double getRadiusY()
- Gets the radiusY (relative size, between 0 and 1) for each node.
- Returns:
- the radiusY of the nodes
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
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