|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.node.FileType
Instances of FileType represent mappings between filesystem extensions and node types. These mapping are case insensitive and have an associated mapping "kind" which may be used to distinguish different sources of file type mappings.
Constructor Summary | |
FileType(java.lang.String description,
java.lang.Class nodeType,
java.lang.Object kind)
All |
|
FileType(java.lang.String description,
java.lang.Class nodeType,
java.lang.Object kind,
javax.swing.Icon icon)
All |
Method Summary | |
static void |
customizeFileChooser(javax.swing.JFileChooser fileChooser)
|
java.lang.String |
getDescription()
Returns the description that this FileType was constructed with. |
static FileType |
getFileType(java.io.File file)
Performs a case-insensitive searches of the global registry for a registered FileType mapping after deriving the file type from a file's extension. |
static FileType |
getFileType(java.lang.String extension)
Performs a case-insensitive searches of the global registry for a registered FileType mapping. |
static java.util.Map |
getFileTypes()
Fetches a map that matches all registered extension keys (as lowercase String instances) to FileType values. |
javax.swing.Icon |
getIcon()
Returns the icon object that this FileType was constructed with or a generic file icon if null was specified. |
java.lang.Object |
getKind()
Returns the 'kind' object that this FileType was constructed with. |
java.lang.Class |
getNodeType()
Returns the node type that this FileType was constructed with. |
static void |
registerFileType(java.lang.String extension,
FileType fileType)
Adds or removes a FileType mapping from the global registry. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public FileType(java.lang.String description, java.lang.Class nodeType, java.lang.Object kind)
description
- A description of the file type for display purposes.nodeType
- A reference to a FileNode or Project subclass.kind
- An arbitrary reference that may be used to distinguish
the source of this file type mapping.public FileType(java.lang.String description, java.lang.Class nodeType, java.lang.Object kind, javax.swing.Icon icon)
description
- A description of the file type for display purposes.nodeType
- A reference to a FileNode or Project subclass.kind
- An arbitrary reference that may be used to distinguish
the source of this file type mapping.icon
- An icon representing the specified file type.Method Detail |
public java.lang.String getDescription()
public java.lang.Class getNodeType()
public java.lang.Object getKind()
public javax.swing.Icon getIcon()
public static void registerFileType(java.lang.String extension, FileType fileType)
extension
- The extension for which a mapping should be added or
removed.fileType
- The fileType the extension should map to, or null if the
mapping should be removed.public static FileType getFileType(java.lang.String extension)
extension
- The extension to search for.public static FileType getFileType(java.io.File file)
file
- The File instance whose extension should be used for the
search.public static java.util.Map getFileTypes()
public static void customizeFileChooser(javax.swing.JFileChooser fileChooser)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |