Class WebFileOpenPicker

java.lang.Object
one.jpro.platform.file.picker.WebFileOpenPicker
All Implemented Interfaces:
MultipleFileSelector, FileOpenPicker, FilePicker

public class WebFileOpenPicker extends Object
Represents a FileOpenPicker implementation for JavaFX applications running on the web via JPro server. This class specializes for selecting and opening local files on a web application.
Author:
Besmir Beqiri
  • Property Details

  • Constructor Details

    • WebFileOpenPicker

      public WebFileOpenPicker(javafx.scene.Node node)
      Initializes a new instance associated with the specified node.
      Parameters:
      node - The node associated with this file picker.
  • Method Details

    • getTitle

      public final String getTitle()
      Gets the value of the title property.
      Property description:
      Returns:
      the value of the title property
      See Also:
    • setTitle

      public final void setTitle(String value)
      Sets the value of the title property.
      Property description:
      Parameters:
      value - the value for the title property
      See Also:
    • titleProperty

      public final javafx.beans.property.StringProperty titleProperty()
      Description copied from interface: FilePicker
      The title of the displayed file dialog.
      Returns:
      the title property
      See Also:
    • initialFileNameProperty

      public final javafx.beans.property.StringProperty initialFileNameProperty()
      Description copied from interface: FilePicker
      The initial file name for the displayed dialog.

      This property is used mostly in the displayed file save dialogs as the initial file name for the file being saved. If set for a file open dialog it will have any impact on the displayed dialog only if the corresponding platform provides support for such property in its file open dialogs.

      Returns:
      the initialFileName property
      See Also:
    • getInitialDirectory

      public final File getInitialDirectory()
      Gets the value of the initialDirectory property.
      Property description:
      Returns:
      the value of the initialDirectory property
      See Also:
    • setInitialDirectory

      public final void setInitialDirectory(File value)
      Sets the value of the initialDirectory property.
      Property description:
      Parameters:
      value - the value for the initialDirectory property
      See Also:
    • initialDirectoryProperty

      public final javafx.beans.property.ObjectProperty<File> initialDirectoryProperty()
      Description copied from interface: FilePicker
      Defines the initial directory for the displayed file dialog.
      Returns:
      the initialDirectory property
      See Also:
    • selectionModeProperty

      public final javafx.beans.property.ObjectProperty<javafx.scene.control.SelectionMode> selectionModeProperty()
      Description copied from interface: MultipleFileSelector
      Defines the selection mode. The selection mode determines how the file dialog allows the user to select files.
      Returns:
      the selectionMode property
      See Also:
    • onFilesSelectedProperty

      public final javafx.beans.property.ObjectProperty<Consumer<List<? extends FileSource>>> onFilesSelectedProperty()
      Description copied from interface: MultipleFileSelector
      Defines the handler to be called when the user selects files. The handler returns the selected files or null if no file has been selected.
      Specified by:
      onFilesSelectedProperty in interface MultipleFileSelector
      Returns:
      the onFilesSelected property
      See Also:
    • getSelectionMode

      public final javafx.scene.control.SelectionMode getSelectionMode()
      Description copied from interface: MultipleFileSelector
      Returns the selection mode.

      The default value is SelectionMode.SINGLE.

      Specified by:
      getSelectionMode in interface MultipleFileSelector
      Returns:
      the selection mode of the file dialog
    • setSelectionMode

      public final void setSelectionMode(javafx.scene.control.SelectionMode value)
      Description copied from interface: MultipleFileSelector
      Sets the selection mode.
      Specified by:
      setSelectionMode in interface MultipleFileSelector
      Parameters:
      value - The selection mode to be set. This should be one of the values defined in the SelectionMode enumeration. Possible values are SelectionMode.SINGLE or SelectionMode.MULTIPLE.
    • getOnFilesSelected

      public final Consumer<List<? extends FileSource>> getOnFilesSelected()
      Description copied from interface: MultipleFileSelector
      Gets the handler to be called when the user selects files.
      Specified by:
      getOnFilesSelected in interface MultipleFileSelector
      Returns:
      the event handler or null.
    • setOnFilesSelected

      public final void setOnFilesSelected(Consumer<List<? extends FileSource>> value)
      Description copied from interface: MultipleFileSelector
      Sets the handler to be called when the user selects files.
      Specified by:
      setOnFilesSelected in interface MultipleFileSelector
      Parameters:
      value - the event handler or null.
    • getNode

      public final javafx.scene.Node getNode()
      Description copied from interface: FilePicker
      Returns the associated node for this file picker.
      Specified by:
      getNode in interface FilePicker
      Returns:
      the associated node for this file picker.
    • getInitialFileName

      public final String getInitialFileName()
      Description copied from interface: FilePicker
      The initial file name for the displayed dialog.
      Specified by:
      getInitialFileName in interface FilePicker
      Returns:
      the file name as a string
    • setInitialFileName

      public final void setInitialFileName(String value)
      Description copied from interface: FilePicker
      Sets the initial file name for the displayed dialog.
      Specified by:
      setInitialFileName in interface FilePicker
      Parameters:
      value - the file name
    • getExtensionFilters

      public final javafx.collections.ObservableList<ExtensionFilter> getExtensionFilters()
      Description copied from interface: FilePicker
      Gets the extension filters used in the displayed file dialog. Only one extension filter from the list is active at any time in the displayed dialog and only files which correspond to this extension filter are shown. The first extension filter from the list is activated when the dialog is invoked. Then the user can switch the active extension filter to any other extension filter from the list and in this way control the set of displayed files.
      Specified by:
      getExtensionFilters in interface FilePicker
      Returns:
      An observable list of the extension filters used in the dialog
    • getSelectedExtensionFilter

      public final ExtensionFilter getSelectedExtensionFilter()
      Description copied from interface: FilePicker
      Gets the extension filter which is currently selected in the displayed file dialog.
      Specified by:
      getSelectedExtensionFilter in interface FilePicker
      Returns:
      the selected extension filter or null if no extension
    • setSelectedExtensionFilter

      public final void setSelectedExtensionFilter(ExtensionFilter filter)
      Description copied from interface: FilePicker
      Sets the extension filter which is currently selected in the displayed file dialog.
      Specified by:
      setSelectedExtensionFilter in interface FilePicker
      Parameters:
      filter - the selected extension filter
    • selectedExtensionFilterProperty

      public final javafx.beans.property.ObjectProperty<ExtensionFilter> selectedExtensionFilterProperty()
      Description copied from interface: FilePicker
      This property is used to pre-select the extension filter for the next displayed dialog and to read the user-selected extension filter from the dismissed dialog.

      When the file dialog is shown, the selectedExtensionFilter will be checked. If the value of selectedExtensionFilter is null or is not contained in the list of extension filters, then the first extension filter in the list of extension filters will be selected instead. Otherwise, the specified selectedExtensionFilter will be activated.

      After the dialog is dismissed the value of this property is updated to match the user-selected extension filter from the dialog.

      Specified by:
      selectedExtensionFilterProperty in interface FilePicker
      Returns:
      the selectedExtensionFilter property
      See Also: