|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gdk.Colormap
public class Colormap
This object stores the mapping between the color values stored in memory and the RGB values that are used to display color values.
| Constructor Summary | |
|---|---|
Colormap()
Create a Colormap initialized to the system's default colormap. |
|
Colormap(org.gnu.glib.Handle handle)
Create a new Colormap from a handle to a native resource. |
|
Colormap(Visual v,
boolean allocate)
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. |
boolean[] |
allocateColors(Color[] colors,
boolean writable,
boolean bestMatch)
Allocates colors from a colormap. |
void |
freeColors(Color[] colors)
Frees previously allocated Colors. |
static Colormap |
getColormapFromHandle(org.gnu.glib.Handle hndl)
Internal static factory method to be used only by Java-Gnome. |
Color[] |
getColors()
Retrieve all of the Colors associated with the Colormap. |
Screen |
getScreen()
Returns the screen for which the colormap was created. |
static Colormap |
getSystem()
Returns the system's default colormap. |
Type |
getType()
|
Visual |
getVisual()
Returns the visual for which the colormap was created. |
Color |
queryColor(long pixel)
Locates the RGB color corresponding to the given hardware pixel. |
| Methods inherited from class org.gnu.glib.Struct |
|---|
equals, getHandle, getNullHandle, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Colormap()
public Colormap(org.gnu.glib.Handle handle)
public Colormap(Visual v,
boolean allocate)
| Method Detail |
|---|
public static Colormap getSystem()
public Visual getVisual()
public Screen getScreen()
public boolean allocateColor(Color color,
boolean writable,
boolean bestMatch)
color - The color to allocatewritable - 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.
public boolean[] allocateColors(Color[] colors,
boolean writable,
boolean bestMatch)
colors - writable - bestMatch - public void freeColors(Color[] colors)
colors - public Color queryColor(long pixel)
pixel - public Color[] getColors()
public Type getType()
public static Colormap getColormapFromHandle(org.gnu.glib.Handle hndl)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||