java.lang.Object
javafx.stage.DirectoryChooser
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 SummaryPropertiesTypePropertyDescriptionfinal ObjectProperty<File> The initial directory for the displayed dialog.final StringPropertyThe title of the displayed dialog.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal FileGets the value of theinitialDirectoryproperty.final StringgetTitle()Gets the value of thetitleproperty.final ObjectProperty<File> The initial directory for the displayed dialog.final voidsetInitialDirectory(File value) Sets the value of theinitialDirectoryproperty.final voidSets the value of thetitleproperty.showDialog(Window ownerWindow) Shows a new directory selection dialog.final StringPropertyThe title of the displayed dialog.
- 
Property Details- 
titleThe title of the displayed dialog.- See Also:
 
- 
initialDirectoryThe initial directory for the displayed dialog.- See Also:
 
 
- 
- 
Constructor Details- 
DirectoryChooserpublic DirectoryChooser()Creates aDirectoryChooser.
 
- 
- 
Method Details- 
setTitleSets the value of thetitleproperty.- Property description:
- The title of the displayed dialog.
- Parameters:
- value- the value for the- titleproperty
- See Also:
 
- 
getTitleGets the value of thetitleproperty.- Property description:
- The title of the displayed dialog.
- Returns:
- the value of the titleproperty
- See Also:
 
- 
titlePropertyThe title of the displayed dialog.- Returns:
- the titleproperty
- See Also:
 
- 
setInitialDirectorySets the value of theinitialDirectoryproperty.- Property description:
- The initial directory for the displayed dialog.
- Parameters:
- value- the value for the- initialDirectoryproperty
- See Also:
 
- 
getInitialDirectoryGets the value of theinitialDirectoryproperty.- Property description:
- The initial directory for the displayed dialog.
- Returns:
- the value of the initialDirectoryproperty
- See Also:
 
- 
initialDirectoryPropertyThe initial directory for the displayed dialog.- Returns:
- the initialDirectoryproperty
- See Also:
 
- 
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
 
 
-