ViewBox class

 

ViewBox overview

 

class ViewBox extends ViewElement; 

 

Graphical Boxes.  A ViewBox represents nodes in a graphic representation.  For example, a Class is represented by a box.  A box is graphically characterized by its top left Point, its width and its height. 

 

ViewBox can also be embedded.  For example, an Attribute in a Class is represented by a ViewBox representing the Attribute in a ViewBox which represents the class.

 

Figure 7. Detailed class diagram of ViewBox

 

See also:   ViewLink, Diagram.

 

 

ViewBox properties

The ViewBox class has the following associations:

·         ViewComponent:ViewBox: ViewBox contained in the owner ViewBox.

·         Position:Point: Point being the center of the ViewBox.

 

The ViewBox class has the following attributes:

·         w: Value of the width of the ViewBox., defined in pixel.

·         h: Height of the ViewBox, defined in pixel.

·         stereotypeDisplay: This can use one of the following values:

v      NoneStereotypeDisplayMode

v      IconStereotypeDisplayMode

v      LabelStereotypeDisplayMode

 

 

ViewBox constructor

ViewBox Diagram:createAddAndMoveViewBox

                (in Element model,

                    in integer x,

                    in integer y,

                    in integer w,

                    in integer h)

This adds a box representing the "model" element in the diagram.

 

ViewBox ViewBox:createAddAndMoveViewBox

                (in Element model,

                 in integer x,

                 in integer y,

                 in integer w,

                 in integer h)

This overlaps in a diagram box a new box that represents the "model" element into a diagram box.

 

A ViewBox can be created in a Diagram, or in a parent ViewBox.  All the associations and attribute values are set at the time of creation.

 

 

ViewBox methods

showContent();

This displays the contents of an element.

 

showLinks()

This displays an element's links.