Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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.