|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.filters.AbstractFilter
public abstract class AbstractFilter
This is an abstract implementation of the filter class that manages the mechanisms for handling data changes.
| Field Summary | |
|---|---|
protected ApplicationConfiguration |
default_configuration
|
protected boolean |
init_cui
|
protected boolean |
subset_content
|
protected UserConfiguration |
user_configuration
|
protected List |
warnings
|
| Constructor Summary | |
|---|---|
AbstractFilter()
|
|
| Method Summary | |
|---|---|
void |
addDataChangeListener(DataChangeListener dcl)
Method adds a DataChangeListener that will
be notified every time a fireDataChanged() call is made
from a filter. |
void |
applyFilter(Concept concept)
Deprecated. Use one of the sub-interfaces instead |
void |
beginInitializeCuiList()
Informs SubsetListener that the Initialize Cui List phase is starting. |
void |
beginSubsetContent()
Informs SubsetListener that the Subset Content phase is starting. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
void |
endInitializeCuiList()
Informs SubsetListener that the Initialize Cui List phase is ending. |
void |
endSubsetContent()
Informs SubsetListener that the Subset Content phase is ending. |
protected void |
fireDataChanged()
Enables filters to inform listeners of data changed event. |
protected void |
fireNotUndoableDataChanged()
Enables filters to indicate that data has changed without notifying the listeners or making this change undoable. |
Color |
getColor()
Returns the Color used to represent this filter. |
GUIConfigurable |
getGUIConfigurableForValidationFailure()
Returns the GUIConfigurable whose tab should next be displayed
to allow the user to correct an error or warning. |
JPanel |
getHelpPanel()
Method provides a JPanel that will be added to the main GUI
help menu to allow the user to consult a help window
that is particular to this filter. |
String |
getValidateMessage()
This method is the default message for filters that don't check for validity. |
String[] |
getValidationErrors()
Returns the messages indicating why validation failed. |
String[] |
getValidationWarnings()
Returns warnings that were indicated during validation. |
String[] |
getWarnings()
Returns a String[] of warnings accumulated during
processing of the input stream. |
boolean |
hasAdvancedOptions()
Indicates whether or not an options menu item should be supplied for advanced configuration options. |
boolean |
hasDataChanged()
Method returns a boolean indicating whether or not the values in this filter have changed. |
void |
removeDataChangeListener(DataChangeListener dcl)
Method removes a DataChangeListener so that it
will no longer be notified every time a fireDataChanged()
call is made from a filter. |
void |
resetDataChanged()
Method resets the data_changed flag in the filter to indicate that no data has been changed since the last save. |
void |
setConfiguration(ApplicationConfiguration c)
Method provides the filter with values from the default configuration file. |
void |
setConfiguration(UserConfiguration c)
Method provides the filter with values from the user configuration file. |
void |
setCuiList(CuiList cui_list)
Provides filter access to the cui list. |
void |
setDataChanged(boolean b)
Method allows the data_changed value to be set from the main gui from the undo/redo mechanism. |
void |
showOptions()
Presents an advanced options GUI to the user. |
boolean |
validate()
This method is the default method for filters that don't check for validity and it returns true indicating a valid filter. |
| 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.filters.Filter |
|---|
isEfficientEnabled |
| Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable |
|---|
getName, getPanel, getTabDescription, setPanelSelections |
| Methods inherited from interface gov.nih.nlm.mms.Configurable |
|---|
getConfigurationDetails, getProperties, resetToDefaults, setProperties |
| Field Detail |
|---|
protected UserConfiguration user_configuration
protected ApplicationConfiguration default_configuration
protected boolean init_cui
protected boolean subset_content
protected List warnings
| Constructor Detail |
|---|
public AbstractFilter()
| Method Detail |
|---|
public JPanel getHelpPanel()
JPanel that will be added to the main GUI
help menu to allow the user to consult a help window
that is particular to this filter.
getHelpPanel in interface GUIConfigurableJPanel to be added to the Help menupublic void showOptions()
showOptions in interface GUIConfigurablepublic boolean hasAdvancedOptions()
hasAdvancedOptions in interface GUIConfigurabletrue if so; false otherwiseprotected void fireDataChanged()
protected void fireNotUndoableDataChanged()
public boolean hasDataChanged()
hasDataChanged in interface GUIConfigurabletrue if data has changed
false otherwisepublic void setDataChanged(boolean b)
setDataChanged in interface GUIConfigurableb - booleanpublic void resetDataChanged()
resetDataChanged in interface GUIConfigurablepublic void addDataChangeListener(DataChangeListener dcl)
DataChangeListener that will
be notified every time a fireDataChanged() call is made
from a filter. Allows main GUI to record all changes to
the filters in the undo/redo mechanism.
addDataChangeListener in interface GUIConfigurabledcl - DataChangeListenerpublic void removeDataChangeListener(DataChangeListener dcl)
DataChangeListener so that it
will no longer be notified every time a fireDataChanged()
call is made from a filter.
removeDataChangeListener in interface GUIConfigurabledcl - DataChangeListenerpublic void setConfiguration(UserConfiguration c)
setConfiguration in interface Configurablec - UserConfigurationpublic void setConfiguration(ApplicationConfiguration c)
setConfiguration in interface Configurablec - UserConfigurationpublic boolean validate()
validate in interface GUIConfigurabletrue filter is validpublic String getValidateMessage()
Stringpublic String[] getValidationErrors()
validate() returns false.
getValidationErrors in interface GUIConfigurablepublic String[] getValidationWarnings()
getValidationWarnings in interface GUIConfigurablepublic GUIConfigurable getGUIConfigurableForValidationFailure()
GUIConfigurable whose tab should next be displayed
to allow the user to correct an error or warning.
getGUIConfigurableForValidationFailure in interface GUIConfigurablepublic void setCuiList(CuiList cui_list)
setCuiList in interface SubsetListenercui_list - CuiListpublic void beginInitializeCuiList()
SubsetListener that the Initialize Cui List phase is starting.
beginInitializeCuiList in interface SubsetListenerpublic void endInitializeCuiList()
SubsetListener that the Initialize Cui List phase is ending.
endInitializeCuiList in interface SubsetListenerpublic void beginSubsetContent()
SubsetListener that the Subset Content phase is starting.
beginSubsetContent in interface SubsetListenerpublic void endSubsetContent()
SubsetListener that the Subset Content phase is ending.
endSubsetContent in interface SubsetListenerpublic Color getColor()
Color used to represent this filter.
Not used yet.
getColor in interface GUIConfigurableColorpublic void applyFilter(Concept concept)
Concept or its components
from the release. Called during the subsetting process.
applyFilter in interface Filterconcept - Conceptpublic int compareTo(Object o)
Required method for implementing
Comparable interface.
Indicates the means for comparison between two Filters.
compareTo in interface Comparableo - the Object to be compared.
ClassCastException - if the specified object's type is not
GUIConfigurable.public String[] getWarnings()
String[] of warnings accumulated during
processing of the input stream.
getWarnings in interface FilterString[] of warnings
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||