PrF UG meta customize editor

From Protege Wiki
Revision as of 01:02, October 9, 2008 by RichMorin (talk | contribs) (Automated import of articles)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Customizing the Class or Slot Editor


Protege-Frames User's Guide
Metaclasses
Understanding Metaclasses
Example: Creating and Using a Metaclass
Looking at :STANDARD- CLASS
Creating a Metaclass
Creating a Class Using a Metaclass
Changing the Metaclass of a Class
Changing the Metaclass of Subclasses
Setting the Default Metaclass
Customizing the Class or Slot Editor
Understanding Slot Metaclasses
Creating a Slot Metaclass
Changing the Slot Metaclass of a Slot
Creating a Subslot Using a Slot Metaclass
Changing the Slot Metaclass of Subslots
Setting the Default Slot Metaclass
Glossary, Editing Help

Using metaclasses, you can customize the layout of the Class Editor or the Slot Editor at the Forms Tab. You can hide entry fields and resize and reposition fields. Normally you do not want to change widgets, as the Class Editor and Slot Editor use special widgets for the standard fields.

To customize the standard Class Editor, select :STANDARD-CLASS at the Forms Tab and then make your desired edits. Since any new class is (by default) created using :STANDARD-CLASS, the Class Editor itself reflects the structure and layout specified for :STANDARD-CLASS at the Forms Tab. Your modifications will show up for every class, whether existing or new. Similarly, to customize the standard Slot Editor, select :STANDARD-SLOT at the Forms Tab and make your desired edits.

If you have non-standard metaclasses or slot metaclasses in your project, you can create custom editors for classes or slots that use these. For example, when you add a field, you may want to reposition it or resize it in the editor.

Example

For example, you could customize the Class Editor for classes that used the Wine template to an InstanceTableWidget that shows the location and the name of the best wineries:

  1. At the Forms Tab, select the Wine template.

    metaclasses_meta_at_forms_tab

  2. Select the Best Wineries widget.

    metaclasses_best_wineries_widget

  3. Select InstanceTableWidget from the Select Widget Type menu at the top right of the Form Editor. metaclasses_menu_DirectInstancesWidgetThis will change the widget display.

  4. You can further configure the widget by double-clicking on it to open the Configure widget dialog. To delete the produces column, select the Define columns of instance table tab, click on the slot name produces, click the Remove the currently selected column button all_object.remove and click OK.

    metaclasses_configure_widget

  5. You can also resize the widget by dragging.

    metaclasses_widget_resized

See the Forms Table of Contents for more information about customizing forms.