Changeset 7494


Ignore:
Timestamp:
2004-05-28T17:02:52+12:00 (20 years ago)
Author:
mdewsnip
Message:

Oops... put back in some code necessary for the workspace tree file filter --- but fixed a bug where the whole shebang was refreshing unnecessarily.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeModel.java

    r7491 r7494  
    8989
    9090
     91    // -- This code is necessary to support the workspace tree file filter --
     92    public void refresh(TreePath path)
     93    {
     94    // If we're not refreshing the whole tree just refresh a certain path
     95    if (path != null) {
     96        super.refresh(path);
     97        return;
     98    }
     99
     100    // Refresh each of the nodes in the workspace tree
     101    for (int i = 0; i < workspace_tree_root.getChildCount(); i++) {
     102        FileNode child_node = (FileNode) workspace_tree_root.getChildAt(i);
     103        super.refresh(new TreePath(child_node.getPath()));
     104    }
     105
     106    // Refresh the local filespace tree specially (it is not unmapped so not refreshed)
     107    for (int i = 0; i < local_filespace_mapping.getChildCount(); i++) {
     108        FileNode child_node = (FileNode) local_filespace_mapping.getChildAt(i);
     109        super.refresh(new TreePath(child_node.getPath()));
     110    }
     111    }
     112
     113
    91114    static private boolean doesArrayContain(Object[] array, Object item)
    92115    {
Note: See TracChangeset for help on using the changeset viewer.