Top Description Fields Constructors Methods
com.sun.glass.ui.ios

pack-priv final Class IosPasteboard

extends Object
Class Inheritance
Imports
java.util.HashMap

Java class encapsulating access to native iOS UIPasteboard API.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
private long
private boolean
public static final String
public static final String
public static final String
public static final String
public static final String
public static final int
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public
IosPasteboard(int type)

Creates IosPasteboard wrapper object for UIPasteboard's generalPasteboard.

public
IosPasteboard(String name)

Creates custom IosPasteboard for given name.

Method Summary

Modifier and TypeMethod and Description
private native long
_clear(long ptr)

private native long
private native long
private native int
private native byte[]
_getItemAsRawImage(long ptr, int index)

private native String
_getItemAsString(long ptr, int index)

private native byte[]
_getItemBytesForUTF(long ptr, int index, String utf)

private native long
_getItemForUTF(long ptr, int index, String utf)

private native String
_getItemStringForUTF(long ptr, int index, String utf)

private native String
_getName(long ptr)

private native long
_getSeed(long ptr)

private native String[][]
_getUTFs(long ptr)

private native long
_putItemsFromArray(long ptr, Object[] items, int supportedActions)

private native void
_release(long ptr)

private void
public long

Returns:

seed
clear
()

clears pasteboard

public int

Returns:

allowed operation
getAllowedOperation
()

Check pasteboard-operation allowed in the current pasteboard state.

public byte[]
getItemAsRawImage(int index)

Get the item representation for the given index as raw pixels bytes suitable for Pixels the platform will try to find the best representation

public String
getItemAsString(int index)

get the item representation for the given index as String the platform will try to find the best representation

public byte[]
getItemBytesForUTF(int index, String utf)

get the item representation for the given utf type as byte array

public long
getItemForUTF(int index, String utf)

get the item representation for the given utf type as native Objective-C object id the item retain count will increase by 1 requires client to drop into Obj-C to do anything useful with the item

public String
getItemStringForUTF(int index, String utf)

get the item representation for the given utf type as String

public String

Returns:

name
getName
()

Native pasteboard name getter;

public long
getNativePasteboard()

Returns native pasteboard pointer (UIPasteboard*)

public long
getSeed()

retrieve pasteboard seed

public String[][]

Returns:

an array of String arrays with multiple UTF types for each item on the Pasteboard (allows for non homogenous items) the length of the array is the count of available items
getUTFs
()

private Object[]
hashMapToArray(HashMap<K, V> hashmap)

public long
putItems(HashMap<String, Object>[] items, int supportedActions)

public long
putItemsFromArray(Object[] items, int supportedActions)

public void
release()

Release native pasteboard instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

Generalback to summary
public static final int General
ObjectIndexback to summary
public static final int ObjectIndex
ptrback to summary
private long ptr
userback to summary
private boolean user
UtfColorback to summary
public static final String UtfColor
UtfFileUrlback to summary
public static final String UtfFileUrl
UtfFindPanelSearchOptionsback to summary
public static final String UtfFindPanelSearchOptions
UtfFontback to summary
public static final String UtfFont
UtfHtmlback to summary
public static final String UtfHtml
UtfIndexback to summary
public static final int UtfIndex
UtfMultipleTextSelectionback to summary
public static final String UtfMultipleTextSelection
UtfPdfback to summary
public static final String UtfPdf
UtfPngback to summary
public static final String UtfPng
UtfRtfback to summary
public static final String UtfRtf
UtfRtfdback to summary
public static final String UtfRtfd
UtfSoundback to summary
public static final String UtfSound
UtfStringback to summary
public static final String UtfString
UtfTabularTextback to summary
public static final String UtfTabularText
UtfTiffback to summary
public static final String UtfTiff
UtfUrlback to summary
public static final String UtfUrl

Constructor Detail

IosPasteboardback to summary
public IosPasteboard(int type)

Creates IosPasteboard wrapper object for UIPasteboard's generalPasteboard.

IosPasteboardback to summary
public IosPasteboard(String name)

Creates custom IosPasteboard for given name. E.g. for drag and drop purpose we create user UIPasterboard with special name DND. See [UIPasteboard pasteboardWithName:create:] documentation.

Method Detail

_clearback to summary
private native long _clear(long ptr)
_createSystemPasteboardback to summary
private native long _createSystemPasteboard(int type)
_createUserPasteboardback to summary
private native long _createUserPasteboard(String name)
_getAllowedOperationback to summary
private native int _getAllowedOperation(long ptr)
_getItemAsRawImageback to summary
private native byte[] _getItemAsRawImage(long ptr, int index)
_getItemAsStringback to summary
private native String _getItemAsString(long ptr, int index)
_getItemBytesForUTFback to summary
private native byte[] _getItemBytesForUTF(long ptr, int index, String utf)
_getItemForUTFback to summary
private native long _getItemForUTF(long ptr, int index, String utf)
_getItemStringForUTFback to summary
private native String _getItemStringForUTF(long ptr, int index, String utf)
_getNameback to summary
private native String _getName(long ptr)
_getSeedback to summary
private native long _getSeed(long ptr)
_getUTFsback to summary
private native String[][] _getUTFs(long ptr)
_putItemsFromArrayback to summary
private native long _putItemsFromArray(long ptr, Object[] items, int supportedActions)
_releaseback to summary
private native void _release(long ptr)
assertValidback to summary
private void assertValid()
clearback to summary
public long clear()

clears pasteboard

Returns:long

seed

getAllowedOperationback to summary
public int getAllowedOperation()

Check pasteboard-operation allowed in the current pasteboard state.

Returns:int

allowed operation

getItemAsRawImageback to summary
public byte[] getItemAsRawImage(int index)

Get the item representation for the given index as raw pixels bytes suitable for Pixels the platform will try to find the best representation

getItemAsStringback to summary
public String getItemAsString(int index)

get the item representation for the given index as String the platform will try to find the best representation

getItemBytesForUTFback to summary
public byte[] getItemBytesForUTF(int index, String utf)

get the item representation for the given utf type as byte array

getItemForUTFback to summary
public long getItemForUTF(int index, String utf)

get the item representation for the given utf type as native Objective-C object id the item retain count will increase by 1 requires client to drop into Obj-C to do anything useful with the item

getItemStringForUTFback to summary
public String getItemStringForUTF(int index, String utf)

get the item representation for the given utf type as String

getNameback to summary
public String getName()

Native pasteboard name getter;

Returns:String

name

getNativePasteboardback to summary
public long getNativePasteboard()

Returns native pasteboard pointer (UIPasteboard*)

getSeedback to summary
public long getSeed()

retrieve pasteboard seed

getUTFsback to summary
public String[][] getUTFs()
Returns:String[][]

an array of String arrays with multiple UTF types for each item on the Pasteboard (allows for non homogenous items) the length of the array is the count of available items

hashMapToArrayback to summary
private Object[] hashMapToArray(HashMap<K, V> hashmap)
putItemsback to summary
public long putItems(HashMap<String, Object>[] items, int supportedActions)
putItemsFromArrayback to summary
public long putItemsFromArray(Object[] items, int supportedActions)
releaseback to summary
public void release()

Release native pasteboard instance.