gov.nih.nlm.mms.browser
Class ExpandableConceptView

java.lang.Object
  extended bygov.nih.nlm.mms.browser.AbstractConceptView
      extended bygov.nih.nlm.mms.browser.ExpandableConceptView
All Implemented Interfaces:
ActionListener, Comparable, ConceptView, Configurable, EventListener, FullyPrintable, GUIConfigurable

public class ExpandableConceptView
extends AbstractConceptView
implements ActionListener

ConceptView that displays the concept report with a formatted appearance that is customizable by the user.

Author:
Deborah Shapiro

Nested Class Summary
 class ExpandableConceptView.PopupListener
           
 
Field Summary
 
Fields inherited from class gov.nih.nlm.mms.browser.AbstractConceptView
clm, default_configuration, font_family, font_point_size, has_data_changed, user_configuration
 
Constructor Summary
ExpandableConceptView()
          Instantiates a ExpandableConceptView.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addDataChangeListener(DataChangeListener dcl)
          Adds a DataChangeListener that responds to configuration changes.
 String getContentType()
          Returns the content type used for the JEditorPane display.
 FinderHandler getFinderHandler()
          Indicates the FinderHandler that will execute the find operation for this ConceptView
 String getName()
          Returns the name.
 JPanel getPanel()
          Returns a JPanel containing the concept report.
 String getPreferredAtom(Atom[] atoms, List precedence)
          Returns the preferred atom's string from amongst the given Atom[].
 Printable getPrintable()
          Returns the Printable that handles printing.
 Properties getProperties()
          Method returns all properties specific to the ConceptView.
 boolean hasAdvancedOptions()
          Indicates whether or not an options menu item should be supplied for advanced configuration options.
 void print()
          Prints the concept report.
 void removeDataChangeListener(DataChangeListener dcl)
          Removes the specified DataChangeListener.
 void resetToDefaults()
          Resets the configuration back to default values.
 void setAtomComparator(Comparator atom_comparator)
          Sets the Comparator that will be used to sort the Atoms.
 void setConcept(Concept concept)
          Sets the Concept to be displayed.
 void setPageSize(int page_size)
          Sets the page size.
 void setProperties(Properties p)
          Sets the view properties.
 void setRestrictor(Restrictor restrictor)
          Sets the Restrictor that will be used to restrict the parts of the Concept that will be displayed in this ConceptView.
 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.AbstractConceptView
compareTo, find, getColor, getConfigurationDetails, getGUIConfigurableForValidationFailure, getHelpPanel, getTabDescription, getValidateMessage, getValidationErrors, getValidationWarnings, hasDataChanged, resetDataChanged, 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

ExpandableConceptView

public ExpandableConceptView()
Instantiates a ExpandableConceptView.

Method Detail

getPanel

public JPanel getPanel()
Returns a JPanel containing the concept report.

Specified by:
getPanel in interface GUIConfigurable
Returns:
a JPanel containing the concept report

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getContentType

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

Specified by:
getContentType in interface ConceptView
Returns:
content type

getFinderHandler

public FinderHandler getFinderHandler()
Indicates the FinderHandler that will execute the find operation for this ConceptView

Specified by:
getFinderHandler in interface ConceptView
Returns:
FinderHandler

setConcept

public void setConcept(Concept concept)
Sets the Concept to be displayed.

Specified by:
setConcept in interface ConceptView
Parameters:
concept - Concept

setRestrictor

public void setRestrictor(Restrictor restrictor)
Sets the Restrictor that will be used to restrict the parts of the Concept that will be displayed in this ConceptView.

Parameters:
restrictor - Restrictor

setAtomComparator

public void setAtomComparator(Comparator atom_comparator)
Sets the Comparator that will be used to sort the Atoms.

Parameters:
atom_comparator - Comparator

setPageSize

public void setPageSize(int page_size)
Sets the page size. This is the number of records that will be displayed at one time for nodes with a lot of data.

Parameters:
page_size - int

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

getProperties

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

Specified by:
getProperties in interface Configurable
Overrides:
getProperties in class AbstractConceptView
Returns:
Properties only those directly related to the concept view.

setProperties

public void setProperties(Properties p)
Sets the view properties.

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

addDataChangeListener

public void addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that responds to configuration changes. Allows main GUI to record all changes to this gui in the undo/redo mechanism.

Specified by:
addDataChangeListener in interface GUIConfigurable
Overrides:
addDataChangeListener in class AbstractConceptView
Parameters:
dcl - the DataChangeListener to add

removeDataChangeListener

public void removeDataChangeListener(DataChangeListener dcl)
Removes the specified DataChangeListener.

Specified by:
removeDataChangeListener in interface GUIConfigurable
Overrides:
removeDataChangeListener in class AbstractConceptView
Parameters:
dcl - the DataChangeListener to remove

getName

public String getName()
Returns the name.

Specified by:
getName in interface GUIConfigurable
Returns:
the name

showOptions

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

Specified by:
showOptions in interface GUIConfigurable

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
Returns:
true if so; false otherwise

print

public void print()
           throws PrinterException
Prints the concept report.

Specified by:
print in interface FullyPrintable
Throws:
PrinterException

getPrintable

public Printable getPrintable()
Returns the Printable that handles printing.

Specified by:
getPrintable in interface FullyPrintable
Returns:
Printable that handles printing

getPreferredAtom

public String getPreferredAtom(Atom[] atoms,
                               List precedence)
Returns the preferred atom's string from amongst the given Atom[]. Uses the Atom.AtomRankComparator and the given precidence list to do ranking.

Parameters:
atoms - Atom[]
precedence - List
Returns:
preferred atom's STR string

subsetDirectoryOpened

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

Specified by:
subsetDirectoryOpened in interface ConceptView
Overrides:
subsetDirectoryOpened in class AbstractConceptView
Parameters:
source_dir - the source directory


Copyright ©2005