Changeset 6027


Ignore:
Timestamp:
2003-11-28T17:39:37+13:00 (20 years ago)
Author:
jmt12
Message:

The first row of the file tree is now selected when you enter enrich view

File:
1 edited

Legend:

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

    r5938 r6027  
    598598    public void gainFocus() {
    599599    // Use this opportunity to update the table model etc.
    600     valueChanged(new TreeSelectionEvent(this, null, false, null, null));
    601     // tree.setElementModel(Gatherer.c_man.getCollection().msm.getElementModel());
     600    // Select the first file (if any)
     601    if(collection_tree != null && collection_tree.getRowCount() > 0) {
     602        collection_tree.setImmediate(true);
     603        collection_tree.setSelectionRow(0);
     604        collection_tree.setImmediate(false);
     605    }
     606    else {
     607        // No selection. Reset other components
     608        valueChanged(new TreeSelectionEvent(this, null, false, null, null));
     609    }
     610
    602611    // Update the menubars idea of whats been selected
    603612    if(collection_tree != null) {
Note: See TracChangeset for help on using the changeset viewer.