Changeset 12064
- Timestamp:
- 2006-07-07T11:20:35+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r11992 r12064 74 74 /** The enrich pane is used to assign, edit and remove metadata from files within the collection. */ 75 75 public EnrichPane enrich_pane = null; 76 /** The design pane allows you to edit the design of the library in terms of the collection configuration file. */76 /** The design pane allows you to edit the design of the library in terms of the collection configuration file. - the stuff that requires rebuilding */ 77 77 public DesignPane design_pane = null; 78 78 /** The create pane contains scripting options for importing and building collections into libraries. */ 79 79 public CreatePane create_pane = null; 80 80 /** The format pane allows you to edit the design of the library in terms of the collection configuration file. - the stuff that doesn't require rebuilding */ 81 public FormatPane format_pane = null; 82 81 83 public FileOpenActionListener foa_listener = new FileOpenActionListener(); 82 84 … … 135 137 136 138 137 138 139 public void windowGainedFocus(WindowEvent e) { 140 //System.out.println("JPanel windowGainedFocus."); 139 141 } 140 142 … … 142 144 //System.out.println("JPanel windowLostFocus."); 143 145 144 Gatherer.g_man.design_pane.saveConfiguration(); 146 if (Gatherer.c_man.getCollection()!=null) { 147 Gatherer.c_man.getCollection().cdm.save(); 148 } 149 //Gatherer.g_man.design_pane.saveConfiguration(); 145 150 146 151 } … … 395 400 } 396 401 402 format_pane = new FormatPane(); 403 format_pane.display(); 404 if (Configuration.get("workflow.format", true)) { 405 tab_pane.addTab("GUI.Format", JarTools.getImage("format.gif"), format_pane); 406 tab_pane.setEnabledAt(tab_pane.indexOfComponent(format_pane), false); 407 } 408 397 409 // The MetaAuditFrame must be created after the gather/enrich panes but before they get focus 398 410 meta_audit = new MetaAuditFrame(); … … 520 532 create_pane.modeChanged(mode); 521 533 } 534 if (format_pane != null) { 535 format_pane.modeChanged(mode); 536 } 522 537 } 523 538 … … 552 567 if (create_pane != null) { 553 568 create_pane.refresh(refresh_reason, collection_loaded); 569 } 570 if (format_pane != null) { 571 format_pane.refresh(refresh_reason, collection_loaded); 554 572 } 555 573 … … 601 619 // Some tabs are also dependant on if a collection is ready 602 620 Component component = tab_pane.getComponentAt(index); 603 if(component == enrich_pane || component == design_pane || component == create_pane ) {621 if(component == enrich_pane || component == design_pane || component == create_pane || component == format_pane) { 604 622 tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready()); 605 623 } … … 788 806 public void stateChanged(ChangeEvent event) 789 807 { 790 // Tell the previous pane that it has lost focus791 808 if (previous_pane != null) { 792 809 if (previous_pane == gather_pane) { … … 801 818 else if (previous_pane == create_pane) { 802 819 create_pane.loseFocus(); 820 } 821 else if (previous_pane == format_pane) { 822 format_pane.loseFocus(); 803 823 } 804 824 } … … 821 841 create_pane.gainFocus(); 822 842 } 843 else if (selected_index == tab_pane.indexOfComponent(format_pane)) { 844 format_pane.gainFocus(); 845 } 823 846 824 847 previous_pane = (JPanel) tab_pane.getSelectedComponent(); 848 825 849 } 826 850 … … 838 862 workflowUpdate("Design", Configuration.get("workflow.design", false)); 839 863 workflowUpdate("Create", Configuration.get("workflow.create", false)); 864 workflowUpdate("Format", Configuration.get("workflow.format", false)); 840 865 } 841 866 … … 907 932 private int design_pos = -1; 908 933 private int create_pos = -1; 934 private int format_pos = -1; 909 935 private int export_pos = -1; 910 936 private JTabbedPane tab_pane = null; … … 917 943 design_pos = tab_pane.indexOfComponent(design_pane); 918 944 create_pos = tab_pane.indexOfComponent(create_pane); 945 format_pos = tab_pane.indexOfComponent(format_pane); 919 946 } 920 947 … … 937 964 if (create_pos != -1) { 938 965 tab_pane.setEnabledAt(create_pos, ready && Configuration.get("workflow.create", false)); 966 } 967 if (format_pos != -1) { 968 tab_pane.setEnabledAt(format_pos, ready && Configuration.get("workflow.format", false)); 939 969 } 940 970 }
Note:
See TracChangeset
for help on using the changeset viewer.