All Packages Class Hierarchy This Package Previous Next Index
Class vnet.display.GraphNet
java.lang.Object
|
+----java.util.Observable
|
+----vnet.display.GraphNet
- public class GraphNet
- extends Observable
- implements Observer
Graphical peer of a NetLayout, managing GraphNodes and GraphLinks
This class is Observable: when it considers that must be redrawn, notifys it
- Version:
- 0.2, august-1997
- Author:
- LuisM Pena
- See Also:
- GraphGeometry, NetLink
-
GraphNet(NetLayout, GraphGeometry)
-
-
GraphNet(NetLayout, GraphGeometry, int)
-
-
draw(Graphics, boolean)
- Draws the net, drawing each of the nodes and links
-
setSize(Dimension)
- Sets the correct size for the GraphNet.
-
update(Observable, Object)
- Observer method.
GraphNet
public GraphNet(NetLayout net,
GraphGeometry geometry)
- Parameters:
- net - the netlayout to represent
- geometry - the GraphGeometry that gives the right position to the items
in the GraphNet
GraphNet
public GraphNet(NetLayout net,
GraphGeometry geometry,
int periodState)
- Parameters:
- net - the netlayout to represent
- geometry - the GraphGeometry that gives the right position to the items
in the GraphNet
- periodState - when a NetLink or a NetNode changes its state, the graphLink
or the GraphNode will change its color, and the duration of this change is given
by this parameter. The duration is given in the number of calls to the draw method
update
public void update(Observable obs,
Object o)
- Observer method. It doesn't pay attention to the bindEvents
draw
public void draw(Graphics g,
boolean bUpdate)
- Draws the net, drawing each of the nodes and links
- Parameters:
- g - the Graphics where the link will be drawn
- bUpdate - is true if the origin of this call has not been a
component update method
setSize
public void setSize(Dimension dimension)
- Sets the correct size for the GraphNet.
The GraphGeometry gives the positions in realite ways, between 0 and 1. These
numbers have to be multiplied by the factor given by the setSize method
- Parameters:
- redimension - the dimension of the area where the net is being drawn
All Packages Class Hierarchy This Package Previous Next Index