This pages gives a short description on how TreeGraph 2 is implemented. A detailed description of all packages and classes can be found in the Javadoc.


The package structure of TreeGraph 2

All classes of TreeGraph 2 are contained in the info.bioinfweb.treegraph package, which also contains its main class (info.bioinfweb.treegraph.Main). The application is divided into the following main subpackages:

The document elements

Data structure

class and interface hierarchy of document elements Document Tree Node Legends ScaleBar HiddenDataMap Branch Legend Labels Label TextLabel IconLabel

Download UML source (ArgoUML)

A TreeGraph 2 document is represented by the Document class which acts as the model in the MVC paradigm used in the implementation. Each instance of Document owns a Tree objects which owns and manages the actual classes representing the single document elements.

A Tree objects contains the paintStart pointer which points at a Node object representing the root node of the document. (Unrooted documents are also represented rooted internally but the afferent branch of the root node is not painted. See here for details.) Each Node object can be linked to several subnodes with a composition, which represents the topology of a tree document. Branches that link nodes are modeled as objects owned by the Node object they lead to. The branches on the other hand own a list of labels. Both nodes and branches own a HiddenDataMap object that stores the hidden node or branch data.

Besides the root node and its subelements the Tree object also own a list of legends and the scale bar of the document (no matter if it currently visible or not).

Class and interface hierarchy

class and interface hierarchy of document elements HiddenDataElement PaintableElement ConcretePaintableElement TreeElement CornerRadiusElement TextElement LineElement AbstractTextElement Label Branch Node Legend ScaleBar IconLabel TextLabel

Download UML source (ArgoUML)

All document elements (which are painted with Graphics2D to represent the tree) implement PaintableElement. Depending on their character they additionally implement...

Note that some elements (e.g. legends) can be both text and line elements.

bioinfweb RSS feed TreeGraph 2 on ResearchGate bioinfweb on twitter TreeGraph 2 on GitHub
bioinfweb - Biology & Informatics Website