org.gnu.gdk
Class Color

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.Boxed
          extended by org.gnu.gdk.Color

Deprecated. This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may exist in java-gnome 4.0; look out for org.gnome.gdk.Color.

public class Color
extends org.gnu.glib.Boxed

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
          Deprecated.  
static Color BLUE
          Deprecated.  
static Color GREEN
          Deprecated.  
static Color ORANGE
          Deprecated.  
static Color RED
          Deprecated.  
static Color WHITE
          Deprecated.  
static Color YELLOW
          Deprecated.  
 
Constructor Summary
Color(org.gnu.glib.Handle handle)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Color(int red, int green, int blue)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 
Method Summary
 java.lang.Object clone()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 boolean equals(java.lang.Object color)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getBlue()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
static Color getColorFromHandle(org.gnu.glib.Handle hndl)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getGreen()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getPixel()
          Deprecated.  
 int getRed()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 org.gnu.glib.Type getType()
          Deprecated.  
 int hashCode()
          Deprecated.  
static Color parse(java.lang.String spec)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setBlue(short value)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setGreen(short value)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setRed(short value)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 java.lang.String toString()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 
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

RED

public static final Color RED
Deprecated. 

BLUE

public static final Color BLUE
Deprecated. 

GREEN

public static final Color GREEN
Deprecated. 

BLACK

public static final Color BLACK
Deprecated. 

YELLOW

public static final Color YELLOW
Deprecated. 

WHITE

public static final Color WHITE
Deprecated. 

ORANGE

public static final Color ORANGE
Deprecated. 
Constructor Detail

Color

public Color(org.gnu.glib.Handle handle)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Construct a Color object from a handle to a native resource.


Color

public Color(int red,
             int green,
             int blue)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Creates an sRGB color with the specified red, green, and blue values in the range (0 - 65535).

See Also:
if a Color object from a textual representation is required.
Method Detail

clone

public java.lang.Object clone()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Makes a copy of this color.

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Determines whether another object is equal to this Color.

Overrides:
equals in class org.gnu.glib.Boxed

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class org.gnu.glib.Boxed

getRed

public int getRed()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the red component in the range 0-65535 in the default sRGB space.


setRed

public void setRed(short value)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the red component in the range of 0-65535.


getGreen

public int getGreen()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the green component in the range 0-65535 in the default sRGB space.


setGreen

public void setGreen(short value)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the green component in the range of 0-65535.


getBlue

public int getBlue()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the blue component in the range 0-65535 in the default sRGB space.


setBlue

public void setBlue(short value)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the blue component in the range of 0-65535.


toString

public java.lang.String toString()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns a string representation of this Color.

Overrides:
toString in class java.lang.Object

parse

public static Color parse(java.lang.String spec)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Parses a textual specification of a color. The text string can be in any of the forms accepted by XParseColor; these include name for a color from rgb.txt, such as DarkSlateGray or a hex specification such as 305050.

Parameters:
spec - The textual description of the color.
Returns:
The new Color object or null if the spec could not be parsed.

getPixel

public int getPixel()
Deprecated. 

getType

public org.gnu.glib.Type getType()
Deprecated. 

getColorFromHandle

public static Color getColorFromHandle(org.gnu.glib.Handle hndl)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Construct a Color object from a handle to a native resource. It should only be used internally by Java-Gnome.