info.bioinfweb.treegraph.document
Class TreeSerializer

java.lang.Object
  extended by info.bioinfweb.treegraph.document.TreeSerializer

public class TreeSerializer
extends java.lang.Object


Constructor Summary
TreeSerializer()
           
 
Method Summary
private static void addLabelBlock(java.util.Vector<PaintableElement> list, boolean textLabel, boolean charShift, Labels labels, boolean above)
           
private static void addLabelsWithID(java.util.Vector<Label> list, Node root, java.lang.String id)
           
private static void addSubtree(java.util.Vector<PaintableElement> list, Node root, boolean leafsOnly, boolean node, boolean branch, boolean textLabel, boolean charShift)
           
static Branch[] getBranches(Node root)
           
static CharShiftLabel[] getCharShiftLabels(Node root)
           
static
<T> T[]
getElements(Node root, T[] array, boolean leafsOnly, boolean node, boolean branch, boolean textLabel, boolean charShift)
           
static
<T> T[]
getElementsOfType(Node root, PaintableElement typeElement, T[] array, boolean leafsOnly)
           
static Label[] getLabels(Node root)
           
static Label[] getLabelsWithID(Node root, java.lang.String id)
           
private static void getLabelsWithIDInBlock(java.util.Vector<Label> list, Labels labels, boolean above, java.lang.String id)
           
static Node[] getLeafNodes(Node root)
           
static LineElement[] getLineElements(Node root)
           
static Node[] getNodes(Node root)
           
static ConcretePaintableElement[] getPaintableElements(Node root)
           
static TextElement[] getTextElements(Node root)
           
static TextLabel[] getTextLabels(Node root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeSerializer

public TreeSerializer()
Method Detail

addLabelBlock

private static void addLabelBlock(java.util.Vector<PaintableElement> list,
                                  boolean textLabel,
                                  boolean charShift,
                                  Labels labels,
                                  boolean above)

addSubtree

private static void addSubtree(java.util.Vector<PaintableElement> list,
                               Node root,
                               boolean leafsOnly,
                               boolean node,
                               boolean branch,
                               boolean textLabel,
                               boolean charShift)

getElements

public static <T> T[] getElements(Node root,
                                  T[] array,
                                  boolean leafsOnly,
                                  boolean node,
                                  boolean branch,
                                  boolean textLabel,
                                  boolean charShift)

getElementsOfType

public static <T> T[] getElementsOfType(Node root,
                                        PaintableElement typeElement,
                                        T[] array,
                                        boolean leafsOnly)

getPaintableElements

public static ConcretePaintableElement[] getPaintableElements(Node root)

getLineElements

public static LineElement[] getLineElements(Node root)

getTextElements

public static TextElement[] getTextElements(Node root)

getNodes

public static Node[] getNodes(Node root)

getBranches

public static Branch[] getBranches(Node root)

getLabels

public static Label[] getLabels(Node root)

getTextLabels

public static TextLabel[] getTextLabels(Node root)

getCharShiftLabels

public static CharShiftLabel[] getCharShiftLabels(Node root)

getLeafNodes

public static Node[] getLeafNodes(Node root)

getLabelsWithIDInBlock

private static void getLabelsWithIDInBlock(java.util.Vector<Label> list,
                                           Labels labels,
                                           boolean above,
                                           java.lang.String id)

addLabelsWithID

private static void addLabelsWithID(java.util.Vector<Label> list,
                                    Node root,
                                    java.lang.String id)

getLabelsWithID

public static Label[] getLabelsWithID(Node root,
                                      java.lang.String id)