How To Make A FigureEvery new diagram type that would appear in the Editor pane will need a property panel associated with it in the Details pane, and make sure that it is correctly displayed in the Navigation pane as well. To do this, the visual elements have to be created and the meta-model has to be changed to accomidate the new diagram type. The best way the accomplish your goal is to find an implemented figure type with similar features to the one you want to create, and use some of it's source code files as templates for the ones you need to create. For instance, if Class type is implemented, and you want to make an Interface type, you could take FigClass.java, copy it into the same directory, and rename it FigInterface.java, and them make the code modifications in that file as appropriate. Also, a new icon for the toolbar will need to made for your new figure. For the sake of this example, let's call our new figure Interface, and let's say that this figure will be part of the Class diagram. All figures are either a node or an edge. Interface will be a node. |
|
Ingredients Files you will need to create:
Files you will need to modify:
Directions FigInterface Notice that the Class figure is similar to the one we want to create. So it would be a time-saver to make a copy of FigClass.java, rename it FigInterface.java, and then make the appropriate modificaitons. Interface You will not want to make any changes to the meta-model unless there is no other way. UMLClassDiagram This will be one of the last steps:
ClassDiagramGraphModel
ClassDiagramRenderer
Results The final result should look like the below. Note that the toolbar and the tree in the Navigation pane are using the same icon. |
Contact
Please send comments and questions to: Jason Robbins
Back to Argo/UML Home