Ignore:
Timestamp:
2005-02-23T15:20:11+13:00 (19 years ago)
Author:
kjdon
Message:

now sort the options in a drop down box

File:
1 edited

Legend:

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

    r9151 r9159  
    8787        HashMap arg_list = argument.getOptions();
    8888        Iterator it = arg_list.keySet().iterator();
     89        ArrayList options = new ArrayList();
    8990        while (it.hasNext()) {
    90             combobox.addItem((String) it.next());
    91         }
    92 
     91            options.add((String) it.next());
     92        }
     93        Collections.sort(options);
     94        for (int i=0; i<options.size(); i++) {
     95            combobox.addItem(options.get(i));
     96        }
    9397        // Connect this so if a value is selected the tooltip updates accordingly
    9498        combobox.addActionListener(new ToolTipUpdater(arg_list));
Note: See TracChangeset for help on using the changeset viewer.