< prev index next >
src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java
Print this page
@@ -129,17 +129,17 @@
}
/**
* Determines if the given file is a root in the navigable tree(s).
* Examples: Windows 98 has one root, the Desktop folder. DOS has one root
- * per drive letter, <code>C:\</code>, <code>D:\</code>, etc. Unix has one root,
- * the <code>"/"</code> directory.
+ * per drive letter, {@code C:\}, {@code D:\}, etc. Unix has one root,
+ * the {@code "/"} directory.
*
- * The default implementation gets information from the <code>ShellFolder</code> class.
+ * The default implementation gets information from the {@code ShellFolder} class.
*
- * @param f a <code>File</code> object representing a directory
- * @return <code>true</code> if <code>f</code> is a root in the navigable tree.
+ * @param f a {@code File} object representing a directory
+ * @return {@code true} if {@code f} is a root in the navigable tree.
* @see #isFileSystemRoot
*/
public boolean isRoot(File f) {
if (f == null || !f.isAbsolute()) {
return false;
@@ -156,12 +156,12 @@
/**
* Returns true if the file (directory) can be visited.
* Returns false if the directory cannot be traversed.
*
- * @param f the <code>File</code>
- * @return <code>true</code> if the file/directory can be traversed, otherwise <code>false</code>
+ * @param f the {@code File}
+ * @return {@code true} if the file/directory can be traversed, otherwise {@code false}
* @see JFileChooser#isTraversable
* @see FileView#isTraversable
* @since 1.4
*/
public Boolean isTraversable(File f) {
@@ -173,11 +173,11 @@
* a system file browser. Example from Windows: the "M:\" directory
* displays as "CD-ROM (M:)"
*
* The default implementation gets information from the ShellFolder class.
*
- * @param f a <code>File</code> object
+ * @param f a {@code File} object
* @return the file name as it would be displayed by a native file chooser
* @see JFileChooser#getName
* @since 1.4
*/
public String getSystemDisplayName(File f) {
@@ -210,11 +210,11 @@
* a system file browser. Example from Windows: the "Desktop" folder
* is described as "Desktop".
*
* Override for platforms with native ShellFolder implementations.
*
- * @param f a <code>File</code> object
+ * @param f a {@code File} object
* @return the file type description as it would be displayed by a native file chooser
* or null if no native information is available.
* @see JFileChooser#getTypeDescription
* @since 1.4
*/
@@ -227,11 +227,11 @@
* a system file browser. Example from Windows: the "M:\" directory
* displays a CD-ROM icon.
*
* The default implementation gets information from the ShellFolder class.
*
- * @param f a <code>File</code> object
+ * @param f a {@code File} object
* @return an icon as it would be displayed by a native file chooser
* @see JFileChooser#getIcon
* @since 1.4
*/
public Icon getSystemIcon(File f) {
@@ -259,13 +259,13 @@
/**
* On Windows, a file can appear in multiple folders, other than its
* parent directory in the filesystem. Folder could for example be the
* "Desktop" folder which is not the same as file.getParentFile().
*
- * @param folder a <code>File</code> object representing a directory or special folder
- * @param file a <code>File</code> object
- * @return <code>true</code> if <code>folder</code> is a directory or special folder and contains <code>file</code>.
+ * @param folder a {@code File} object representing a directory or special folder
+ * @param file a {@code File} object
+ * @return {@code true} if {@code folder} is a directory or special folder and contains {@code file}.
* @since 1.4
*/
public boolean isParent(File folder, File file) {
if (folder == null || file == null) {
return false;
@@ -286,16 +286,16 @@
}
}
/**
*
- * @param parent a <code>File</code> object representing a directory or special folder
- * @param fileName a name of a file or folder which exists in <code>parent</code>
- * @return a File object. This is normally constructed with <code>new
- * File(parent, fileName)</code> except when parent and child are both
- * special folders, in which case the <code>File</code> is a wrapper containing
- * a <code>ShellFolder</code> object.
+ * @param parent a {@code File} object representing a directory or special folder
+ * @param fileName a name of a file or folder which exists in {@code parent}
+ * @return a File object. This is normally constructed with
+ * {@code new File(parent, fileName)} except when parent and child are both
+ * special folders, in which case the {@code File} is a wrapper containing
+ * a {@code ShellFolder} object.
* @since 1.4
*/
public File getChild(File parent, String fileName) {
if (parent instanceof ShellFolder) {
File[] children = getFiles(parent, false);
@@ -308,16 +308,16 @@
return createFileObject(parent, fileName);
}
/**
- * Checks if <code>f</code> represents a real directory or file as opposed to a
- * special folder such as <code>"Desktop"</code>. Used by UI classes to decide if
+ * Checks if {@code f} represents a real directory or file as opposed to a
+ * special folder such as {@code "Desktop"}. Used by UI classes to decide if
* a folder is selectable when doing directory choosing.
*
- * @param f a <code>File</code> object
- * @return <code>true</code> if <code>f</code> is a real file or directory.
+ * @param f a {@code File} object
+ * @return {@code true} if {@code f} is a real file or directory.
* @since 1.4
*/
public boolean isFileSystem(File f) {
if (f instanceof ShellFolder) {
ShellFolder sf = (ShellFolder)f;
@@ -351,12 +351,12 @@
/**
* Is dir the root of a tree in the file system, such as a drive
* or partition. Example: Returns true for "C:\" on Windows 98.
*
- * @param dir a <code>File</code> object representing a directory
- * @return <code>true</code> if <code>f</code> is a root of a filesystem
+ * @param dir a {@code File} object representing a directory
+ * @return {@code true} if {@code f} is a root of a filesystem
* @see #isRoot
* @since 1.4
*/
public boolean isFileSystemRoot(File dir) {
return ShellFolder.isFileSystemRoot(dir);
@@ -367,11 +367,11 @@
* for drives or partitions, e.g. a "hard disk" icon.
*
* The default implementation has no way of knowing, so always returns false.
*
* @param dir a directory
- * @return <code>false</code> always
+ * @return {@code false} always
* @since 1.4
*/
public boolean isDrive(File dir) {
return false;
}
@@ -381,11 +381,11 @@
* for a floppy disk. Implies isDrive(dir).
*
* The default implementation has no way of knowing, so always returns false.
*
* @param dir a directory
- * @return <code>false</code> always
+ * @return {@code false} always
* @since 1.4
*/
public boolean isFloppyDrive(File dir) {
return false;
}
@@ -395,11 +395,11 @@
* for a computer node, e.g. "My Computer" or a network server.
*
* The default implementation has no way of knowing, so always returns false.
*
* @param dir a directory
- * @return <code>false</code> always
+ * @return {@code false} always
* @since 1.4
*/
public boolean isComputerNode(File dir) {
return ShellFolder.isComputerNode(dir);
}
@@ -440,11 +440,11 @@
}
/**
* Return the user's default starting directory for the file chooser.
*
- * @return a <code>File</code> object representing the default
+ * @return a {@code File} object representing the default
* starting folder
* @since 1.4
*/
public File getDefaultDirectory() {
File f = (File)ShellFolder.get("fileChooserDefaultFolder");
@@ -541,14 +541,14 @@
}
/**
- * Returns the parent directory of <code>dir</code>.
- * @param dir the <code>File</code> being queried
- * @return the parent directory of <code>dir</code>, or
- * <code>null</code> if <code>dir</code> is <code>null</code>
+ * Returns the parent directory of {@code dir}.
+ * @param dir the {@code File} being queried
+ * @return the parent directory of {@code dir}, or
+ * {@code null} if {@code dir} is {@code null}
*/
public File getParentDirectory(File dir) {
if (dir == null || !dir.exists()) {
return null;
}
@@ -599,16 +599,16 @@
return null;
}
}
/**
- * Creates a new <code>File</code> object for <code>f</code> with correct
+ * Creates a new {@code File} object for {@code f} with correct
* behavior for a file system root directory.
*
- * @param f a <code>File</code> object representing a file system root
+ * @param f a {@code File} object representing a file system root
* directory, for example "/" on Unix or "C:\" on Windows.
- * @return a new <code>File</code> object
+ * @return a new {@code File} object
* @since 1.4
*/
protected File createFileSystemRoot(File f) {
return new FileSystemRoot(f);
}
< prev index next >