|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcore.NodeManager
NodeManager.java - Centralised repository for information on nodes in the simulation
| Method Summary | |
void |
addNode(int x,
int y,
java.lang.String IPAddress,
java.awt.Color c)
Add a Node to the NodeManager |
void |
editVNodeIP(java.lang.String IPold,
java.lang.String IPnew)
Change the IPAddress of a node. |
void |
editVNodex(java.lang.String IP,
java.lang.String stringx)
Change the x co-ordinate of a node |
void |
editVNodey(java.lang.String IP,
java.lang.String stringy)
Change the y co-ordinate of a node |
VisualNode |
findNode(java.lang.String IP)
Returns a VisualNode with the desired IP Address |
java.util.ArrayList |
getNodes()
Return the list of nodes currently contained in the node manager. |
boolean |
inRange(java.lang.String srcIP,
java.lang.String destIP,
double dist)
Check if two nodes are within range of each other. |
static NodeManager |
instance()
|
void |
moveNodes()
Move the positions of the nodes contained in the NodeManager. |
void |
nodestep()
Step(change) the x and y co-ordinates of the nodes in the NodeManager. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static NodeManager instance()
public void addNode(int x,
int y,
java.lang.String IPAddress,
java.awt.Color c)
x - Initial x positiony - Initial y positionIPAddress - The IP Address of the nodec - The Color object of the nodepublic java.util.ArrayList getNodes()
public void moveNodes()
public boolean inRange(java.lang.String srcIP,
java.lang.String destIP,
double dist)
srcIP - IP Address of source node.destIP - IP Address of destination nodedist - Range distance
public void editVNodeIP(java.lang.String IPold,
java.lang.String IPnew)
IPold - Old IPIPnew -
public void editVNodex(java.lang.String IP,
java.lang.String stringx)
IP - IP Address of the node to be changedstringx - x co-ordinate as a String
public void editVNodey(java.lang.String IP,
java.lang.String stringy)
IP - IP Address of the node to be changedstringy - y co-ordinate as a Stringpublic VisualNode findNode(java.lang.String IP)
IP - IP Address to be searched for.
public void nodestep()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||