Changeset 11626
- Timestamp:
- 2006-04-07T14:43:27+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r11622 r11626 70 70 /** The label at the top of the collection tree, which shows the collection name. */ 71 71 private JLabel collection_label; 72 /** The panel that contains the collection tree. */ 73 private JPanel collection_pane = null; 74 /** The scrollable area into which the collection tree is placed. */ 75 private JScrollPane collection_scroll = null; 72 76 /** The splitpane dividing the collection tree and the metadata editing controls. */ 73 77 private JSplitPane external_split; … … 116 120 { 117 121 // Creation 118 JPanelcollection_pane = new JPanel(new BorderLayout());122 collection_pane = new JPanel(new BorderLayout()); 119 123 collection_pane.setMinimumSize(MINIMUM_SIZE); 120 124 collection_pane.setPreferredSize(COLLECTION_TREE_SIZE); … … 127 131 128 132 DragGroup group = new DragGroup(); 129 collection_tree = new CollectionTree(Gatherer.c_man.getCollectionTreeModel(), false);133 collection_tree = Gatherer.g_man.gather_pane.collection_tree; 130 134 group.add(collection_tree); 131 135 collection_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); 132 136 collection_tree.addTreeSelectionListener(this); 133 JScrollPane collection_scroll = new JScrollPane(collection_tree);134 137 collection_filter = collection_tree.getFilter(); 135 138 … … 141 144 // Collection Pane 142 145 collection_pane.add(collection_label, BorderLayout.NORTH); 143 collection_pane.add(collection_scroll, BorderLayout.CENTER);144 collection_pane.add(collection_filter, BorderLayout.SOUTH);145 146 146 147 JSplitPane metadata_editing_pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); … … 168 169 return; 169 170 } 171 172 // Add the collection tree and filter back into this pane 173 collection_scroll = new JScrollPane(collection_tree); 174 collection_pane.add(collection_scroll, BorderLayout.CENTER); 175 collection_pane.add(collection_filter, BorderLayout.SOUTH); 170 176 171 177 // Select the first node in the tree if nothing is already selected … … 191 197 // Upload the modified metadata.xml files to the server now, if we're using one 192 198 MetadataXMLFileManager.uploadModifiedMetadataXMLFiles(); 199 200 // Remove the collection tree and filter from this pane so it can be added to the Gather pane 201 collection_pane.remove(collection_scroll); 202 collection_pane.remove(collection_filter); 193 203 } 194 204 -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r11624 r11626 768 768 // Tell the previous pane that it has lost focus 769 769 if (previous_pane != null) { 770 if (previous_pane == enrich_pane) { 770 if (previous_pane == gather_pane) { 771 gather_pane.loseFocus(); 772 } 773 else if (previous_pane == enrich_pane) { 771 774 enrich_pane.loseFocus(); 772 775 } -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11622 r11626 76 76 private DragGroup group = null; 77 77 /** The tree showing the files within the collection. */ 78 p rivateCollectionTree collection_tree = null;78 public CollectionTree collection_tree = null; 79 79 /** The threaded queue that handles the actually movement of files, so that the gui remains responsive. */ 80 80 private FileQueue file_queue = null; … … 237 237 collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null); 238 238 group.add(collection_tree); 239 collection_scroll = new JScrollPane(collection_tree);240 239 collection_filter = collection_tree.getFilter(); 241 240 … … 271 270 collection_pane.setLayout(new BorderLayout()); 272 271 collection_pane.add(collection_label, BorderLayout.NORTH); 273 collection_pane.add(collection_scroll, BorderLayout.CENTER);274 collection_pane.add(collection_filter, BorderLayout.SOUTH);275 272 276 273 tree_pane.add(workspace_pane, JSplitPane.LEFT); … … 307 304 /** Called to inform this control panel that it has just gained focus as an effect of the user clicking on its tab. 308 305 */ 309 public void gainFocus() { 306 public void gainFocus() 307 { 308 // Add the collection tree and filter back into this pane 309 collection_scroll = new JScrollPane(collection_tree); 310 collection_pane.add(collection_scroll, BorderLayout.CENTER); 311 collection_pane.add(collection_filter, BorderLayout.SOUTH); 312 310 313 // Update the meta-audit view to show the current selection, if any. 311 314 Gatherer.g_man.meta_audit.setRecords(getCollectionTreeSelection()); 315 } 316 317 318 /** Called to inform this pane that it has just lost focus as an effect of the user clicking on another tab 319 */ 320 public void loseFocus() 321 { 322 // Remove the collection tree and filter from this pane so it can be added to the Enrich pane 323 collection_pane.remove(collection_scroll); 324 collection_pane.remove(collection_filter); 312 325 } 313 326
Note:
See TracChangeset
for help on using the changeset viewer.