public interface Edge extends java.io.Serializable, java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
void |
connect(Node aStart,
Node anEnd)
Connects this edge to two nodes.
|
boolean |
contains(java.awt.geom.Point2D aPoint)
Tests whether the edge contains a point.
|
void |
draw(java.awt.Graphics2D g2)
Draw the edge.
|
java.awt.geom.Rectangle2D |
getBounds(java.awt.Graphics2D g2)
Gets the smallest rectangle that bounds this edge.
|
java.awt.geom.Line2D |
getConnectionPoints()
Gets the points at which this edge is connected to
its nodes.
|
Node |
getEnd()
Gets the ending node.
|
Node |
getStart()
Gets the starting node.
|
void draw(java.awt.Graphics2D g2)
g2
- the graphics contextboolean contains(java.awt.geom.Point2D aPoint)
aPoint
- the point to testvoid connect(Node aStart, Node anEnd)
aStart
- the starting nodeanEnd
- the ending nodejava.awt.geom.Line2D getConnectionPoints()
java.awt.geom.Rectangle2D getBounds(java.awt.Graphics2D g2)
java.lang.Object clone()