Top Description Fields Constructors Methods
javafx.scene.input

public final Class Dragboard

extends Clipboard
Class Inheritance
Imports
java.util.Set, com.sun.javafx.scene.input.DragboardHelper, com.sun.javafx.tk.TKClipboard, javafx.scene.image.Image

A drag and drop specific Clipboard.
Since
JavaFX 2.0

Field Summary

Inherited from javafx.scene.input.Clipboard:
peer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static Dragboard
public Image

Returns:

the image used as a drag view
getDragView
()

Gets the image used as a drag view.

public double

Returns:

x position of the cursor over the image
getDragViewOffsetX
()

Gets the x position of the cursor of the drag view image.

public double

Returns:

y position of the cursor over the image
getDragViewOffsetY
()

Gets the y position of the cursor of the drag view image.

pack-priv TKClipboard
public final Set<TransferMode>

Returns:

set of supported transfer modes
getTransferModes
()

Gets set of transport modes supported by source of this drag operation.

public void
setDragView(Image
image to use for the drag view
image
,
double
x position of the cursor over the image
offsetX
,
double
y position of the cursor over the image
offsetY
)

Sets the visual representation of data being transferred in a drag and drop gesture.

public void
setDragView(Image
image to use for the drag view
image
)

Sets the visual representation of data being transferred in a drag and drop gesture.

public void
setDragViewOffsetX(double
x position of the cursor over the image
offsetX
)

Sets the x position of the cursor of the drag view image.

public void
setDragViewOffsetY(double
y position of the cursor over the image
offsetY
)

Sets the y position of the cursor of the drag view image.

Inherited from javafx.scene.input.Clipboard:
clearcontentPutgetContentgetContentImplgetContentTypesgetFilesgetHtmlgetImagegetRtfgetStringgetSystemClipboardgetUrlhasContenthasFileshasHtmlhasImagehasRtfhasStringhasUrlsetContent

Constructor Detail

Dragboardback to summary
pack-priv Dragboard(TKClipboard peer)

Method Detail

createDragboardback to summary
pack-priv static Dragboard createDragboard(TKClipboard peer)
getDragViewback to summary
public Image getDragView()

Gets the image used as a drag view. This method returns meaningful value only when starting drag and drop operation in the DRAG_DETECTED handler, it returns null at other times.

Returns:Image

the image used as a drag view

Since
JavaFX 8.0
getDragViewOffsetXback to summary
public double getDragViewOffsetX()

Gets the x position of the cursor of the drag view image. This method returns meaningful value only when starting drag and drop operation in the DRAG_DETECTED handler, it returns 0 at other times.

Returns:double

x position of the cursor over the image

Since
JavaFX 8.0
getDragViewOffsetYback to summary
public double getDragViewOffsetY()

Gets the y position of the cursor of the drag view image. This method returns meaningful value only when starting drag and drop operation in the DRAG_DETECTED handler, it returns 0 at other times.

Returns:double

y position of the cursor over the image

Since
JavaFX 8.0
getPeerback to summary
pack-priv TKClipboard getPeer()
getTransferModesback to summary
public final Set<TransferMode> getTransferModes()

Gets set of transport modes supported by source of this drag operation.

Returns:Set<TransferMode>

set of supported transfer modes

setDragViewback to summary
public void setDragView(Image image, double offsetX, double offsetY)

Sets the visual representation of data being transferred in a drag and drop gesture. Uses the given image for the drag view with the offsetX and offsetY specifying cursor position over the image. This method should be called only when starting drag and drop operation in the DRAG_DETECTED handler, calling it at other times doesn't have any effect.

Parameters
image:Image

image to use for the drag view

offsetX:double

x position of the cursor over the image

offsetY:double

y position of the cursor over the image

Since
JavaFX 8.0
setDragViewback to summary
public void setDragView(Image image)

Sets the visual representation of data being transferred in a drag and drop gesture. This method should be called only when starting drag and drop operation in the DRAG_DETECTED handler, calling it at other times doesn't have any effect.

Parameters
image:Image

image to use for the drag view

Since
JavaFX 8.0
setDragViewOffsetXback to summary
public void setDragViewOffsetX(double offsetX)

Sets the x position of the cursor of the drag view image. This method should be called only when starting drag and drop operation in the DRAG_DETECTED handler, calling it at other times doesn't have any effect.

Parameters
offsetX:double

x position of the cursor over the image

Since
JavaFX 8.0
setDragViewOffsetYback to summary
public void setDragViewOffsetY(double offsetY)

Sets the y position of the cursor of the drag view image. This method should be called only when starting drag and drop operation in the DRAG_DETECTED handler, calling it at other times doesn't have any effect.

Parameters
offsetY:double

y position of the cursor over the image

Since
JavaFX 8.0