org.gnu.gtk

Class SelectionData

public class SelectionData extends Boxed

Data used in Drag and drop operations
Constructor Summary
SelectionData(Handle handle)
Method Summary
byte[]getData()
doublegetDouble()
intgetFormat()
intgetInt()
intgetLength()
longgetLong()
PixbufgetPixbuf()
AtomgetSelection()
static SelectionDatagetSelectionData(Handle handle)
Internal static factory method to be used by Java-Gnome only.
AtomgetTarget()
Atom[]getTargets()
StringgetText()
AtomgetType()
String[]getUris()
voidsetData(byte[] data, String type)
voidsetDouble(double data)
voidsetInt(int data)
voidsetLong(long data)
booleansetPixbuf(Pixbuf pixbuf)
voidsetTarget(Atom target)
booleansetText(String text)
booleansetUris(String[] uris)
booleantargetsIncludeImage(boolean writable)
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide a {@link org.gnu.gdk.Pixbuf}.
booleantargetsIncludText()
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide text.

Constructor Detail

SelectionData

public SelectionData(Handle handle)

Method Detail

getData

public byte[] getData()

getDouble

public double getDouble()

getFormat

public int getFormat()

getInt

public int getInt()

getLength

public int getLength()

getLong

public long getLong()

getPixbuf

public Pixbuf getPixbuf()

getSelection

public Atom getSelection()

getSelectionData

public static SelectionData getSelectionData(Handle handle)
Internal static factory method to be used by Java-Gnome only.

getTarget

public Atom getTarget()

getTargets

public Atom[] getTargets()

getText

public String getText()

getType

public Atom getType()

getUris

public String[] getUris()

setData

public void setData(byte[] data, String type)

setDouble

public void setDouble(double data)

setInt

public void setInt(int data)

setLong

public void setLong(long data)

setPixbuf

public boolean setPixbuf(Pixbuf pixbuf)

setTarget

public void setTarget(Atom target)

setText

public boolean setText(String text)

setUris

public boolean setUris(String[] uris)

targetsIncludeImage

public boolean targetsIncludeImage(boolean writable)
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide a {@link org.gnu.gdk.Pixbuf}.

Parameters: writable Whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format.

Returns: TRUE if this SelectionData holds a list of targets, and a suitable target for images is included, otherwise FALSE.

targetsIncludText

public boolean targetsIncludText()
Given that this SelectionData object holds a list of targets, determines if any of the targets in targets can be used to provide text.

Returns: TRUE if this SelectionData holds a list of targets, and a suitable target for text is included, otherwise FALSE.