Example usage for javax.swing JFileChooser getActionMap

List of usage examples for javax.swing JFileChooser getActionMap

Introduction

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

Prototype

public final ActionMap getActionMap() 

Source Link

Document

Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.

Usage

From source file:edu.clemson.lph.civet.addons.VspsCviFile.java

public void importVspsFile(Window parent) {
    String sVspsDir = CivetConfig.getVspsDirPath();
    File fDir = new File(sVspsDir);
    JFileChooser open = new JFileChooser(fDir);
    Action details = open.getActionMap().get("viewTypeDetails");
    details.actionPerformed(null);//from   www. j  av a  2 s . c  om
    open.setDialogTitle("Civet: Open PDF File");
    open.setFileSelectionMode(JFileChooser.FILES_ONLY);
    open.setFileFilter(new FileNameExtensionFilter("CSV Files", "csv"));
    open.setMultiSelectionEnabled(false);
    int resultOfFileSelect = open.showOpenDialog(parent);
    if (resultOfFileSelect == JFileChooser.APPROVE_OPTION) {
        File fIn = open.getSelectedFile();
        saveme(parent, fIn);
        //          vsps.printme();
    }

}