All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.TypedFile

java.lang.Object
   |
   +----java.io.File
           |
           +----com.sun.java.swing.TypedFile

public class TypedFile
extends File
Typed File Objects, returned by FileChooserModel


Constructor Index

 o TypedFile(String, FileType)
Return a TypedFile of type for path.
 o TypedFile(String, String, FileType)
Return a TypedFile of type for path and name.

Method Index

 o getIcon()
May return null, in which case UI must provide a default icon
 o getType()
Guaranteed not to return null.
 o setType(FileType)
Must be called once (and only once) before getType is called.
 o toString()

Constructors

 o TypedFile
 public TypedFile(String path,
                  FileType type)
Return a TypedFile of type for path. If you need a TypedFile and you don't know the type, use FileChooserModel.getType.

 o TypedFile
 public TypedFile(String path,
                  String name,
                  FileType type)
Return a TypedFile of type for path and name. If you need a TypedFile and you don't know the type, use FileChooserModel.getType.

Methods

 o getType
 public FileType getType()
Guaranteed not to return null. RuntimeException thrown if this is called before a type has been set.

 o setType
 public void setType(FileType type)
Must be called once (and only once) before getType is called. RuntimeException thrown if this is violated.

 o getIcon
 public Icon getIcon()
May return null, in which case UI must provide a default icon

 o toString
 public String toString()
Overrides:
toString in class File

All Packages  Class Hierarchy  This Package  Previous  Next  Index