Ignore:
Timestamp:
2004-12-17T15:07:36+13:00 (19 years ago)
Author:
mdewsnip
Message:

Tidied up the workspace and collection trees a bit more, in preparation for having special icons for some collection files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r8813 r8846  
    4848import org.greenstone.gatherer.Dictionary;
    4949import org.greenstone.gatherer.Gatherer;
     50import org.greenstone.gatherer.collection.CollectionTree;
    5051import org.greenstone.gatherer.collection.CollectionTreeNode;
    51 import org.greenstone.gatherer.collection.CollectionManager;
    5252import org.greenstone.gatherer.file.FileNode;
    5353import org.greenstone.gatherer.file.FileOpenActionListener;
     
    7373    private DragGroup group               =  null;
    7474    /** The tree showing the files within the collection. */
    75     private DragTree collection_tree         = null;
     75    private CollectionTree collection_tree = null;
    7676    /** The threaded queue that handles the actually movement of files, so that the gui remains responsive. */
    7777    private FileQueue file_queue          =  null;
     
    8080    /** The filter currently applied to the workspace tree. */
    8181    private Filter workspace_filter = null;
    82     /** The collection model which is used to build, and hold the data of, the collection tree. */
    83     private TreeModel collection    = null;
    8482    /** The button used to cancel all pending file queue jobs. */
    8583    private JButton stop_action        =  null;
     
    259257    Dictionary.registerText(collection_label, "Collection.No_Collection");
    260258
    261     collection = Gatherer.c_man.getRecordSet();
    262     if (collection != null) {
    263         collection_tree = new DragTree(Utility.COLLECTION_TREE, collection, null, true);
    264         collection_tree.setEnabled(true);
    265     }
    266     else {
    267         collection_tree = new DragTree(Utility.COLLECTION_TREE, null, true);
    268         collection_tree.setEnabled(false);
    269     }
     259    collection_tree = new CollectionTree(Utility.COLLECTION_TREE, Gatherer.c_man.getCollectionTreeModel(), true);
     260    collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null);
    270261    group.add(collection_tree);
    271262    collection_tree.addFocusListener(this);
     
    425416        // Update collection tree
    426417        if (refresh_reason == Gatherer.COLLECTION_OPENED) {
    427         collection_tree.setModel(Gatherer.c_man.getRecordSet());
     418        collection_tree.setModel(Gatherer.c_man.getCollectionTreeModel());
    428419        }
    429420
Note: See TracChangeset for help on using the changeset viewer.