Difference between revisions of "P4UiComponentSummary"

From Protege Wiki

Jump to: navigation, search
Line 4: Line 4:
</div><br />
</div><br />
Back to [[Protege4DevDocs]]
'''Back to [[Main_Page#Developer_Documentation|Protege Developer Documentation]]'''
Line 217: Line 217:
=== CreateNewChild/SiblingTarget ===
=== CreateNewChild/SiblingTarget ===
'''Back to [[Main_Page#Developer_Documentation|Protege Developer Documentation]]'''

Latest revision as of 22:10, May 23, 2016

Protege Developer Docs: UI Components

This page describes some of the more useful UI components available for developers working with Protege 4, 5 or newer versions.

Back to Protege Developer Documentation


[edit] 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:

[edit] Components

[edit] Core components

[edit] Actions

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

[edit] 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)

[edit] 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

[edit] Preferences

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

[edit] 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

[edit] Icons

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


[edit] Dialogs

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

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

[edit] NativeBrowserLauncher

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

 NativeBrowserLauncher.openURL(String url);

[edit] ComponentFactory

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

[edit] CheckTable

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

[edit] CheckList

[edit] File dialogs

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

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

[edit] FilePathPanel/FileURIPanel

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

[edit] LinkLabel

A label that acts like a hyperlink

[edit] OWL Specific components

Many of the OWL components are very specific, but a number can be reused in your own application.

[edit] Expression Editor

A text editor that allows OWL objects to be created. It provides content parsing, autocompletion, validation and rendering of existing OWL objects using the The type of object that is supported depends on the OWLExpressionChecker that is provided in the constructor (eg OWLDescriptionChecker).

use: org.protege.editor.owl.ui.clsdescriptioneditor.ExpressionEditor

example of use: org.protege.editor.owl.ui.editor.OWLDescriptionExpressionEditor

[edit] OWLClassDescriptionEditor

A tabbed component that can take any number of OWLDescriptionEditors as tabs and can be used to create OWL expressions

[edit] OWLEntityFindPanel

A component that, given another component that implements Findable will allow a search based on entity name.

[edit] OWL Frame lists

See Frame views to see what the component looks like.

An extension of MList (see #Lists above) that contains axioms and provides additional functionality (such as right click items). This list is used in all of the default entity description views and others. A frame list is initialised with an OWLFrame that contains sections (OWLFrameSections), each of which contains rows (OWLFrameSectionRows). An example of an OWLFrame is org.protege.editor.owl.ui.frame.OWLClassDescriptionFrame

All the work in using a frame list is likely to be in creating/specifying the AbstractOWLFrameSections that its frame contains.

use: org.protege.editor.owl.ui.framelist.OWLFrameList2

many examples of OWLFrameSections are available in org.protege.editor.owl.ui.frame

[edit] Views

Views are implemented as plugins (see PluginTypes#ViewComponent for more details).

[edit] Rename entities UI

use: org.protege.editor.owl.ui.rename.RenameEntityPanel

[edit] Renderering / renderers

Various string renderers and cell renderers are available in the org.protege.editor.owl.ui.renderer package. You can get renderings for OWLObjects and OWLEntities directly from the OWLModelManager as this will use the cache and also ensures the rendering is consistent with the defaults selected for the rest of P4.

Most components described here already use the OWL cell renderers

[edit] OWL Entity selectors

Selectors for each type of entity are available in the org.protege.editor.owl.ui.selector package. You can get pull up a selector dialog more easily by using #UIHelper.pickOWLClass() etc.

example: org.protege.editor.owl.ui.selector.OWLClassSelectorPanel

[edit] OWL Icons

Same as #Icons but gets its icon images from the icons/ folder in the owl plugin.

[edit] OWL object trees

Take a hierarchy provider and render a JTree with the correct cell renderer and default protege behaviour.

use: org.protege.editor.owl.ui.tree.OWLModelManagerTree

[edit] OWLComponentFactory

Get selectors and editors for OWL Objects.

This can be retrieved from the OWLWorkspace.getOWLComponentFactory().

[edit] UIHelper

Provides many useful static methods.

use: org.protege.editor.owl.ui.UIHelper

[edit] Behaviours

Many of these behaviours can be added to views/components.

To be documented - for now, search for the interfaces usage.

[edit] Draggable

[edit] Deleteable/Copyable

[edit] Findable

[edit] CreateNewChild/SiblingTarget

Back to Protege Developer Documentation

Personal tools