yFiles Tutorial Graph Hierarchy Demos

The following tutorial view demos show how to work with graphs that are organized as a hierarchical structure of expanded or collapsed groups of nodes.

Class Description
demo.view.hierarchy.HierarchyDemoExhibits the Nested Graph Hierarchy and the Node Grouping technologies that are a modular part of the yFiles library
demo.view.hierarchy.CustomGroupVisualizationDemoDemonstrates how to customize the visual representation of group and folder nodes using GenericGroupNodeRealizer
demo.view.hierarchy.FadingGroupStateIconDemoDemonstrates how to fade in/out the group state icon when moving the mouse over group/folder nodes
demo.view.hierarchy.GroupingDemoExhibits the Nested Graph Hierarchy and the Node Grouping technologies
demo.view.hierarchy.GroupNavigationDemoShows how to implement custom navigation actions to navigate to group/folder node contents and back
demo.view.hierarchy.HierarchyJTreeDemoShows how to use class HierarchyJTree to display the hierarchical structure as a JTree

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.