/****************************************************************************
 * Copyright (C) 2014 ecsec GmbH.
 * All rights reserved.
 * Contact: ecsec GmbH (info@ecsec.de)
 *
 * This file is part of the Open eCard App.
 *
 * GNU General Public License Usage
 * This file may be used under the terms of the GNU General Public
 * License version 3.0 as published by the Free Software Foundation
 * and appearing in the file LICENSE.GPL included in the packaging of
 * this file. Please review the following information to ensure the
 * GNU General Public License version 3.0 requirements will be met:
 * http://www.gnu.org/copyleft/gpl.html.
 *
 * Other Usage
 * Alternatively, this file may be used in accordance with the terms
 * and conditions contained in a signed written agreement between
 * you and ecsec GmbH.
 *
 ***************************************************************************/

package org.openecard.richclient.gui.components;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JTextField;


/**
 *
 * @author Hans-Martin Haase <hans-martin.haase@ecsec.de>
 */
public class OpenFileBrowserListener implements ActionListener {
    private final String fileType;
    private final JTextField value;

    public OpenFileBrowserListener(String fileTypes, JTextField currentvalue) {
	fileType = fileTypes;
	value = currentvalue;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
	FileChooserItem fChooser = new FileChooserItem(fileType);
	fChooser.setVisible(true);
	int chooserresult = fChooser.showOpenDialog(null);

	if (chooserresult == JFileChooser.APPROVE_OPTION && fChooser.getSelectedFile().isFile()) {
	    value.setText(fChooser.getSelectedFile().getPath());
	}
    }

}

@@ -1021,29 +1021,8 @@
 er;%0A
-import java.io.File;%0A
 impo
@@ -1087,16 +1087,76 @@
 ;%0A%0A%0A/**%0A
+ * ActionListener implementation which opens a FileChooser.%0A
  *%0A * @a
@@ -1281,212 +1281,942 @@
 r %7B%0A
-    private final String fileType;%0A    private final JTextField value;%0A%0A    public OpenFileBrowserListener(String fileTypes, JTextField currentvalue) %7B%0A%09fileType = fileTypes;%0A%09value = currentvalue;%0A    %7D%0A
+%0A    /**%0A     * A semicolon separated list of accepted file types.%0A     */%0A    private final String fileType;%0A%0A    /**%0A     * The JTextField which is modified when a file was selected.%0A     */%0A    private final JTextField value;%0A%0A    /**%0A     * Creates a new OpenFileBrowserListener object.%0A     *%0A     * @param fileTypes A semicolon separated list of accepted file types.%0A     * @param currentvalue A %7B@link JTextField%7D which registers this listener.%0A     */%0A    public OpenFileBrowserListener(String fileTypes, JTextField currentvalue) %7B%0A%09fileType = fileTypes;%0A%09value = currentvalue;%0A    %7D%0A%0A    /**%0A     * Creates a new FileChooserItem and make it appear on the screen.%0A     *%0A     * The method creates a %7B@link FileChooserItem%7D and makes it visible on the screen. If the user has selected a valid%0A     * file according to the restrictions stored in the %7B@code fileType%7D field.%0A     *%0A     * @param e An %7B@link ActionEvent%7D.%0A     */
 %0A   

Remove unused import and add java doc.