yFiles Tutorial Ports Demo

The following files make up the tutorial ports demo. The demo shows how

Directory resource contains sample graph files and images.

Class Description
demo.view.ports.PortsDemoThe main demo program in this tutorial.
demo.view.ports.FixedPortsNodeRealizerA NodeRealizer implementation for nodes that have a fixed set of ports. Used in the PortsDemo.
demo.view.ports.EncoderFactoryProvides an extended GML encoder that can handle fixed port lists for nodes. Used in the PortsDemo.
demo.view.ports.ParserFactoryProvides an extended GML parser that can handle fixed port lists for nodes. Used in the PortsDemo.

Running the Demos

From Within an IDE

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.

With Ant

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.