The following demos show how to use, customize, and extend the graph input and output facilities provided by yFiles.
Package | Description |
---|---|
demo.io.graphml | Contains demos that focus on how to use, customize, and extend the GraphML graph interchange format input and output facilities provided by yFiles. |
Class | Description |
---|---|
demo.io.GraphFormatConverter | This class implements a command line driven graph format converter. Possible input formats are GraphML, ZIPGraphML, GML, or YGF. Output formats are GraphML, ZIPGraphML, GML, YGF, GIF, and JPG. Additionally, it is possible to write to the formats PDF, EMF, SWF, EPS, SVG, and SVGZ in case the corresponding yFiles extension packages ySVG and yExport are installed. The size of some output formats can be specified. |
demo.io.ImageMapDemo | Shows how to export a graph as an image and as a hyperlinked HTML image map. |
demo.io.TiledImageDemo | Shows how to export a graph as a collection of multiple image tiles. |
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.