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

📄 cellelement.java

📁 Java资源管理器
💻 JAVA
字号:
/*
 * Created on 2005-5-7
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package gui;

import java.io.File;

import javax.swing.ImageIcon;

/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class CellElement {
    private ImageIcon folderIcon;
    private ImageIcon fileIcon;
    private ImageIcon unknow;
    private File file;
    
    public CellElement(File file){
        this.file = file;
        folderIcon = new ImageIcon("icons\\foldercolse.png");
        fileIcon = new ImageIcon("icons\\file.png");
        unknow = new ImageIcon("icons\\unknow.gif");
    }
    public ImageIcon getImageIcon(){
      if(file.isDirectory())  
           return folderIcon; 
       else if(file.isFile())
           return fileIcon;
       else return unknow;
    }
    public File getFile(){
        return file;
    }
}

⌨️ 快捷键说明

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