Example usage for javax.swing JFileChooser isMultiSelectionEnabled

List of usage examples for javax.swing JFileChooser isMultiSelectionEnabled

Introduction

In this page you can find the example usage for javax.swing JFileChooser isMultiSelectionEnabled.

Prototype

public boolean isMultiSelectionEnabled() 

Source Link

Document

Returns true if multiple files can be selected.

Usage

From source file:Main.java

public static void main(String[] argv) {
    JFileChooser chooser = new JFileChooser();
    boolean enabled = chooser.isMultiSelectionEnabled();

    chooser.showOpenDialog(null);/*from  w  ww  .j a v  a2s.  c o  m*/
}

From source file:se.trixon.mapollage.ui.config.ModuleSourcePanel.java

@Override
public void onFileChooserOk(FileChooserPanel fileChooserPanel, File file) {
    JFileChooser fileChooser = fileChooserPanel.getFileChooser();

    if (fileChooserPanel == sourceChooserPanel) {
        if (fileChooser.isMultiSelectionEnabled()) {
            String paths = StringUtils.join(fileChooser.getSelectedFiles(), File.pathSeparator);
            fileChooserPanel.setPath(paths);
        }/*from w  ww. j a v a 2  s.  c om*/

        saveSourcePath();
    }
}

From source file:se.trixon.toolbox.checksum.ChecksumTopComponent.java

@Override
public void onFileChooserOk(FileChooserPanel fileChooserPanel, File file) {
    JFileChooser fileChooser = fileChooserPanel.getFileChooser();
    if (fileChooserPanel == sourceChooserPanel) {
        logPanel.clear();/* w ww  .j  a va2s.c  om*/
        if (fileChooser.isMultiSelectionEnabled()) {
            String paths = StringUtils.join(fileChooser.getSelectedFiles(), SystemUtils.PATH_SEPARATOR);
            fileChooserPanel.setPath(paths);
        }
    }
}

From source file:se.trixon.toolbox.dbtext.DbTextTopComponent.java

@Override
public void onFileChooserOk(FileChooserPanel fileChooserPanel, File file) {
    JFileChooser fileChooser = fileChooserPanel.getFileChooser();

    if (fileChooserPanel == sourceChooserPanel) {
        if (fileChooser.isMultiSelectionEnabled()) {
            String paths = StringUtils.join(fileChooser.getSelectedFiles(), SystemUtils.PATH_SEPARATOR);
            fileChooserPanel.setPath(paths);
        }/*  w w w. j ava2  s .  co m*/
    }
}

From source file:se.trixon.toolbox.photokml.config.ModuleSourcePanel.java

@Override
public void onFileChooserOk(FileChooserPanel fileChooserPanel, File file) {
    JFileChooser fileChooser = fileChooserPanel.getFileChooser();

    if (fileChooserPanel == sourceChooserPanel) {
        if (fileChooser.isMultiSelectionEnabled()) {
            String paths = StringUtils.join(fileChooser.getSelectedFiles(), SystemUtils.PATH_SEPARATOR);
            fileChooserPanel.setPath(paths);
        }//from  w  ww  .  ja  v  a  2  s . co  m

        saveSourcePath();
    }
}