org.gnu.gtk
Class SelectionData

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.Boxed
          extended by org.gnu.gtk.SelectionData

public class SelectionData
extends Boxed

Data used in Drag and drop operations


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

Constructor Detail

SelectionData

public SelectionData(org.gnu.glib.Handle handle)
Method Detail

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)