Changeset 12089 for trunk/gli


Ignore:
Timestamp:
2006-07-07T13:07:19+12:00 (18 years ago)
Author:
kjdon
Message:

some dictionary key changes, some other stuff

File:
1 edited

Legend:

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

    r11993 r12089  
    2727package org.greenstone.gatherer.cdm;
    2828
    29 
    3029import java.awt.*;
    3130import java.awt.event.*;
     
    7372    static final private String DOCUMENTBUTTONS = "DocumentButtons";
    7473    static final private String DOCUMENTBUTTONS_DEFAULT_FORMAT = "Detach|Highlight";
     74    static final private String SEARCHTYPES = "SearchTypes";
     75    static final private String SEARCHTYPES_DEFAULT_FORMAT = "plain,form";
     76
    7577    static private  HashMap format_map = null ;     
    7678
     
    129131   
    130132
    131       if (getFormat(DOCUMENTBUTTONS) == null) {
     133    if (getFormat(DOCUMENTBUTTONS) == null) {
    132134        addFormat(new Format(DOCUMENTBUTTONS,"",DOCUMENTBUTTONS_DEFAULT_FORMAT));
    133     }
    134      
     135       
     136    }
     137   
     138    // only for mgpp and lucene colls - change!
     139    if (getFormat(SEARCHTYPES)==null) {
     140        addFormat(new Format(SEARCHTYPES, "", SEARCHTYPES_DEFAULT_FORMAT));
     141    }
     142   
    135143    }
    136144
     
    187195    return controls;
    188196    }
     197
     198    /** Called when the detail mode has changed which in turn may cause several design elements to be available/hidden
     199     * @param mode the new mode as an int
     200     */
     201    public void modeChanged(int mode) {
     202
     203    }
     204
    189205
    190206    /** updates the format model */
     
    257273    }
    258274
    259     private class FormatControl
     275    public class FormatControl
    260276    extends JPanel
    261277    implements Control{
     
    512528    }
    513529
    514 
    515    
     530    public Format getCurrentFormat() {
     531        return (Format)format_list.getSelectedValue();
     532       
     533    }
     534
    516535    /** Listens for clicks on the add button, and if the relevant details are provided adds a new format. Note that formats are responsible for codecing the values into something that can be a) stored in a DOM and b) written to file */
    517536    private class AddListener
     
    814833        editor_textarea.setEditable(false);
    815834        editor_textarea.setBackground(Color.lightGray);
    816         Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Add_Tooltip");
     835        Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Editor_Disabled_Tooltip");
    817836
    818837        enabled_checkbox.setEnabled(false);
     
    829848        editor_textarea.setEditable(true);
    830849        editor_textarea.setBackground(Color.white);
    831         Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Edit_Tooltip");
     850        Dictionary.registerTooltip(editor_textarea, "CDM.FormatManager.Editor_Tooltip");
    832851        enabled_checkbox.setEnabled(true);
    833852            variable_combobox.setEnabled(true); 
Note: See TracChangeset for help on using the changeset viewer.