KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > ftp > client > FTPFileSystemView


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.ftp.client;
20
21 import javax.swing.Icon JavaDoc;
22
23 import org.openharmonise.commons.xml.namespace.NamespaceType;
24 import org.openharmonise.vfs.*;
25 import org.openharmonise.vfs.gui.*;
26 import org.openharmonise.vfs.metadata.*;
27
28
29 /**
30  * @author Matthew Large
31  *
32  */

33 public class FTPFileSystemView implements VirtualFileSystemView {
34
35     /**
36      *
37      */

38     public FTPFileSystemView() {
39         super();
40     }
41
42     /* (non-Javadoc)
43      * @see com.simulacramedia.vfs.VirtualFileSystemView#getIcon(com.simulacramedia.vfs.VirtualFile)
44      */

45     public Icon JavaDoc getIcon(VirtualFile vfFile) {
46         if(vfFile.isDirectory()) {
47             return IconManager.getInstance().getIcon("16-dir-closed.gif");
48         } else {
49             return IconManager.getInstance().getIcon("16-plain-document.gif");
50         }
51     }
52
53     /* (non-Javadoc)
54      * @see com.simulacramedia.vfs.VirtualFileSystemView#getIcon(com.simulacramedia.vfs.VirtualFile, boolean)
55      */

56     public Icon JavaDoc getIcon(VirtualFile vfFile, boolean bIsDirectoryOpen) {
57         if(bIsDirectoryOpen) {
58             return IconManager.getInstance().getIcon("16-dir-opened.gif");
59         } else {
60             return IconManager.getInstance().getIcon("16-dir-closed.gif");
61         }
62     }
63
64     /* (non-Javadoc)
65      * @see com.simulacramedia.vfs.VirtualFileSystemView#getDisplayName(com.simulacramedia.vfs.VirtualFile)
66      */

67     public String JavaDoc getDisplayName(VirtualFile vfFile) {
68         return vfFile.getFileName();
69     }
70
71     /* (non-Javadoc)
72      * @see com.simulacramedia.vfs.VirtualFileSystemView#getFileSystemIcon()
73      */

74     public Icon JavaDoc getFileSystemIcon() {
75         return null;
76     }
77
78     /* (non-Javadoc)
79      * @see com.simulacramedia.vfs.VirtualFileSystemView#getFileSystemDisplayName()
80      */

81     public String JavaDoc getFileSystemDisplayName() {
82         return null;
83     }
84
85     /* (non-Javadoc)
86      * @see com.simulacramedia.vfs.VirtualFileSystemView#getVFSIndependantProperty(java.lang.String)
87      */

88     public PropertyInstance getVFSIndependantProperty(String JavaDoc sIndependantPropName) {
89         return null;
90     }
91
92     /* (non-Javadoc)
93      * @see com.simulacramedia.vfs.VirtualFileSystemView#getModificationDate(com.simulacramedia.vfs.VirtualFile)
94      */

95     public String JavaDoc getModificationDate(VirtualFile vfFile) {
96         return (String JavaDoc)vfFile.getProperty(NamespaceType.OHRM.getURI(), "modificationdate").getValues().get(0);
97     }
98
99     /* (non-Javadoc)
100      * @see com.simulacramedia.vfs.VirtualFileSystemView#getContentType(com.simulacramedia.vfs.VirtualFile)
101      */

102     public String JavaDoc getContentType(VirtualFile vfFile) {
103         return null;
104     }
105
106     /* (non-Javadoc)
107      * @see com.simulacramedia.vfs.VirtualFileSystemView#setContentType(com.simulacramedia.vfs.VirtualFile, java.lang.String)
108      */

109     public void setContentType(VirtualFile vfFile, String JavaDoc sContentType) {
110     }
111
112     /* (non-Javadoc)
113      * @see com.simulacramedia.vfs.VirtualFileSystemView#getSummary(com.simulacramedia.vfs.VirtualFile)
114      */

115     public String JavaDoc getSummary(VirtualFile vfFile) {
116         return null;
117     }
118
119     /* (non-Javadoc)
120      * @see com.simulacramedia.vfs.VirtualFileSystemView#getLogicalFileName(com.simulacramedia.vfs.VirtualFile)
121      */

122     public String JavaDoc getLogicalFileName(VirtualFile vfFile) {
123         return null;
124     }
125
126     /* (non-Javadoc)
127      * @see com.simulacramedia.vfs.VirtualFileSystemView#getPublicationDate(com.simulacramedia.vfs.VirtualFile)
128      */

129     public String JavaDoc getPublicationDate(VirtualFile vfFile) {
130         return "none";
131     }
132
133     /* (non-Javadoc)
134      * @see com.simulacramedia.vfs.VirtualFileSystemView#getArchiveDate(com.simulacramedia.vfs.VirtualFile)
135      */

136     public String JavaDoc getArchiveDate(VirtualFile vfFile) {
137         return "none";
138     }
139
140 }
141
Popular Tags