- Timestamp:
- 2003-12-08T14:19:24+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r6051 r6145 68 68 import org.greenstone.gatherer.gui.OpenCollectionDialog; 69 69 import org.greenstone.gatherer.gui.Preferences; 70 import org.greenstone.gatherer.gui.PreviewPane;70 //import org.greenstone.gatherer.gui.PreviewPane; 71 71 import org.greenstone.gatherer.gui.SimpleOpenCollectionDialog; 72 72 import org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame; … … 77 77 import org.greenstone.gatherer.msm.Metadata; 78 78 import org.greenstone.gatherer.shell.GShell; 79 import org.greenstone.gatherer.util.StaticStrings; 79 80 import org.greenstone.gatherer.util.TreeSynchronizer; 80 81 import org.greenstone.gatherer.util.Utility; … … 105 106 public MirrorPane mirror_pane = null; 106 107 /** The preview pane contains a preview of your build collection. */ 107 public PreviewPane preview_pane = null;108 //public PreviewPane preview_pane = null; 108 109 /** Are certain panes currently locked? */ 109 110 private boolean locked = false; … … 374 375 SwingUtilities.invokeLater(tab_updater); 375 376 } 376 // Finally display the collection name in the title bar. 377 // Set the title 378 String collection_title = null; 379 String collection_name = null; 377 380 if (ready) { 378 this.setTitle(Utility.PROGRAM_NAME + ":\"" + Gatherer.c_man.getCollection().getTitle() + "\""); 379 } 380 else { 381 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary.get("Collection.No_Collection")); 382 } 381 Collection collection = Gatherer.c_man.getCollection(); 382 collection_title = collection.getTitle(); 383 collection_name = collection.getName(); 384 collection = null; 385 } 386 setTitle(collection_title, collection_name); 387 collection_title = null; 388 collection_name = null; 383 389 // Now is a good time to force a garbage collect. 384 390 ///ystem.err.println("Calling garbage collection."); … … 395 401 try { 396 402 this.setSize(size); 397 if(Gatherer.c_man.ready()) { 398 this.setTitle(Utility.PROGRAM_NAME + ":\"" + Gatherer.c_man.getCollection().getTitle() + "\""); 399 } 400 else { 401 this.setTitle(Utility.PROGRAM_NAME + ": " + Dictionary.get("Collection.No_Collection")); 402 } 403 404 // Set the title 405 String collection_title = null; 406 String collection_name = null; 407 if (Gatherer.c_man.ready()) { 408 Collection collection = Gatherer.c_man.getCollection(); 409 collection_title = collection.getTitle(); 410 collection_name = collection.getName(); 411 collection = null; 412 } 413 setTitle(collection_title, collection_name); 414 collection_title = null; 415 collection_name = null; 416 403 417 // Pretty corner icon 404 418 this.setIconImage(Utility.getImage("gatherer_small.gif").getImage()); … … 461 475 } 462 476 463 preview_pane = new PreviewPane();464 preview_pane.display();465 if(Gatherer.config.get("workflow.preview", true)) {466 467 468 }477 //preview_pane = new PreviewPane(); 478 //preview_pane.display(); 479 //if(Gatherer.config.get("workflow.preview", true)) { 480 //tab_pane.addTab("GUI.Preview", Utility.getImage("final.gif"), preview_pane); 481 //tab_pane.setEnabledAt(tab_pane.indexOfComponent(preview_pane), false); 482 //} 469 483 470 484 // Find the first tab that is enabled and select that. … … 559 573 // Some tabs are also dependant on if a collection is ready 560 574 Component component = tab_pane.getComponentAt(index); 561 if(component == preview_pane) { 562 tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready() && Gatherer.c_man.built()); 563 } 564 else if(component == metaedit_pane || component == config_pane || component == export_pane || component == create_pane) { 575 //if(component == preview_pane) { 576 //tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready() && Gatherer.c_man.built()); 577 //} 578 //else 579 if(component == metaedit_pane || component == config_pane || component == export_pane || component == create_pane) { 565 580 tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready()); 566 581 } … … 587 602 collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED); 588 603 } 604 } 605 606 /** Change the string shown in the title bar of the main gui frame. If either value is null, the 'No Collection' string is shown instead. 607 * @param title 608 * @param name 609 */ 610 public void setTitle(String title, String name) { 611 // Finally display the collection name in the title bar. 612 StringBuffer title_buffer = new StringBuffer(Utility.PROGRAM_NAME); 613 title_buffer.append(StaticStrings.COLON_CHARACTER); 614 title_buffer.append(StaticStrings.SPACE_CHARACTER); 615 if (title != null && name != null) { 616 title_buffer.append(title); 617 title_buffer.append(StaticStrings.SPACE_CHARACTER); 618 title_buffer.append(StaticStrings.OPEN_PARENTHESIS_CHARACTER); 619 title_buffer.append(name); 620 title_buffer.append(StaticStrings.CLOSE_PARENTHESIS_CHARACTER); 621 } 622 else { 623 title_buffer.append(Dictionary.get("Collection.No_Collection")); 624 } 625 this.setTitle(title_buffer.toString()); 626 title_buffer = null; 589 627 } 590 628 … … 796 834 create_pane.gainFocus(); 797 835 } 798 else if(tab_pane.getSelectedIndex() == tab_pane.indexOfComponent(preview_pane)) {799 800 801 }836 //else if(tab_pane.getSelectedIndex() == tab_pane.indexOfComponent(preview_pane)) { 837 //config_pane.saveConfiguration(); 838 //preview_pane.gainFocus(); 839 //} 802 840 803 841 previous_pane = (JPanel) tab_pane.getSelectedComponent();
Note:
See TracChangeset
for help on using the changeset viewer.