yFiles Tutorial Demos for Tree Layout

This package contains tutorial source code demos that showcase various aspects of the yFiles tree layout facilities.

Class Description
demo.view.layout.tree.AssistantPlacerDemo This demo shows how to use y.layout.tree.GenericTreeLayouter in conjunction with y.layout.tree.AssistantPlacer .
demo.view.layout.tree.CollapsibleTreeDemo This demo shows how subtrees can be collapsed and expanded by simply clicking on their respective root nodes. Three different layout algorithms can be chosen: y.layout.tree.TreeLayouter, y.layout.tree.BalloonLayouter and y.layout.organic.OrganicLayouter .
demo.view.layout.tree.DendrogramLayouterDemo This demo shows how to achieve a dendrogram-like tree layout using y.layout.tree.GenericTreeLayouter and y.layout.tree.DendrogramPlacer.
demo.view.layout.tree.IncrementalTreeLayouterDemoComplex demo that shows how the y.layout.tree.GenericTreeLayouter can be used to incrementally build complex tree structures with simple user gestures.
demo.view.layout.tree.RotatableNodePlacersDemo This demo presents y.layout.tree.GenericTreeLayouter in conjunction with node placers that support subtree rotation.
demo.view.layout.tree.TreeLayoutConfigurationDemo This demo serves as a launcher for the tree layout styles offered by TreeLayoutConfiguration.

Running the Demos

From Within an IDE

Set <yFilesDir>/src as your source directory. Then add <yFilesDir>/lib/y.jar and the source folder <yFilesDir>/src to your classpath. Now you should be ready to compile and run all executable demo classes.

With Ant

First make sure you have the build tool Ant installed on your system. Now you can use the demo build script build.xml located in <yFilesDir>/src/demo to launch each demo by specifying its simple class name as a target. Alternatively, launch the interactive demo driver by specifying run as target to conveniently access all demos.