org.gnu.glib

Class Value

public class Value extends MemStruct

Value is a polymorphic type that can hold values of any other type. This is used internally and should not be exposed outside of the library.
Constructor Summary
Value(Type type)
Construct a new Value from a given org.gnu.glib.Type.
Value(Handle aHandle)
Construct a new Value object using a handle to a native object.
Method Summary
Valuecopy()
Create a copy of this Value object.
booleangetBoolean()
Used internally by Java-Gnome
BoxedgetBoxed()
doublegetDouble()
Used internally by Java-Gnome
doublegetFloat()
Used internally by Java-Gnome
intgetInt()
Used internally by Java-Gnome
ObjectgetJavaObject()
Get the data held by this Value object.
longgetLong()
Used internally by Java-Gnome
PixbufgetPixbuf()
Used internally by Java-Gnome.
StringgetString()
Used internally by Java-Gnome
voidsetBoolean(boolean value)
Used internally by Java-Gnome to set a boolean value
voidsetBoxed(Boxed value)
voidsetDouble(double value)
Used internally by Java-Gnome to set a double value
voidsetFloat(float value)
Used internally by Java-Gnome to set a float value
voidsetInteger(int value)
Used internally by Java-Gnome to set an integer value
voidsetJavaObject(Object obj)
Set the data held by this Value object with the given Object.
voidsetLong(long value)
Used internally by Java-Gnome to set a long value
voidsetPixbuf(Pixbuf obj)
Used internally by Java-Gnome.
voidsetString(String value)
Used internally by Java-Gnome to set a string value

Constructor Detail

Value

public Value(Type type)
Construct a new Value from a given org.gnu.glib.Type.

Value

public Value(Handle aHandle)
Construct a new Value object using a handle to a native object.

Parameters: aHandle The handle

Method Detail

copy

public Value copy()
Create a copy of this Value object.

Returns: An object of type Value that contains the same data as the current object.

getBoolean

public boolean getBoolean()
Used internally by Java-Gnome

getBoxed

public Boxed getBoxed()

getDouble

public double getDouble()
Used internally by Java-Gnome

getFloat

public double getFloat()
Used internally by Java-Gnome

getInt

public int getInt()
Used internally by Java-Gnome

getJavaObject

public Object getJavaObject()
Get the data held by this Value object.

NOTE: You probably don't want to use this directly. Prefer using a convenience method such as: GObject.

Returns: The data value held by this Value instance. If the data is held in the C GValue structure, the returned object is an instance of Handle. If the data is held locally in the Java object, that is returned, otherwise null is returned.

getLong

public long getLong()
Used internally by Java-Gnome

getPixbuf

public Pixbuf getPixbuf()

Deprecated: As of libgtk-java 2.8.5, this method has been deprecated in favour of getJavaObject. Future major version releases will have this method removed, please use with caution.

Used internally by Java-Gnome.

getString

public String getString()
Used internally by Java-Gnome

setBoolean

public void setBoolean(boolean value)
Used internally by Java-Gnome to set a boolean value

setBoxed

public void setBoxed(Boxed value)

setDouble

public void setDouble(double value)
Used internally by Java-Gnome to set a double value

setFloat

public void setFloat(float value)
Used internally by Java-Gnome to set a float value

setInteger

public void setInteger(int value)
Used internally by Java-Gnome to set an integer value

setJavaObject

public void setJavaObject(Object obj)
Set the data held by this Value object with the given Object. Objects will be set directly in the C GValue structure. Other "non-Glib" objects will also be kept locally in the Java object.

NOTE: You probably don't want to use this directly. Prefer using a convenience method such as: GObject.

Parameters: obj The object to set as the data value for this Value instance.

setLong

public void setLong(long value)
Used internally by Java-Gnome to set a long value

setPixbuf

public void setPixbuf(Pixbuf obj)

Deprecated: As of libgtk-java 2.8.5, this method has been deprecated in favour of setJavaObject. Future major version releases will have this method removed, please use with caution.

Used internally by Java-Gnome.

setString

public void setString(String value)
Used internally by Java-Gnome to set a string value