|
|||||||||
| 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.SCluster
public class SCluster
This class represents all the super clusters consisting of clusters. The super cluster is third level in the node address. If node's address is 1.2.3.4 then the super cluster id is 2
| Field Summary | |
|---|---|
List |
clusters
|
| Fields inherited from class cgl.narada.topology.viewer.Node |
|---|
clients, INVALID_VALUE, nodeId, nodeLocation, parentClusterId, parentSClusterId, parentSSClusterId |
| Constructor Summary | |
|---|---|
SCluster(int pSClusterId,
int pSSClusterId)
Only constructor |
|
| Method Summary | |
|---|---|
void |
deleteAllClusters(List nodesToBeDeleted)
Deletes all the cluster present in this super cluster. |
void |
deleteCluster(int clusterId,
int nodeId,
List nodesToBeDeleted)
Deletes an existing cluster inside the super cluster only if that cluster is empty and then repositions all other clusters. |
void |
drawSuperCluster(Graphics g,
int limitX1,
int limitY1,
int limitX2,
int limitY2)
Draws the super cluster only if its part is visible on the screen. |
Node |
getNodeAtParticularCoordinates(int x,
int y)
Finds out cluster nearest to the specified coordinates. |
Node |
getParticularNode(int clusterId,
int nodeId)
Returns a node in this super cluster with specified cluster and node id. |
void |
insertCluster(int clusterId,
int nodeId)
Add a new cluster to the list. |
void |
repositionClusters()
Gets the new Position objects and assign then to all the
clusters inside this super 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 clusters
| Constructor Detail |
|---|
public SCluster(int pSClusterId,
int pSSClusterId)
| Method Detail |
|---|
public void insertCluster(int clusterId,
int nodeId)
throws TopologyException
clusterId - id of a clusternodeId - id of a node to be inserted
TopologyException - if due to some problem cluster is found null
during node insertion
public void deleteCluster(int clusterId,
int nodeId,
List nodesToBeDeleted)
throws TopologyException
clusterId - id of a cluster containing node to be deleted.nodeId - id of a node to be deleted.nodesToBeDeleted - a List which will contain node
addresses of the nodes being deleted.
TopologyException - if no such cluster id found while node
deletion.public void deleteAllClusters(List nodesToBeDeleted)
nodesToBeDeleted - a List which will contain node
addresses of the nodes being deleted.
public Node getNodeAtParticularCoordinates(int x,
int y)
x - X-coordinatey - Y-coordinate
Node nearest to specified coordinates.
public void drawSuperCluster(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-coordinate
public Node getParticularNode(int clusterId,
int nodeId)
clusterId - id of a cluster.nodeId - id of a node.
Nodepublic void repositionClusters()
Position objects and assign then to all the
clusters inside this super cluster. Recurdively calls repositionNodes()
for each of the cluster.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||