public class CommonFileChooser extends Object
| Constructor and Description |
|---|
CommonFileChooser(String[] extensions,
String description)
This constructor creates the JFileChooser and the Extension-Filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(String extension)
Adds an extension to the extension-filter.
|
void |
clearExtensions()
Deletes all extensions from the extension-filter.
|
void |
setCurrentDirectory(String currentDirectory) |
void |
setDescription(String description)
Sets the description for the extensions.
|
String |
showDialogAndReturnFilename(JPanel parent,
String label)
This method shows the JFileChooser for a parent JPanel and returns the
path of the selected file.
|
public void addExtension(String extension)
extension - The extension to addpublic void clearExtensions()
public void setDescription(String description)
description - The description the user want so set uppublic String showDialogAndReturnFilename(JPanel parent, String label)
parent - The parent JPanellabel - This parameter is to define the label of the dialogpublic void setCurrentDirectory(String currentDirectory)
Copyright © 2013. All rights reserved.