- Timestamp:
- 2006-04-07T16:56:05+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r11625 r11627 91 91 /** The collection this manager is managing! */ 92 92 static private Collection collection = null; 93 /** The collection_model. */ 94 private CollectionTreeModel collection_model = null; 93 /** The collection tree (used in both Gather and Enrich panes). */ 94 static private CollectionTree collection_tree = null; 95 /** The collection tree model. */ 96 private CollectionTreeModel collection_tree_model = null; 95 97 /** An inner class listener responsible for noting tree changes and resetting saved when they occur. */ 96 98 private FMTreeModelListener fm_tree_model_listener = null; … … 237 239 238 240 collection = null; 239 collection_ model = null;241 collection_tree_model = null; 240 242 Configuration.setCollectionConfiguration(null); 241 243 Gatherer.refresh(Gatherer.COLLECTION_CLOSED); … … 643 645 644 646 647 public CollectionTree getCollectionTree() 648 { 649 if (collection_tree == null) { 650 collection_tree = new CollectionTree(collection_tree_model, true); 651 } 652 653 return collection_tree; 654 } 655 656 645 657 /** Retrieve the tree model associated with the current collection. */ 646 658 public CollectionTreeModel getCollectionTreeModel() 647 659 { 648 if (collection_ model == null && collection != null) {660 if (collection_tree_model == null && collection != null) { 649 661 // Use the import directory to generate a new CollectionTreeModel 650 collection_ model = new CollectionTreeModel(new CollectionTreeNode(new File(getCollectionImportDirectoryPath())));662 collection_tree_model = new CollectionTreeModel(new CollectionTreeNode(new File(getCollectionImportDirectoryPath()))); 651 663 // Ensure that the manager is a change listener for the tree. 652 664 if (fm_tree_model_listener == null) { 653 665 fm_tree_model_listener = new FMTreeModelListener(); 654 666 } 655 collection_ model.addTreeModelListener(fm_tree_model_listener);656 } 657 return collection_ model;667 collection_tree_model.addTreeModelListener(fm_tree_model_listener); 668 } 669 return collection_tree_model; 658 670 } 659 671 -
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r11626 r11627 131 131 132 132 DragGroup group = new DragGroup(); 133 collection_tree = Gatherer. g_man.gather_pane.collection_tree;133 collection_tree = Gatherer.c_man.getCollectionTree(); 134 134 group.add(collection_tree); 135 135 collection_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11626 r11627 76 76 private DragGroup group = null; 77 77 /** The tree showing the files within the collection. */ 78 p ublicCollectionTree collection_tree = null;78 private 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; … … 234 234 Dictionary.registerText(collection_label, "Collection.No_Collection"); 235 235 236 collection_tree = new CollectionTree(Gatherer.c_man.getCollectionTreeModel(), true);236 collection_tree = Gatherer.c_man.getCollectionTree(); 237 237 collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null); 238 238 group.add(collection_tree);
Note:
See TracChangeset
for help on using the changeset viewer.