com.accendia.netstart.client.service
Class JSecureFileChooser

java.lang.Object
  extended by com.accendia.netstart.client.service.JSecureFileChooser

public class JSecureFileChooser
extends java.lang.Object

Provides the method for the user to select files the application is allowed to write or read and returns FileProxy objects for the selected files. The user is in full control over which files are read and written by the application.


Constructor Summary
JSecureFileChooser()
          Creates a JSecureFileChooser instance.
 
Method Summary
 java.lang.String getSelectedFile()
           
 boolean isAcceptAllFileFilterUsed()
           
 boolean isMultiSelectionEnabled()
           
 void setAcceptAllFileFilterUsed(boolean b)
          Sets the flag that indicates whether the accept all file filter is used.
 void setFilterExtensions(java.lang.String[] extensions)
          Sets the list of filter extensions.
 void setMultiSelectionEnabled(boolean b)
          Sets the flag that allows the user to select multiple files.
 void setSelectedFile(java.lang.String fileName)
          Sets the initial file selection.
 FileProxy[] showOpenDialog(java.awt.Component parent)
          Displays a file chooser dialog that allows the user to select files the application is allowed to read.
 FileProxy[] showSaveDialog(java.awt.Component parent)
          Displays a file chooser dialog that allows the user to select files the application is allowed to write.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSecureFileChooser

public JSecureFileChooser()
Creates a JSecureFileChooser instance.

Method Detail

setFilterExtensions

public void setFilterExtensions(java.lang.String[] extensions)
Sets the list of filter extensions.

Parameters:
extensions - The array of filter extensions for the file chooser dialogs.

setMultiSelectionEnabled

public void setMultiSelectionEnabled(boolean b)
Sets the flag that allows the user to select multiple files.

Parameters:
b - true if the user is allowed to select multiple files.

isMultiSelectionEnabled

public boolean isMultiSelectionEnabled()
Returns:
The multiple file selection flag.

setAcceptAllFileFilterUsed

public void setAcceptAllFileFilterUsed(boolean b)
Sets the flag that indicates whether the accept all file filter is used.

Parameters:
b - true if the accept all file filter will be used.

isAcceptAllFileFilterUsed

public boolean isAcceptAllFileFilterUsed()
Returns:
The accept all file filter flag.

setSelectedFile

public void setSelectedFile(java.lang.String fileName)
Sets the initial file selection.

Parameters:
fileName - The name of the file that must be initially selected.

getSelectedFile

public java.lang.String getSelectedFile()
Returns:
The name of the file initially selected.

showOpenDialog

public FileProxy[] showOpenDialog(java.awt.Component parent)
Displays a file chooser dialog that allows the user to select files the application is allowed to read.

Parameters:
parent - The parent window of the dialog.
Returns:
A list of file proxies to the files selected by the user or null if the user cancels the dialog.

showSaveDialog

public FileProxy[] showSaveDialog(java.awt.Component parent)
Displays a file chooser dialog that allows the user to select files the application is allowed to write.

Parameters:
parent - The parent window of the dialog.
Returns:
A list of file proxies to the files selected by the user or null if the user cancels the dialog.