org.eu.sk.zero.acd
Class Edge

java.lang.Object
  |
  +--org.eu.sk.zero.acd.Component
        |
        +--org.eu.sk.zero.acd.Edge

public class Edge
extends Component

Edge connecting two nodes.

Version:
$Id: Edge.java,v 1.8 2003/05/04 19:02:22 robo Exp $
See Also:
EdgeType

Field Summary
 
Fields inherited from class org.eu.sk.zero.acd.Component
id, type
 
Constructor Summary
Edge(org.eu.sk.zero.acd.ComponentType type, org.eu.sk.zero.acd.Node f, org.eu.sk.zero.acd.Node t)
          Adds an edge of the given type between the given two edges.
Edge(org.eu.sk.zero.acd.ComponentType type, org.eu.sk.zero.acd.Node f, org.eu.sk.zero.acd.Node t, Color c)
          Adds an edge of the given type between the given two nodes.
 
Method Summary
 void draw(Graphics g)
          Draws the edge using the given Graphics objects.
 void draw(Graphics g, int prop)
          Draws the edge using the given Graphics objects.
 org.eu.sk.zero.acd.Node from()
          Returns the first node of this edge
 org.eu.sk.zero.acd.Node to()
          Returns the second node of this edge
 
Methods inherited from class org.eu.sk.zero.acd.Component
addValue, deselect, getId, getType, hide, isError, isHidden, isSelected, select, setError, show, toString, value, value, valueIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(org.eu.sk.zero.acd.ComponentType type,
            org.eu.sk.zero.acd.Node f,
            org.eu.sk.zero.acd.Node t)
Adds an edge of the given type between the given two edges. Color will be used the same as the default color of the egde-type.


Edge

public Edge(org.eu.sk.zero.acd.ComponentType type,
            org.eu.sk.zero.acd.Node f,
            org.eu.sk.zero.acd.Node t,
            Color c)
Adds an edge of the given type between the given two nodes. Color will be used as specified

Method Detail

from

public org.eu.sk.zero.acd.Node from()
Returns the first node of this edge


to

public org.eu.sk.zero.acd.Node to()
Returns the second node of this edge


draw

public void draw(Graphics g,
                 int prop)
Draws the edge using the given Graphics objects.

Parameters:
prop - - properties - see the final static ComponentType attributes.

draw

public void draw(Graphics g)
Draws the edge using the given Graphics objects.