project35.soa.ontology.views
Class OntologyServiceManager
java.lang.Object
project35.soa.ontology.views.OntologyServiceManager
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class OntologyServiceManager
- extends java.lang.Object
- implements java.awt.event.ActionListener
manages ontology services associated with a given text field
It associates its own ServiceMenuListener
with the label of
the form field. When users right click over it, the ServiceMenuListener
causes the OntologyServiceManager
to generate a
popup menu of services. if the service yields less than 40 terms
it attempts to render the terms as menu items. Selecting an item will
cause the form to marked up with a term.
if the service produces more than 40 terms, then this class creates a
menu item for the service that causes the OntologyViewer
to display the terms.
When an OntologyViewer
is displayed, the manager associates
a DefaultOntologyTermSelectionListener
with it. This class,
which implements the OntologyTermSelectionListener
interface,
is responsible for recording meta data about selected terms, then pasting
the term labels into the text field.
Copyright (c) 2008 Kevin Garwood for Project35. The original code was
developed by Kevin Garwood for the University of Manchester. Revisions
have been made for Project35, a project that is independent of that
institution. This code is licensed under the Academic Free License
version 3.0. The code attribution for the original code is included here:
Copyright (c) Kevin Garwood and University of Manchester 2007.
All rights reserved. Licensed under the Academic Free License
version 3.0. For more information on the terms and conditions,
please see the file "LICENSE" that is included in this distribution.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Constructor Summary |
OntologyServiceManager(javax.swing.JComponent rightClickLabelTarget,
java.lang.String associatedRecordName,
java.lang.String associatedFieldName,
javax.swing.text.JTextComponent textComponent,
Project35FormContext project35FormContext,
java.util.ArrayList ontologyServices)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OntologyServiceManager
public OntologyServiceManager(javax.swing.JComponent rightClickLabelTarget,
java.lang.String associatedRecordName,
java.lang.String associatedFieldName,
javax.swing.text.JTextComponent textComponent,
Project35FormContext project35FormContext,
java.util.ArrayList ontologyServices)
generateMenu
public javax.swing.JPopupMenu generateMenu()
- Returns:
- the popup menu that appears when an end-user right clicks
over label of the form field that has been linked with ontology
services
removeServiceMenuListener
public void removeServiceMenuListener()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener