Changeset 10016
- Timestamp:
- 2005-06-07T11:21:55+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r10011 r10016 342 342 tab_pane.setFont(Configuration.getFont("general.font", false)); 343 343 344 if (Configuration.get("workflow.download", true)) {344 if (Configuration.get("workflow.download", true)) { 345 345 download_pane = new DownloadPane(); 346 346 // "GUI.Download_Tooltip" is used automatically … … 351 351 gather_pane = new GatherPane(collection_tree_sync); 352 352 gather_pane.display(); 353 if (Configuration.get("workflow.gather", true)) {353 if (Configuration.get("workflow.gather", true)) { 354 354 // "GUI.Gather_Tooltip" is used automatically 355 355 tab_pane.addTab("GUI.Gather", JarTools.getImage("gather.gif"), gather_pane); … … 359 359 enrich_pane = new EnrichPane(collection_tree_sync); 360 360 enrich_pane.display(); 361 if (Configuration.get("workflow.enrich", true)) {361 if (Configuration.get("workflow.enrich", true)) { 362 362 // "GUI.Enrich_Tooltip" is used automatically 363 363 tab_pane.addTab("GUI.Enrich", JarTools.getImage("enrich.gif"), enrich_pane); … … 367 367 design_pane = new DesignPane(); 368 368 design_pane.display(); 369 if (Configuration.get("workflow.design", true)) {369 if (Configuration.get("workflow.design", true)) { 370 370 // "GUI.Design_Tooltip" is used automatically 371 371 tab_pane.addTab("GUI.Design", JarTools.getImage("design.gif"), design_pane); … … 375 375 create_pane = new CreatePane(); 376 376 create_pane.display(); 377 if (Configuration.get("workflow.create", true)) {377 if (Configuration.get("workflow.create", true)) { 378 378 // "GUI.Create_Tooltip" is used automatically 379 379 tab_pane.addTab("GUI.Create", JarTools.getImage("create.gif"), create_pane); … … 382 382 383 383 // Select the collect pane if it is available 384 if (Configuration.get("workflow.gather", false)) {384 if (tab_pane.indexOfComponent(gather_pane) != -1) { 385 385 tab_pane.setSelectedComponent(gather_pane); 386 386 } 387 387 // Otherwise find the first tab that is enabled and select that. 388 388 else { 389 boolean found = false; 390 for(int i = 0; !found && i < tab_pane.getTabCount(); i++) { 391 if(tab_pane.isEnabledAt(i)) { 389 for (int i = 0; i < tab_pane.getTabCount(); i++) { 390 if (tab_pane.isEnabledAt(i)) { 392 391 tab_pane.setSelectedIndex(i); 393 found = true;392 break; 394 393 } 395 394 } … … 452 451 /** This method is called when the collection is being built, and is used to disable all controls in all pane which could change the state of the collection. 453 452 */ 454 public void lockCollection(boolean import_stage, boolean lock) { 453 public void lockCollection(boolean import_stage, boolean lock) 454 { 455 455 locked = lock; 456 456 457 if (import_stage) { 457 458 int gather_pos = tab_pane.indexOfComponent(gather_pane); 459 if (gather_pos != -1) { 460 tab_pane.setEnabledAt(gather_pos, !lock); 461 } 458 462 int enrich_pos = tab_pane.indexOfComponent(enrich_pane); 459 int design_pos = tab_pane.indexOfComponent(design_pane); 460 tab_pane.setEnabledAt(gather_pos, !lock); 461 tab_pane.setEnabledAt(enrich_pos, !lock); 463 if (enrich_pos != -1) { 464 tab_pane.setEnabledAt(enrich_pos, !lock); 465 } 466 } 467 468 int design_pos = tab_pane.indexOfComponent(design_pane); 469 if (design_pos != -1) { 462 470 tab_pane.setEnabledAt(design_pos, !lock); 463 471 } 464 else { 465 int design_pos = tab_pane.indexOfComponent(design_pane); 466 tab_pane.setEnabledAt(design_pos, !lock); 467 } 468 } 472 } 473 469 474 470 475 public void modeChanged(int mode) {
Note:
See TracChangeset
for help on using the changeset viewer.