|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.topology.viewer.Node
cgl.narada.topology.viewer.Cluster
public class Cluster
This class represents all the clusters consisting of nodes. The cluster is second level in the node address. If node's address is 1.2.3.4 then cluster id is 3
| Field Summary | |
|---|---|
List |
nodes
|
| Fields inherited from class cgl.narada.topology.viewer.Node |
|---|
clients, INVALID_VALUE, nodeId, nodeLocation, parentClusterId, parentSClusterId, parentSSClusterId |
| Constructor Summary | |
|---|---|
Cluster(int clusterId,
int pSClusterId,
int pSSClusterId)
Only constructor. |
|
| Method Summary | |
|---|---|
void |
deleteAllNodes(List nodesToBeDeleted)
Deletes all the nodes in the cluster |
void |
deleteNode(int nodeId,
List nodesToBeDeleted)
Deletes an existing node inside the cluster. |
void |
drawCluster(Graphics g,
int limitX1,
int limitY1,
int limitX2,
int limitY2)
Draws the cluster only if its part is visible on the screen. |
Node |
getNodeAtParticularCoordinates(int x,
int y)
Finds a node in the cluster, nearest to specified coordinates. |
Node |
getParticularNode(int nodeId)
Returns a node in the cluster with specified node id |
void |
insertNode(int nodeId)
Adds a new node to the list. |
void |
repositionNodes()
Gets new positions and assigns then to all nodes inside the cluster. |
| Methods inherited from class cgl.narada.topology.viewer.Node |
|---|
addClient, addTopic, canFitOnPanel, deleteAllClients, deleteAllTopics, deleteClient, deleteTopic, drawNode, getAllClients, getClient, getNodeAddress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public List nodes
| Constructor Detail |
|---|
public Cluster(int clusterId,
int pSClusterId,
int pSSClusterId)
| Method Detail |
|---|
public void insertNode(int nodeId)
nodeId - id of a node
public void deleteNode(int nodeId,
List nodesToBeDeleted)
throws TopologyException
nodeId - id of the nodenodesToBeDeleted - List which contains the node
address of a node which needs to be deleted.
TopologyException - if specified node is not found in the cluster.public void deleteAllNodes(List nodesToBeDeleted)
nodesToBeDeleted - List which contains the node
address of a node which needs to be deleted.
public Node getNodeAtParticularCoordinates(int x,
int y)
x - X-coordinate.y - Y-coordinate.
Node null if no such node is foundpublic Node getParticularNode(int nodeId)
nodeId - id of a node
Node
public void drawCluster(Graphics g,
int limitX1,
int limitY1,
int limitX2,
int limitY2)
g - Graphics object for image drawing.limitX1 - lower limit for X-coordinatelimitY1 - lower limit for Y-coordinatelimitX2 - upper limit for X-coordinatelimitY2 - upper limit for Y-coordinatepublic void repositionNodes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||