gov.nih.nlm.mms.browser
Class TreeBrowserFinder

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

public class TreeBrowserFinder
extends AbstractFinder
implements Browser

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, conceptDataSelector, fBrowsableInputStream, font_family, font_point_size, has_data_changed, searchOptions
 
Fields inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
data_changed, default_configuration, listeners, 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.
 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 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
getBrowsableInputStream, getConceptDataSelector, getHelpPanel, setBrowsableInputStream, setConceptDataSelector, setConceptListManager, setFontFamily, setFontPointSize, setPanelSelections, setSearchOptions
 
Methods inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
addDataChangeListener, addValidationError, addValidationWarning, clearValidationErrors, clearValidationWarnings, compareTo, fireDataChanged, getColor, getConfigurationDetails, getGUIConfigurableForValidationFailure, getTabDescription, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, setConfiguration, setConfiguration, setDataChanged, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nih.nlm.mms.browser.Finder
setBrowsableInputStream, setConceptDataSelector, setConceptListManager, setFontFamily, setFontPointSize, setSearchOptions
 
Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable
addDataChangeListener, getColor, getGUIConfigurableForValidationFailure, getHelpPanel, getTabDescription, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, setDataChanged, setPanelSelections, validate
 
Methods inherited from interface gov.nih.nlm.mms.Configurable
getConfigurationDetails, setConfiguration, setConfiguration
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

TreeBrowserFinder

public TreeBrowserFinder()
Instantiates a TreeBrowserFinder.

Method Detail

getPanel

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

Specified by:
getPanel in interface GUIConfigurable
Overrides:
getPanel in class AbstractGUIConfigurable
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.

Specified by:
resetToDefaults in interface Configurable
Overrides:
resetToDefaults in class AbstractGUIConfigurable

getProperties

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

Specified by:
getProperties in interface Configurable
Overrides:
getProperties in class AbstractGUIConfigurable
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 AbstractGUIConfigurable
Parameters:
p - Properties

getName

public String getName()
Returns the name.

Specified by:
getName in interface GUIConfigurable
Overrides:
getName in class AbstractGUIConfigurable
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.

Specified by:
showOptions in interface GUIConfigurable
Overrides:
showOptions in class AbstractGUIConfigurable

hasAdvancedOptions

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

Specified by:
hasAdvancedOptions in interface GUIConfigurable
Overrides:
hasAdvancedOptions in class AbstractGUIConfigurable
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