The following tutorial view demos are in this package:
| Package | Description |
|---|---|
| demo.view.realizer | The contained tutorial demos describe how to use, customize, and extend diverse NodeRealizer and EdgeRealizer classes. |
| demo.view.rendering |
Centers around advanced rendering aspects of the graph view.
It is shown how to use auxiliary rendering classes Drawable,
BackgroundRenderer, and BridgeCalculator.
|
| demo.view.viewmode | Shows how to use, customize, and extend diverse ViewMode classes. View modes provide the base functionality to handle mouse-based interaction that happens in a view. |
| demo.view.layout | Provides many tutorial demos that center around automatic layout and labeling features for diagrams. |
| demo.view.anim | Contains demos that center around the diverse animation effects that can be applied to graph elements and to graph views. |
| demo.view.advanced | Shows how to use advanced application features like drag and drop, print previewing, clipboard functionality, and undoability. |
| demo.view.ports | Contains a demo graph editor that employs special nodes that come with a fixed set of allowed connection points (known as ports). |
| demo.view.hierarchy | Demonstrates how to write an application that manages a hierarchy of nested and grouped graphs. A tree view, a regular graph view, and a graph overview are used to visualize the hierarchy and groupings of graphs and nodes. Many sample actions are provided that perform navigational and structural tasks on the graph hierarchy. See the Hierarchy Demo README on how to use this small application. |
| demo.view.applet | Features a self-contained demo setup that shows how to deploy yFiles-based applications as Java applets inside a web browser. |
| Class | Description |
|---|---|
| demo.view.SimpleDemo | The yFiles view says "Hello World." Shows how to display a graph viewer/editor component inside a frame. |
| demo.view.BuildGraphDemo | Shows how to build a Graph2D with different node types and styles applied to its elements. |
| demo.view.ViewActionDemo | Demonstrates some actions that can be performed on the view or
the contents of the view:
|
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.