gov.nih.nlm.mms.browser
Class ShowAllBrowserRestrictor

java.lang.Object
  extended by gov.nih.nlm.mms.AbstractGUIConfigurable
      extended by gov.nih.nlm.mms.browser.AbstractBrowserRestrictor
          extended by gov.nih.nlm.mms.browser.ShowAllBrowserRestrictor
All Implemented Interfaces:
BrowserRestrictor, Configurable, GUIConfigurable, Restrictor, Comparable, Comparator

public class ShowAllBrowserRestrictor
extends AbstractBrowserRestrictor
implements BrowserRestrictor

Default BrowserRestrictor which doesn't restrict at all. It shows, or makes available, all data.

Author:
Deborah Shapiro

Field Summary
 
Fields inherited from class gov.nih.nlm.mms.browser.AbstractBrowserRestrictor
cds
 
Fields inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
data_changed, default_configuration, listeners, user_configuration
 
Constructor Summary
ShowAllBrowserRestrictor()
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compares this object with the specified object for order.
 Color getColor()
          Returns the color in which the restricted data will be displayed.
 String getName()
          Returns the name.
 String getStyleLegend()
          Returns a HTML string containing a key for how elements from the browser restrictor should be displayed, indicating the color and font style.
 String getTabDescription()
          Return the description to appear above the main configuration panel in the BrowserRestrictorOptionsGUI.
 boolean hasAdvancedOptions()
          Indicates whether or not an options menu item should be supplied for advanced configuration options.
 boolean keep(Object o)
          Indicates if the given Object should be kept according to the restriction rules of this BrowserRestrictor return true if Object should be kept false otherwise
 
Methods inherited from class gov.nih.nlm.mms.browser.AbstractBrowserRestrictor
equals, getColor, getConceptDataSelector, getProperties, getStyle, isBold, isConceptViewHideModeEnabled, isConceptViewHighlightModeEnabled, isFinderRestrictionEnabled, isItalics, isUnderline, setBold, setConceptViewHideModeEnabled, setConceptViewHighlightModeEnabled, setFinderRestrictionEnabled, setItalics, setProperties, setUnderline, toString
 
Methods inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
addDataChangeListener, addValidationError, addValidationWarning, clearValidationErrors, clearValidationWarnings, compareTo, fireDataChanged, getConfigurationDetails, getGUIConfigurableForValidationFailure, getHelpPanel, getPanel, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, resetToDefaults, setConfiguration, setConfiguration, setDataChanged, setPanelSelections, showOptions, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nih.nlm.mms.browser.BrowserRestrictor
getColor, getConceptDataSelector, getStyle, isBold, isConceptViewHideModeEnabled, isConceptViewHighlightModeEnabled, isFinderRestrictionEnabled, isItalics, isUnderline, setBold, setConceptViewHideModeEnabled, setConceptViewHighlightModeEnabled, setFinderRestrictionEnabled, setItalics, setUnderline
 
Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable
addDataChangeListener, getGUIConfigurableForValidationFailure, getHelpPanel, getPanel, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, setDataChanged, setPanelSelections, showOptions, validate
 
Methods inherited from interface gov.nih.nlm.mms.Configurable
getConfigurationDetails, getProperties, resetToDefaults, setConfiguration, setConfiguration, setProperties
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ShowAllBrowserRestrictor

public ShowAllBrowserRestrictor()
Method Detail

keep

public boolean keep(Object o)
Indicates if the given Object should be kept according to the restriction rules of this BrowserRestrictor return true if Object should be kept false otherwise

Specified by:
keep in interface Restrictor
Specified by:
keep in class AbstractBrowserRestrictor
Returns:
true object will be kept false otherwise

compare

public int compare(Object o1,
                   Object o2)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Required method for implementing Comparable interface. Indicates the means for comparison between two Filters.

Specified by:
compare in interface Comparator
Parameters:
o1 - the first Object to be compared.
02 - the second Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type is not GUIConfigurable.

getName

public String getName()
Returns the name.

Specified by:
getName in interface GUIConfigurable
Overrides:
getName in class AbstractGUIConfigurable
Returns:
the name

getTabDescription

public String getTabDescription()
Return the description to appear above the main configuration panel in the BrowserRestrictorOptionsGUI.

Specified by:
getTabDescription in interface GUIConfigurable
Overrides:
getTabDescription in class AbstractGUIConfigurable
Returns:
tab description String

getColor

public Color getColor()
Returns the color in which the restricted data will be displayed.

Specified by:
getColor in interface GUIConfigurable
Overrides:
getColor in class AbstractGUIConfigurable
Returns:
Color in which restricted data will be highlighted

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

getStyleLegend

public String getStyleLegend()
Returns a HTML string containing a key for how elements from the browser restrictor should be displayed, indicating the color and font style.

Specified by:
getStyleLegend in interface BrowserRestrictor
Returns:
legend indicating color and font style meanings


Copyright ©2005