0843-0846

Previous Table of Contents Next

Page 843

candidate for definition of a program unit is a segment of program code that is used by more than one trigger. You should also use program units to modularize long code segments.

Property Classes

A property class defines the properties of a class of objects. In cases where many form objects have identical properties, a property class benefits the developer by ensuring that the objects are consistent. Additionally, you can use property classes to enforce standards and to accelerate the development time for a form module.

Record Groups

You can think of a record group as a virtual table in memory. Record groups are structured sets of data that you can use to pass data between application modules or to populate lists of values or other list items.

Visual Attributes

An object's visual attribute defines the color , font, and style characteristics for an item. Although you can set each of these values individually for each object, the visual attribute provides a mechanism to define a valid combination of visual characteristics for a form. A high-quality application should not use many different visual attributes within the items. By adhering to a set of visual attributes, the forms can use an item's particular characteristics to signify a specific meaning.

Windows

A window is the frame within which a form appears on the user 's screen. Each canvas is assigned to a specific window in the form and several canvases can be assigned to the same window. A single form can contain several windows, or it can consist of only one window.

Object Properties Sheets

The characteristics of each element in a form are defined by its various properties. A context-sensitive property sheet exists for each component, based on the type of object that is defined. The properties are grouped logically within the property sheet and each type of object has a different property sheet. Several of the more important properties are covered later in this chapter.

The scrollbar at the right side of the property sheet lets you navigate through the property sheet, and the iconic buttons at the top control activities in the sheet.

The first two buttons copy and paste all the properties between the property sheet and the clipboard. The next two buttons add and delete custom properties in the property sheet. The next button creates a new property class based on the properties for the object.

The Inherit button causes the currently selected property to be inherited from the object's property class. If no class is defined for the object, the Inherit button causes the property to be restored to the Forms 4.5 default for the property.

Page 844

You use the next button when more than one object is selected from the Object Navigator. The button toggles between showing the union of all properties associated with all the selected objects or only the properties associated with all the objects (intersection). When you select multiple objects in the Object Navigator, a single change to a property in the property sheet is propagated to all the objects.

You use the last button to freeze or unfreeze the property sheet synchronization mode. When this window is unfrozen (the default), whenever a new object is selected, the property sheet is synchronized to show the new object. However, if it is frozen, the synchronization does not occur until it is unfrozen.

TIP
You can maximize the various windows in Oracle Forms within the designer window. However, with practice, using multiple windows simultaneously (as shown in Figure 35.1) can accelerate the programming phase of the module. As you move around the Object Navigator, the appropriate property sheet is displayed, and by selecting multiple items in the Navigator, you show the common properties. This is a matter of personal preference, and you might find that having multiple windows is too confusing. I do, however, encourage you to try before deciding what you like best.

The Layout Editor

The Layout Editor (shown in Figure 35.2) presents the canvas on which the form objects are laid out. This tool is operated through the use of iconic buttons and menu choices. You use the buttons along the left side of the Layout Editor window to create and manipulate the form layout objects. Table 35.1 describes these buttons (top to bottom, left to right).

Table 35.1. Layout Editor buttons.

Button
Usage
Select Selects objects on the canvas.
Magnify Zooms in/out on the canvas. Click within the canvas to zoom in. Click while holding the Shift key to zoom out. The current magnification level is shown in the lower-left area of the Layout Editor window.
Rectangle Draws a rectangle on the canvas.
Ellipse Draws a circle or ellipse.
Polygon Draws a multiple-sided object.
Rounded Rectangle Draws a rectangle with rounded corners.

Page 845

Button
Usage
Text Adds boilerplate text to the canvas.
Checkbox Creates a checkbox item.
Text Item Creates a text item field.
Oracle Graphics Inserts an Oracle Graphics chart item.
VBX Creates a VBX control item.
List Item Creates a drop-down list item.
Rotate Rotates the selected object.
Reshape Reshapes the selected object.
Line Draws a line.
Arc Draws a curved line.
Polyline Draws a series of connected lines.
Freehand Draws in freehand mode.
Button Creates a button item.
Radio Button Creates a radio button item.
Image Item Attaches an image item to the canvas.
OLE Creates an OLE container item.
Display Item Creates an item for display purposes only.

Figure 35.2.
Oracle Forms Layout
Editor.


Page 846

The listboxes at the top of the Layout Editor allow the user to navigate between the multiple canvases and blocks in the form, whereas the iconic buttons are used for command control within the editor. These buttons, in order, are

Open Opens an existing module
Save Saves the current module
Run Runs the current module
Cut Cuts the selected objects
Copy Copies selected objects
Paste Pastes objects from clipboard
Copy Properties Copies properties to clipboard
Paste Properties Pastes properties from clipboard

Customizing the Forms Environment

Oracle Forms 4.5 allows the programmer to modify the development environment using Tools Options. You use the Designer Options dialog (shown in Figure 35.3) to set the behavior of the Oracle Forms Designer.

Figure 35.3.
Defining Oracle Forms
Designer options.


The five checkboxes establish the operating mode for Oracle Forms Designer. If checked, the first box causes the current module to be saved automatically whenever a form is generated, and the second box causes the form to be generated (compiled) whenever it is run from the designer. (The net effect of having both boxes checked is that every form is saved and generated by clicking the Run button.)

NOTE
Many of the earlier versions of Oracle Forms were notorious for producing general protection faults, which usually resulted in work being lost. It became a common practice to use these checkboxes practically universally . Unfortunately, unless you save a backup of a module, changes can wipe out prior versions of a form if you use these options.
Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net