use of javafx.stage.DirectoryChooser in project bitsquare by bitsquare.
the class GUIUtil method getDirectoryFormChooser.
public static String getDirectoryFormChooser(Preferences preferences, Stage stage) {
DirectoryChooser directoryChooser = new DirectoryChooser();
directoryChooser.setInitialDirectory(new File(preferences.getDefaultPath()));
directoryChooser.setTitle("Select export path");
File dir = directoryChooser.showDialog(stage);
if (dir != null) {
String directory = dir.getAbsolutePath();
preferences.setDefaultPath(directory);
return directory;
} else {
return "";
}
}
use of javafx.stage.DirectoryChooser in project Entitas-Java by Rubentxu.
the class CodeGeneratorApp method handleComponentsFolder.
@FXML
public void handleComponentsFolder(ActionEvent event) {
final DirectoryChooser directoryChooser = new DirectoryChooser();
final File selectedDirectory = directoryChooser.showDialog(stage);
if (selectedDirectory != null) {
fieldComponentFolder.setText(selectedDirectory.getAbsolutePath());
if (props != null)
props.setProperty("fieldComponentFolder", selectedDirectory.getAbsolutePath());
}
}
use of javafx.stage.DirectoryChooser in project Entitas-Java by Rubentxu.
the class CodeGeneratorApp method handleGeneratedFolder.
@FXML
public void handleGeneratedFolder(ActionEvent event) {
final DirectoryChooser directoryChooser = new DirectoryChooser();
final File selectedDirectory = directoryChooser.showDialog(stage);
if (selectedDirectory != null) {
fieldGeneratedFolder.setText(selectedDirectory.getAbsolutePath());
if (props != null)
props.setProperty("fieldGeneratedFolder", selectedDirectory.getAbsolutePath());
}
}
use of javafx.stage.DirectoryChooser in project jabref by JabRef.
the class FXDialogService method getConfiguredDirectoryChooser.
private DirectoryChooser getConfiguredDirectoryChooser(DirectoryDialogConfiguration directoryDialogConfiguration) {
DirectoryChooser chooser = new DirectoryChooser();
directoryDialogConfiguration.getInitialDirectory().map(Path::toFile).ifPresent(chooser::setInitialDirectory);
return chooser;
}
use of javafx.stage.DirectoryChooser in project trex-stateless-gui by cisco-system-traffic-generator.
the class PreferencesController method initialize.
/**
* Initializes the controller class.
*
* @param url
* @param rb
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
chooser = new DirectoryChooser();
// initialize locations
loadPreferences();
}
Aggregations