The following tutorial demos center around advanced rendering aspects of the graph view.
It is shown how to use auxiliary rendering classes Drawable
,
BackgroundRenderer
, and BridgeCalculator
.
Class | Description |
---|---|
demo.view.rendering.BridgeDemo | Demonstrates how to utilize BridgeCalculator to draw bridges or gaps for crossing edges. |
demo.view.rendering.BackgroundDemo | Demonstrates how to use background images in the view |
demo.view.rendering.DrawablesDemo | This demo shows how to add objects of type Drawable to a Graph2DView |
demo.view.rendering.LevelOfDetailDemo | Demonstrates how to control the level of detail for graph visualization using rendering hints |
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.