|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.samcrow.Node
public abstract class Node
Base class for nodes
Field Summary | |
---|---|
protected static int |
CIRCLE_RADIUS
|
protected java.util.Collection<Link> |
links
|
protected int |
x
|
protected int |
y
|
Constructor Summary | |
---|---|
Node(int inX,
int inY)
Construct a node with a given location and no links |
Method Summary | |
---|---|
void |
addLink(Link inLink)
|
int |
compareTo(Node o)
|
boolean |
equals(java.lang.Object obj)
|
org.lekan.graphics.SGObject |
getDrawObject()
Get the SGObjects to draw this node |
java.util.Collection<Link> |
getLinks()
|
int |
getX()
Get the X-coordinate of this node |
int |
getY()
Get the Y-coordinate of this node |
int |
hashCode()
|
boolean |
isInArea(java.awt.event.MouseEvent e)
Check if the location of a given MouseEvent is inside the circle that represents this Node |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int CIRCLE_RADIUS
protected int x
protected int y
protected java.util.Collection<Link> links
Constructor Detail |
---|
public Node(int inX, int inY)
inX
- The X coordinate of the nodeinY
- The Y coordinate of the nodeMethod Detail |
---|
public final void addLink(Link inLink)
public org.lekan.graphics.SGObject getDrawObject()
public final java.util.Collection<Link> getLinks()
public final int getX()
public final int getY()
public boolean isInArea(java.awt.event.MouseEvent e)
e
- the MouseEvent to check
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(Node o)
compareTo
in interface java.lang.Comparable<Node>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |