Ignore:
Timestamp:
2006-08-08T09:31:45+12:00 (18 years ago)
Author:
shaoqun
Message:

force the model to refresh when set root, e.g. call setRoot method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/DOMProxyListModel.java

    r12084 r12414  
    159159    cache.clear();
    160160    int index = indexOf(entry);
     161     
     162         
    161163    fireIntervalAdded(this, index, index);
    162164    }
     
    184186    boolean found = false;
    185187    int size = getSize();
     188     
    186189    for(int i = 0; !found && i < size; i++) {
    187190        DOMProxyListEntry sibling = (DOMProxyListEntry) getElementAt(i);
    188         if(sibling.equals(entry)) {
     191            if(sibling.equals(entry)) {
     192               
    189193        found = true;
    190194        }
     
    193197    }
    194198
     199   
    195200    public synchronized Object getElementAt(int index)
    196201    {
     
    254259    }
    255260
     261 
    256262    /** Changes the 'root' element that this list sources its information from.
    257263     * @param  root the new root Element
     
    262268    this.root = root;
    263269    this.children = this.root.getElementsByTagName(this.tag_name);
     270    fireContentsChanged(this, 0, getSize());     
    264271    }
    265272
Note: See TracChangeset for help on using the changeset viewer.