Klasse DirectoryChooserOptions

java.lang.Object
net.sf.jguiraffe.gui.dlg.AbstractDialogOptions<File,DirectoryChooserOptions>
net.sf.jguiraffe.gui.dlg.filechooser.DirectoryChooserOptions

public class DirectoryChooserOptions extends AbstractDialogOptions<File,DirectoryChooserOptions>

A class for defining the options of a directory chooser dialog.

Instances of this class can be passed to a file chooser service to configure the behavior of a directory chooser dialog. The class offers a fluent API to set the single properties.

Implementation note: Instances are not thread-safe.

Seit:
1.4
  • Konstruktordetails

    • DirectoryChooserOptions

      public DirectoryChooserOptions(DialogResultCallback<File,D> resultCallback, D data)
      Creates a new instance of DirectoryChooserOptions and sets the callback to be notified with the dialog result and an additional data object to be passed to the callback.
      Typparameter:
      D - the type of the data object
      Parameter:
      resultCallback - the result callback
      data - the data object for the callback
      Löst aus:
      IllegalArgumentException - if the result callback is null
    • DirectoryChooserOptions

      public DirectoryChooserOptions(DialogResultCallback<File,?> resultCallback)
      Creates a new instance of DirectoryChooserOptions and sets the callback to be notified with the dialog result.
      Parameter:
      resultCallback - the result callback
      Löst aus:
      IllegalArgumentException - if the result callback is null
  • Methodendetails

    • setInitialDirectory

      public DirectoryChooserOptions setInitialDirectory(File directory)
      Allows setting the initial directory for the directory chooser dialog.
      Parameter:
      directory - the initial directory
      Gibt zurück:
      this object
    • getInitialDirectory

      public File getInitialDirectory()
      Returns the initial directory for the directory chooser dialog. Result can be null if no such directory has been set.
      Gibt zurück:
      the initial directory
    • getSelf

      protected DirectoryChooserOptions getSelf()
      Beschreibung aus Klasse kopiert: AbstractDialogOptions
      Returns a self reference to this object. This is used to support method chaining when setting multiple properties.
      Angegeben von:
      getSelf in Klasse AbstractDialogOptions<File,DirectoryChooserOptions>
      Gibt zurück:
      a self reference