|
|||||||||
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.Boxed
org.gnu.gdk.Color
public class Color
Describes an allocated or unallocated color. A color consists of red, green and blue values in the range 0-65535 and a pixel value. The pixel value is highly dependent on the depth and colormap which this color will be used to draw into. Therefore, sharing colors between colormaps is a bad idea.
Field Summary | |
---|---|
static Color |
BLACK
|
static Color |
BLUE
|
static Color |
GREEN
|
static Color |
ORANGE
|
static Color |
RED
|
static Color |
WHITE
|
static Color |
YELLOW
|
Constructor Summary | |
---|---|
Color(org.gnu.glib.Handle handle)
Construct a Color object from a handle to a native resource. |
|
Color(int red,
int green,
int blue)
Creates an sRGB color with the specified red, green, and blue values in the range (0 - 65535). |
Method Summary | |
---|---|
java.lang.Object |
clone()
Makes a copy of this color. |
boolean |
equals(java.lang.Object color)
Determines whether another object is equal to this Color. |
int |
getBlue()
Returns the blue component in the range 0-65535 in the default sRGB space. |
static Color |
getColorFromHandle(org.gnu.glib.Handle hndl)
Construct a Color object from a handle to a native resource. |
int |
getGreen()
Returns the green component in the range 0-65535 in the default sRGB space. |
int |
getPixel()
|
int |
getRed()
Returns the red component in the range 0-65535 in the default sRGB space. |
Type |
getType()
|
int |
hashCode()
Returns a hash code value for the object. |
static Color |
parse(java.lang.String spec)
Parses a textual specification of a color. |
void |
setBlue(short value)
Sets the blue component in the range of 0-65535. |
void |
setGreen(short value)
Sets the green component in the range of 0-65535. |
void |
setRed(short value)
Sets the red component in the range of 0-65535. |
java.lang.String |
toString()
Returns a string representation of this Color. |
Methods inherited from class org.gnu.glib.Boxed |
---|
getBoxedFromHandle |
Methods inherited from class org.gnu.glib.Struct |
---|
getHandle, getNullHandle |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Color RED
public static final Color BLUE
public static final Color GREEN
public static final Color BLACK
public static final Color YELLOW
public static final Color WHITE
public static final Color ORANGE
Constructor Detail |
---|
public Color(org.gnu.glib.Handle handle)
public Color(int red, int green, int blue)
if a Color object from a textual representation
is required.
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object color)
equals
in class Boxed
color
- the reference object with which to compare.
public int hashCode()
Boxed
hashCode
in class Boxed
public int getRed()
public void setRed(short value)
public int getGreen()
public void setGreen(short value)
public int getBlue()
public void setBlue(short value)
public java.lang.String toString()
toString
in class java.lang.Object
public static Color parse(java.lang.String spec)
spec
- The textual description of the color.
public int getPixel()
public Type getType()
public static Color getColorFromHandle(org.gnu.glib.Handle hndl)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |