Overview of diagrams and view elements

 

Presentation

Objecteering provides access to the Diagram and ViewElement metamodel, thus allowing you to handle diagrams and layout using the J language.  Therefore, it is possible to automatically layout, animate and create diagrams with J, and to provide any kind of automated service related to UML diagrams.

 

This chapter will describe how to handle diagrams and view elements, by describing the principle, providing examples, and describing the metamodel.

 

 

Overview of the metamodel

A Diagram is made up of ViewElements that can be either Boxes (ViewBox) or Links (ViewLink).  Boxes and Links are defined with one or several geometrical Points, and have various graphical resources that can be managed through J. 

 

A ViewElement is generally a representation of an Element, defined in the UML metamodel. Most elements can be represented by an unlimited number of ViewElements, depending on presentation needs.  For example, a Package can have a related Class diagram, that will contain several ViewBoxes representing classes that belong to the Package, and ViewLinks representing dependencies, Associations, Generalizations, ….

 

Figure 2. Diagram metamodel

 

Several Elements can have associated Diagrams, that will contain a set of ViewElements.  This is typically the case of NameSpaces.

 

Diagrams and view elements model metaclasses

·         Diagram: Graphic representation of a model.

·         Point: Graphic point in a diagram.

·         ViewBox: Graphic Boxes.

·         ViewElement: Graphic representation of a ModelElement.

·         ViewLink: Graphic link.