Display Context
Definition
The display context is a class containing general visualization attributes.
Use
As with other attribute bundles the application can create an instance of the class, a customizing bundle. The application can assign this customizing bundle to a port in the graphics proxy.
You can use the display context in one of two ways:
-
You can use the display context as a substructure in other customizing objects, for example in the drawing area. The display context counts as one attribute in another customizing bundle. Since the display context can be used in different customizing objects not all of the attributes are relevant. The other attributes bundles contain contexts, such as the title context and these contexts contain a subset of the attributes of the display context.
-
The display context can also be assigned to a port on its own. This is an efficient way to use the display context if the same attributes are used in several different customizing bundles.
The display context can be used for different purposes with different classes. For example, it could be used to set the color of the title for the drawing area and the line attributes for gridlines.
Structure
The display context contains six types of attribute:
-
Border
-
Line
-
Area
-
Text
-
Marker
-
Miscellaneous
Integration
Those attributes (in customizing bundles) with the suffix _CONTEXT refer to the display context.
The application does not have to save the display context separately because it is saved along with the customizing bundle that contains it. It is also loaded along with the customizing bundle that contains it.
Just as there is a hierarchy of ports so too there is a hierarchy of display contexts. For more information, see Hierarchy of Display Contexts.