| |
|
| javax.swing.JFileChooser org.netbeans.api.project.ant.FileChooser
FileChooser | final public class FileChooser extends JFileChooser (Code) | | Custom file chooser allowing user to choose how a file will be referenced
from a project - via absolute path, or relative path. Make sure you call
FileChooser.getSelectedPaths instead of
FileChooser.getSelectedFiles as it returns relative
files and performs file copying if necessary.
author: David Konecny since: org.netbeans.modules.project.ant/1 1.19 |
Constructor Summary | |
public | FileChooser(AntProjectHelper helper, boolean copyAllowed) Create chooser for given AntProjectHelper. | public | FileChooser(File baseFolder, File sharedLibrariesFolder) Create chooser for given base folder and shared libraries folder. |
FileChooser | public FileChooser(AntProjectHelper helper, boolean copyAllowed)(Code) | | Create chooser for given AntProjectHelper. Standard file chooser is shown
if project is not sharable.
Parameters: helper - ant project helper; cannot be null Parameters: copyAllowed - is file copying allowed |
FileChooser | public FileChooser(File baseFolder, File sharedLibrariesFolder)(Code) | | Create chooser for given base folder and shared libraries folder.
Parameters: baseFolder - base folder to which all selected files will be relativized;can be null in which case regular file chooser is shown Parameters: sharedLibrariesFolder - providing shared libraries folder enables optionof copying selected files there; can be null in which case copying optionis disabled |
approveSelection | public void approveSelection()(Code) | | |
getSelectedPaths | public String[] getSelectedPaths() throws IOException(Code) | | Returns array of paths selected. The difference from
FileChooser.getSelectedFiles is that depends on user's choice the files
may be relative and they may have been copied to different location.
array of files which may be relative to base folder this chooserwas created for; e.g. project folder in case of AntProjectHelper constructor; never null; can be empty array throws: java.io.IOException - any IO problem; for example during file copying |
|
|
|