Ignore:
Timestamp:
2008-08-31T13:43:29+12:00 (16 years ago)
Author:
kjdon
Message:

added separate_cjk option to index options. added tooltips to all options

File:
1 edited

Legend:

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

    r13468 r17114  
    190190    private JCheckBox casefold_checkbox = new JCheckBox();
    191191    private JCheckBox accentfold_checkbox = new JCheckBox();
    192 
     192    private JCheckBox separate_cjk_checkbox =new JCheckBox();
     193   
    193194    public StemmingControl()
    194195    {
     
    197198       
    198199        stem_checkbox.setText(Dictionary.get("CDM.IndexingManager.Stem"));
     200        stem_checkbox.setToolTipText(Dictionary.get("CDM.IndexingManager.Stem_Tooltip"));
    199201        stem_checkbox.setActionCommand(StaticStrings.STEM_OPTION_STR);
    200202       
    201203        casefold_checkbox.setText(Dictionary.get("CDM.IndexingManager.Casefold"));
     204        casefold_checkbox.setToolTipText(Dictionary.get("CDM.IndexingManager.Casefold_Tooltip"));
    202205        casefold_checkbox.setActionCommand(StaticStrings.CASEFOLD_OPTION_STR);
    203206       
    204207        accentfold_checkbox.setText(Dictionary.get("CDM.IndexingManager.Accent_fold"));
     208        accentfold_checkbox.setToolTipText(Dictionary.get("CDM.IndexingManager.Accent_fold_Tooltip"));
    205209        accentfold_checkbox.setActionCommand(StaticStrings.ACCENTFOLD_OPTION_STR);
    206210        // Accent-folding is currently not available for MG
    207211        accentfold_checkbox.setEnabled(!build_type.equals(BuildTypeManager.BUILD_TYPE_MG));
    208        
     212   
     213        separate_cjk_checkbox.setText(Dictionary.get("CDM.IndexingManager.Separate_cjk"));
     214        separate_cjk_checkbox.setToolTipText(Dictionary.get("CDM.IndexingManager.Separate_cjk_Tooltip"));
     215        separate_cjk_checkbox.setActionCommand(StaticStrings.SEPARATE_CJK_OPTION_STR);
     216
    209217        JPanel checkbox_panel = new JPanel();
    210         checkbox_panel.setLayout(new GridLayout(1, 3));
    211         checkbox_panel.add(stem_checkbox);
    212         checkbox_panel.add(casefold_checkbox);
    213         checkbox_panel.add(accentfold_checkbox);
    214        
     218        checkbox_panel.setLayout(new GridLayout(2, 1));
     219       
     220        JPanel stem_panel = new JPanel();
     221        stem_panel.setLayout(new GridLayout(1,3));
     222        stem_panel.add(stem_checkbox);
     223        stem_panel.add(casefold_checkbox);
     224        stem_panel.add(accentfold_checkbox);
     225       
     226        JPanel other_panel = new JPanel();
     227        other_panel.setLayout(new GridLayout(1,1));
     228        other_panel.add(separate_cjk_checkbox);
     229
     230        checkbox_panel.add(stem_panel);
     231        checkbox_panel.add(other_panel);
     232
    215233        add(new JLabel(Dictionary.get("CDM.IndexingManager.Options")), BorderLayout.WEST);
    216234        add(checkbox_panel, BorderLayout.CENTER);
     
    227245            stem_model.addOption(StaticStrings.ACCENTFOLD_OPTION_STR);
    228246        }
     247        separate_cjk_checkbox.setSelected(false);
    229248        }
    230249        else {
     
    238257            accentfold_checkbox.setSelected(true);
    239258        }
     259        if (stem_model.getOption(StaticStrings.SEPARATE_CJK_OPTION_STR) != null) {
     260            separate_cjk_checkbox.setSelected(true);
     261        }
     262       
    240263       
    241264        }
     
    245268        casefold_checkbox.addActionListener(cbl);
    246269        accentfold_checkbox.addActionListener(cbl);
    247 
     270        separate_cjk_checkbox.addActionListener(cbl);
     271       
    248272        // changing stem indexes changes build settings
    249273        stem_checkbox.addActionListener(CollectionDesignManager.buildcol_change_listener);
    250274        casefold_checkbox.addActionListener(CollectionDesignManager.buildcol_change_listener);
    251275        accentfold_checkbox.addActionListener(CollectionDesignManager.buildcol_change_listener);
    252 
     276        separate_cjk_checkbox.addActionListener(CollectionDesignManager.buildcol_change_listener);
    253277       
    254278    }
     
    258282        if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_MG)) {
    259283        //changing to MG
     284        accentfold_checkbox.setSelected(false);
    260285        accentfold_checkbox.setEnabled(false);
    261286        if (accentfold_checkbox.isSelected()) {
Note: See TracChangeset for help on using the changeset viewer.