Home > Articles > Data > Oracle

Property Classes in Oracle Developer

  • Print
  • + Share This
  • 💬 Discuss
From the author of
Property classes in Oracle Developer can be confusing if you try and read Oracle's obfuscated description of them in the online documentation. After the description is rephrased or an example is given, however, they become very easy to understand. Author Matthew Bennett gives an example in this article.

This evening, I am helping my daughter finish her algebra homework, and am amazed at how she thinks something so easy can be so difficult. When I rephrased some of the questions, she immediately saw their solutions. Property classes in Form Builder, a part of Oracle Developer, can be the same way. If you try and read Oracle's obfuscated description of them in the online documentation, you might not understand how they can help you. However, after the description is rephrased or an example given, they become very easy to understand.

An Example

In helping my daughter with her homework, I had the most success when I used an example. Rather than doing something complicated with Form Builder, let's start with a couple of shapes. Figure 1 shows a red square and a green circle that we will be using in the example.

Figure 1 Red square and green circle in Forms Developer to help demonstrate property classes.

Now, you want to create a property class that consists of the background color property. This is done by following these steps:

  1. Click on one of the two shape objects in the Layout Editor (that's the window that holds the shapes where you can see them).

  2. Make sure the Property Palette is open. If not, open it by clicking on the Tools, Property Palette menu item in the Layout Editor menu.

  3. Select the Background Color Property in the Property Palette.

  4. Create a property class by clicking on the Property Class icon (the fifth icon to the right in the Property Palette's toolbar).

    You will see a dialog box, saying Form Builder is creating a new property class. You can then see the class in the object navigator (the third window not yet mentioned).

  5. Select the newly created property class found in the object navigator window (you may have to expand the Property Classes hierarchical tree).

  6. Now look in the Property Palette; you have your property class with some derived name. Change the name property to SHAPE_CLASS.

    Now the class name is more descriptive.

You have created a property class. Now you want both shapes on the form to derive their background colors from the SHAPE_CLASS. Select the red square in the Layout Editor. Under the General section is a property called Subclass Information. If you click on it, the property value has a More button. Click the button, and you see a Subclass Information dialog box. Notice that the Object option is selected. What you really want to happen is have the Property Class option selected, which changes some of the dialog box pull-down list choices. Choose SHAPE_CLASS from the Property Class Name pull-down list, as shown in Figure 2. You can dismiss the dialog box by clicking the OK button.

Figure 2 Subclass Information dialog box used to associate property classes with form objects.

Now derive the background color for the green circle from the SHAPE_CLASS using the same steps described previously. When you are done, the green circle should now be a red circle, as shown in Figure 3.

Figure 3 Square and circle in Forms Developer that are now receiving the background property value from a property class.

Now, if you want to change the background color for both shape objects, you only need to make the change in one place: the SHAPE_CLASS background color property.

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus