Inheritance

Inheritance is the mechanism by which a newly created object shares the structure of one or more existing objects. Oracle Forms incorporates inheritance by means of property classes and subclassing.

Consider the standard toolbar application discussed in Chapter 1, "GUI Development." Here we used a property class, named PC_ICONICBUTTON, which was applied to each of the iconic buttons. An example of such a property class appears in Figure 6.1, and an example of applying this property class to individual buttons is shown in Figure 6.2.

Figure 6.1. A property class for iconic buttons.

Figure 6.2. An example of applying a property class to an item.

This eliminates the need for specifying the common properties individually for each icon.

Inheritance by means of property classes is limited to

Here are some points to keep in mind about inheritance using property classes:

Inheritance by means of subclassing is discussed in the Object and Code Reusability section.

Категории