|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gtk.GtkObject | +--org.gnu.gtk.Widget | +--org.gnu.gtk.Container | +--org.gnu.gtk.Bin | +--org.gnu.gtk.Button | +--org.gnu.gnome.ColorPicker
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.
Constructor Summary | |
ColorPicker()
Creates a new instance of ColorPicker |
|
ColorPicker(int 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. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
GtkEventType |
getEventType(java.lang.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. |
java.lang.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(java.lang.String title)
Sets the title of the color picker. |
Methods inherited from class org.gnu.gtk.Button |
addListener, click, enter, getLabel, getRelief, getUseStock, getUseUnderline, leave, press, release, removeListener, setLabel, setRelief, setUseStock, setUseUnderline |
Methods inherited from class org.gnu.gtk.Bin |
getChild |
Methods inherited from class org.gnu.gtk.Container |
add, addListener, getBorderWidth, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode |
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 |
public ColorPicker()
public ColorPicker(int handle)
Method Detail |
public double getAlphaDouble()
public double getBlueDouble()
public double getGreenDouble()
public double getRedDouble()
public int getAlpha8Bit()
public int getBlue8Bit()
public int getGreen8Bit()
public int getRed8Bit()
public int getAlpha16Bit()
public int getBlue16Bit()
public int getGreen16Bit()
public int getRed16Bit()
public boolean getAlphaEnabled()
public boolean getDitherEnabled()
public java.lang.String getTitle()
public void setColorDouble(double alpha, double blue, double green, double red) throws java.lang.IllegalArgumentException
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.
java.lang.IllegalArgumentException
- Thrown if any given value is outside
of the valid range 0.0 to 1.0.public void setAlphaDouble(double alpha) throws java.lang.IllegalArgumentException
alpha
- The alpha of the color.
java.lang.IllegalArgumentException
- Thrown if alpha is outside of the
valid range 0.0 to 1.0.public void setBlueDouble(double color) throws java.lang.IllegalArgumentException
color
- The blue element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0.0 to 1.0.public void setGreenDouble(double color) throws java.lang.IllegalArgumentException
color
- The green element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0.0 to 1.0.public void setRedDouble(double color) throws java.lang.IllegalArgumentException
color
- The red element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0.0 to 1.0.public void setColor8Bit(int alpha, int blue, int green, int red) throws java.lang.IllegalArgumentException
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.
java.lang.IllegalArgumentException
- Thrown if any given value is outside
of the valid range 0 to 255.public void setAlpha8Bit(int alpha) throws java.lang.IllegalArgumentException
alpha
- The alpha of the color.
java.lang.IllegalArgumentException
- Thrown if alpha is outside of the
valid range 0 to 255.public void setBlue8Bit(int color) throws java.lang.IllegalArgumentException
color
- The blue element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 255.public void setGreen8Bit(int color) throws java.lang.IllegalArgumentException
color
- The green element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 255.public void setRed8Bit(int color) throws java.lang.IllegalArgumentException
color
- The red element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 255.public void setColor16Bit(int alpha, int blue, int green, int red) throws java.lang.IllegalArgumentException
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.
java.lang.IllegalArgumentException
- Thrown if any given value is outside
of the valid range 0 to 65535.public void setAlpha16Bit(int alpha) throws java.lang.IllegalArgumentException
alpha
- The alpha of the color.
java.lang.IllegalArgumentException
- Thrown if alpha is outside of the
valid range 0 to 65535.public void setBlue16Bit(int color) throws java.lang.IllegalArgumentException
color
- The blue element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 65535.public void setGreen16Bit(int color) throws java.lang.IllegalArgumentException
color
- The green element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 65535.public void setRed16Bit(int color) throws java.lang.IllegalArgumentException
color
- The red element of the color.
java.lang.IllegalArgumentException
- Thrown if color is outside of the
valid range 0 to 65535.public void setAlphaEnabled(boolean enable)
public void setDitherEnabled(boolean enable)
enable
- True to use dither. Otherwise, false.public void setTitle(java.lang.String title)
title
- The title for the color picker.public static Type getType()
public void addListener(ColorPickerListener listener)
ColorPickerListener
public void removeListener(ColorPickerListener listener)
addListener(ColorPickerListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Button
public GtkEventType getEventType(java.lang.String signal)
getEventType
in class Button
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |