Changeset 36140


Ignore:
Timestamp:
2022-04-12T12:15:46+12:00 (2 years ago)
Author:
kjdon
Message:

made the stemming controls be selected and enabled appropriately for solr. Also, starting work on adding sort and facets, so have adjusted the options layout

File:
1 edited

Legend:

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

    r28216 r36140  
    144144        setLayout(new BorderLayout());
    145145        //if (!build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
    146         add(stem_control, BorderLayout.NORTH);
     146        add(stem_control, BorderLayout.EAST);
    147147        //}
    148148        if (!build_type.equals(BuildTypeManager.BUILD_TYPE_MG)) {
    149         add(level_control, BorderLayout.CENTER);
     149        add(level_control, BorderLayout.WEST);
    150150        }
    151151    }
     
    176176        if (build_type.equals(BuildTypeManager.BUILD_TYPE_MG)) {
    177177        // changing from MG
    178         add(level_control, BorderLayout.CENTER);
     178        add(level_control, BorderLayout.WEST);
    179179        }
    180180        else if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_MG)) {
     
    225225           
    226226        JPanel checkbox_panel = new JPanel();
    227         checkbox_panel.setLayout(new GridLayout(2, 1));
     227        checkbox_panel.setLayout(new GridLayout(1, 1));
    228228        checkbox_panel.setComponentOrientation(Dictionary.getOrientation());
    229            
     229            // todo, remove one of these panels
    230230        JPanel stem_panel = new JPanel();
    231         stem_panel.setLayout(new GridLayout(1,3));
     231        stem_panel.setLayout(new GridLayout(4,1));
    232232        stem_panel.add(stem_checkbox);
    233233        stem_panel.add(casefold_checkbox);
    234234        stem_panel.add(accentfold_checkbox);
     235        stem_panel.add(separate_cjk_checkbox);
    235236        stem_panel.setComponentOrientation(Dictionary.getOrientation());
    236237           
    237         JPanel other_panel = new JPanel();
    238         other_panel.setLayout(new GridLayout(1,1));
    239         other_panel.add(separate_cjk_checkbox);
    240             other_panel.setComponentOrientation(Dictionary.getOrientation());                   
     238        // JPanel other_panel = new JPanel();
     239        // other_panel.setLayout(new GridLayout(1,1));
     240        // other_panel.add(separate_cjk_checkbox);
     241            // other_panel.setComponentOrientation(Dictionary.getOrientation());   
     242       
    241243           
    242244        checkbox_panel.add(stem_panel);
    243         checkbox_panel.add(other_panel);
     245        //checkbox_panel.add(other_panel);
    244246           
    245247            JLabel tmp = new JLabel(Dictionary.get("CDM.IndexingManager.Options"));
    246248            tmp.setComponentOrientation(Dictionary.getOrientation());
    247         add(tmp, BorderLayout.LINE_START);
     249        add(tmp, BorderLayout.NORTH);
    248250        add(checkbox_panel, BorderLayout.CENTER);
    249251
    250252        // set the defaults
    251         if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
     253        if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)|| build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)) {
    252254        stem_checkbox.setSelected(false);
    253255        stem_checkbox.setEnabled(false);
     
    304306        accentfold_checkbox.setSelected(true);
    305307        options_model.addOption(StaticStrings.ACCENTFOLD_OPTION_STR);
    306         if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
    307             // was lucene
     308        if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE) || build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)) {
     309            // was lucene/solr
    308310            stem_checkbox.setEnabled(true);
    309311            stem_checkbox.setSelected(true);
     
    320322        options_model.removeOption(StaticStrings.ACCENTFOLD_OPTION_STR);
    321323   
    322         if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
     324        if (build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE) || build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)) {
    323325            // was lucene
    324326            stem_checkbox.setEnabled(true);
     
    331333       
    332334        }
    333         if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
     335        if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE) || new_build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)) {
    334336        accentfold_checkbox.setSelected(true);
    335337        accentfold_checkbox.setEnabled(false);
Note: See TracChangeset for help on using the changeset viewer.