org.gnu.gnome
public class ColorPicker extends Button
Deprecated:
The ColorPicker button pops up a ColorSelectionDialog and allows a color to be selected. The button changes color to match the currently selected color. The colors can be set using doubles - values between 0.0 and 1.0, 8 bit integers - values between 0 and 255, and 16 bit integers - values between 0 and 65535.See Also: org.gnu.gtk.ColorSelectionDialog
Constructor Summary | |
---|---|
ColorPicker()
Creates a new instance of ColorPicker | |
ColorPicker(Handle handle)
Construct a ColorPicker using a handle to a native resource. |
Method Summary | |
---|---|
void | addListener(ColorPickerListener listener)
Register an object to handle ColorPicker events.
|
int | getAlpha16Bit()
Get the alpha of the color as a 16 bit value between 0 and 65535.
|
int | getAlpha8Bit()
Get the alpha of the color as a 8 bit value between 0 and 255.
|
double | getAlphaDouble()
Get the alpha of the color as a double value between 0.0 and 1.0.
|
boolean | getAlphaEnabled()
Returns whether ColorPicker uses alpha.
|
int | getBlue16Bit()
Get the blue element of the color as a 16 bit value between 0 and 65535.
|
int | getBlue8Bit()
Get the blue element of the color as a 8 bit value between 0 and 255.
|
double | getBlueDouble()
Get the blue element of the color as a double value between 0.0 and 1.0.
|
boolean | getDitherEnabled()
Returns whether ColorPicker uses dither.
|
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
int | getGreen16Bit()
Get the green element of the color as a double value between 0 and 65535.
|
int | getGreen8Bit()
Get the green element of the color as a double value between 0 and 255.
|
double | getGreenDouble()
Get the green element of the color as a double value between 0.0 and 1.0.
|
int | getRed16Bit()
Get the red element of the color as a double value between 0 and 65535.
|
int | getRed8Bit()
Get the red element of the color as a double value between 0 and 255.
|
double | getRedDouble()
Get the red element of the color as a double value between 0.0 and 1.0.
|
String | getTitle()
Gets the title of the color picker.
|
static Type | getType()
Retrieve the runtime type used by the GLib library. |
void | removeListener(ColorPickerListener listener)
Removes a listener
|
void | setAlpha16Bit(int alpha)
Set the alpha of the color as a 16 bit value between 0 and 65535.
|
void | setAlpha8Bit(int alpha)
Set the alpha of the color as a 8 bit value between 0 and 255.
|
void | setAlphaDouble(double alpha)
Set the alpha of the color as a double value between 0.0 and 1.0.
|
void | setAlphaEnabled(boolean enable)
Sets whether ColorPicker is to use alpha.
|
void | setBlue16Bit(int color)
Set the blue element of the color as a 16 bit value between 0 and 65535.
|
void | setBlue8Bit(int color)
Set the blue element of the color as a 8 bit value between 0 and 255.
|
void | setBlueDouble(double color)
Set the blue element of the color as a double value between 0.0 and 1.0.
|
void | setColor16Bit(int alpha, int blue, int green, int red)
A shortcut method to set all the color values with one call. |
void | setColor8Bit(int alpha, int blue, int green, int red)
A shortcut method to set all the color values with one call. |
void | setColorDouble(double alpha, double blue, double green, double red)
A shortcut method to set all the color values with one call. |
void | setDitherEnabled(boolean enable)
Sets whether ColorPicker is to use dither.
|
void | setGreen16Bit(int color)
Set the green element of the color as a integer value between 0 and
65535.
|
void | setGreen8Bit(int color)
Set the green element of the color as a integer value between 0 and 255.
|
void | setGreenDouble(double color)
Set the green element of the color as a double value between 0.0 and 1.0.
|
void | setRed16Bit(int color)
Set the red element of the color as a integer value between 0 and 65535.
|
void | setRed8Bit(int color)
Set the red element of the color as a integer value between 0 and 255.
|
void | setRedDouble(double color)
Set the red element of the color as a double value between 0.0 and 1.0.
|
void | setTitle(String title)
Sets the title of the color picker.
|
See Also: ColorPickerListener
Returns: The alpha of the color.
Returns: The alpha of the color.
Returns: The alpha of the color.
Returns: True if alpha is used. Otherwise, false.
Returns: The blue element of the color.
Returns: The blue element of the color.
Returns: The blue element of the color.
Returns: True if dither is used. Otherwise, false.
Returns: The green element of the color.
Returns: The green element of the color.
Returns: The green element of the color.
Returns: The red element of the color.
Returns: The red element of the color.
Returns: The red element of the color.
Returns: The title for the color picker.
See Also: addListener
Parameters: alpha The alpha of the color.
Throws: IllegalArgumentException Thrown if alpha is outside of the valid range 0 to 65535.
Parameters: alpha The alpha of the color.
Throws: IllegalArgumentException Thrown if alpha is outside of the valid range 0 to 255.
Parameters: alpha The alpha of the color.
Throws: IllegalArgumentException Thrown if alpha is outside of the valid range 0.0 to 1.0.
Parameters: enable True to use alpha. Otherwise, false.
Parameters: color The blue element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 65535.
Parameters: color The blue element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 255.
Parameters: color The blue element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0.0 to 1.0.
Parameters: alpha The alpha of the color. blue The blue element of the color. green The green element of the color. red The red element of the color.
Throws: IllegalArgumentException Thrown if any given value is outside of the valid range 0 to 65535.
Parameters: alpha The alpha of the color. blue The blue element of the color. green The green element of the color. red The red element of the color.
Throws: IllegalArgumentException Thrown if any given value is outside of the valid range 0 to 255.
Parameters: alpha The alpha of the color. blue The blue element of the color. green The green element of the color. red The red element of the color.
Throws: IllegalArgumentException Thrown if any given value is outside of the valid range 0.0 to 1.0.
Parameters: enable True to use dither. Otherwise, false.
Parameters: color The green element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 65535.
Parameters: color The green element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 255.
Parameters: color The green element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0.0 to 1.0.
Parameters: color The red element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 65535.
Parameters: color The red element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0 to 255.
Parameters: color The red element of the color.
Throws: IllegalArgumentException Thrown if color is outside of the valid range 0.0 to 1.0.
Parameters: title The title for the color picker.