gov.nih.nlm.mms.browser
Class TreeBrowserFinder

java.lang.Object
  extended by gov.nih.nlm.mms.browser.AbstractFinder
      extended by gov.nih.nlm.mms.browser.TreeBrowserFinder
All Implemented Interfaces:
Finder, Configurable, GUIConfigurable, Comparable

public class TreeBrowserFinder
extends AbstractFinder

Represents a Finder that enables user to choose concepts for display from an HTML document formatted to look like a tree. All methods in this class should be called from a separate thread.

Author:
Deborah Shapiro

Nested Class Summary
 class TreeBrowserFinder.PopupListener
          Listener to display JPopupMenu.
 class TreeBrowserFinder.TreeBrowserFinderOptionsGUI
          Options GUI for TreeBrowserFinder.
 
Field Summary
 
Fields inherited from class gov.nih.nlm.mms.browser.AbstractFinder
clm, fBrowsableInputStream, font_family, font_point_size, has_data_changed, user_configuration
 
Constructor Summary
TreeBrowserFinder()
          Instantiates a TreeBrowserFinder.
 
Method Summary
 String getContentType()
          Returns the content type used for the JEditorPane display.
 String getName()
          Returns the name.
 JPanel getPanel()
          Returns a JPanel containing a JTree that enables navigation through the context hierarchy.
 Properties getProperties()
          Method returns all properties specific to the Finder.
protected  SearchOptions getSearchOptions()
           
 boolean hasAdvancedOptions()
          Indicates whether or not an options menu item should be supplied for advanced configuration options.
 void refresh()
          Redraws the text portions of the Finder.
 void resetToDefaults()
          Resets the configuration back to default values.
 void setMaxResults(int max_children)
          Sets the maximum number of cuis that will be returned as results of the search.
 void setProperties(Properties p)
          Method provides the GUIConfigurable with all properties specific to the Finder.
 void setSearchOptions(SearchOptions searchOptions)
          Indicates the SearchOptions.
 void showOptions()
          Presents an advanced options GUI to the user.
 void subsetDirectoryOpened(File source_dir)
          Handles opening of a source directory.
 
Methods inherited from class gov.nih.nlm.mms.browser.AbstractFinder
addDataChangeListener, compareTo, getBrowsableInputStream, getColor, getConfigurationDetails, getGUIConfigurableForValidationFailure, getHelpPanel, getTabDescription, getValidateMessage, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, setBrowsableInputStream, setConceptListManager, setConfiguration, setConfiguration, setDataChanged, setFontFamily, setFontPointSize, setPanelSelections, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeBrowserFinder

public TreeBrowserFinder()
Instantiates a TreeBrowserFinder.

Method Detail

getSearchOptions

protected SearchOptions getSearchOptions()

setSearchOptions

public void setSearchOptions(SearchOptions searchOptions)
Indicates the SearchOptions.

Parameters:
searchOptions -

getPanel

public JPanel getPanel()
Returns a JPanel containing a JTree that enables navigation through the context hierarchy.

Returns:
a JPanel containing a JTree that enables navigation through the context hierarchy

resetToDefaults

public void resetToDefaults()
Resets the configuration back to default values. When used with a GUI this method should change the data model behind the GUI and allow setPanelSelections to actually update the GUI.


getProperties

public Properties getProperties()
Method returns all properties specific to the Finder.

Specified by:
getProperties in interface Configurable
Overrides:
getProperties in class AbstractFinder
Returns:
Properties only those directly related to the finder.

setProperties

public void setProperties(Properties p)
Method provides the GUIConfigurable with all properties specific to the Finder.

Specified by:
setProperties in interface Configurable
Overrides:
setProperties in class AbstractFinder
Parameters:
p - Properties

getName

public String getName()
Returns the name.

Returns:
the name

getContentType

public String getContentType()
Returns the content type used for the JEditorPane display.

Returns:
content type

showOptions

public void showOptions()
Presents an advanced options GUI to the user.


hasAdvancedOptions

public boolean hasAdvancedOptions()
Indicates whether or not an options menu item should be supplied for advanced configuration options.

Returns:
true if so; false otherwise

subsetDirectoryOpened

public void subsetDirectoryOpened(File source_dir)
Handles opening of a source directory.

Specified by:
subsetDirectoryOpened in interface Finder
Overrides:
subsetDirectoryOpened in class AbstractFinder
Parameters:
source_dir - the source directory

setMaxResults

public void setMaxResults(int max_children)
Sets the maximum number of cuis that will be returned as results of the search.

Parameters:
max_children - max number of cuis that will be returned

refresh

public void refresh()
Redraws the text portions of the Finder. Should be called from a new Thread().

Specified by:
refresh in interface Finder
Overrides:
refresh in class AbstractFinder


Copyright ©2005