edu.rice.cs.util.swing
Class FileDisplay
java.lang.Object
edu.rice.cs.util.swing.FileDisplay
public class FileDisplay
- extends Object
This class is a wrapper for a file whose toString
method outputs only the last element in the file
path. If it's a file, then it outputs the file name without its parent directories. If it's a directory, then
it outputs the name of that directory only
_fdm
protected FileDisplayManager _fdm
newFile
public static FileDisplay newFile(File parent,
FileDisplayManager fdm)
getParentFile
public File getParentFile()
getFile
public File getFile()
isEditable
public boolean isEditable()
- If the representation of the file is different from the underlying
child string of the path, then the node represented by this file display
cannot be edited. If the user edited the text by giving a new representation,
there is no way to determine what the new child string of the path should be.
However, if the user is creating a new node in the tree, they will be able
to edit it.
isNew
public boolean isNew()
getRepresentation
public String getRepresentation()
toString
public final String toString()
- Overrides:
toString
in class Object
formatRep
protected String formatRep(File file)
getDefaultNewFileRep
protected static String getDefaultNewFileRep()