|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.caida.otter.DisplayObjects
A container for nodes, labels, and links. This class should encapsulate all the necessary information to render a graph to the screen.
Constructor Summary | |
DisplayObjects()
Create an empty display object |
Method Summary | |
java.lang.Object |
addAttribute(java.lang.Object category,
java.lang.Object attribute,
java.lang.Object value)
Add an attribute to inside a category |
java.lang.Object |
addCategory(java.lang.Object category)
Add a category to the set. |
void |
addColumnNameToNodeName()
|
Label |
addLabel(int index,
int column,
int row,
java.lang.String name,
java.lang.String colName)
Add a label to our DisplayObject |
Label |
addLabel(Label newLabel)
|
Line |
addLine(Coordinate coord1,
Coordinate coord2,
java.lang.String name)
Add a line to our DisplayObject |
Line |
addLine(Line newLine)
|
Node |
addNode(int index,
int column,
int row,
java.lang.String name,
java.lang.String colName)
Add a node to our DisplayObject |
Node |
addNode(int index,
int column,
int row,
java.lang.String name,
java.lang.String colName,
int nodeNumber)
Add a node to the DisplayObject John Tusson Tue Aug 14 16:28:12 PDT 2001 |
Node |
addNode(Node newNode)
|
java.lang.Object |
changeAttribute(java.lang.Object category,
java.lang.Object attribute,
java.lang.Object value)
Replace an attribute inside a category |
boolean |
checkSelfConsistencyForNodesAndLines()
check the data structure for self-consistency |
boolean |
containsKey(java.lang.String lineName)
|
boolean |
containsLabel(Label label)
|
boolean |
containsLabel(java.lang.String labelName)
|
boolean |
containsLine(Line line)
|
boolean |
containsNode(Node node)
|
boolean |
containsNode(java.lang.String nodeName)
|
java.lang.Object |
deleteAttribute(java.lang.Object category,
java.lang.Object attribute)
Remove an attribute from inside a category |
java.lang.Object |
deleteCategory(java.lang.Object category)
Remove an attribute from the set of categories. |
java.lang.Object[] |
enumerateAttributes(java.lang.Object category)
Get a list of attributes in a given category |
java.lang.Object[] |
enumerateCategories()
Get a list of objects that represent all of the categories contained in this node's category set. |
java.lang.Object |
getAttribute(java.lang.Object category,
java.lang.Object attribute)
Get an attribute from inside a category |
Label |
getLabel(java.lang.String name)
|
int |
getLabelCount()
|
java.util.Enumeration |
getLabelEnumeration()
|
Line |
getLine(java.lang.String name)
|
int |
getLineCount()
|
java.util.Enumeration |
getLineEnumeration()
|
Node |
getNode(java.lang.String name)
|
int |
getNodeCount()
|
java.util.Enumeration |
getNodeEnumeration()
|
void |
invertImage(boolean invertX,
boolean invertY)
Invert our display object along either axis. |
void |
normalizeSize(int screenX,
int screenY)
Normalize the size of the final image. |
void |
removeLabel(Label delLabel)
Remove a label from the DisplayObject |
void |
staggerLabels(int tierCount,
int spacing)
Assumes all the labels are already at the same X val; stagger labels into a specified number of tiers over the given total space. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DisplayObjects()
Method Detail |
public void addColumnNameToNodeName()
public boolean checkSelfConsistencyForNodesAndLines()
public Node addNode(int index, int column, int row, java.lang.String name, java.lang.String colName)
index
- The index value to assign the new node.column
- The column number to put the new node in.row
- The row number to put the new node in.name
- The name to assign the new node.colName
- The column name to assign the new node.public Node addNode(int index, int column, int row, java.lang.String name, java.lang.String colName, int nodeNumber)
index
- The index value to assign the new node.column
- The column number to put the new node in.row
- The row number to put the new node in.name
- The name to assign the new node.colName
- The column name to assign the new node.nodeNumber
- The orignal node number from graph filepublic Node addNode(Node newNode)
public Node getNode(java.lang.String name)
public java.util.Enumeration getNodeEnumeration()
public boolean containsNode(Node node)
public boolean containsNode(java.lang.String nodeName)
public int getNodeCount()
public int getLabelCount()
public int getLineCount()
public Label addLabel(int index, int column, int row, java.lang.String name, java.lang.String colName)
index
- The index to assign the new Labelcolumn
- The column number to assign the new label.row
- The row number to assign the new label.name
- The name to assign the new label.colName
- The column name to assign to the new label.public Label addLabel(Label newLabel)
public Label getLabel(java.lang.String name)
public java.util.Enumeration getLabelEnumeration()
public boolean containsLabel(Label label)
public boolean containsLabel(java.lang.String labelName)
public Line addLine(Coordinate coord1, Coordinate coord2, java.lang.String name)
idx1
- the index of the node the line starts from.idx2
- the index of the node the line ends at.name
- A name to assign to the new line.public Line addLine(Line newLine)
public Line getLine(java.lang.String name)
public java.util.Enumeration getLineEnumeration()
public boolean containsLine(Line line)
public boolean containsKey(java.lang.String lineName)
public void invertImage(boolean invertX, boolean invertY)
invertX
- true if you want the X axis inverted, false otherwise.invertY
- true if you want the Y axis inverted, false otherwise.public void removeLabel(Label delLabel)
delLabel
- The label object to remove.public void normalizeSize(int screenX, int screenY)
screenX
- The new width in pixels.screenY
- the new height in pixels.public void staggerLabels(int tierCount, int spacing)
tierCount
- The number of tiers to divide the labels into.spacing
- The spacing in pixels between the tiers.public java.lang.Object addCategory(java.lang.Object category)
public java.lang.Object addAttribute(java.lang.Object category, java.lang.Object attribute, java.lang.Object value)
public java.lang.Object getAttribute(java.lang.Object category, java.lang.Object attribute)
public java.lang.Object deleteCategory(java.lang.Object category)
public java.lang.Object deleteAttribute(java.lang.Object category, java.lang.Object attribute)
public java.lang.Object changeAttribute(java.lang.Object category, java.lang.Object attribute, java.lang.Object value)
public java.lang.Object[] enumerateCategories()
public java.lang.Object[] enumerateAttributes(java.lang.Object category)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |