The following tutorial demos describe how to use, customize, and extend diverse NodeRealizer and EdgeRealizer classes. Among other user interface aspects, a realizer defines the way a graph element is rendered.
Note: Except for the implementation of demo.view.realizer.StateNodeRealizer,
all classes listed here are also executable.
| Class | Description |
|---|---|
| demo.view.realizer.GenericNodeRealizerDemo | This class demonstrates usage of GenericNodeRealizer which makes it easy to provide customized node rendering. |
| demo.view.realizer.CircleNodeRealizer | This class represents a customized ShapeNodeRealizer similar to the ellipse type, but restricts the aspect ratio to be 1, i.e., the ellipse to be a circle at all times. You can use this class in any of your programs. |
| demo.view.realizer.GenericEdgeRealizerDemo | This class demonstrates usage of GenericEdgeRealizer which makes it easy to provide customized edge rendering. |
| demo.view.realizer.YLabelConfigurationDemo | This class demonstrates the usage of YLabel's configuration feature which simplifies customized label rendering. |
| demo.view.realizer.NoteNodeRealizer | This class represents a custom NodeRealizer that can be used to represent a comment or note in an UML diagram. |
| demo.view.realizer.ScrollingNodeRealizer | Demonstrates how scrollbars inside a NodeRealizer can be implemented. |
| demo.view.realizer.UMLClassNodeRealizer | This class represents a custom NodeRealizer that can be used to represent a class in an UML diagram. It supports classname, sterotype, constraint, attribute list, and method list. |
| demo.view.realizer.BridgeEdgeRealizerDemo | This class demonstrates how to implement a custom EdgeRealizer that shows bridges/gaps when crossing other edges. |
| demo.view.realizer.StateNodeRealizer | This class represents a custom NodeRealizer with its own paint, copy, and serialization routines. |
| demo.view.realizer.StateNodeRealizerDemo | This demo shows how the custom node realizer StateNodeRealizer can be used within an application. |
| demo.view.realizer.SwingRendererDemo | This class shows how to customize GenericNodeRealizer to display JComponents as nodes. |
| demo.view.realizer.RoundRectNodeRealizer | This class represents a custom ShapeNodeRealizer that represents a rounded rectangle with custom rounding radii. You can use this class in any of your programs. |
| demo.view.realizer.VisualFeatureDemo | Presents the visual features that are available with node realizers and edge realizers. In particular, these include labels for both nodes and edges, decorations for edge end points, but also colors and shapes for both types of graph elements. |
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.