java.lang.Object
one.jpro.platform.file.dropper.WebFileDropper
- All Implemented Interfaces:
javafx.event.EventTarget,FileDropper,MultipleFileSelector
Represents a
FileDropper implementation for JavaFX applications
running on the web via JPro server. This class extends the BaseFileDropper
class and specializes it for web files.- Author:
- Besmir Beqiri
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<ExtensionFilter> Defines the property for the extension filter.final javafx.beans.property.ReadOnlyBooleanPropertyDefines the property for the files drag over state.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> Event handler invoked when file dragging gesture enters the target node.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> Event handler invoked when file dragging gesture exits the target node.final javafx.beans.property.ObjectProperty<Consumer<List<? extends FileSource>>> Defines the handler to be called when the user selects files.final javafx.beans.property.ObjectProperty<javafx.scene.control.SelectionMode> Defines the selection mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.event.EventDispatchChainbuildEventDispatchChain(javafx.event.EventDispatchChain tail) final javafx.beans.property.ObjectProperty<ExtensionFilter> Defines the property for the extension filter.final javafx.beans.property.ReadOnlyBooleanPropertyDefines the property for the files drag over state.final ExtensionFilterGets the extension filter which is currently used.final javafx.collections.ObservableList<String> Returns the MIME types of the files which are currently dragged above the node.javafx.scene.NodegetNode()Returns the target node for this file dropper.final javafx.event.EventHandler<FileDragEvent> Retrieves the event handler to be called when file dragging gesture enters the target node.final javafx.event.EventHandler<FileDragEvent> Retrieves the event handler to be called when file dragging gesture exits the target node.Consumer<List<? extends FileSource>> Gets the handler to be called when the user selects files.final javafx.scene.control.SelectionModeReturns the selection mode.final booleanGets the value of thefilesDragOverproperty.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> Event handler invoked when file dragging gesture enters the target node.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> Event handler invoked when file dragging gesture exits the target node.final javafx.beans.property.ObjectProperty<Consumer<List<? extends FileSource>>> Defines the handler to be called when the user selects files.final javafx.beans.property.ObjectProperty<javafx.scene.control.SelectionMode> Defines the selection mode.final voidsetExtensionFilter(ExtensionFilter filter) Sets the extension filter which is currently used.final voidsetOnDragEntered(javafx.event.EventHandler<FileDragEvent> value) Sets the event handler to be called when file dragging gesture enters the target node.final voidsetOnDragExited(javafx.event.EventHandler<FileDragEvent> value) Sets the event handler to be called when file dragging gesture enters the target node.voidsetOnFilesSelected(Consumer<List<? extends FileSource>> value) Sets the handler to be called when the user selects files.final voidsetSelectionMode(javafx.scene.control.SelectionMode value) Sets the selection mode.
-
Property Details
-
selectionMode
public final javafx.beans.property.ObjectProperty<javafx.scene.control.SelectionMode> selectionModeProperty- Specified by:
selectionModePropertyin interfaceMultipleFileSelector- Returns:
- the
selectionModeproperty - See Also:
-
onFilesSelected
public final javafx.beans.property.ObjectProperty<Consumer<List<? extends FileSource>>> onFilesSelectedProperty- Specified by:
onFilesSelectedPropertyin interfaceMultipleFileSelector- Returns:
- the
onFilesSelectedproperty - See Also:
-
filesDragOver
public final javafx.beans.property.ReadOnlyBooleanProperty filesDragOverProperty- Returns:
- the
filesDragOverproperty - See Also:
-
extensionFilter
- Specified by:
extensionFilterPropertyin interfaceFileDropper- Returns:
- the
extensionFilterproperty - See Also:
-
onDragEntered
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> onDragEnteredProperty- Specified by:
onDragEnteredPropertyin interfaceFileDropper- Returns:
- the
onDragEnteredproperty - See Also:
-
onDragExited
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> onDragExitedProperty- Specified by:
onDragExitedPropertyin interfaceFileDropper- Returns:
- the
onDragExitedproperty - See Also:
-
-
Constructor Details
-
WebFileDropper
public WebFileDropper(javafx.scene.Node node)
-
-
Method Details
-
selectionModeProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.control.SelectionMode> selectionModeProperty()Description copied from interface:MultipleFileSelectorDefines the selection mode. The selection mode determines how the file dialog allows the user to select files.- Specified by:
selectionModePropertyin interfaceMultipleFileSelector- Returns:
- the
selectionModeproperty - See Also:
-
onFilesSelectedProperty
public final javafx.beans.property.ObjectProperty<Consumer<List<? extends FileSource>>> onFilesSelectedProperty()Description copied from interface:MultipleFileSelectorDefines the handler to be called when the user selects files. The handler returns the selected files ornullif no file has been selected.- Specified by:
onFilesSelectedPropertyin interfaceMultipleFileSelector- Returns:
- the
onFilesSelectedproperty - See Also:
-
isFilesDragOver
public final boolean isFilesDragOver()Gets the value of thefilesDragOverproperty.- Property description:
- Returns:
- the value of the
filesDragOverproperty - See Also:
-
filesDragOverProperty
public final javafx.beans.property.ReadOnlyBooleanProperty filesDragOverProperty()Description copied from interface:FileDropperDefines the property for the files drag over state.- Returns:
- the
filesDragOverproperty - See Also:
-
getFilesDragOverTypes
Returns the MIME types of the files which are currently dragged above the node. -
getNode
public javafx.scene.Node getNode()Description copied from interface:FileDropperReturns the target node for this file dropper.- Specified by:
getNodein interfaceFileDropper- Returns:
- the target node for this file dropper.
-
getExtensionFilter
Description copied from interface:FileDropperGets the extension filter which is currently used.- Specified by:
getExtensionFilterin interfaceFileDropper- Returns:
- the extension filter or
nullif no extension
-
setExtensionFilter
Description copied from interface:FileDropperSets the extension filter which is currently used.- Specified by:
setExtensionFilterin interfaceFileDropper- Parameters:
filter- the extension filter
-
extensionFilterProperty
Description copied from interface:FileDropperDefines the property for the extension filter.- Specified by:
extensionFilterPropertyin interfaceFileDropper- Returns:
- the
extensionFilterproperty - See Also:
-
getSelectionMode
public final javafx.scene.control.SelectionMode getSelectionMode()Description copied from interface:MultipleFileSelectorReturns the selection mode.The default value is
SelectionMode.SINGLE.- Specified by:
getSelectionModein interfaceMultipleFileSelector- Returns:
- the selection mode of the file dialog
-
setSelectionMode
public final void setSelectionMode(javafx.scene.control.SelectionMode value) Description copied from interface:MultipleFileSelectorSets the selection mode.- Specified by:
setSelectionModein interfaceMultipleFileSelector- Parameters:
value- The selection mode to be set. This should be one of the values defined in the SelectionMode enumeration. Possible values areSelectionMode.SINGLEorSelectionMode.MULTIPLE.
-
getOnDragEntered
Description copied from interface:FileDropperRetrieves the event handler to be called when file dragging gesture enters the target node.- Specified by:
getOnDragEnteredin interfaceFileDropper- Returns:
- the event handler or
null.
-
setOnDragEntered
Description copied from interface:FileDropperSets the event handler to be called when file dragging gesture enters the target node.- Specified by:
setOnDragEnteredin interfaceFileDropper- Parameters:
value- the event handler ornull.
-
onDragEnteredProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> onDragEnteredProperty()Description copied from interface:FileDropperEvent handler invoked when file dragging gesture enters the target node.- Specified by:
onDragEnteredPropertyin interfaceFileDropper- Returns:
- the
onDragEnteredproperty - See Also:
-
getOnDragExited
Description copied from interface:FileDropperRetrieves the event handler to be called when file dragging gesture exits the target node.- Specified by:
getOnDragExitedin interfaceFileDropper- Returns:
- the event handler or
null.
-
setOnDragExited
Description copied from interface:FileDropperSets the event handler to be called when file dragging gesture enters the target node.- Specified by:
setOnDragExitedin interfaceFileDropper- Parameters:
value- the event handler ornull.
-
onDragExitedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<FileDragEvent>> onDragExitedProperty()Description copied from interface:FileDropperEvent handler invoked when file dragging gesture exits the target node.- Specified by:
onDragExitedPropertyin interfaceFileDropper- Returns:
- the
onDragExitedproperty - See Also:
-
getOnFilesSelected
Description copied from interface:MultipleFileSelectorGets the handler to be called when the user selects files.- Specified by:
getOnFilesSelectedin interfaceMultipleFileSelector- Returns:
- the event handler or
null.
-
setOnFilesSelected
Description copied from interface:MultipleFileSelectorSets the handler to be called when the user selects files.- Specified by:
setOnFilesSelectedin interfaceMultipleFileSelector- Parameters:
value- the event handler ornull.
-
buildEventDispatchChain
public javafx.event.EventDispatchChain buildEventDispatchChain(javafx.event.EventDispatchChain tail) - Specified by:
buildEventDispatchChainin interfacejavafx.event.EventTarget
-