Anfang des Inhaltsbereichs

Objektdokumentation Display Context  Dokument im Navigationsbaum lokalisieren

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:

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.

Example

The attribute bundle CL_CU_DRAWING_AREA has the contexts CO_DISPLAY_CONTEXT, CO_TITLE_CONTEXT and CO_LEGEND_CONTEXT each of which contains a subset of the attributes in CL_CU_DISPLAY_CONTEXT.

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.

Hinweis

The display context is copied, not referenced, so changing an attribute in CL_CU_DISPLAY_CONTEXT does not automatically change the customizing objects that have already been instantiated.

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.