|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.tensegrity.gui.swing.dialog.graphfilechooser.SVGFilter
The graphfilechooser for tensegrity apps.
| Field Summary | |
static java.lang.String[] |
extensions
Predefined string array of valid extensions. |
| Constructor Summary | |
SVGFilter()
Constructs a new SVGFilter instance. |
|
| Method Summary | |
boolean |
accept(java.io.File f)
Returns true on all directories and files which have the right extension. |
java.lang.String |
getDescription()
Returns a descriptive string for the tensegrity file format. |
java.lang.String[] |
getExtensionList()
Returns an array with all valid extensions for this file type |
int |
getType()
Returns the type of this filter. |
java.lang.String |
getValidFilename(java.io.File file)
Method isValidFilename checks whether the given filename has a valid extension. |
static boolean |
isValidExtension(java.lang.String ext)
Method isValidExtension iterates through the list of extensions and checks whether the given extension matches one of the listed ones. |
static boolean |
isXMLFile(java.io.File file)
Method isXMLFile reads the first line of the file and checks whether it starts with the typical xml definition. |
void |
openInViewer(java.io.File file)
Opens the given File in the viewer. |
boolean |
supportsOpenInViewer()
Returns true if the file can be opened in the viewer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String[] extensions
| Constructor Detail |
public SVGFilter()
SVGFilter instance.
| Method Detail |
public static boolean isXMLFile(java.io.File file)
file - the File to examine.
true iff the file is an xml file.public boolean accept(java.io.File f)
FileFilter.accept(File)public java.lang.String getDescription()
FileFilter.getDescription()public static boolean isValidExtension(java.lang.String ext)
ext - the extension to examine.
true if the extension is valid.public java.lang.String getValidFilename(java.io.File file)
getValidFilename in interface ExtendedFileFilterfile - the filename to check.
true if the filename is valid.public boolean supportsOpenInViewer()
true if the file can be opened in the viewer.
supportsOpenInViewer in interface ExtendedFileFiltertrue if the file can be opened in the viewer.public int getType()
getType in interface ExtendedFileFilterpublic void openInViewer(java.io.File file)
File in the viewer.
openInViewer in interface ExtendedFileFilterfile - the File to open in the viewer.public java.lang.String[] getExtensionList()
ExtendedFileFilter
getExtensionList in interface ExtendedFileFilter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||