|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.topology.viewer.LinkManagement
public class LinkManagement
This class managed all the links present in the system.
| Field Summary | |
|---|---|
List |
links
|
| Constructor Summary | |
|---|---|
LinkManagement()
Only constructor. |
|
| Method Summary | |
|---|---|
void |
addLink(Node n1,
Node n2,
int linkId,
String linkType)
Adds a link between the specified node pair. |
void |
deleteAllLinks()
|
void |
deleteAllLinksForNode(Node n)
Deletes all the links emerging from the specified node. |
void |
deleteLink(Node n1,
Node n2,
int linkId)
Deletes a particular link between two nodes. |
void |
deleteLinksForPair(Node n1,
Node n2)
|
void |
drawAllLinks(Graphics g)
Draws all the links present in the system. |
List |
getAllLinksForNode(Node n)
Returns all the links emerging from a particular node. |
List |
getAllLinksForPair(Node n1,
Node n2)
Returns all the links between a given node pair. |
Color |
getLinkColor(Node n1,
Node n2)
Gets one of the four colors depending upon the end nodes of a link |
int |
getLinkCount()
Returns total number of links present in the system. |
LinkDetails |
getLinkDetails(Node n1,
Node n2)
Get object containing information about all the links between specified node pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public List links
| Constructor Detail |
|---|
public LinkManagement()
| Method Detail |
|---|
public void addLink(Node n1,
Node n2,
int linkId,
String linkType)
n1 - one end Noed of a link.n2 - other end node of a link.linkId - id of a link to be inserted.linkType - type of a link to be inserted.
public void deleteLink(Node n1,
Node n2,
int linkId)
throws TopologyException
n1 - one end Noed of a link.n2 - other end node of a link.linkId - id of the link to be deleted.
TopologyException - if specified node pair is not found.public void deleteAllLinksForNode(Node n)
n - Node whose connections are being removed.
public void deleteLinksForPair(Node n1,
Node n2)
public void deleteAllLinks()
public int getLinkCount()
public List getAllLinksForNode(Node n)
n - Node of which connections are being returned.
List of all the links emerging from specified node.
public List getAllLinksForPair(Node n1,
Node n2)
n1 - one Node of a pair.n2 - other Node of a pair.
List containing String representations
of all the links between specified pair.
public LinkDetails getLinkDetails(Node n1,
Node n2)
n1 - one end Node of a link.n2 - other end Node of a link.
LinkDetails object for a specified node pair.public void drawAllLinks(Graphics g)
g - Graphics object pertaining to the image being
drawn.
public Color getLinkColor(Node n1,
Node n2)
n1 - one end Node of a link.n2 - other end Node of a link.
Color object for the link between specified node
pair.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||