Where to Find Up-to-date yFiles Information

This page is from the outdated yFiles for Java 2.13 documentation. You can find the most up-to-date documentation for all yFiles products on the yFiles documentation overview page.

Please see the following links for more information about the yFiles product family of diagramming programming libraries and corresponding yFiles products for modern web apps, for cross-platform Java(FX) applications, and for applications for the Microsoft .NET environment.

More about the yFiles product family Close X

Domain-Specific Layout Algorithms

In addition to the major layout algorithms, which are predominantly general-purpose, the yFiles library also provides domain-specific layout algorithms that are tailored to deal with special-purpose applications. Often, such algorithms require the graph to fulfill certain conditions, or need additional tagging information with the graph elements.

Family Tree Layout

Class FamilyTreeLayouter is a special-purpose layout algorithm that provides genealogical tree layout for graphs that encode family trees. Figure 5.23, “Family tree” shows an example family tree from tutorial demo application FamilyTreeDemo.java.

Figure 5.23. Family tree

Family tree.

FamilyTreeLayouter requires that there is a data provider registered with the graph using the look-up key DP_KEY_FAMILY_TYPE. This data provider is used to retrieve information about each of the nodes, namely whether a given node represents a person or a partnership of two persons, i.e., a family.

Supplemental Layout Data

Class FamilyTreeLayouter knows a number of data provider keys which are used to retrieve supplemental layout data for a graph's elements. The data is bound to the graph by means of a data provider which is registered using a given look-up key. Table 5.22, “Data provider look-up keys” lists all look-up keys for FamilyTreeLayouter.

Binding supplemental layout data to a graph is described in the section called “Providing Supplemental Layout Data”.

Table 5.22. Data provider look-up keys

Key Element Type Value Type Description
DP_KEY_FAMILY_TYPE Node String For each node one of TYPE_FAMILY, TYPE_MALE, or TYPE_FEMALE.

Layout Options

Class FamilyTreeLayouter uses different strategies for arranging the members of families, i.e., parents and children, on the one hand and then arranging these entire families on the other hand. The so-called top layouter is responsible for the latter strategy, which by default is an incremental hierarchical layout algorithm. Using another layout algorithm for the top layouter can be done by means of the following setter method:

void setTopLayouter(Layouter layouter)
Description Determines the top layouter.

Tutorial Demo Code

Tutorial demo application FamilyTreeDemo.java presents FamilyTreeLayouter's capabilities using GEDCOM sample data.