Package jadex.base.gui
Class RemoteFileChooser
- java.lang.Object
-
- jadex.base.gui.RemoteFileChooser
-
public class RemoteFileChooser extends java.lang.Object
Helper class that uses a JFileChooser for selecting a file at a remote platform. Methods of this class should only be called from the swing thread.
-
-
Field Summary
Fields Modifier and Type Field Description protected IFuture<javax.swing.JFileChooser>
filechooser
The file chooser (asynchronously created on first access).protected IExternalAccess
remote
The remote platform access.
-
Constructor Summary
Constructors Constructor Description RemoteFileChooser(IExternalAccess remote)
Create a remote file chooser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<FileData>
chooseFile(java.lang.String title, java.lang.String def, javax.swing.JComponent parent, int mode, javax.swing.filechooser.FileFilter filter)
Choose a remote file.IFuture<javax.swing.JFileChooser>
getFileChooser()
Get or create the file chooser.
-
-
-
Field Detail
-
remote
protected IExternalAccess remote
The remote platform access.
-
filechooser
protected IFuture<javax.swing.JFileChooser> filechooser
The file chooser (asynchronously created on first access).
-
-
Constructor Detail
-
RemoteFileChooser
public RemoteFileChooser(IExternalAccess remote)
Create a remote file chooser.- Parameters:
remote
- The remote platform access.
-
-
Method Detail
-
chooseFile
public IFuture<FileData> chooseFile(java.lang.String title, java.lang.String def, javax.swing.JComponent parent, int mode, javax.swing.filechooser.FileFilter filter)
Choose a remote file.- Parameters:
title
- The file chooser title.def
- The default file (if any).filename
- A file name (without path) to use as default (if any).parent
- The parent component.mode
- The file selection mode.filter
- A file filter to use (if any).- Returns:
- The absolute path of the file from the remote file system or null if no file was selected.
-
getFileChooser
public IFuture<javax.swing.JFileChooser> getFileChooser()
Get or create the file chooser.
-
-