Changeset 9152


Ignore:
Timestamp:
2005-02-23T14:08:33+13:00 (19 years ago)
Author:
kjdon
Message:

some of the functionality in the MyArgumentControl class is now in the base class, so use this instead of repeating code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java

    r9139 r9152  
    388388    }
    389389
    390     /** Update the values stored in the collection so as to rememebr the current state of this argument. */
     390    /** Update the values stored in the collection so as to remember the current state of this argument. */
    391391    public void update() {
    392         String name = argument.getName();
    393         boolean enable = true;
    394         if(enabled != null) {
    395         enable = enabled.isSelected();
    396         }
    397         String value = null;
    398         if(value_control == null) {
    399         // Flag value, nothing to do.
    400         }
    401         else if(value_control instanceof JTextField) {
    402         value = ((JTextField)value_control).getText();
    403         }
    404         else if(value_control instanceof JSpinner) {
    405         value = ((JSpinner)value_control).getValue().toString();
    406         }
    407         else if(value_control instanceof JComboBox) {
    408         value = (((JComboBox)value_control).getSelectedItem()).toString();
    409         }
     392        String name = getName();
     393        boolean enable = isEnabled();
     394        String value = getValue();
    410395        // If this argument was a flag, but is now disabled, remove from the build options altogether
    411396        if(!enable && value == null) {
Note: See TracChangeset for help on using the changeset viewer.