java.lang.Object
javafx.stage.DirectoryChooser
public final class DirectoryChooser extends Object
Provides support for standard directory chooser dialogs. These dialogs have
 look and feel of the platform UI components which is independent of JavaFX.
 On some platforms where file access may be restricted or not part of the user
 model (for example, on some mobile or embedded devices), opening a directory
 dialog may always result in a no-op (that is, null file being returned).
- Since:
- JavaFX 2.1
- 
Property SummaryProperties Type Property Description ObjectProperty<File>initialDirectoryThe initial directory for the displayed dialog.StringPropertytitleThe title of the displayed dialog.
- 
Constructor SummaryConstructors Constructor Description DirectoryChooser()Creates aDirectoryChooser.
- 
Method SummaryModifier and Type Method Description FilegetInitialDirectory()Gets the value of the property initialDirectory.StringgetTitle()Gets the value of the property title.ObjectProperty<File>initialDirectoryProperty()The initial directory for the displayed dialog.voidsetInitialDirectory(File value)Sets the value of the property initialDirectory.voidsetTitle(String value)Sets the value of the property title.FileshowDialog(Window ownerWindow)Shows a new directory selection dialog.StringPropertytitleProperty()The title of the displayed dialog.
- 
Property Details- 
titleThe title of the displayed dialog.- See Also:
- getTitle(),- setTitle(String)
 
- 
initialDirectoryThe initial directory for the displayed dialog.- See Also:
- getInitialDirectory(),- setInitialDirectory(File)
 
 
- 
- 
Constructor Details- 
DirectoryChooserpublic DirectoryChooser()Creates aDirectoryChooser.
 
- 
- 
Method Details- 
setTitleSets the value of the property title.- Property description:
- The title of the displayed dialog.
 
- 
getTitleGets the value of the property title.- Property description:
- The title of the displayed dialog.
 
- 
titlePropertyThe title of the displayed dialog.- See Also:
- getTitle(),- setTitle(String)
 
- 
setInitialDirectorySets the value of the property initialDirectory.- Property description:
- The initial directory for the displayed dialog.
 
- 
getInitialDirectoryGets the value of the property initialDirectory.- Property description:
- The initial directory for the displayed dialog.
 
- 
initialDirectoryPropertyThe initial directory for the displayed dialog.- See Also:
- getInitialDirectory(),- setInitialDirectory(File)
 
- 
showDialogShows a new directory selection dialog. The method doesn't return until the displayed dialog is dismissed. The return value specifies the directory chosen by the user ornullif no selection has been made. If the owner window for the directory selection dialog is set, input to all windows in the dialog's owner chain is blocked while the dialog is being shown.- Parameters:
- ownerWindow- the owner window of the displayed dialog
- Returns:
- the selected directory or nullif no directory has been selected
 
 
-