Interaction of Basic Objects

Purpose

The basic objects in the Graphical Framework interact for various purposes including the following:

  • One object creating or destroying another (for example, the application creating the data container)
  • One object subscribing to another (graphics proxies registering with the data container)
  • One object sending data to another (the application filling the data container with data)

Prerequisites

For some types of interaction one object needs to be registered with another. For example, a graphics proxy must be registered with a data container to access data from the latter.

Process Flow

First the application in the figure below creates the data container and then fills it with the data to be displayed. The application also creates the graphics proxies.

Each graphics proxy then subscribes to a data container (for reasons of consistency a graphics proxy can take its data from one data container only). The data container distributes data to the graphics proxies that are registered with it.

Next, customizing objects are assigned to the graphics proxies so that the graphics proxies can change the appearance of graphical objects - the customizing objects define the display attributes.

The graphics proxies then register with the multiplexer which coordinates communication between graphics proxies.

Changing data

If you change data by interactively changing the graphical object then the application is informed of the change to the data and can query the data container concerning the changes. The advantage of this technology is that the event parameters of the graphical objects need not be known to the application and any change is represented only in the data. If the application validates and accepts the change to the data the data container distributes the changed data to the graphics proxies that are registered with it (using the notify mechanism). The same mechanism is used if the application adds, changes or deletes entries in the data container. This guarantees that all graphical objects always display the same data (without a complex distribution mechanism being necessary on the part of the application).

For more information, see Overview of Basic Objects.