|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.AbstractGUIConfigurable
gov.nih.nlm.mms.browser.AbstractBrowserRestrictor
gov.nih.nlm.mms.browser.SourceBrowserRestrictor
public class SourceBrowserRestrictor
Holds criteria for how to restrict or highlight content
in finder searches and/or concept view displays. Offers
user restriction/highlight mechanisms based on Sources.
| Field Summary |
|---|
| Fields inherited from class gov.nih.nlm.mms.browser.AbstractBrowserRestrictor |
|---|
cds |
| Fields inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable |
|---|
data_changed, listeners, user_configuration |
| Constructor Summary | |
|---|---|
SourceBrowserRestrictor()
Every BrowserRestrictor is required to have a no-arg constructor. |
|
| Method Summary | |
|---|---|
void |
addSourceColorSetting(Source source,
Color color)
Sets the given Color to be associated with the given
Source. |
void |
addSourceStyleSetting(Source source,
String style)
Sets the given style to be associated with the given Source. |
int |
compare(Object o1,
Object o2)
Compares this object with the specified object for order. |
List<Color> |
getColor(Object o)
Returns a List of Colors for which the given parameter
matches in the BrowserRestrictor's key. |
Color |
getColorForSource(Source source)
Returns the Color associated with the given
Source. |
String |
getConfigurationDetails()
Method returns a String detailing
the user selections on the GUIConfigurable. |
String |
getName()
Returns the name. |
JPanel |
getPanel()
Returns a JPanel containing configuration options. |
Properties |
getProperties()
Returns the Properties representing the configuration choices. |
List<String> |
getStyle(Object o)
Returns a List of font styles for which the given parameter
matches in the BrowserRestrictor's key. |
String |
getStyleForSource(Source source)
Returns the style associated with the given Source. |
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()
Returns the description to be used in conjunction with the panel when presented to the user. |
boolean |
isColorInHashMap(Color color)
Indicates if the given Color is present in the
set of Source - Color
associations. |
boolean |
isSourceInColorHashMap(Source source)
Indicates if the given Source is
present in the set of Source - Color
associations. |
boolean |
isSourceInStyleHashMap(Source source)
Indicates if the given Source is
present in the set of Source - style
associations. |
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 |
void |
removeSourceColorSetting(Source source)
Clears the association between the given Source
and its Color setting. |
void |
removeSourceStyleSetting(Source source)
Clears the association between the given Source
and its style setting. |
void |
setProperties(Properties props)
Sets the Properties representing the configuration choices. |
void |
showOptions()
Presents an advanced options GUI to the user. |
| Methods inherited from class gov.nih.nlm.mms.browser.AbstractBrowserRestrictor |
|---|
equals, getConceptDataSelector, hasAdvancedOptions, isBold, isConceptViewHideModeEnabled, isConceptViewHighlightModeEnabled, isFinderRestrictionEnabled, isItalics, isUnderline, setBold, setConceptViewHideModeEnabled, setConceptViewHighlightModeEnabled, setFinderRestrictionEnabled, setItalics, setUnderline, toString |
| 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 |
|---|
getConceptDataSelector, isBold, isConceptViewHideModeEnabled, isConceptViewHighlightModeEnabled, isFinderRestrictionEnabled, isItalics, isUnderline, setBold, setConceptViewHideModeEnabled, setConceptViewHighlightModeEnabled, setFinderRestrictionEnabled, setItalics, setUnderline |
| Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable |
|---|
addDataChangeListener, getColor, getGUIConfigurableForValidationFailure, getHelpPanel, getValidationErrors, getValidationWarnings, hasAdvancedOptions, hasDataChanged, removeDataChangeListener, resetDataChanged, setDataChanged, setPanelSelections, validate |
| Methods inherited from interface gov.nih.nlm.mms.Configurable |
|---|
resetToDefaults, setConfiguration, setConfiguration |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public SourceBrowserRestrictor()
BrowserRestrictor is required to have a no-arg constructor.
| Method Detail |
|---|
public boolean keep(Object o)
Object should be kept according to
the restriction rules of this BrowserRestrictor
return true if Object should be kept
false otherwise
keep in interface Restrictorkeep in class AbstractBrowserRestrictortrue object will be kept
false otherwise
public int compare(Object o1,
Object o2)
Required method for implementing
Comparable interface.
Indicates the means for comparison between two Filters.
compare in interface Comparatoro1 - the first Object to be compared.02 - the second Object to be compared.
ClassCastException - if the specified object's type is not
GUIConfigurable.public String getName()
getName in interface GUIConfigurablegetName in class AbstractGUIConfigurablepublic JPanel getPanel()
JPanel containing configuration options.
getPanel in interface GUIConfigurablegetPanel in class AbstractGUIConfigurableJPanel containing configuration optionspublic String getTabDescription()
getTabDescription in interface GUIConfigurablegetTabDescription in class AbstractGUIConfigurablepublic Properties getProperties()
Properties representing the configuration choices.
getProperties in interface ConfigurablegetProperties in class AbstractBrowserRestrictorProperties representing the configuration choicespublic void setProperties(Properties props)
Properties representing the configuration choices.
setProperties in interface ConfigurablesetProperties in class AbstractBrowserRestrictorp - the Properties representing the configuration choicespublic String getConfigurationDetails()
String detailing
the user selections on the GUIConfigurable. This String will
be displayed in the mmsys.log at the completion of subsetting
so it should be formatted to be easily read.
getConfigurationDetails in interface ConfigurablegetConfigurationDetails in class AbstractGUIConfigurableString of data for logpublic void showOptions()
showOptions in interface GUIConfigurableshowOptions in class AbstractGUIConfigurable
public void addSourceColorSetting(Source source,
Color color)
Color to be associated with the given
Source.
source - Sourcecolor - Color
public void addSourceStyleSetting(Source source,
String style)
Source.
sty - Sourcestyle - Colorpublic void removeSourceColorSetting(Source source)
Source
and its Color setting.
sty - Sourcepublic void removeSourceStyleSetting(Source source)
Source
and its style setting.
source - Sourcepublic Color getColorForSource(Source source)
Color associated with the given
Source.
source - Source
Colorpublic boolean isColorInHashMap(Color color)
Color is present in the
set of Source - Color
associations.
color - Color
true if given Color is present
false otherwisepublic boolean isSourceInColorHashMap(Source source)
Source is
present in the set of Source - Color
associations.
source - Source
true if given Source is present
false otherwisepublic boolean isSourceInStyleHashMap(Source source)
Source is
present in the set of Source - style
associations.
source - Source
true if given Source is present
false otherwisepublic String getStyleForSource(Source source)
Source.
source - Source
public String getStyleLegend()
getStyleLegend in interface BrowserRestrictorpublic List<Color> getColor(Object o)
List of Colors for which the given parameter
matches in the BrowserRestrictor's key.
getColor in interface BrowserRestrictorgetColor in class AbstractBrowserRestrictoro - Object
public List<String> getStyle(Object o)
List of font styles for which the given parameter
matches in the BrowserRestrictor's key.
getStyle in interface BrowserRestrictorgetStyle in class AbstractBrowserRestrictoro - Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||