|
Bridges-Java-2.3.3
2.3.3
Bridges(JavaAPI)
|
This class extends Element to represent general trees with arbitrary number of children. More...
Public Member Functions | |
| TreeElement () | |
| TreeElement (E e) | |
| TreeElement (String label, E e) | |
| TreeElement (TreeElement< E > left, TreeElement< E > right) | |
| TreeElement (E e, TreeElement< E > left, TreeElement< E > right) | |
| String | getDataStructType () |
| void | addChild (TreeElement< E > child) |
| int | getNumberOfChildren () |
| void | setChild (int index, TreeElement< E > child) |
| TreeElement< E > | getChild (int index) |
| String | getDataStructureRepresentation () |
Public Member Functions inherited from bridges.base.Element< E > | |
| String | getDataStructType () |
| Element () | |
| Element (E val) | |
| Element (String label, E val) | |
| Element (Element< E > original) | |
| String | getIdentifier () |
| ElementVisualizer | getVisualizer () |
| void | setVisualizer (ElementVisualizer visualizer) |
| LinkVisualizer | getLinkVisualizer (Element< E > el) |
| String | getClassName () |
| int | compareTo (Element< E > e1) |
| boolean | equals (Element< E > e1) |
| String | getElementRepresentation () |
| String | getLinkRepresentation (LinkVisualizer lv, String src, String dest) |
| String | getLabel () |
| void | setLabel (String label) |
| String | arrangeLabel (String label, int wordNumber) |
| E | getValue () |
| void | setValue (E value) |
| String | toString () |
Public Member Functions inherited from bridges.base.DataStruct | |
| abstract String | getDataStructType () |
Additional Inherited Members | |
Protected Member Functions inherited from bridges.base.Element< E > | |
| void | setLinkVisualizer (Element< E > el) |
| void | removeLinkVisualizer (Element< E > el) |
| void | validateVal (E value) |
Protected Attributes inherited from bridges.base.DataStruct | |
| String | QUOTE = "\"" |
This class extends Element to represent general trees with arbitrary number of children.
TreeElement nodes can have an arbitrary number of child nodes(held in in a vector in the order in which they were added). The visualization of trees assumes that the children are drawn in order from left to right.
Tree Elements have labels (string) that are displayed on the visualization. Elements take an generic object E as a user defined parameter, which can be any native type or object.
Elements contain a visualizer (ElementVisualizer) object for setting visual attributes (color, shape, opacity, size), necessary for displaying them in a web browser.
Elements also have a LinkVisualizer object that is used when they are linked to another element, appropriate for setting link attributes, between parent and child nodes.
| <E> | The generic parameter object that is part of this element, representing application specific data. |
| bridges.base.TreeElement< E >.TreeElement | ( | ) |
Constructs an empty TreeElement with first two children set to null.
| bridges.base.TreeElement< E >.TreeElement | ( | E | e | ) |
Constructs a TreeElement holding an object "e" with first two children set to null.
| e | the generic object that TreeElement will hold |
| bridges.base.TreeElement< E >.TreeElement | ( | String | label, |
| E | e | ||
| ) |
Constructs a TreeElement with label set to "label", holding an object "e".
| label | the label of TreeElement that shows up on the Bridges visualization |
| e | the generic object that TreeElement will hold |
| bridges.base.TreeElement< E >.TreeElement | ( | TreeElement< E > | left, |
| TreeElement< E > | right | ||
| ) |
Constructs an empty TreeElement left pointer pointing to child 0 and right pointer pointing to child 1.
| left | the TreeElement to be assigned to the child 0 of this TreeElement |
| right | the TreeElement to be assigned to the child 1 of this TreeElement |
| bridges.base.TreeElement< E >.TreeElement | ( | E | e, |
| TreeElement< E > | left, | ||
| TreeElement< E > | right | ||
| ) |
Constructs a TreeElement holding the object "e", left pointer pointing to first child and right pointer pointing to second child
| e | the generic object that TreeElement will hold |
| left | the TreeElement to be assigned to the first child of this TreeElement |
| right | the TreeElement to be assigned to the second child of this TreeElement |
| void bridges.base.TreeElement< E >.addChild | ( | TreeElement< E > | child | ) |
Adds a child to the node
| TreeElement<E> bridges.base.TreeElement< E >.getChild | ( | int | index | ) |
gets a child at a particular index
| index | into the list of children |
| String bridges.base.TreeElement< E >.getDataStructType | ( | ) |
This method gets the data structure type
| String bridges.base.TreeElement< E >.getDataStructureRepresentation | ( | ) |
Get hierarchical JSON of the tree representation
| int bridges.base.TreeElement< E >.getNumberOfChildren | ( | ) |
Returns the number of children at this node
| void bridges.base.TreeElement< E >.setChild | ( | int | index, |
| TreeElement< E > | child | ||
| ) |
adds a child to the node - will be added at the next open position
| child | to be added |
1.8.10