Chapter 4 Managing Profiles


Creating a form

You can create a form on any metaclass that has a property sheet, or on a stereotype or a criterion. For property tabs, if the property tab is linked to a stereotype, the corresponding tab appears only when the metaclass instance has the correct stereotype. The same occurs for criterion: the tab appears only when the criterion condition is met.

When you create a form, you need to define the items that will be included into the form. You can add:

Extended attributes When you click the Add Extended Attribute Control tool, a selection dialog box appears to let you select among attributes defined in the current metaclass, in a parent metaclass, or in a stereotype or criterion defined under the current metaclass. Each extended attribute appears as an item in the form tree view. By default, the name of the extended attribute is displayed as a control in the form; however, you can modify this default name by typing a new name in the Label box. The extended attribute comment appears in the tooltip of the extended attribute control in the new form.
If you select an extended attribute defined in a stereotype or a criterion, by default it does not appear in the form if the stereotype or criterion condition is not true. You can select the Show Hidden Attribute to have the extended attribute displayed by default but disabled in the form, this allows you to have a stable form layout with always the same controls that can be available or not.
The type of control associated with an extended attribute depends on the type of the extended attribute: boolean extended attributes are associated with check boxes, lists with combo boxes, text with multi-line edit boxes, and so on.

Methods When you click the Add Method Push Button tool, a selection dialog box appears to let you select among methods defined in the current metaclass or in a parent metaclass. Each method item appears as an item in the form tree view; it corresponds to a push button that invokes the custom method from the property tab or dialog box. By default, the name of the method is displayed in the push button; you should rename it in the Label box to make it more readable. The method comment appears in the tooltip of the method control in the new form.

Note   Push button not available in viewer mode
The method push buttons are not available if you are using PowerDesigner Viewer as methods cannot be executed in the viewer mode. To bypass this problem, you should create different property tabs.

Keyboard navigation

You can create keyboard shortcuts to navigate among controls in the new form. To do so, you should prefix the letter that will serve as the keyboard shortcut with an & character. To use the & character in a label, you must escape it with a second &.

For example the following label: "&Johnson && Son" will display as follows "Johnson & Son".

If you do not specify a shortcut key, PowerDesigner will choose one by default.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.