gate.gui.ontology
Class SearchAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gate.gui.ontology.SearchAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class SearchAction
extends AbstractAction

A Class that provides a GUI to search for a resource in the ontology editor. It allows looking up for a resource with certain name or to locate a resource that has a certain value set on the specified property.

Author:
niraj
See Also:
Serialized Form

Nested Class Summary
 class SearchAction.ComboRenderer
          Description: This class provides the renderer for the Search comboBox Nodes.
 
Field Summary
protected  JPanel guiPanel
          main guiPanel that holds the search gui components.
protected  OntologyEditor ontologyEditor
          The editor whose ontology is used for searching in.
protected  JComboBox properties
          combobox that holds the filtered properties based on user's input.
protected  RDFProperty[] propertiesArray
          An array that contains a list of properties in which the search function searches in.
protected  OResource[] resourcesArray
          An array that contains a list of resources in which the search function searches in.
protected  JComboBox resourcesBox
          Box to show the filtered resources based on the user's input in the find what box.
protected  JCheckBox searchInPropertyValues
          Indicates if the search function should search for the find what string in the values of the specified property.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
SearchAction(String s, Icon icon, OntologyEditor editor)
          Constructor
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Obtains a list of resources from the ontology being displayed in the ontology editor and invokes the search dialog.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourcesBox

protected JComboBox resourcesBox
Box to show the filtered resources based on the user's input in the find what box.


guiPanel

protected JPanel guiPanel
main guiPanel that holds the search gui components.


ontologyEditor

protected OntologyEditor ontologyEditor
The editor whose ontology is used for searching in.


resourcesArray

protected OResource[] resourcesArray
An array that contains a list of resources in which the search function searches in. This list is updated on each invocation of the search function.


propertiesArray

protected RDFProperty[] propertiesArray
An array that contains a list of properties in which the search function searches in. This list is updated on each invocation of the search function.


properties

protected JComboBox properties
combobox that holds the filtered properties based on user's input.


searchInPropertyValues

protected JCheckBox searchInPropertyValues
Indicates if the search function should search for the find what string in the values of the specified property.

Constructor Detail

SearchAction

public SearchAction(String s,
                    Icon icon,
                    OntologyEditor editor)
Constructor

Parameters:
s - - caption of the search button
icon - - icon to be used for the search button
editor - - instance of the ontology editor
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ae)
Obtains a list of resources from the ontology being displayed in the ontology editor and invokes the search dialog.