TnT Tree offers a flexible API that allows the configuration of every component of the tree visualisation. This is achieved by creating interfaces for the elements in the tree: layouts, node displays and labels. Using these interfaces TnT Tree offers pre-defined configurations of these elements. For example, for the general node display interface TnT Tree offers different pre-defined configurations for displaying nodes as circles, squares or triangles.
Some of the methods defined in the interface are needed to build the pre-defined elements while the others are configuration methods for all the pre-defined elements made with the interface. For example, the node display interface exposes the following methods: display, size, fill, stroke and stroke_width. The specific node displays (circles, squares and triangles) are built by setting the display method in the general interface. The rest of the methods (size, fill, stroke and stroke_width) are configuration methods also in the pre-defined displays. When using the library most of the time the user will be using the pre-defined elements but new ones can be created using the interface.
In the API documentation below interfaces are prepended by the [interface] keyword. Interface methods that are needed to create the pre-defined configurations are prepended with [interface-method]