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.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 advanced features like using a model graph and having multiple different
views on it, or temporarily preventing parts of a graph from being editable.
Also, contains a demo that employs special nodes with a fixed set of allowed connection points (known as ports). |
demo.view.application | Shows how to use application features like drag and drop, print previewing, clipboard functionality, and undoability. Also, local views are presented, swimlane support, and searching in a graph. |
demo.view.hierarchy | These demos show how to write applications that can manage a hierarchy of nested and grouped graphs. Predefined actions are used that perform navigational and structural tasks on the graph hierarchy. Furthermore, creating customized actions is presented as well. |
demo.view.applet | Features a self-contained demo setup that shows how to deploy yFiles-based applications as Java applets inside a web browser. |
demo.view.orgchart |
Extensive demo application that presents an organization chart in a visually
rich manner.
Many aspects of yFiles are demonstrated, for example, realizer and view mode customization, or animations. Implementation of the demo's features, like level of detail (LoD) rendering, or synchronization between a business model and the graph structure using yFiles is shown in detail. |
demo.view.flowchart | Simple flowchart editor application that comes with a large set of flowchart symbols and a reusable palette component. |
Class | Description |
---|---|
demo.view.SimpleDemo | The yFiles view says "Hello World." Shows how to display a graph viewer/editor component inside a frame. Try clicking into the view to create new nodes, pressing the left mouse button over a node and dragging the mouse to another node to create an edge, clicking a node to select it... |
demo.view.BuildGraphDemo | Shows how to build a Graph2D with different node types and styles applied to its elements. Try adding new nodes and edges with the mouse. |
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.