yFiles Tutorial Layout Demos

The following source code samples demonstrate how to use the yFiles layout algorithms when the yFiles Viewer distribution is not present.

Class Description
demo.layout.withoutview.DiagonalLayouterImplementation of a custom layouter that arranges the nodes on a diagonal line
demo.layout.withoutview.LayoutWithoutAViewShows how to use layout and labeling algorithms without using classes that are only present in the yFiles Viewer distribution
demo.layout.withoutview.GroupingLayoutWithoutAViewShows how to use layout and labeling algorithms using node and edge grouping without yFiles Viewer classes
demo.layout.withoutview.IncrementalLayoutWithoutAViewShows how to use layout and labeling algorithms using incremental layout capabilities without yFiles Viewer classes
demo.layout.withoutview.SwimlaneLayoutWithoutAViewShows how to use layout and labeling algorithms using swim lane capabilities without yFiles Viewer classes
demo.layout.withoutview.PartitionGridLayoutWithoutAViewShows how to use layout and labeling algorithms using the partition grid feature without yFiles Viewer classes
demo.layout.withoutview.RecursiveGroupLayouterDemoShows how to layout the contents of group nodes each with a different layout style
demo.layout.withoutview.IntersectionCalculatorDemoPlace edge connection points on visual outline of nodes
demo.layout.withoutview.IntersectionCalculators Provides utilities for calculating intersection points of edges at nodes.

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.