|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.mms.filters.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
|
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. |
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
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 GUIConfigurable
JPanel
to be added to the Help menupublic void showOptions()
showOptions
in interface GUIConfigurable
public boolean hasAdvancedOptions()
hasAdvancedOptions
in interface GUIConfigurable
true
if so; false
otherwiseprotected void fireDataChanged()
protected void fireNotUndoableDataChanged()
public boolean hasDataChanged()
hasDataChanged
in interface GUIConfigurable
true
if data has changed
false
otherwisepublic void setDataChanged(boolean b)
setDataChanged
in interface GUIConfigurable
b
- boolean
public void resetDataChanged()
resetDataChanged
in interface GUIConfigurable
public 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 GUIConfigurable
dcl
- DataChangeListener
public 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 GUIConfigurable
dcl
- DataChangeListener
public void setConfiguration(UserConfiguration c)
setConfiguration
in interface Configurable
c
- UserConfiguration
public void setConfiguration(ApplicationConfiguration c)
setConfiguration
in interface Configurable
c
- UserConfiguration
public boolean validate()
validate
in interface GUIConfigurable
true
filter is validpublic String getValidateMessage()
String
public String[] getValidationErrors()
validate()
returns false
.
getValidationErrors
in interface GUIConfigurable
public String[] getValidationWarnings()
getValidationWarnings
in interface GUIConfigurable
public GUIConfigurable getGUIConfigurableForValidationFailure()
GUIConfigurable
whose tab should next be displayed
to allow the user to correct an error or warning.
getGUIConfigurableForValidationFailure
in interface GUIConfigurable
public void setCuiList(CuiList cui_list)
setCuiList
in interface SubsetListener
cui_list
- CuiList
public void beginInitializeCuiList()
SubsetListener
that the Initialize Cui List phase is starting.
beginInitializeCuiList
in interface SubsetListener
public void endInitializeCuiList()
SubsetListener
that the Initialize Cui List phase is ending.
endInitializeCuiList
in interface SubsetListener
public void beginSubsetContent()
SubsetListener
that the Subset Content phase is starting.
beginSubsetContent
in interface SubsetListener
public void endSubsetContent()
SubsetListener
that the Subset Content phase is ending.
endSubsetContent
in interface SubsetListener
public Color getColor()
Color
used to represent this filter.
Not used yet.
getColor
in interface GUIConfigurable
Color
public void applyFilter(Concept concept)
Concept
or its components
from the release. Called during the subsetting process.
applyFilter
in interface Filter
concept
- Concept
public int compareTo(Object o)
Required method for implementing
Comparable
interface.
Indicates the means for comparison between two Filter
s.
compareTo
in interface Comparable
o
- the Object to be compared.
ClassCastException
- if the specified object's type is not
GUIConfigurable
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |