|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.AbstractGUIConfigurable
public class AbstractGUIConfigurable
Generically represents an object that can be configured by
the MetamorphoSysGUI.
| Field Summary | |
|---|---|
protected boolean |
data_changed
|
protected ApplicationConfiguration |
default_configuration
|
protected List<DataChangeListener> |
listeners
|
protected UserConfiguration |
user_configuration
|
| Constructor Summary | |
|---|---|
AbstractGUIConfigurable()
|
|
| Method Summary | |
|---|---|
void |
addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that responds to configuration changes. |
void |
addValidationError(String validation_error)
Adds a validation error to the list of errors. |
void |
addValidationWarning(String validation_warning)
Adds a validation warning to the list of warnings. |
void |
clearValidationErrors()
Clears the list of validation errors. |
void |
clearValidationWarnings()
Clears the list of validation warnings. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
protected void |
fireDataChanged()
Enables filters to inform listeners of data changed event. |
Color |
getColor()
Returns the Color that should be used to display
the name. |
String |
getConfigurationDetails()
Method returns a String detailing
the user selections on the filter. |
GUIConfigurable |
getGUIConfigurableForValidationFailure()
Returns the GUIConfigurable whose tab should next be displayed
to allow the user to correct an error or warning. |
JPanel |
getHelpPanel()
Returns a JPanel that will be displayed when the
user selects the corresponding menu item from the Help menu
and will provide the user with detailed instructions on the tab's use. |
String |
getName()
Returns the name. |
JPanel |
getPanel()
Returns a JPanel containing configuration options. |
Properties |
getProperties()
Returns the Properties representing the configuration choices. |
String |
getTabDescription()
Returns the description to be used in conjunction with the panel when presented to the user. |
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()
Indicates whether or not the configuration information has changed. |
void |
removeDataChangeListener(DataChangeListener dcl)
Removes the specified DataChangeListener. |
void |
resetDataChanged()
Sets the data changed flag to false. |
void |
resetToDefaults()
Resets the configuration back to default values. |
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 |
setDataChanged(boolean b)
Sets the value of the data changed flag. |
void |
setPanelSelections()
Updates the view to reflect the data model. |
void |
setProperties(Properties p)
Sets the Properties representing the configuration choices. |
void |
showOptions()
Presents an advanced options GUI to the user. |
boolean |
validate()
Indicates whether or not the validation rules have passed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean data_changed
protected List<DataChangeListener> listeners
protected UserConfiguration user_configuration
protected ApplicationConfiguration default_configuration
| Constructor Detail |
|---|
public AbstractGUIConfigurable()
| Method Detail |
|---|
public void setConfiguration(ApplicationConfiguration c)
setConfiguration in interface Configurablec - ApplicationConfigurationpublic void setConfiguration(UserConfiguration c)
setConfiguration in interface Configurablec - UserConfigurationpublic String getConfigurationDetails()
String detailing
the user selections on the filter. 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 ConfigurableString of data for logpublic Properties getProperties()
Properties representing the configuration choices.
getProperties in interface ConfigurableProperties representing the configuration choicespublic void setProperties(Properties p)
Properties representing the configuration choices.
setProperties in interface Configurablep - the Properties representing the configuration choicespublic void resetToDefaults()
setPanelSelections to actually update the GUI.
resetToDefaults in interface Configurablepublic JPanel getPanel()
JPanel containing configuration options.
getPanel in interface GUIConfigurableJPanel containing configuration optionspublic boolean hasDataChanged()
hasDataChanged in interface GUIConfigurabletrue if data has changed;
false otherwisepublic void setDataChanged(boolean b)
setDataChanged in interface GUIConfigurableb - the boolean value for the data changed flagpublic void resetDataChanged()
false.
resetDataChanged in interface GUIConfigurablepublic void addDataChangeListener(DataChangeListener dcl)
DataChangeListener that responds to configuration changes.
Allows main GUI to record all changes to
this gui in the undo/redo mechanism.
addDataChangeListener in interface GUIConfigurabledcl - the DataChangeListener to addpublic void removeDataChangeListener(DataChangeListener dcl)
DataChangeListener.
removeDataChangeListener in interface GUIConfigurabledcl - the DataChangeListener to removeprotected void fireDataChanged()
public Color getColor()
Color that should be used to display
the name.
getColor in interface GUIConfigurableColor that should be used to display the name.public String getName()
getName in interface GUIConfigurablepublic String getTabDescription()
getTabDescription in interface GUIConfigurablepublic void showOptions()
showOptions in interface GUIConfigurablepublic boolean hasAdvancedOptions()
hasAdvancedOptions in interface GUIConfigurabletrue if so; false otherwisepublic JPanel getHelpPanel()
JPanel that will be displayed when the
user selects the corresponding menu item from the Help menu
and will provide the user with detailed instructions on the tab's use.
getHelpPanel in interface GUIConfigurableJPanel to be used when showing user helppublic void setPanelSelections()
setPanelSelections in interface GUIConfigurablepublic boolean validate()
validate in interface GUIConfigurablebooleantrue if so;
false otherwisepublic void addValidationError(String validation_error)
validation_error - Stringpublic void clearValidationErrors()
public String[] getValidationErrors()
validate() returns false.
getValidationErrors in interface GUIConfigurablepublic String[] getValidationWarnings()
getValidationWarnings in interface GUIConfigurablepublic void addValidationWarning(String validation_warning)
validation_warning - Stringpublic void clearValidationWarnings()
public GUIConfigurable getGUIConfigurableForValidationFailure()
GUIConfigurable whose tab should next be displayed
to allow the user to correct an error or warning.
getGUIConfigurableForValidationFailure in interface GUIConfigurablepublic 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||