资源简介

NetBeans RCP - 使用 Node & ExplorerManager 结合 BeanTreeView 编写一个磁盘文件树<br><br>项目构建在 NetBeans IDE 6.0 上。

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

package mobi.chenwei.nbm.explorer;

import java.io.File;
import java.io.FileFilter;
import java.io.Serializable;

/**
 * 文件操作中的文件夹过滤器类。
 *
 * @author Chen Wei
 * @website www.chenwei.mobi
 * @email chenweionline@hotmail.com
 */
public class DirFilter implements FileFilter Serializable {
    // 是否过滤隐藏文件夹。
    private boolean filtrateHidden = false;
    
    public boolean accept(File pathname) {
        if(pathname.isDirectory()){
            if(isFiltrateHidden() && pathname.isHidden()){
                return false;
            }else{
                return true;
            }
        }else{
            return false;
        }
    }

    public boolean isFiltrateHidden() {
        return 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2008-01-19 15:30  NBM_Explorer\
     文件         513  2008-01-17 11:36  NBM_Explorer\build.xml
     文件         249  2008-01-17 11:36  NBM_Explorer\manifest.mf
     目录           0  2008-01-17 11:36  NBM_Explorer\nbproject\
     文件        1310  2008-01-17 11:36  NBM_Explorer\nbproject\build-impl.xml
     文件         455  2008-01-17 11:36  NBM_Explorer\nbproject\genfiles.properties
     文件          27  2008-01-17 11:36  NBM_Explorer\nbproject\platform.properties
     目录           0  2008-01-17 11:36  NBM_Explorer\nbproject\private\
     文件          89  2008-01-17 11:36  NBM_Explorer\nbproject\private\platform-private.properties
     文件          76  2008-01-17 11:36  NBM_Explorer\nbproject\project.properties
     文件        2819  2008-01-17 11:36  NBM_Explorer\nbproject\project.xml
     目录           0  2008-01-17 11:36  NBM_Explorer\src\
     目录           0  2008-01-17 11:36  NBM_Explorer\src\mobi\
     目录           0  2008-01-17 11:36  NBM_Explorer\src\mobi\chenwei\
     目录           0  2008-01-17 11:36  NBM_Explorer\src\mobi\chenwei\nbm\
     目录           0  2008-01-19 15:23  NBM_Explorer\src\mobi\chenwei\nbm\explorer\
     文件         158  2008-01-19 15:24  NBM_Explorer\src\mobi\chenwei\nbm\explorer\Bundle.properties
     文件         969  2008-01-19 13:05  NBM_Explorer\src\mobi\chenwei\nbm\explorer\DirFilter.java
     文件         889  2008-01-17 11:36  NBM_Explorer\src\mobi\chenwei\nbm\explorer\ExplorerAction.java
     文件        1169  2008-01-19 12:10  NBM_Explorer\src\mobi\chenwei\nbm\explorer\ExplorerTopComponent.form
     文件        4588  2008-01-19 12:10  NBM_Explorer\src\mobi\chenwei\nbm\explorer\ExplorerTopComponent.java
     文件         579  2008-01-19 12:17  NBM_Explorer\src\mobi\chenwei\nbm\explorer\ExplorerTopComponentSettings.xml
     文件         423  2008-01-19 12:17  NBM_Explorer\src\mobi\chenwei\nbm\explorer\ExplorerTopComponentWstcref.xml
     文件        1045  2008-01-19 14:47  NBM_Explorer\src\mobi\chenwei\nbm\explorer\FileChildren.java
     文件        1866  2008-01-19 15:24  NBM_Explorer\src\mobi\chenwei\nbm\explorer\FileNode.java
     文件        1027  2008-01-17 11:36  NBM_Explorer\src\mobi\chenwei\nbm\explorer\layer.xml
     目录           0  2008-01-17 11:36  NBM_Explorer\test\
     目录           0  2008-01-17 11:36  NBM_Explorer\test\unit\
     目录           0  2008-01-17 11:36  NBM_Explorer\test\unit\src\

评论

共有 条评论