public abstract class Edge extends Item
| Modifier and Type | Field and Description |
|---|---|
private Node |
node1
Node 1 is connected to Node2.
|
private Node |
node2
Node 2 is connected to Node1.
|
| Modifier and Type | Method and Description |
|---|---|
void |
calculateMiddle()
Calculates the middle between Node n1 and Node n2.
|
void |
deregister()
deregister the edge from the Nodes.
|
void |
draw(java.awt.Graphics g)
drawing the connecting between Node 1 and Node2.
|
boolean |
equals(java.lang.Object obj) |
Node |
getN1()
Getter of Node 1.
|
Node |
getN2()
Getter of Node 2.
|
boolean |
hasConnection(Node n1,
Node n2)
method to check if there is a connection between Node n1 and Node n2.
|
int |
hashCode() |
boolean |
isConnectedTo(Node n)
checks if this edge is connected to the node n.
|
void |
register()
register the edge at the Nodes as a observer.
|
(package private) abstract void |
setColor(java.awt.Graphics g)
setting color of the Edge.
|
accept, acceptConnectVisitor, contains, containsVaByIdentifier, getBoundary, getPoint, getPropertyBar, getPropertyDraw, getSelected, getSelectedNodes, markAsSelected, selectAll, selectMultiple, selectNone, selectOne, selectRect, selectToggle, setBoundary, setPoint, setSelected, updatePositionprivate final Node node1
private final Node node2
abstract void setColor(java.awt.Graphics g)
g - graphic of the edge.public Node getN2()
public Node getN1()
public void register()
public void deregister()
public final void calculateMiddle()
public void draw(java.awt.Graphics g)
public boolean hasConnection(Node n1, Node n2)
n1 - Node 1.n2 - Node 2.public boolean isConnectedTo(Node n)
n - the nodepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object