]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/ModuleEditor/src/org/tianocore/common/IFileFilter.java
Remove ModuleEditor and PackageEditor from Tools\Source
[mirror_edk2.git] / Tools / Source / ModuleEditor / src / org / tianocore / common / IFileFilter.java
diff --git a/Tools/Source/ModuleEditor/src/org/tianocore/common/IFileFilter.java b/Tools/Source/ModuleEditor/src/org/tianocore/common/IFileFilter.java
deleted file mode 100644 (file)
index 1daf7fa..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/** @file\r
\r
- The file is used to override FileFilter to provides customized interfaces \r
\r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution.  The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- **/\r
-\r
-package org.tianocore.common;\r
-\r
-import java.io.File;\r
-\r
-import javax.swing.filechooser.FileFilter;\r
-\r
-/**\r
- The class is used to override FileFilter to provides customized interfaces\r
\r
- @since ModuleEditor 1.0\r
\r
- **/\r
-public class IFileFilter extends FileFilter {\r
-\r
-    private String strExt;\r
-\r
-    /**\r
-     Reserved for test\r
-     \r
-     @param args\r
-     \r
-     **/\r
-    public static void main(String[] args) {\r
-        // TODO Auto-generated method stub\r
-\r
-    }\r
-\r
-    /**\r
-     This is the default constructor\r
-     \r
-     @param ext\r
-     \r
-     **/\r
-    public IFileFilter(String ext) {\r
-        this.strExt = ext;\r
-    }\r
-\r
-    /* (non-Javadoc)\r
-     * @see javax.swing.filechooser.FileFilter#accept(java.io.File)\r
-     * \r
-     * Override method "accept"\r
-     * \r
-     */\r
-    public boolean accept(File file) {\r
-        if (file.isDirectory()) {\r
-            return true;\r
-        }\r
-        String strFileName = file.getName();\r
-        int intIndex = strFileName.lastIndexOf('.');\r
-        if (intIndex > 0 && intIndex < strFileName.length() - 1) {\r
-            String strExtension = strFileName.substring(intIndex + 1).toLowerCase();\r
-            if (strExtension.equals(strExt))\r
-                return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    /* (non-Javadoc)\r
-     * @see javax.swing.filechooser.FileFilter#getDescription()\r
-     * \r
-     * Override method "getDescription" to config description via different file type \r
-     * \r
-     */\r
-    public String getDescription() {\r
-        if (strExt.equals("msa"))\r
-            return "Module Surface Area File(*.msa)";\r
-        if (strExt.equals("mbd"))\r
-            return "Module Build Description File(*.mbd)";\r
-        return "";\r
-    }\r
-\r
-}\r