|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
edu.iastate.metnet.metaomgraph.GraphFileFilter
public class GraphFileFilter
File filter used in MetaOmGraph file chooser dialogs. The filter can be set
to one of three modes via the setMode(int) method. If the mode is
GraphFileFilter.XML, only files with a .xml extension will be accepted. If
it's set to GraphFileFilter.TEXT, .txt and .csv files will be accepted. And
if it's set to GraphFileFilter.PROJECT, .mcg and .mog files will be accepted.
| Field Summary | |
|---|---|
static int |
PNG
Mode to accept .png files |
static int |
PROJECT
Mode to accept .mcg and .mog files |
static int |
TEXT
Mode to accept .txt and .csv files |
static int |
XML
Mode to accept .xml files |
| Constructor Summary | |
|---|---|
GraphFileFilter()
Creates a GraphFileFilter in text mode (*.txt, *.csv). |
|
GraphFileFilter(int mode)
Creates a GraphFileFilter with the specified mode. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File arg0)
Determines whether or not to display a given file in the file chooser. |
java.lang.String |
getDescription()
Gets a description of this filter. |
void |
setMode(int mode)
Changes which files will be accepted by this filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int XML
public static final int TEXT
public static final int PROJECT
public static final int PNG
| Constructor Detail |
|---|
public GraphFileFilter()
public GraphFileFilter(int mode)
mode - the mode. Must be one of GraphFileFilter.XML,
GraphFileFilter.TEXT, or GraphFileFilter.PROJECT.| Method Detail |
|---|
public void setMode(int mode)
mode - the mode
java.security.InvalidParameterException - if the specified mode is not one of GraphFileFilter.XML,
GraphFileFilter.TEXT, or GraphFileFilter.PROJECT.public boolean accept(java.io.File arg0)
accept in class javax.swing.filechooser.FileFilterpublic java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||