⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filesystemmodel.java

📁 一个网络上传下载器
💻 JAVA
字号:
/* * FileSystemModel.java * * Created on 2007年11月23日, 下午4:16 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package TreeList;import javax.swing.*;import javax.swing.tree.*;import javax.swing.event.*;    /** *  * @author LiuYuyang */class FileSystemModel implements TreeModel {        FolderNode theRoot;    char fileType = FolderNode.DIRECTORY;        public FileSystemModel(FolderNode fs) {        theRoot = fs;    }        public Object getRoot() {        return theRoot;    }        public Object getChild(Object parent, int index) {        return ((FolderNode) parent).getChild(fileType, index);    }        public int getChildCount(Object parent) {        return ((FolderNode) parent).getChildCount(fileType);    }        public boolean isLeaf(Object node) {        return ((FolderNode) node).isLeaf(fileType);    }        public int getIndexOfChild(Object parent, Object child) {        return ((FolderNode) parent).getIndexOfChild(fileType, child);    }        public void valueForPathChanged(TreePath path, Object newValue) {            }        public void addTreeModelListener(TreeModelListener l) {            }        public void removeTreeModelListener(TreeModelListener l) {            }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -