Changeset 11890


Ignore:
Timestamp:
2006-05-30T16:18:55+12:00 (18 years ago)
Author:
shaoqun
Message:

added code to make add_button distabled properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r11502 r11890  
    557557            // You can never add anything to blank-blank
    558558            if(f.toString().length() == 0 && pname.length() == 0) {
    559             add_button.setEnabled(false);
     559                        add_button.setEnabled(false);
    560560            replace_button.setEnabled(false);
    561561            remove_button.setEnabled(false);
    562562            }
    563563            else {
     564                   
    564565               Format format = getFormat(Format.generateName(f, pname));
    565566               // If there is an existing feature, select it, and use it to determine what controls are visible
     
    587588                control_pane.updateUI();
    588589                remove_button.setEnabled(true);
     590                            add_button.setEnabled(false);
    589591               }
    590592               // Otherwise there is no existing format, so we proceed by checking against the feature name
    591593            else {
    592                ///ystem.err.println("No existing format");
     594                 ///ystem.err.println("No existing format");
    593595                format_list.clearSelection();
    594596                if(Format.isParamType(name)) {
Note: See TracChangeset for help on using the changeset viewer.