- Timestamp:
- 2009-01-12T13:04:29+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/gui/WriteCDImagePrompt.java
r14045 r18370 118 118 public WriteCDImagePrompt() { 119 119 super(Gatherer.g_man, true); 120 this.setComponentOrientation(Dictionary.getOrientation()); 120 121 cancel_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip")); 121 122 122 123 details_textarea = new JTextArea(Dictionary.get("DeleteCollectionPrompt.No_Collection")); 123 details_textarea.setEditable(false); 124 details_textarea.setComponentOrientation(Dictionary.getOrientation()); 125 details_textarea.setEditable(false); 124 126 125 127 details_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_Details")); 126 128 details_label.setComponentOrientation(Dictionary.getOrientation()); 129 127 130 instructions_textarea = new JTextArea(Dictionary.get("WriteCDImagePrompt.Instructions")); 131 instructions_textarea.setComponentOrientation(Dictionary.getOrientation()); 128 132 instructions_textarea.setCaretPosition(0); 129 133 instructions_textarea.setEditable(false); … … 135 139 list = new CheckList(true); 136 140 list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List")); 137 138 ok_button = new GLIButton(Dictionary.get("WriteCDImagePrompt.Export"), Dictionary.get("WriteCDImagePrompt.Export_Tooltip")); 139 141 list_label.setComponentOrientation(Dictionary.getOrientation()); 142 143 ok_button = new GLIButton(Dictionary.get("WriteCDImagePrompt.Export"), Dictionary.get("WriteCDImagePrompt.Export_Tooltip")); 144 140 145 title_field = new JTextField(); 146 title_field.setComponentOrientation(Dictionary.getOrientation()); 141 147 // Dictionary.setTooltip(title_field, "WriteCDImagePrompt.CD_Name_Tooltip"); 142 148 title_label = new JLabel(Dictionary.get("WriteCDImagePrompt.CD_Name")); 143 149 title_label.setComponentOrientation(Dictionary.getOrientation()); 144 150 145 151 estimated_size_field = new JTextField(); 152 estimated_size_field.setComponentOrientation(Dictionary.getOrientation()); 146 153 estimated_size_field.setEditable(false); 147 154 … … 152 159 estimated_size_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 153 160 estimated_size_label = new JLabel(Dictionary.get("WriteCDImagePrompt.Size_Label")); 154 161 estimated_size_label.setComponentOrientation(Dictionary.getOrientation()); 162 155 163 scanForCollections(); 156 list.setListData(all_collections); 164 list.setListData(all_collections); 157 165 158 166 prompt = this; … … 172 180 noinstall_button = new JRadioButton(Dictionary.get("WriteCDImagePrompt.NoInstall")); 173 181 noinstall_button.setToolTipText(Dictionary.get("WriteCDImagePrompt.NoInstall_Tooltip")); 174 182 noinstall_button.setComponentOrientation(Dictionary.getOrientation()); 175 183 176 184 install_button = new JRadioButton(Dictionary.get("WriteCDImagePrompt.Install")); 177 185 install_button.setToolTipText(Dictionary.get("WriteCDImagePrompt.Install_Tooltip")); 178 179 180 186 install_button.setComponentOrientation(Dictionary.getOrientation()); 187 181 188 } 182 189 … … 203 210 public boolean display() { 204 211 212 JScrollPane scrol_tmp; 205 213 // Radio buttons 206 ButtonGroup radio_group = new ButtonGroup(); 214 ButtonGroup radio_group = new ButtonGroup(); 207 215 radio_group.add(install_button); 208 216 install_button.setSelected(true); … … 211 219 // Top pane 212 220 JPanel instructions_pane = new JPanel(new BorderLayout()); 221 instructions_pane.setComponentOrientation(Dictionary.getOrientation()); 213 222 instructions_pane.setBorder(BorderFactory.createEmptyBorder(5,5,0,5)); 214 instructions_pane.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER); 223 scrol_tmp = new JScrollPane(instructions_textarea); 224 scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 225 instructions_pane.add(scrol_tmp, BorderLayout.CENTER); 215 226 216 227 title_label.setBorder(BorderFactory.createEmptyBorder(0,5,0,15)); 217 228 218 229 JPanel title_pane = new JPanel(new BorderLayout()); 219 title_pane.add(title_label, BorderLayout.WEST); 230 title_pane.setComponentOrientation(Dictionary.getOrientation()); 231 title_pane.add(title_label, BorderLayout.LINE_START); 220 232 title_pane.add(title_field, BorderLayout.CENTER); 221 233 title_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); 222 234 223 235 JPanel radio_pane = new JPanel(new GridLayout(2,1)); 236 radio_pane.setComponentOrientation(Dictionary.getOrientation()); 224 237 install_button.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 225 238 noinstall_button.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 226 239 radio_pane.add(install_button); 227 radio_pane.add(noinstall_button); 228 229 240 radio_pane.add(noinstall_button); 241 230 242 JPanel options_pane = new JPanel(new BorderLayout()); 243 options_pane.setComponentOrientation(Dictionary.getOrientation()); 231 244 options_pane.add(title_pane, BorderLayout.NORTH); 232 245 options_pane.add(radio_pane, BorderLayout.CENTER); … … 235 248 // Central pane 236 249 JPanel list_pane = new JPanel(new BorderLayout()); 250 list_pane.setComponentOrientation(Dictionary.getOrientation()); 237 251 list_pane.add(list_label, BorderLayout.NORTH); 238 list_pane.add(new JScrollPane(list), BorderLayout.CENTER); 252 scrol_tmp =new JScrollPane(list); 253 scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 254 list_pane.add(scrol_tmp, BorderLayout.CENTER); 239 255 list_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 240 256 241 257 JPanel details_pane = new JPanel(new BorderLayout()); 242 258 details_pane.add(details_label, BorderLayout.NORTH); 243 details_pane.add(new JScrollPane(details_textarea), BorderLayout.CENTER); 259 scrol_tmp =new JScrollPane(details_textarea); 260 scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 261 details_pane.add(scrol_tmp, BorderLayout.CENTER); 244 262 details_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 245 263 246 264 JPanel central_pane = new JPanel(new GridLayout(2, 1)); 265 central_pane.setComponentOrientation(Dictionary.getOrientation()); 247 266 central_pane.add(list_pane); 248 267 central_pane.add(details_pane); … … 251 270 // Lower pane 252 271 JPanel estimated_size_pane = new JPanel(new BorderLayout()); 253 estimated_size_pane.add(estimated_size_label, BorderLayout.WEST); 272 estimated_size_pane.setComponentOrientation(Dictionary.getOrientation()); 273 estimated_size_pane.add(estimated_size_label, BorderLayout.LINE_START); 254 274 estimated_size_pane.add(estimated_size_field, BorderLayout.CENTER); 255 275 estimated_size_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 256 276 257 277 JPanel button_pane = new JPanel(new GridLayout(1, 2)); 278 button_pane.setComponentOrientation(Dictionary.getOrientation()); 258 279 button_pane.add(ok_button); 259 280 button_pane.add(cancel_button); 260 281 button_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 261 282 262 283 JPanel lower_pane = new JPanel(new BorderLayout()); 284 lower_pane.setComponentOrientation(Dictionary.getOrientation()); 263 285 lower_pane.add(estimated_size_pane, BorderLayout.NORTH); 264 286 lower_pane.add(button_pane, BorderLayout.SOUTH); … … 267 289 // Final. 268 290 JPanel content_pane = (JPanel)this.getContentPane(); 291 content_pane.setComponentOrientation(Dictionary.getOrientation()); 269 292 content_pane.setLayout(new BorderLayout()); 270 293 content_pane.add(instructions_pane, BorderLayout.NORTH); 271 294 content_pane.add(central_pane, BorderLayout.CENTER); 272 295 content_pane.add(lower_pane, BorderLayout.SOUTH); 273 296 274 297 // Center and display. 275 298 Dimension screen_size = Configuration.screen_size; … … 600 623 public ProgressDialog() { 601 624 super(Gatherer.g_man, Dictionary.get("WriteCDImagePrompt.Title"), true); 625 this.setComponentOrientation(Dictionary.getOrientation()); 602 626 setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); 603 627 setSize(size); 604 628 JPanel content_pane = (JPanel) getContentPane(); 629 content_pane.setComponentOrientation(Dictionary.getOrientation()); 605 630 JLabel progress_label = new JLabel(Dictionary.get("WriteCDImagePrompt.Progress_Label")); 606 631 progress_label.setComponentOrientation(Dictionary.getOrientation()); 632 607 633 JProgressBar progress_bar = new JProgressBar(); 634 progress_bar.setComponentOrientation(Dictionary.getOrientation()); 608 635 progress_bar.setIndeterminate(true); 609 636 content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
Note:
See TracChangeset
for help on using the changeset viewer.