- Timestamp:
- 2003-08-29T09:50:08+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GConfigPane.java
r4933 r5340 82 82 } 83 83 public void gainFocus() { 84 cdm.gainFocus(); 84 if(cdm == null && Gatherer.c_man.ready()) { 85 // Retrieve the new config manager. 86 cdm = Gatherer.c_man.getCollection().cdm; 87 // Display it. 88 cdm.display(this); 89 } 90 if(cdm != null) { 91 cdm.gainFocus(); 92 } 85 93 } 86 94 -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r5337 r5340 396 396 this.setTitle(Utility.PROGRAM_NAME + ": " + get("Collection.No_Collection")); 397 397 } 398 398 // Pretty corner icon 399 399 this.setIconImage(Utility.getImage("gatherer_small.gif").getImage()); 400 401 400 // BorderLayout for the main screen. I'll try my best to avoid t 401 // hese in subcomponents as they're space greedy. 402 402 content_pane.setLayout(new BorderLayout()); 403 403 // Create the menu-bar and stick it up the top. 404 404 menu_bar = new MenuBar(new MenuListenerImpl()); 405 405 content_pane.add(menu_bar, BorderLayout.NORTH); 406 407 406 // Create the tabbed pane and plop it in the center where it will 407 // expand to consume all available space like any good gas would. 408 408 tab_pane = new JTabbedPane(); 409 409 tab_pane.addChangeListener(this); 410 410 tab_pane.setFont(Gatherer.config.getFont("general.font", false)); 411 411 412 // May have to play with the order in which tabs are added. 412 // May have to play with the order in which tabs are added. 413 browser_pane = new BrowsingPane(); 413 414 if(Gatherer.config.get("workflow.browse", true)) { 414 browser_pane = new BrowsingPane();415 415 tab_pane.addTab(get("Browser"), Utility.getImage("browsing.gif"), browser_pane); 416 416 tab_pane.setEnabledAt(tab_pane.indexOfComponent(browser_pane), Gatherer.config.get("workflow.browse", false)); 417 417 } 418 418 419 mirror_pane = new MirrorPane(); 419 420 if(Gatherer.config.get("workflow.mirror", true)) { 420 mirror_pane = new MirrorPane();421 421 tab_pane.addTab(get("Mirroring"), Utility.getImage("mirroring.gif"), mirror_pane); 422 422 tab_pane.setEnabledAt(tab_pane.indexOfComponent(mirror_pane), Gatherer.config.get("workflow.mirror", false)); 423 423 } 424 424 425 collection_pane = new CollectionPane(workspace_tree_sync, collection_tree_sync); 426 collection_pane.display(); 425 427 if(Gatherer.config.get("workflow.gather", true)) { 426 collection_pane = new CollectionPane(workspace_tree_sync, collection_tree_sync);427 collection_pane.display();428 428 tab_pane.addTab(get("Collection"), Utility.getImage("collection.gif"), collection_pane); 429 429 tab_pane.setEnabledAt(tab_pane.indexOfComponent(collection_pane), Gatherer.config.get("workflow.gather", false)); 430 430 } 431 431 432 metaedit_pane = new MetaEditPane(collection_tree_sync); 433 metaedit_pane.display(); 432 434 if(Gatherer.config.get("workflow.enrich", true)) { 433 metaedit_pane = new MetaEditPane(collection_tree_sync);434 metaedit_pane.display();435 435 tab_pane.addTab(get("MetaEdit"), Utility.getImage("metaedit.gif"), metaedit_pane); 436 436 tab_pane.setEnabledAt(tab_pane.indexOfComponent(metaedit_pane), false); 437 437 } 438 438 439 config_pane = new GConfigPane(); 440 config_pane.display(); 439 441 if(Gatherer.config.get("workflow.design", true)) { 440 config_pane = new GConfigPane();441 config_pane.display();442 442 tab_pane.addTab(get("Build"), Utility.getImage("build.gif"), config_pane); 443 443 tab_pane.setEnabledAt(tab_pane.indexOfComponent(config_pane), false); … … 449 449 } 450 450 451 create_pane = new CreatePane(); 452 create_pane.display(); 451 453 if(Gatherer.config.get("workflow.create", true)) { 452 create_pane = new CreatePane();453 create_pane.display();454 454 tab_pane.addTab(get("Create"), Utility.getImage("build session.gif"), create_pane); 455 455 tab_pane.setEnabledAt(tab_pane.indexOfComponent(create_pane), false); 456 456 } 457 457 458 preview_pane = new PreviewPane(); 459 preview_pane.display(); 458 460 if(Gatherer.config.get("workflow.preview", true)) { 459 preview_pane = new PreviewPane();460 preview_pane.display();461 461 tab_pane.addTab(get("Preview"), Utility.getImage("final.gif"), preview_pane); 462 462 tab_pane.setEnabledAt(tab_pane.indexOfComponent(preview_pane), false); 463 463 } 464 464 465 465 // Find the first tab that is enabled and select that. 466 466 boolean found = false; 467 467 for(int i = 0; !found && i < tab_pane.getTabCount(); i++) { … … 473 473 474 474 content_pane.add(tab_pane, BorderLayout.CENTER); 475 475 // Drive a sessionReady event to update all controls to reflect current collection status. 476 476 collectionChanged(Gatherer.c_man.ready()); 477 477 } 478 478 catch (Exception e) { 479 479 Gatherer.printStackTrace(e); 480 480 // The GUI failing to build is a app killer 481 481 e.printStackTrace(); 482 482 System.exit(1);
Note:
See TracChangeset
for help on using the changeset viewer.