public static enum SwingUrlListPreferenceProperty.UrlSelectionMode extends java.lang.Enum<SwingUrlListPreferenceProperty.UrlSelectionMode>
Enum Constant and Description |
---|
DirectoriesOnly
Allow only directories to be selected.
|
FilesAndDirectories
Allow both files and directories to be selected.
|
FilesOnly
Allow only files to be selected.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileSelectionMode()
Get the file selection mode of JFileChooser which is equivalent to this URL selection mode.
|
boolean |
isAllowed(java.io.File file)
Check whether the given file object is allowed.
|
static SwingUrlListPreferenceProperty.UrlSelectionMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SwingUrlListPreferenceProperty.UrlSelectionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SwingUrlListPreferenceProperty.UrlSelectionMode FilesAndDirectories
public static final SwingUrlListPreferenceProperty.UrlSelectionMode FilesOnly
public static final SwingUrlListPreferenceProperty.UrlSelectionMode DirectoriesOnly
public static SwingUrlListPreferenceProperty.UrlSelectionMode[] values()
for (SwingUrlListPreferenceProperty.UrlSelectionMode c : SwingUrlListPreferenceProperty.UrlSelectionMode.values()) System.out.println(c);
public static SwingUrlListPreferenceProperty.UrlSelectionMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getFileSelectionMode()
public boolean isAllowed(@NotNull java.io.File file)
file
- either a file or a directorytrue
: this mode allows the objectfalse
: this mode does not allow the object