Difference between revisions of "P4UiComponentSummary"
(→OWL Frame lists)
|Line 1:||Line 1:|
<span class="orangeBoxTitle">Developer Docs: UI Components</span><br /><br />
This page describes some of the more useful UI components available for
This page describes some of the more useful UI components available for developers .
Revision as of 22:24, 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 Protege4DevDocs
- 1 Packages
- 2 Components
- 2.1 Core components
- 2.2 OWL Specific components
- 3 Behaviours
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:
- org.protege.editor.core.ui and its subpackages for core generic ui components
- org.protege.editor.owl.ui and its subpackages for owl specific ui components
Create menu items using a plugin mechanism (see PluginTypes#EditorKitMenuAction for details).
Display a dialog to the user when an exception needs to be reported.
Protege-style JLists that have support for sections, and items with buttons on the right hand side for deleting, editing etc
Create preferences panels for your plugins (see PluginTypes#preferencespanel for details).
A dialog with a series of pages to guide the user through a set of tasks with a certain set of steps.
Get a selection of icons that are found in the icons/ folder in the core plugin.
Provides some handy static dialog/validating dialog (VerifyingOptionPane) creation methods.
Show a url in the default native browser for the users OS.
Provides a series of static methods to create some standard Swing components with Protege default look and feel.
A table that supports selection checkboxes in the first column with a "check all" option
Provides a number of native file selectors for loading or saving files.
An editor with a built in file selection dialog (as used by Open ontology dialogs etc)
A label that acts like a hyperlink
OWL Specific components
Many of the OWL components are very specific, but a number can be reused in your own application.
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).
example of use: org.protege.editor.owl.ui.editor.OWLDescriptionExpressionEditor
A tabbed component that can take any number of OWLDescriptionEditors as tabs and can be used to create OWL expressions
A component that, given another component that implements Findable will allow a search based on entity name.
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.
many examples of OWLFrameSections are available in org.protege.editor.owl.ui.frame
Views are implemented as plugins (see PluginTypes#ViewComponent for more details).
Rename entities UI
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
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.
Same as #Icons but gets its icon images from the icons/ folder in the owl plugin.
OWL object trees
Take a hierarchy provider and render a JTree with the correct cell renderer and default protege behaviour.
Get selectors and editors for OWL Objects.
This can be retrieved from the OWLWorkspace.getOWLComponentFactory().
Provides many useful static methods.
Many of these behaviours can be added to views/components.
To be documented - for now, search for the interfaces usage.