P4UiComponentSummary

From Protege Wiki
Revision as of 07:36, May 6, 2009 by Nickdrummond (talk | contribs) (Added core components)

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

P4 Developer Docs: UI Components

This page describes some of the more useful UI components available for P4 developers.


Back to Protege4DevDocs



Packages

There are many standard UI components, as part of the core Protege framework and more specific components for managing OWL objects in the OWL editor kit.

All UI classes can be found in the following packages:

Components

Core components

Actions

Create menu items using a plugin mechanism (see PluginTypes#EditorKitMenuAction for details).


Errors

Display a dialog to the user when an exception needs to be reported.

use: org.protege.editor.core.ui.error.ErrorLogPanel

 ErrorLogPanel.showErrorDialog(Exception e)


Lists

Protege-style JLists that have support for sections, and items with buttons on the right hand side for deleting, editing etc

implement: org.protege.editor.core.ui.list.MList example: org.protege.editor.core.ui.list.RemovableObjectList


Preferences

Create preferences panels for your plugins (see PluginTypes#preferencespanel for details).


Wizards

A dialog with a series of pages to guide the user through a set of tasks with a certain set of steps.

implement: org.protege.editor.core.ui.wizard.Wizard example: org.protege.editor.owl.ui.ontology.wizard.create.CreateOntologyWizard


Icons

Get a selection of icons that are found in the icons/ folder in the core plugin.

 Icons.getIcon("error.png")


Dialogs

Provides some handy static dialog/validating dialog (VerifyingOptionPane) creation methods.

use: org.protege.editor.core.ui.util.JOptionPaneEx


NativeBrowserLauncher

Show a url in the default native browser for the users OS.

 NativeBrowserLauncher.openURL(String url);


ComponentFactory

Provides a series of static methods to create some standard Swing components with Protege default look and feel.


CheckTable

A table that supports selection checkboxes in the first column with a "check all" option


CheckList

File dialogs

Provides a number of native file selectors for loading or saving files.

use: org.protege.editor.core.ui.util.UIUtil


FilePathPanel/FileURIPanel

An editor with a built in file selection dialog (as used by Open ontology dialogs etc)


LinkLabel

A label that acts like a hyperlink