info.bioinfweb.treegraph.document
Class TreeSerializer

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

public class TreeSerializer
extends Object


Constructor Summary
TreeSerializer()
           
 
Method Summary
private static void addLabelBlock(Vector<PaintableElement> list, boolean textLabel, boolean iconLabel, Labels labels, boolean above)
           
private static void addLabelsWithID(Vector<Label> list, Node root, String id)
           
private static void addSubtree(Vector<PaintableElement> list, Node root, boolean leafsOnly, boolean node, boolean branch, boolean textLabel, boolean iconLabel)
           
static Branch[] getBranches(Node root)
           
static
<T> T[]
getElements(Node root, T[] array, boolean leafsOnly, boolean node, boolean branch, boolean textLabel, boolean iconLabel)
           
static
<T> T[]
getElementsOfType(Node root, PaintableElement typeElement, T[] array, boolean leafsOnly)
           
static IconLabel[] getIconLabels(Node root)
           
static Label[] getLabels(Node root)
           
static Label[] getLabelsWithID(Node root, String id)
           
private static void getLabelsWithIDInBlock(Vector<Label> list, Labels labels, boolean above, 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(Vector<PaintableElement> list,
                                  boolean textLabel,
                                  boolean iconLabel,
                                  Labels labels,
                                  boolean above)

addSubtree

private static void addSubtree(Vector<PaintableElement> list,
                               Node root,
                               boolean leafsOnly,
                               boolean node,
                               boolean branch,
                               boolean textLabel,
                               boolean iconLabel)

getElements

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

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)

getIconLabels

public static IconLabel[] getIconLabels(Node root)

getLeafNodes

public static Node[] getLeafNodes(Node root)

getLabelsWithIDInBlock

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

addLabelsWithID

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

getLabelsWithID

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