java.lang.Object
one.jpro.platform.file.event.DataTransfer
Data transfer class.
- Author:
- Besmir Beqiri
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final javafx.scene.input.DataFormatRepresents a single File.static final javafx.scene.input.DataFormatRepresents a List of File sources.static final javafx.scene.input.DataFormatRepresents a List of Files.static final javafx.scene.input.DataFormatRepresents a List of MIME types. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal ObjectgetData(javafx.scene.input.DataFormat format) final FilegetFile()Gets theFilewhich had previously been registered.getFiles()Gets the List ofFilewhich had previously been registered.final List<FileSource> Gets the List ofFileSourcewhich had previously been registered.Gets the List of MIME types as strings which had previously been registered.final booleanhasData(javafx.scene.input.DataFormat format) Tests whether there is any data of the given DataFormat type.final booleanhasFile()Gets whether aFilehas been registered as data.final booleanhasFiles()Gets whether a List of Files has been registered as data.final booleanGets whether a List ofFileSourcehas been registered as data.final booleanGets whether a List of MIME types as strings has been registered as data.final voidfinal void
-
Field Details
-
FILE
public static final javafx.scene.input.DataFormat FILERepresents a single File. -
FILES
public static final javafx.scene.input.DataFormat FILESRepresents a List of Files. -
FILE_SOURCES
public static final javafx.scene.input.DataFormat FILE_SOURCESRepresents a List of File sources. -
MIME_TYPES
public static final javafx.scene.input.DataFormat MIME_TYPESRepresents a List of MIME types.
-
-
Constructor Details
-
DataTransfer
public DataTransfer()
-
-
Method Details
-
getData
-
putData
-
setData
-
clearData
public final void clearData() -
hasData
public final boolean hasData(javafx.scene.input.DataFormat format) Tests whether there is any data of the given DataFormat type.- Parameters:
format- the format type- Returns:
- true if there is data for this type
-
hasFile
public final boolean hasFile()Gets whether aFilehas been registered as data.- Returns:
- true if
hasData(DataTransfer.FILE)returns true, false otherwise
-
getFile
Gets theFilewhich had previously been registered. This is equivalent to invokinggetData(DataTransfer.FILE). If no such entry exists, null is returned.- Returns:
- The File source associated with
FILE, or null if there is none.
-
hasFiles
public final boolean hasFiles()Gets whether a List of Files has been registered as data.- Returns:
- true if
hasData(DataTransfer.FILES)returns true, false otherwise
-
getFiles
Gets the List ofFilewhich had previously been registered. This is equivalent to invokinggetData(DataTransfer.FILES). If no such entry exists, null is returned.- Returns:
- The List of Files associated with
FILES, or null if there is none.
-
hasFileSources
public final boolean hasFileSources()Gets whether a List ofFileSourcehas been registered as data.- Returns:
- true if
hasData(DataTransfer.FILE_SOURCES)returns true, false otherwise
-
getFileSources
Gets the List ofFileSourcewhich had previously been registered. This is equivalent to invokinggetData(DataTransfer.FILE_SOURCES). If no such entry exists, null is returned.- Returns:
- The List of Files associated with
FILE_SOURCES, or null if there is none.
-
hasMimeTypes
public final boolean hasMimeTypes()Gets whether a List of MIME types as strings has been registered as data.- Returns:
- true if
hasData(DataTransfer.MIME_TYPES)returns true, false otherwise
-
getMimeTypes
Gets the List of MIME types as strings which had previously been registered. This is equivalent to invokinggetData(DataTransfer.MIME_TYPES). If no such entry exists, null is returned.- Returns:
- The List of MIME types as strings associated with
MIME_TYPES, or null if there is none.
-