org.gnu.gtk
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.
addListener , click , enter , getButton , getEventListenerClass , getEventType , getFocusOnClick , getImage , getLabel , getRelief , getType , getUseStock , getUseUnderline , getXAlignment , getYAlignment , leave , press , release , removeListener , setAlignment , setFocusOnClick , setImage , setLabel , setRelief , setUseStock , setUseUnderline |
add , addListener , getBooleanChildProperty , getBorderWidth , getChildProperty , getChildren , getEventListenerClass , getEventType , getIntChildProperty , getResizeMode , getType , remove , removeListener , resizeChildren , setBooleanChildProperty , setBorderWidth , setChildProperty , setIntChildProperty , setResizeMode |
activate , addAccelerator , addEvents , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , addListener , canActivateAccel , createContext , createLayout , draw , drawArea , drawArea , finish , getAccessible , getAllocation , getCanFocus , getColormap , getContext , getData , getDisplay , getDragData , getEventListenerClass , getEventType , getExtensionEvents , getModifierStyle , getName , getParent , getParentWindow , getPointer , getRootWindow , getScreen , getSensitive , getStyle , getToplevel , getType , getWidget , getWindow , grabDefault , grabFocus , hasFocus , hasScreen , hide , hideAll , highlight , highlight , intersect , isAncestor , makeWidget , modifyStyle , popColormap , pushColormap , realize , removeAccelerator , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , removeListener , reparent , setBackgroundColor , setBaseColor , setCanFocus , setColormap , setDoubleBuffered , setDragDestination , setDragIcon , setDragIconPixbuf , setDragIconStock , setDragSource , setEvents , setExtensionEvents , setFont , setForegroundColor , setMinimumSize , setName , setNoDragDestination , setNoDragSource , setSensitive , setTextColor , shapeCombineMask , show , showAll , unHighlight , unHighlight |
addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addEventHandler , addListener , collect , freezeNotify , getBooleanProperty , getData , getDoubleProperty , getEventListenerClass , getEventType , getFloatProperty , getGObjectFromHandle , getIntProperty , getJavaObjectProperty , getLongProperty , getPixbufProperty , getProperty , getStringProperty , hasProperty , notify , removeEventHandler , removeListener , setBooleanProperty , setData , setDoubleProperty , setFloatProperty , setIntProperty , setJavaObjectProperty , setLongProperty , setPixbufProperty , setProperty , setStringProperty , thawNotify |
ColorButton
public ColorButton()
Create a new ColorButton.
ColorButton
public ColorButton(Handle handle)
For internal use by Java-Gnome only.
ColorButton
public ColorButton(Color color)
Create a new ColorButton initialized with the provided color.
color
- A Color to set the current color with.
addListener
public void addListener(ColorButtonListener listener)
Register an object to handle dialog events.
getAlpha
public int getAlpha()
Returns the current alpha value.
getColor
public Color getColor()
Returns the current color value.
getColorButton
public static ColorButton getColorButton(Handle handle)
For internal use by Java-Gnome only.
getTitle
public String getTitle()
Returns the title from the ColorSelectionDialog.
getUseAlpha
public boolean getUseAlpha()
Returns whether or not the ColorButton is using the alpha channel.
setAlpha
public void setAlpha(int alpha)
Sets the current opacity to be alpha
setColor
public void setColor(Color color)
Set the current color for the widget.
setTitle
public void setTitle(String title)
Sets the color for the ColorSelectionDialog.
setUseAlpha
public void setUseAlpha(boolean useAlpha)
Sets whether or not the ColorButton should use the alpha channel.