Class FilePicker


  • public class FilePicker
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FilePicker​(com.sun.star.uno.XComponentContext xContext)
      Convenience wrapper class for the UNO file picker service
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPath()
      Get a user selected path with a file picker
      java.lang.String[] getPaths()
      Get one or more user selected paths with a file picker Warning: This does not work on all platforms when using native file pickers (but always when using Office file pickers)
      • Methods inherited from class java.lang.Object

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

      • FilePicker

        public FilePicker​(com.sun.star.uno.XComponentContext xContext)
        Convenience wrapper class for the UNO file picker service
        Parameters:
        xContext - the UNO component context from which the file picker can be created
    • Method Detail

      • getPaths

        public java.lang.String[] getPaths()
        Get one or more user selected paths with a file picker Warning: This does not work on all platforms when using native file pickers (but always when using Office file pickers)
        Returns:
        array containing the path URLs or null if the dialog is canceled
      • getPath

        public java.lang.String getPath()
        Get a user selected path with a file picker
        Returns:
        the path URL or null if the dialog is canceled