Changeset 12120


Ignore:
Timestamp:
2006-07-10T14:57:57+12:00 (18 years ago)
Author:
kjdon
Message:

Changed text handling to use Dictionary.get rather than Dictionary.setText or Dictionary.registerBoth etc. also removed mnemonics cos they suck for other languages. removed commented out custom args code

File:
1 edited

Legend:

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

    r11877 r12120  
    6868    /** The central pane where a list of known arguments is displayed. */
    6969    private JPanel central_pane = null;
    70     /** The field for entering custom arguments. */
    71     //private JTextField custom = null;
    72     /** The panel for the custom arguments */
    73     //private JPanel custom_pane = null;
    7470    /** The name of the owner of the last argument control. */
    7571    private String previous_owner = null;
     
    9490    setSize(SIZE);
    9591    setJMenuBar(new SimpleMenuBar("designingacollection")); // can we tell whether we are doing a classifier or plugin, to make the help more specific??
    96     Dictionary.setText(this, "CDM.ArgumentConfiguration.Title");
     92    setTitle(Dictionary.get("CDM.ArgumentConfiguration.Title"));
    9793
    9894    central_pane = new JPanel();
    9995    JPanel content_pane = (JPanel) getContentPane();
    10096
    101 //  custom_pane = new JPanel();
    102 //  String custom_str = data.getCustom();
    103 //  if (custom_str != null) {
    104 //      custom = new JTextField(custom_str);
    105 //  }
    106 //  else {
    107 //      custom = new JTextField();
    108 //  }
    109 //  JLabel custom_label = new JLabel();
    110 //  custom_label.setPreferredSize(LABEL_SIZE);
    111 //  Dictionary.setText(custom_label, "CDM.ArgumentConfiguration.Custom");
    112 
    11397    JPanel header_pane = new JPanel();
    114     JLabel header = new JLabel();
     98    JLabel header = new JLabel(Dictionary.get("CDM.ArgumentConfiguration.Header", data.getName()));
    11599    header.setHorizontalAlignment(JLabel.CENTER);
    116100    header.setOpaque(true);
    117     String args[] = new String[1];
    118     args[0] = data.getName();
    119     Dictionary.setText(header, "CDM.ArgumentConfiguration.Header", args);
    120 
     101   
    121102    JPanel button_pane = new JPanel();
    122     cancel = new GLIButton();
    123     cancel.setMnemonic(KeyEvent.VK_C);
    124     Dictionary.setBoth(cancel, "General.Cancel", "General.Pure_Cancel_Tooltip");
    125     ok = new GLIButton();
    126     ok.setMnemonic(KeyEvent.VK_O);
    127     Dictionary.setBoth(ok, "General.OK", "General.OK_Tooltip");
    128 
     103    cancel = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     104       
     105    ok = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
     106   
    129107    // Listeners
    130108    cancel.addActionListener(this);
    131109    ok.addActionListener(this);
    132110    ok.addActionListener(CollectionDesignManager.all_change_listener);
    133 
    134     // Layout
    135 //  custom_pane.setLayout(new BorderLayout());
    136 //  custom_pane.add(custom_label, BorderLayout.WEST);
    137 //  custom_pane.add(custom, BorderLayout.CENTER);
    138111
    139112    button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
     
    169142    if (event.getSource() == ok) {
    170143        // Clear the current focus to ensure components such as combobox have correctly updated
    171         //custom.requestFocus();
    172         // Update the details stored in the data objects arguments.
    173         //data.setCustom(custom.getText());
    174144        // Loop through each of the controls in the central pane, updating the matching argument as necessary.
    175145        for(int i = 0; i < central_pane.getComponentCount(); i++) {
     
    243213        }
    244214    }
    245     // now add in the custom args bit
    246 //  coloured = !coloured;
    247 //  Color color = (coloured ? Configuration.getColor("coloring.collection_heading_background", false) : Configuration.getColor("coloring.collection_tree_background", false));
    248 //  addHeader(Dictionary.get("CDM.ArgumentConfiguration.Custom_Header"), color);
    249 //  custom_pane.setBackground(color);
    250 //  central_pane.add(custom_pane);
    251215    if(total_height > 0) {
    252216        JPanel filler = new JPanel();
Note: See TracChangeset for help on using the changeset viewer.