Changeset 12120
- Timestamp:
- 2006-07-10T14:57:57+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java
r11877 r12120 68 68 /** The central pane where a list of known arguments is displayed. */ 69 69 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;74 70 /** The name of the owner of the last argument control. */ 75 71 private String previous_owner = null; … … 94 90 setSize(SIZE); 95 91 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")); 97 93 98 94 central_pane = new JPanel(); 99 95 JPanel content_pane = (JPanel) getContentPane(); 100 96 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 113 97 JPanel header_pane = new JPanel(); 114 JLabel header = new JLabel( );98 JLabel header = new JLabel(Dictionary.get("CDM.ArgumentConfiguration.Header", data.getName())); 115 99 header.setHorizontalAlignment(JLabel.CENTER); 116 100 header.setOpaque(true); 117 String args[] = new String[1]; 118 args[0] = data.getName(); 119 Dictionary.setText(header, "CDM.ArgumentConfiguration.Header", args); 120 101 121 102 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 129 107 // Listeners 130 108 cancel.addActionListener(this); 131 109 ok.addActionListener(this); 132 110 ok.addActionListener(CollectionDesignManager.all_change_listener); 133 134 // Layout135 // custom_pane.setLayout(new BorderLayout());136 // custom_pane.add(custom_label, BorderLayout.WEST);137 // custom_pane.add(custom, BorderLayout.CENTER);138 111 139 112 button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); … … 169 142 if (event.getSource() == ok) { 170 143 // 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());174 144 // Loop through each of the controls in the central pane, updating the matching argument as necessary. 175 145 for(int i = 0; i < central_pane.getComponentCount(); i++) { … … 243 213 } 244 214 } 245 // now add in the custom args bit246 // 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);251 215 if(total_height > 0) { 252 216 JPanel filler = new JPanel();
Note:
See TracChangeset
for help on using the changeset viewer.