Search in sources :

Example 11 with DirectoryChooser

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 "";
    }
}
Also used : File(java.io.File) DirectoryChooser(javafx.stage.DirectoryChooser)

Example 12 with DirectoryChooser

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());
    }
}
Also used : CodeGenFile(ilargia.entitas.codeGeneration.data.CodeGenFile) DirectoryChooser(javafx.stage.DirectoryChooser) FXML(javafx.fxml.FXML)

Example 13 with DirectoryChooser

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());
    }
}
Also used : CodeGenFile(ilargia.entitas.codeGeneration.data.CodeGenFile) DirectoryChooser(javafx.stage.DirectoryChooser) FXML(javafx.fxml.FXML)

Example 14 with DirectoryChooser

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;
}
Also used : DirectoryChooser(javafx.stage.DirectoryChooser)

Example 15 with DirectoryChooser

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();
}
Also used : DirectoryChooser(javafx.stage.DirectoryChooser)

Aggregations

DirectoryChooser (javafx.stage.DirectoryChooser)16 File (java.io.File)8 FXML (javafx.fxml.FXML)6 CodeGenFile (ilargia.entitas.codeGeneration.data.CodeGenFile)4 BaseController (com.spawpaw.mybatis.generator.gui.controller.BaseController)1 Constants (com.spawpaw.mybatis.generator.gui.util.Constants)1 RenderManager (fractal.RenderManager)1 Popup (io.bitsquare.gui.main.overlays.popups.Popup)1 Dimension (java.awt.Dimension)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 CancellationException (java.util.concurrent.CancellationException)1 Platform (javafx.application.Platform)1 Alert (javafx.scene.control.Alert)1 Button (javafx.scene.control.Button)1 ButtonType (javafx.scene.control.ButtonType)1 Label (javafx.scene.control.Label)1