Interface WebAPI.SingleFileUploader
- All Superinterfaces:
WebAPI.FileSelector
- All Known Implementing Classes:
WebAPI.FileUploader
- Enclosing class:
WebAPI
This class is used for uploading a file. It's associated with a node.
- Since:
- 2018.1.1
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<WebAPI.JSFile> The current JSFile, which was selected by the client.javafx.beans.property.ObjectProperty<JSVariable> javafx.beans.property.ObjectProperty<WebAPI.FileSelectedListener> Defines a function to be called when a file is dropped.javafx.beans.property.ReadOnlyDoublePropertyDefines the progress of uploading the file.javafx.beans.property.ReadOnlyStringPropertyContains the filename, which was selected by the client.javafx.beans.property.ReadOnlyIntegerPropertyContains the size in bytes of the selected file.javafx.beans.property.BooleanPropertyDefines whether an object url should be created.javafx.beans.property.ReadOnlyObjectProperty<File> Contains the file, which was uploaded.Properties inherited from interface com.jpro.webapi.WebAPI.FileSelector
fileDragOver, selectFileOnClick, selectFileOnDrop, selectionMode -
Method Summary
Modifier and TypeMethodDescriptiondefault WebAPI.JSFileGets the value of the property jsFile.default WebAPI.FileSelectedListenerdefault doubleGets the value of the property progress.default StringGets the value of the property selectedFile.default intGets the value of the property selectedFileSizedefault FileGets the value of the property uploadedFile.javafx.beans.property.ReadOnlyObjectProperty<WebAPI.JSFile> The current JSFile, which was selected by the client.javafx.beans.property.ObjectProperty<JSVariable> javafx.beans.property.ObjectProperty<WebAPI.FileSelectedListener> Defines a function to be called when a file is dropped.javafx.beans.property.ReadOnlyDoublePropertyDefines the progress of uploading the file.javafx.beans.property.ReadOnlyStringPropertyContains the filename, which was selected by the client.javafx.beans.property.ReadOnlyIntegerPropertyContains the size in bytes of the selected file.default voidjavafx.beans.property.BooleanPropertyDefines whether an object url should be created.javafx.beans.property.ReadOnlyObjectProperty<File> Contains the file, which was uploaded.voidStarts uploading the selected file.Methods inherited from interface com.jpro.webapi.WebAPI.FileSelector
fileDragOverProperty, getFileDragOver, getFilesDragOverTypes, getSelectFileOnClick, getSelectFileOnDrop, getSelectionMode, selectFileOnClickProperty, selectFileOnDropProperty, selectionModeProperty, setSelectFileOnClick, setSelectFileOnDrop, setSelectionMode, supportedExtensions
-
Property Details
-
selectedFile
javafx.beans.property.ReadOnlyStringProperty selectedFilePropertyContains the filename, which was selected by the client.- See Also:
-
selectedFileSize
javafx.beans.property.ReadOnlyIntegerProperty selectedFileSizePropertyContains the size in bytes of the selected file.- See Also:
-
progress
javafx.beans.property.ReadOnlyDoubleProperty progressPropertyDefines the progress of uploading the file. When the value is 1.0, then the upload is finished.- See Also:
-
jsFile
javafx.beans.property.ReadOnlyObjectProperty<WebAPI.JSFile> jsFilePropertyThe current JSFile, which was selected by the client.- See Also:
-
uploadedFile
javafx.beans.property.ReadOnlyObjectProperty<File> uploadedFilePropertyContains the file, which was uploaded. It is null until progress reaches 1.0.- See Also:
-
onFileSelected
javafx.beans.property.ObjectProperty<WebAPI.FileSelectedListener> onFileSelectedPropertyDefines a function to be called when a file is dropped.- See Also:
-
shouldCreateObjectURL
javafx.beans.property.BooleanProperty shouldCreateObjectURLPropertyDefines whether an object url should be created.- See Also:
-
objectURL
javafx.beans.property.ObjectProperty<JSVariable> objectURLProperty- See Also:
-
-
Method Details
-
selectedFileProperty
javafx.beans.property.ReadOnlyStringProperty selectedFileProperty()Contains the filename, which was selected by the client.- Returns:
- the
selectedFileproperty - See Also:
-
selectedFileSizeProperty
javafx.beans.property.ReadOnlyIntegerProperty selectedFileSizeProperty()Contains the size in bytes of the selected file.- Returns:
- the
selectedFileSizeproperty - See Also:
-
progressProperty
javafx.beans.property.ReadOnlyDoubleProperty progressProperty()Defines the progress of uploading the file. When the value is 1.0, then the upload is finished.- Returns:
- the
progressproperty - See Also:
-
jsFileProperty
javafx.beans.property.ReadOnlyObjectProperty<WebAPI.JSFile> jsFileProperty()The current JSFile, which was selected by the client.- Returns:
- the
jsFileproperty
-
uploadFile
void uploadFile()Starts uploading the selected file. During upload, the progress property will slowly reach 1.0. -
uploadedFileProperty
javafx.beans.property.ReadOnlyObjectProperty<File> uploadedFileProperty()Contains the file, which was uploaded. It is null until progress reaches 1.0.- Returns:
- the
uploadedFileproperty - See Also:
-
onFileSelectedProperty
javafx.beans.property.ObjectProperty<WebAPI.FileSelectedListener> onFileSelectedProperty()Defines a function to be called when a file is dropped.- Returns:
- the
onFileSelectedproperty - See Also:
-
shouldCreateObjectURLProperty
javafx.beans.property.BooleanProperty shouldCreateObjectURLProperty()Defines whether an object url should be created.- Returns:
- the
shouldCreateObjectURLproperty
-
objectURLProperty
javafx.beans.property.ObjectProperty<JSVariable> objectURLProperty()- Returns:
- a JSVariable containing the object URL.
-
getUploadedFile
Gets the value of the property uploadedFile. -
getSelectedFile
Gets the value of the property selectedFile. -
getSelectedFileSize
default int getSelectedFileSize()Gets the value of the property selectedFileSize -
getProgress
default double getProgress()Gets the value of the property progress. -
getJSFile
Gets the value of the property jsFile. -
getOnFileSelected
- Since:
- 2018.1.1 Gets the value of the property onFileSelected
-
setOnFileSelected
- Since:
- 2018.1.1 Sets the value of the property onFileSelected.
-