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.HierarchyDemo | Exhibits the Nested Graph Hierarchy and the Node Grouping technologies that are a modular part of the yFiles library |
demo.view.hierarchy.CustomGroupVisualizationDemo | Demonstrates how to customize the visual representation of group and folder nodes using GenericGroupNodeRealizer |
demo.view.hierarchy.FadingGroupStateIconDemo | Demonstrates how to fade in/out the group state icon when moving the mouse over group/folder nodes |
demo.view.hierarchy.GroupingDemo | Exhibits the Nested Graph Hierarchy and the Node Grouping technologies |
demo.view.hierarchy.GroupNavigationDemo | Shows how to implement custom navigation actions to navigate to group/folder node contents and back |
demo.view.hierarchy.HierarchyJTreeDemo | Shows how to use class HierarchyJTree to display the hierarchical structure as a JTree |
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.
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.