de.caff.util.settings.swing

## Enum SwingUrlListPreferenceProperty.UrlSelectionMode

- java.lang.Object
- - java.lang.Enum<SwingUrlListPreferenceProperty.UrlSelectionMode>
  - - de.caff.util.settings.swing.SwingUrlListPreferenceProperty.UrlSelectionMode

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SwingUrlListPreferenceProperty.UrlSelectionMode>
  Enclosing class:
    SwingUrlListPreferenceProperty

      public static enum SwingUrlListPreferenceProperty.UrlSelectionMode
      extends java.lang.Enum<SwingUrlListPreferenceProperty.UrlSelectionMode>

  Modes for local file URL selection.

- - ### Enum Constant Summary

    Enum Constants
    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.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### FilesAndDirectories

          public static final SwingUrlListPreferenceProperty.UrlSelectionMode FilesAndDirectories

      Allow both files and directories to be selected.

    - #### FilesOnly

          public static final SwingUrlListPreferenceProperty.UrlSelectionMode FilesOnly

      Allow only files to be selected.

    - #### DirectoriesOnly

          public static final SwingUrlListPreferenceProperty.UrlSelectionMode DirectoriesOnly

      Allow only directories to be selected.

  - ### Method Detail

    - #### values

          public static SwingUrlListPreferenceProperty.UrlSelectionMode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (SwingUrlListPreferenceProperty.UrlSelectionMode c : SwingUrlListPreferenceProperty.UrlSelectionMode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static SwingUrlListPreferenceProperty.UrlSelectionMode valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getFileSelectionMode

          public int getFileSelectionMode()

      Get the file selection mode of JFileChooser which is equivalent to this URL selection mode.
      Returns:
        file selection mode

    - #### isAllowed

          public boolean isAllowed(@NotNull
                                   java.io.File file)

      Check whether the given file object is allowed.
      Parameters:
        `file` - either a file or a directory
      Returns:
        `true`: this mode allows the object
        `false`: this mode does not allow the object