Klasse DirectoryChooserOptions
java.lang.Object
net.sf.jguiraffe.gui.dlg.AbstractDialogOptions<File,DirectoryChooserOptions>
net.sf.jguiraffe.gui.dlg.filechooser.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
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDirectoryChooserOptions
(DialogResultCallback<File, ?> resultCallback) Creates a new instance ofDirectoryChooserOptions
and sets the callback to be notified with the dialog result.DirectoryChooserOptions
(DialogResultCallback<File, D> resultCallback, D data) Creates a new instance ofDirectoryChooserOptions
and sets the callback to be notified with the dialog result and an additional data object to be passed to the callback. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the initial directory for the directory chooser dialog.protected DirectoryChooserOptions
getSelf()
Returns a self reference to this object.setInitialDirectory
(File directory) Allows setting the initial directory for the directory chooser dialog.Von Klasse geerbte Methoden net.sf.jguiraffe.gui.dlg.AbstractDialogOptions
getCancelInvoker, getResultCallback, getTitle, getTitleResource, resolveTitle, setCanceledCallback, setCanceledCallback, setTitle, setTitleResource
-
Konstruktordetails
-
DirectoryChooserOptions
Creates a new instance ofDirectoryChooserOptions
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 callbackdata
- the data object for the callback- Löst aus:
IllegalArgumentException
- if the result callback is null
-
DirectoryChooserOptions
Creates a new instance ofDirectoryChooserOptions
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
Allows setting the initial directory for the directory chooser dialog.- Parameter:
directory
- the initial directory- Gibt zurück:
- this object
-
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
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 KlasseAbstractDialogOptions<File,
DirectoryChooserOptions> - Gibt zurück:
- a self reference
-