This demo allows you to visualize and edit UML class diagrams. It shows how to
GenericNodeRealizer that
        provides interactive buttons to show or hide parts of the node and to
        add or remove labels.
      Drawables to display interactive buttons that invoke edge creation.EditMode that handles mouse interactions with buttons.| Class | Description | 
|---|---|
| demo.view.uml.UmlDemo | Allows to visualize and edit UML class diagrams. | 
| demo.view.uml.UmlEditMode | A customized EditModethat also handles animated edge creation buttons. | 
| demo.view.uml.UmlEdgeCreationButtons | A Drawablethat displays circular, zoom-independent edge creation buttons that can be animated. | 
| demo.view.uml.UmlRealizerFactory | A Factorythat provides methods to create node realizers, edge realizers and to access custom
      properties of the realizers. | 
| demo.view.uml.UmlCreateEdgeMode | A ViewModethat creates a new edge with a target node when dragging. | 
| demo.view.uml.UmlClassConfiguration | A custom configuration for a UML class node that paints a class node with buttons to edit the node. | 
| demo.view.uml.UmlClassButton | An abstract class for interaction with and painting of a button of a class node. | 
| demo.view.uml.UmlClassOpenCloseClassButton | A button of class node that shows or hides the attributes and operations area when clicked. | 
| demo.view.uml.UmlClassOpenCloseSectionButton | A button of class node that shows or hides the attributes area or the operations area, respectively, when clicked. | 
| demo.view.uml.UmlClassAddItemButton | A button of class node that adds a label to the attributes list or the operations list, respectively, when clicked. | 
| demo.view.uml.UmlClassRemoveItemButton | A button of class node that removes a label from the attributes list or the operations list, respectively, when clicked. | 
| demo.view.uml.UmlClassAnimation | Animates opening and closing in a class node. That way, when a button is pressed to open or close the node, one of its sections or also when adding or removing a label, the node's size will change smoothly. | 
| demo.view.uml.UmlClassLabelPainter | A label painter that does not paint selection marks when a label is selected. | 
| demo.view.uml.UmlClassLabelEditMode | A ViewModethat opens a label editor when a label is double-clicked and shows a selection background
      for the selected label while the mouse is over the node. | 
| demo.view.uml.UmlClassLabelSupport | A class that provides methods to change the model and update the labels in a class node. | 
| demo.view.uml.UmlClassModel | The model of a class node consisting of the name of the class and lists of attributes and operations. | 
| demo.view.uml.UmlClassModelIOHandler | A GraphMLIOHandlerthat serializes and deserializes theUmlClassModelstored as user
      data of the node realizer representing an UML class. | 
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.