|
|||||||||
| 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.ContentViewBrowserRestrictor
public class ContentViewBrowserRestrictor
Holds criteria for how to restrict or highlight content
in finder searches and/or concept view displays. Offers
user restriction/highlight mechanisms based on ContentViews.
| 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 | |
|---|---|
ContentViewBrowserRestrictor()
Every BrowserRestrictor is required to have a no-arg constructor. |
|
| Method Summary | |
|---|---|
void |
addIdColorSetting(String id,
Color color)
Sets the given Color to be associated with the given
content view id. |
void |
addIdStyleSetting(String id,
String style)
Sets the given style to be associated with the given content view id. |
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 |
getColorForId(String id)
Returns the Color associated with the given
content view id. |
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 |
getStyleForId(String id)
Returns the style associated with the given content view id. |
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 content view id - Color
associations. |
boolean |
isIdInColorHashMap(String id)
Indicates if the given content view id is present in the set of content view id - Color
associations. |
boolean |
isIdInStyleHashMap(String id)
Indicates if the given content view id is present in the set of content view id - 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 |
removeIdColorSetting(String id)
Clears the association between the given content view id and its Color setting. |
void |
removeIdStyleSetting(String id)
Clears the association between the given content view id 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.GUIConfigurable |
|---|
addDataChangeListener, getColor, getGUIConfigurableForValidationFailure, getHelpPanel, getValidationErrors, getValidationWarnings, 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 |
| Constructor Detail |
|---|
public ContentViewBrowserRestrictor()
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.
o1 - 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 addIdColorSetting(String id,
Color color)
Color to be associated with the given
content view id.
id - Stringcolor - Color
public void addIdStyleSetting(String id,
String style)
id - Stringstyle - Colorpublic void removeIdColorSetting(String id)
Color setting.
id - Stringpublic void removeIdStyleSetting(String id)
id - Stringpublic Color getColorForId(String id)
Color associated with the given
content view id.
id - String
Colorpublic boolean isColorInHashMap(Color color)
Color is present in the
set of content view id - Color
associations.
color - Color
true if given Color is present
false otherwisepublic boolean isIdInColorHashMap(String id)
Color
associations.
id - String
true if given content view id is present
false otherwisepublic boolean isIdInStyleHashMap(String id)
id - String
true if given content view id is present
false otherwisepublic String getStyleForId(String id)
id - String
public String getStyleLegend()
public 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 | ||||||||