Controlling Form Behavior and Format Using Properties, Property Classes, and the Property Palette - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

Controlling Form Behavior and Format Using Properties, Property Classes, and the Property Palette

Description:

Create and use property classes. Create and use visual attributes ... Visual attributes are a form object similar to a property class. ... – PowerPoint PPT presentation

Number of Views:181
Avg rating:3.0/5.0
Slides: 51
Provided by: johnadolp
Category:

less

Transcript and Presenter's Notes

Title: Controlling Form Behavior and Format Using Properties, Property Classes, and the Property Palette


1
Chapter 5 Controlling Form Behavior and Format
Using Properties, Property Classes, and the
Property Palette
2
  • In this chapter you will
  • Learn the purpose of properties and property
    types
  • Learn to operate the Property Palette
  • Create and use property classes
  • Create and use visual attributes
  • Control form navigation using properties
  • Learn about important block properties
  • Create reusable components using object groups
    and libraries
  • Create and use SmartClasses
  • Change properties during runtime


3
Properties and Property Types
  • A property is a setting in a program.
  • A typical program can have hundreds of settings
    that control application characteristics such as
    font, width of a text item, or boilerplate.

4
Properties and Property Types
  • A form is also a program and has hundreds of
    property settings.
  • The Data Block Wizard, Layout Editor Wizard, and
    the Layout Editor can be used to set properties.
  • The former tools cannot set all form properties.
    However the Property Palette can.
  • The Property Palette is a dialog box that
    displays the properties for the currently
    selected item.
  • Settings are added to properties on the Property
    Palette using drop-down lists, text items,
    editor, and color palettes.

5
Properties and Property Types
6
Properties and Property Types
7
Properties and Property Types
8
Properties and Property Types
9
Properties and Property Types
  • It is possible to select multiple objects and
    open a Property Palette that displays the
    property values for all of the items.
  • A value of asterisks () indicate the
    selected objects property values differ.
  • An actual value indicates the selected objects
    property values are the same.

10
Properties and Property Types
  • When multiple item properties are displayed in a
    Property Palette, two views are available
  • The Intersection view displays properties that
    exist on each of the selected items.
  • The Union view displays all properties whether
    they exist on all selected objects or not.
  • The Intersection/Union tool located at the top of
    the Property Palette can be used to toggle the
    two views.

11
Properties and Property Types
12
Properties and Property Types
  • Normally the Property Palette only shows
    properties for the currently selected object(s).
  • The properties in the Property Palette change
    when a new object is selected.
  • It is possible to keep a Property Palette open
    with existing properties and open a second
    Property Palette for a new object.
  • The Pin/Unpin tool located on the Property
    Palette causes a palette to stay open or to
    close.

13
Properties and Property Types
14
Properties and Property Types
  • It can be difficult to locate a property on the
    Property Palette.
  • The Find tool is used to locate the desired
    property.

15
Properties and Property Types
16
Creating and Using Property Classes
  • A property class is a form object that contains a
    set of developer defined properties.
  • Property classes are assigned to other objects
    superceding their existing properties.
  • Property classes are assigned to other objects
    using the Subclass Information property.
  • Property classes are excellent productivity and
    standardization tools.

17
Creating and Using Property Classes
  • Property classes can be created on the Object
    Navigator using the Create tool.
  • Property class properties can be viewed by
    opening a Property Palette for the property
    class.
  • Properties can be added using the Add Property
    tool located on the Property Palette.
  • The Add Property tool opens a dialog box that
    displays all properties available for the
    property class.

18
Creating and Using Property Classes
19
Creating and Using Property Classes
  • The Delete Property tool is used to delete
    properties from the property class.
  • You can determine that an object is using a
    property class on the Object Navigator by the red
    arrow and cross symbol that appear below the
    objects icon.
  • You can determine a property whose value is
    supplied by a property class. A carriage return
    symbol will precede the property on the Property
    Palette.

20
Creating and Using Property Classes
21
Creating and Using Visual Attributes
  • Visual attributes are a form object similar to a
    property class.
  • Visual attributes only contain font and color
    properties.
  • Visual attributes are used to format data block
    items, canvases, windows, alerts, and LOVs.

22
Creating and Using Visual Attributes
  • There are three types of visual attributes
  • Common - Used to format most items
  • Title - Used to format the frame title
  • Prompt - Used to format data block item prompts
  • Visual attributes are created on the Object
    Navigator using the Create tool.
  • Visual attribute properties are modified using
    the Property Palette.

23
Creating and Using Visual Attributes
24
Creating and Using Visual Attributes
  • Visual attributes are assigned to the object
    using one of the following properties
  • Current Record Visual Attribute Group (data
    block, data block item)
  • Visual Attribute Group
  • Prompt Visual Attribute Group
  • Frame Title Visual Attribute Group

25
Creating and Using Visual Attributes
  • The Current Record Visual Attribute Group
    properties on the data block and data block item
    objects use the visual attributes to format the
    currently selected record.
  • Current Record Visual Attribute Group properties
    are excellent tools to identify the current
    record when the form contains multiple tabular
    data blocks.

26
Controlling Form Navigation Using Properties
  • By default, block and data block item navigation
    is determined by the order the objects are
    displayed in the Object Navigator.
  • The form, data block, and data block item objects
    have properties that override and further control
    the default navigation.

27
Controlling Form Navigation Using Properties
28
Controlling Form Navigation Using Properties
  • Data blocks have a Navigation Style property that
    determines where the input focus navigates to
    when the operator tabs from the last item in a
    record.
  • Settings are
  • Same Record
  • Change Record
  • Change Data Block
  • Data blocks also have a Previous Navigation Data
    Block and Next Navigation Data Block property
    that override the default navigation on the
    Object Navigator.

29
Controlling Form Navigation Using Properties
  • Data block items have a Previous Navigation Item
    and Next Navigation Item property that override
    the default navigation set on the Object
    Navigator.
  • Data block items have a Keyboard Navigable
    property that prevents the operator from tabbing
    into an item.
  • Data block items also have a Query Allowed
    property that prevents the operator from tabbing
    into a data block item when the data block is in
    the Query mode.

30
Controlling Form Navigation Using Properties
  • Form objects have a Mouse Navigable property that
    determines which object can receive the input
    focus using the mouse. Settings include
  • Form
  • Data block
  • Record
  • Item
  • Form is the default setting.

31
Important Data Block Properties
  • Data blocks have several important properties.
  • Number of Records Displayed controls the amount
    of records visible to the operator at a given
    time.
  • The WHERE clause property allows the developer to
    limit the records displayed on the data block.
  • The Database Block property determines whether
    the data block is a control block.
  • The Query Allowed, Insert Allowed, Update
    Allowed, and Delete Allowed properties can
    suppress SQL statements issued by the data block.

32
Creating Reusable Components Using Object Groups
and Libraries
  • Standard reusable form components can increase
    developer productivity.
  • Forms Builder has two objects that can be used to
    standardize form components
  • Object Group
  • Object Library

33
Creating Reusable Components Using Object Groups
and Libraries
  • An object group is a form component that contains
    a set of form components.
  • When an object group is copied into another form
    its components are moved to the appropriate
    object in the form.
  • Object groups eliminate the labor of copying many
    objects into a form.

34
Creating Reusable Components Using Object Groups
and Libraries
35
Creating Reusable Components Using Object Groups
and Libraries
  • A good use of an object group is to have default
    components such as the content canvas, visual
    attributes, property classes, windows, and
    triggers. The object group can be used to set up
    the form and get a quick start.
  • Object groups are created on the Object Navigator
    using the Create tool.
  • Objects are added to the group by dragging them
    from the form into the object group.

36
Creating Reusable Components Using Object Groups
and Libraries
  • An object library is an external module that can
    contain any form component.
  • Since the objects are stored outside a form there
    is a smaller chance that the standard object was
    modified by a developer.
  • Object libraries are created on the Object
    Navigator.
  • Double-clicking the object library opens the
    Object Library dialog box.

37
Creating Reusable Components Using Object Groups
and Libraries
  • Objects are moved into the object library by
    dragging them from the form into the dialog box.
  • Objects are moved into the form by dragging them
    from the dialog box into the form.
  • Object libraries have tabs which are used to
    group common objects.

38
Creating Reusable Components Using Object Groups
and Libraries
  • Object libraries have a file extension of .olb.
  • Stndrd20.olb is an Oracle Form Builder 6i demo
    object library.
  • Ofgstnd1.olb is an Oracle Forms Builder 9i demo
    object library.
  • Object libraries are created on the Object
    Navigator using the Create tool.

39
Creating Reusable Components Using Object Groups
and Libraries
40
Creating Reusable Components Using Object Groups
and Libraries
  • Existing object libraries can be brought into the
    IDE using the File/Open menu selection.
  • Once an object library has been loaded into the
    IDE it will automatically reload each time Forms
    Builder is opened.
  • Object libraries can be removed from the IDE by
    selecting the library and pressing the Delete key.

41
Creating and Using SmartClasses
  • Selecting an object node and pressing the right
    mouse opens a popup menu.
  • One of the options on the popup menu is
    SmartClasses.
  • SmartClasses is a submenu that displays objects
    that can be copied into the object class.
  • The set of SmartClasses objects change dependant
    upon the object class selected.

42
Creating and Using SmartClasses
43
Creating and Using SmartClasses
  • Oracle has developed a set of objects that will
    appear in the SmartClasses menu.
  • You can add your own objects by designating an
    object in an object library as a member of the
    SmartClasses.
  • The Edit/SmartClass menu option is used to
    designate an object library object a member of
    the SmartClasses.

44
Creating and Using SmartClasses
45
Changing Properties at Runtime
  • Properties are normally set using the Property
    Palette or other Forms Builder tools.
  • Properties can also be set at runtime using a
    built-in subprogram.
  • A built-in subprogram is an Oracle developed
    procedure or function that performs a specific
    task.
  • Every object has a built-in subprogram that can
    be used in a PL/SQL script to modify the objects
    properties.

46
Changing Properties at Runtime
  • The built-ins do not modify all of the items
    properties. Visual properties such as text item
    height and width are not modifiable.
  • It is very common to modify data block and data
    block item properties.
  • The Set_block_property, Set_block_item_property,
    and Set_block_item_instance_property are commonly
    used built-ins that are representative of the
    built-in class.
  • The built-ins are procedures and have argument
    lists.

47
Changing Properties at Runtime
48
Changing Properties at Runtime
  • The Set_block_item_property and
    Set_block_item_instance properties are similar
    but have a small difference.
  • The Set_block_item_property built-in modifies the
    property for every occurrence of the item in the
    data block.
  • The Set_block_item_instance_property built-in
    modifies the property for select records only.
    You must identify the row when using this
    built-in.

49
Where You Are and Where Youre Going
  • You have seen
  • That a major part of developing a form is setting
    properties on the Property Palette
  • The functionality of a number of different
    properties that affect the data block, data block
    item, and form
  • How to create visual attributes, property
    classes, object groups, and object libraries
  • How to set properties during runtime

50
Where You Are and Where Youre Going
  • In the next chapter you will see
  • How to use the PL/SQL editor, the fourth
    development tool
  • How to create triggers that execute PL/SQL
    statements
  • How to add you own logic to the form using these
    tools
Write a Comment
User Comments (0)
About PowerShow.com