| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.bioinfweb.treegraph.document.ConcretePaintableElement
info.bioinfweb.treegraph.document.AbstractTextElement
info.bioinfweb.treegraph.document.Node
public class Node
This class represents a node of a tree in the TreeGraph data structure.
| Field Summary | |
|---|---|
private  Branch | 
afferentBranch
 | 
private  HashMap<String,Object> | 
attributeMap
 | 
private  ArrayList<Node> | 
children
 | 
private  NodeFormats | 
formats
 | 
private  HiddenDataMap | 
hiddenDataMap
 | 
private  Node | 
parent
 | 
private  String | 
uniqueName
 | 
| Fields inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement | 
|---|
positions | 
| Constructor Summary | |
|---|---|
Node()
 | 
|
| Method Summary | |
|---|---|
 Node | 
clone()
Returns a deep copy of this node not including the subtrees.  | 
 Node | 
clone(boolean keepUniqheNames)
Returns a deep copy of this node not including the subtrees.  | 
 Node | 
cloneWithSubtree(boolean keepUniqueNames)
Clones this object and all objects in this subtree and its afferent branch.  | 
 boolean | 
containedInSubtree(ConcretePaintableElement element)
Tests whether an element is contained in the subtree under this node.  | 
 Branch | 
getAfferentBranch()
 | 
 HashMap<String,Object> | 
getAttributeMap()
The attribute map can store data that is specific to special tasks like ladderizing or tree merging.  | 
 List<Node> | 
getChildren()
 | 
 NodeFormats | 
getFormats()
 | 
 HiddenDataMap | 
getHiddenDataMap()
 | 
 Node | 
getHighestChild()
Returns the upper most subnode of this node (e.g. needed for legend positioning).  | 
static Node | 
getInstanceWithBranch()
 | 
 Node | 
getLinkedNode()
 | 
 Node | 
getLowestChild()
Returns the lowest subnode of this node (e.g. needed for legend positioning).  | 
 Node | 
getNext()
 | 
 Node | 
getNextLeaf()
 | 
 Node | 
getParent()
 | 
 NodePositionData | 
getPosition(PositionPaintType type)
Returns the stored DataPosition-object of an for an positioner-
 identifier. | 
 Node | 
getPrevious()
 | 
 Node | 
getPreviousLeaf()
 | 
 String | 
getUniqueName()
The unique name is used to identify nodes in the XML-file which are associated with legends.  | 
 boolean | 
hasAfferentBranch()
 | 
 boolean | 
hasParent()
 | 
 boolean | 
hasUniqueName()
Test if this node has a unique name specified  | 
 boolean | 
isChildOf(Node ancestor)
Tests if the specified node is an ancestor of this node.  | 
 boolean | 
isFirst()
 | 
 boolean | 
isLast()
 | 
 boolean | 
isLeaf()
Tests if this Node is at the deepest level of the tree (has no subnodes). | 
 boolean | 
isOnlySubelement()
Tests if this element is the only Node under the parent node. | 
 Vector<String> | 
leafNames()
 | 
private  void | 
searchLeafNames(Node root,
                Vector<String> names)
 | 
 void | 
setAfferentBranch(Branch afferentBranch)
Sets the specified branch as the afferent branch of this node and additionally sets this node as the target node of the specified branch.  | 
 void | 
setFormats(ElementFormats formats)
 | 
 void | 
setParent(Node node)
 | 
 void | 
setUniqueName(String uniqueName)
The unique name is used to identify nodes in the XML-file which are associated with legends.  | 
| Methods inherited from class info.bioinfweb.treegraph.document.AbstractTextElement | 
|---|
assignTextElementData, getData, toString | 
| Methods inherited from class java.lang.Object | 
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private Node parent
private ArrayList<Node> children
private Branch afferentBranch
private NodeFormats formats
private String uniqueName
private HiddenDataMap hiddenDataMap
private HashMap<String,Object> attributeMap
| Constructor Detail | 
|---|
public Node()
| Method Detail | 
|---|
public static Node getInstanceWithBranch()
public NodePositionData getPosition(PositionPaintType type)
PaintableElementDataPosition-object of an for an positioner-
 identifier. If no position-object has been stored for this identifier, one will be created.
getPosition in interface PaintableElementgetPosition in class ConcretePaintableElementpublic Node getParent()
public void setParent(Node node)
public List<Node> getChildren()
public Branch getAfferentBranch()
public void setAfferentBranch(Branch afferentBranch)
afferentBranch - the new afferent branchpublic HashMap<String,Object> getAttributeMap()
public boolean isLeaf()
Node is at the deepest level of the tree (has no subnodes).
public boolean hasParent()
public boolean hasAfferentBranch()
public boolean isOnlySubelement()
Node under the parent node.
public boolean isFirst()
public boolean isLast()
public Node getPrevious()
public Node getNext()
public Node getPreviousLeaf()
public Node getNextLeaf()
public boolean isChildOf(Node ancestor)
n.isAncestor(n) 
 is false.)
ancestor - 
public boolean containedInSubtree(ConcretePaintableElement element)
element - the element to search for (either a Node, Branch,
        Label or Legend)
true, if the element is foundTreeSerializerpublic NodeFormats getFormats()
getFormats in interface CornerRadiusElementgetFormats in interface LineElementgetFormats in interface PaintableElementgetFormats in interface TextElementgetFormats in class AbstractTextElementpublic void setFormats(ElementFormats formats)
setFormats in interface PaintableElementpublic String getUniqueName()
public void setUniqueName(String uniqueName)
uniqueName - the new unique name or null if it shall be deletedpublic boolean hasUniqueName()
nullpublic HiddenDataMap getHiddenDataMap()
getHiddenDataMap in interface HiddenDataElementpublic Node getHighestChild()
public Node getLowestChild()
private void searchLeafNames(Node root, Vector<String> names)
public Vector<String> leafNames()
public Node getLinkedNode()
getLinkedNode in interface TreeElementpublic Node clone()
clone(false).
clone in interface TextElementclone in class AbstractTextElementpublic Node clone(boolean keepUniqheNames)
keepUniqheNames - defines whether the copy should have the same unique
 name as the original.
public Node cloneWithSubtree(boolean keepUniqueNames)
null.
keepUniqueNames - defines wheather the copied nodes should have the same 
 unique names as the originals.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||