Example usage for java.awt FileDialog setModalityType

List of usage examples for java.awt FileDialog setModalityType

Introduction

In this page you can find the example usage for java.awt FileDialog setModalityType.

Prototype

public void setModalityType(ModalityType type) 

Source Link

Document

Sets the modality type for this dialog.

Usage

From source file:br.upe.ecomp.dosa.view.mainwindow.MainWindowActions.java

@Override
protected void exportButtonActionPerformed(ActionEvent evt) {
    String outputDirectory = null;
    String outputFile = null;/*from   www.j  a  v a2s  .  c o m*/
    String measurement = (String) measurementLineResultComboBox.getSelectedItem();
    Integer step = Integer.parseInt(stepLineResultTextField.getText());

    FileDialog fileopen = new FileDialog(new Frame(), "Open Results Directory", FileDialog.SAVE);
    fileopen.setModalityType(ModalityType.DOCUMENT_MODAL);
    fileopen.setVisible(true);

    if (fileopen.getFile() != null) {
        outputDirectory = fileopen.getDirectory();
        outputFile = fileopen.getFile();
    }

    if (outputDirectory != null && outputFile != null) {
        new CSVParser().parse(outputDirectory, outputFile, resultFiles, measurement, step);
    }
}