org.gnu.gdk
Class Colormap

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gdk.Colormap

public class Colormap
extends GObject


Constructor Summary
Colormap()
          Create a Colormap initialized to the system's default colormap.
Colormap(int handle)
          Create a new Colormap from a handle to a native resource.
Colormap(Visual v, boolean private_)
          Creates a new colormap for the given visual.
 
Method Summary
 boolean allocateColor(Color color, boolean writable, boolean bestMatch)
          Allocates a single color from a colormap.
static Colormap getSystem()
          Returns the system's default colormap.
 Visual getVisual()
          Returns the visual for which a given colormap was created.
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Colormap

public Colormap()
Create a Colormap initialized to the system's default colormap.


Colormap

public Colormap(int handle)
Create a new Colormap from a handle to a native resource.


Colormap

public Colormap(Visual v,
                boolean private_)
Creates a new colormap for the given visual.

Method Detail

getSystem

public static Colormap getSystem()
Returns the system's default colormap.


getVisual

public Visual getVisual()
Returns the visual for which a given colormap was created.


allocateColor

public boolean allocateColor(Color color,
                             boolean writable,
                             boolean bestMatch)
Allocates a single color from a colormap.

Parameters:
color - The color to allocate
writable - If true the color is allocated writable.
bestMatch - If true GDK will attempt to do matching against existing colors if the color cannot be allocated as requested.

Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net