The following tutorial view demos shows how to use advanced application features like drag and drop, print previewing, clipboard functionality, and undoability.
| Class | Description |
|---|---|
| demo.view.advanced.EdgeConnectorDemo | Shows how to mimic node-to-edge and edge-to-edge connections. |
| demo.view.advanced.UndoRedoDemo | Shows how to use undo/redo functionality provided by yFiles. |
| demo.view.advanced.ClipboardDemo | Demonstrates how to use the yFiles clipboard functionality to cut, copy, and paste parts of a graph. |
| demo.view.advanced.DragAndDropDemo | Shows how to drag different node types from a list and how to drop them on a graph view. |
| demo.view.advanced.InactiveLayerDemo | Demonstrates how to put a part of a graph in an inactive background layer of the view. |
| demo.view.advanced.ModelViewManagerDemo | Demonstrates automatic structural synchronization between several graphs using y.view.ModelViewManager. |
| demo.view.advanced.PrintPreviewDemo | Demonstrates how to use the yFiles print preview panel and how to add a title and a footer to a printed page or poster. |
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.