|
|||||||||
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.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.Bin
org.gnu.gtk.Button
org.gnu.gtk.ColorButton
public class ColorButton
The ColorButton is a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a ColorSelection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.
Constructor Summary | |
---|---|
ColorButton()
Create a new ColorButton. |
|
ColorButton(Color color)
Create a new ColorButton initialized with the provided color. |
|
ColorButton(org.gnu.glib.Handle handle)
For internal use by Java-Gnome only. |
Method Summary | |
---|---|
void |
addListener(ColorButtonListener listener)
Register an object to handle dialog events. |
int |
getAlpha()
Returns the current alpha value. |
Color |
getColor()
Returns the current color value. |
static ColorButton |
getColorButton(org.gnu.glib.Handle handle)
For internal use by Java-Gnome only. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
java.lang.String |
getTitle()
Returns the title from the ColorSelectionDialog. |
boolean |
getUseAlpha()
Returns whether or not the ColorButton is using the alpha channel. |
void |
removeListener(ColorButtonListener listener)
Removes a listener |
void |
setAlpha(int alpha)
Sets the current opacity to be alpha |
void |
setColor(Color color)
Set the current color for the widget. |
void |
setTitle(java.lang.String title)
Sets the color for the ColorSelectionDialog. |
void |
setUseAlpha(boolean useAlpha)
Sets whether or not the ColorButton should use the alpha channel. |
Methods inherited from class org.gnu.gtk.Button |
---|
addListener, click, enter, getButton, getFocusOnClick, getImage, getLabel, getRelief, getType, getUseStock, getUseUnderline, getXAlignment, getYAlignment, leave, press, release, removeListener, setAlignment, setFocusOnClick, setImage, setLabel, setRelief, setUseStock, setUseUnderline |
Methods inherited from class org.gnu.gtk.Bin |
---|
getChild |
Methods inherited from class org.gnu.gtk.Container |
---|
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
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 ColorButton()
public ColorButton(Color color)
color
- A Color to set the current color with.public ColorButton(org.gnu.glib.Handle handle)
Method Detail |
---|
public static ColorButton getColorButton(org.gnu.glib.Handle handle)
public void setColor(Color color)
color
- public Color getColor()
public void setAlpha(int alpha)
alpha
- public int getAlpha()
public void setUseAlpha(boolean useAlpha)
useAlpha
- public boolean getUseAlpha()
public void setTitle(java.lang.String title)
title
- public java.lang.String getTitle()
public void addListener(ColorButtonListener listener)
ColorButtonListener
public void removeListener(ColorButtonListener listener)
addListener(ColorButtonListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Button
public EventType getEventType(java.lang.String signal)
getEventType
in class Button
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |