Changeset 13049


Ignore:
Timestamp:
2006-10-09T10:22:22+13:00 (18 years ago)
Author:
shaoqun
Message:

added a default selected feature

File:
1 edited

Legend:

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

    r12808 r13049  
    205205        JPanel component_selection_panel = new JPanel();
    206206        JLabel component_label = new JLabel(Dictionary.get("CDM.TranslationManager.Affected_Features"));
    207         features_list = new JList(getFeaturesList());
     207
     208
     209        Object[] features = getFeaturesList();
     210        features_list = new JList(features);
    208211        features_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     212            if (features != null && features.length >0){
     213        features_list.setSelectedIndex(0);
     214        }
    209215
    210216        JPanel fragment_selection_panel = new JPanel();
     
    652658        implements ActionListener {
    653659        public void actionPerformed(ActionEvent event) {
    654         if(!ignore_event) {
     660        if(!ignore_event && features_list.getSelectedIndex()>-1) {
    655661            ignore_event = true;
    656662            ///ystem.err.println("LanguageActionListener");
Note: See TracChangeset for help on using the changeset viewer.