final class LocalClipboard extends java.lang.Object implements TKClipboard
Modifier and Type | Field and Description |
---|---|
private java.util.Map<DataFormat,java.lang.Object> |
values |
Constructor and Description |
---|
LocalClipboard() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getContent(DataFormat dataFormat)
Returns the content stored in this clipboard of the given type, or null
if there is no content with this type.
|
java.util.Set<DataFormat> |
getContentTypes()
Gets the set of DataFormat types on this Clipboard instance which have
associated data registered on the clipboard.
|
Image |
getDragView()
Gets the image used as a drag view.
|
double |
getDragViewOffsetX()
Gets the x position of the cursor of the drag view image.
|
double |
getDragViewOffsetY()
Gets the y position of the cursor of the drag view image.
|
java.util.Set<TransferMode> |
getTransferModes() |
boolean |
hasContent(DataFormat dataFormat)
Tests whether there is any content on this clipboard of the given DataFormat type.
|
boolean |
putContent(Pair<DataFormat,java.lang.Object>... content)
Puts the specified content onto the clipboard.
|
void |
setDragView(Image image)
Sets the visual representation of data being transfered in a drag and drop gesture.
|
void |
setDragViewOffsetX(double offsetX)
Sets the x position of the cursor of the drag view image.
|
void |
setDragViewOffsetY(double offsetY)
Sets the y position of the cursor of the drag view image.
|
void |
setSecurityContext(java.security.AccessControlContext ctx)
This method is used to set security context of the Stage.
|
private final java.util.Map<DataFormat,java.lang.Object> values
public void setSecurityContext(java.security.AccessControlContext ctx)
TKClipboard
setSecurityContext
in interface TKClipboard
public java.util.Set<DataFormat> getContentTypes()
TKClipboard
getContentTypes
in interface TKClipboard
public boolean putContent(Pair<DataFormat,java.lang.Object>... content)
TKClipboard
NullPointerException
is thrown if either the DataFormat
or the Object
data in the content Pair
is null.putContent
in interface TKClipboard
content
- The content to put on the clipboard.public java.lang.Object getContent(DataFormat dataFormat)
TKClipboard
getContent
in interface TKClipboard
public boolean hasContent(DataFormat dataFormat)
TKClipboard
hasContent
in interface TKClipboard
public java.util.Set<TransferMode> getTransferModes()
getTransferModes
in interface TKClipboard
public void setDragView(Image image)
TKClipboard
setDragView
in interface TKClipboard
image
- image to use for the drag viewpublic void setDragViewOffsetX(double offsetX)
TKClipboard
setDragViewOffsetX
in interface TKClipboard
offsetX
- x position of the cursor over the imagepublic void setDragViewOffsetY(double offsetY)
TKClipboard
setDragViewOffsetY
in interface TKClipboard
offsetY
- x position of the cursor over the imagepublic Image getDragView()
TKClipboard
getDragView
in interface TKClipboard
public double getDragViewOffsetX()
TKClipboard
getDragViewOffsetX
in interface TKClipboard
public double getDragViewOffsetY()
TKClipboard
getDragViewOffsetY
in interface TKClipboard