org.gnu.gtk
Class SelectionData
java.lang.Object
org.gnu.glib.Struct
org.gnu.glib.Boxed
org.gnu.gtk.SelectionData
public class SelectionData
- extends Boxed
Data used in Drag and drop operations
Methods inherited from class org.gnu.glib.Struct |
getHandle, getNullHandle |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
SelectionData
public SelectionData(org.gnu.glib.Handle handle)
getSelectionData
public static SelectionData getSelectionData(org.gnu.glib.Handle handle)
- Internal static factory method to be used by Java-Gnome only.
setTarget
public void setTarget(Atom target)
getSelection
public Atom getSelection()
getTarget
public Atom getTarget()
getType
public Atom getType()
getFormat
public int getFormat()
getLength
public int getLength()
getData
public byte[] getData()
setData
public void setData(byte[] data,
java.lang.String type)
getText
public java.lang.String getText()
setText
public boolean setText(java.lang.String text)
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.
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
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.
getTargets
public Atom[] getTargets()
setPixbuf
public boolean setPixbuf(Pixbuf pixbuf)
getPixbuf
public Pixbuf getPixbuf()
setUris
public boolean setUris(java.lang.String[] uris)
getUris
public java.lang.String[] getUris()
getInt
public int getInt()
getDouble
public double getDouble()
getLong
public long getLong()
setInt
public void setInt(int data)
setLong
public void setLong(long data)
setDouble
public void setDouble(double data)