ViewElement class
ViewElement overview
Graphical representation of a ModelElement. For example, the box representing a class in a diagram will be a ViewElement related to the Class.
A ViewElement belongs to a Diagram.

Figure 8. Detailed class diagram of ViewElement
Color management
The color of graphic elements is managed by ViewElement. The "fg" colors (foreround color) are those of the box lines and of its text, whilst the "bg" colors (background color) are those of the background of the box.
The RGB system is used to specify colors appearing in diagrams. The values of the "Red" "Green" and "Blue" attributes are those defined in either the "Customize options" box for UML 2.0 diagrams (opened by the "Graphic options" context menu command on an element in a UML 2.0 diagram) or the "Resources" window for UML 1.4 diagrams (opened by the "Resources" context menu command on an element in a UML 1.4 diagram). Whole values between 0 and 255 are concerned here, and they are used to indicate the density of colors. When everything is set to 0, the color is black, and when everything is set to 1, the color is white.
ViewElement properties
The ViewElement class has the following association:
· Model:Element: Link to the element represented by the ViewElement
The class has the following attributes:
Attribute values for colors:
· bgRed: Level of red in the background color.
· bgGreen: Level of green in the background color of the Element.
· bgBlue: Level of blue in the background color of the Element.
· fgRed: Level of red in the foreground color of the Element.
· fgGreen: Level of green in the foreground color of the Element.
· fgBlue: Level of blue in the foreground color of the Element.
Attribute values for line styles:
· lineWidth: width of the line drawing the Element.
· lineStyle: style of the line drawing the Element : solid, dash, dot, dashdot, dashdoubledot, alternate, doubledot, longdash.
Attribute values for patterns:
· pattern: type of box fill-in (solid, clear, gray, cross, dark 1 to 4, light 1 to 4).
Attribute values for font:
· fontFamily: this attribute concerns the name of the font family, for example, times new roman, lucida, helvetica, etc. This can vary according to the platform used.
· bold: application of "bold" to characters
· underlined: underlining of characters
· italic: characters in italics
· fontSize: size of characters
Attribute values for display modes:
· mask: used to mask elements
· detailedDisplay: used to indicate the level of detail shown
· taggedVisible: indicates whether or not tagged values are visible
· stereotypeDisplay: indicates whether stereotypes should be represented by a small icon, a large icon or nothing