PrF UG meta customize editor

From Protege Wiki
Jump to: navigation, search

Customizing the Class or Slot Editor

Protege-Frames User's Guide
Understanding Metaclasses
Example: Creating and Using a Metaclass
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.


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.

    Forms tab, "Wine template" selected
  2. Select the Best Wineries widget.

    Best Wineries widget
  3. Select InstanceTableWidget from the Select Widget Type menu at the top right of the Form Editor.

    InstanceTableWidget selected in menu

    This will change the widget display, adding field headings.

    Best Wineries widget, with field headings
  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 (all_object.remove) button and click OK.

    Configure Best Wineries dialog
  5. You can also resize the widget by dragging.

    Best Wineries widget, resized

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