org.sf.cafebabe
Class MainFileView

java.lang.Object
  extended by javax.swing.filechooser.FileView
      extended by org.sf.cafebabe.MainFileView

public class MainFileView
extends javax.swing.filechooser.FileView


Constructor Summary
MainFileView()
           
 
Method Summary
 java.lang.String getDescription(java.io.File f)
          A human readable description of the file.
 javax.swing.Icon getIcon(java.io.File f)
          Icon that reperesents this file.
 java.lang.String getName(java.io.File f)
          The name of the file.
 java.lang.String getTypeDescription(java.io.File f)
          A human readable description of the type of the file.
 void putDescription(java.io.File f, java.lang.String fileDescription)
          Adds a human readable description of the file.
 void putIcon(java.lang.String extension, javax.swing.Icon icon)
          Adds an icon based on the file type "dot" extension string, e.g: ".gif".
 void putTypeDescription(java.io.File f, java.lang.String typeDescription)
          Adds a human readable type description for files of the type of the passed in file.
 void putTypeDescription(java.lang.String extension, java.lang.String typeDescription)
          Adds a human readable type description for files.
 void setName(java.io.File f, java.lang.String fileName)
          The name of the file.
 
Methods inherited from class javax.swing.filechooser.FileView
isTraversable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainFileView

public MainFileView()
Method Detail

setName

public void setName(java.io.File f,
                    java.lang.String fileName)
The name of the file.

See Also:
getName(java.io.File)

getName

public java.lang.String getName(java.io.File f)
The name of the file.

Overrides:
getName in class javax.swing.filechooser.FileView
See Also:
setName(java.io.File, java.lang.String), FileView.getName(java.io.File)

putDescription

public void putDescription(java.io.File f,
                           java.lang.String fileDescription)
Adds a human readable description of the file.


getDescription

public java.lang.String getDescription(java.io.File f)
A human readable description of the file.

Overrides:
getDescription in class javax.swing.filechooser.FileView
See Also:
FileView.getDescription(java.io.File)

putTypeDescription

public void putTypeDescription(java.lang.String extension,
                               java.lang.String typeDescription)
Adds a human readable type description for files. Based on "dot" extension strings, e.g: ".gif". Case is ignored.


putTypeDescription

public void putTypeDescription(java.io.File f,
                               java.lang.String typeDescription)
Adds a human readable type description for files of the type of the passed in file. Based on "dot" extension strings, e.g: ".gif". Case is ignored.


getTypeDescription

public java.lang.String getTypeDescription(java.io.File f)
A human readable description of the type of the file.

Overrides:
getTypeDescription in class javax.swing.filechooser.FileView
See Also:
FileView.getTypeDescription(java.io.File)

putIcon

public void putIcon(java.lang.String extension,
                    javax.swing.Icon icon)
Adds an icon based on the file type "dot" extension string, e.g: ".gif". Case is ignored.


getIcon

public javax.swing.Icon getIcon(java.io.File f)
Icon that reperesents this file. Default implementation returns null. You might want to override this to return something more interesting.

Overrides:
getIcon in class javax.swing.filechooser.FileView
See Also:
FileView.getIcon(java.io.File)


Copyright 2006 Dream Programs Inc.. All Rights Reserved.