java-gnome version 4.1.2

org.gnome.gtk
Class ColorButton

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Widget
                  extended by org.gnome.gtk.Container
                      extended by org.gnome.gtk.Bin
                          extended by org.gnome.gtk.Button
                              extended by org.gnome.gtk.ColorButton
All Implemented Interfaces:
Activatable

public class ColorButton
extends Button

A Button used to select a RGBA colour.

This is a Button that presents a little rectangle filled with the currently selected RGBA colour. When pressed, it opens a ColorSelectionDialog where the user can select a colour.

You will usually want to connect to the ColorButton.ColorSet signal, that is emitted each time the user changes the colour. You can get the currently selected colour with the getRGBA() method.

Since:
4.0.12
Author:
Vreixo Formoso, Andrew Cowie

Nested Class Summary
static interface ColorButton.ColorSet
          Signal emitted when the user selects a different RGBA colour.
 
Nested classes/interfaces inherited from class org.gnome.gtk.Button
Button.Clicked
 
Nested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
 
Constructor Summary
ColorButton()
          Create a new ColorButton.
ColorButton(RGBA color)
          Create a new ColorButton with the specified Color selected.
 
Method Summary
 void connect(ColorButton.ColorSet handler)
          Hook up a handler for ColorButton.ColorSet signal.
 RGBA getRGBA()
          Get the colour currently selected.
 void setRGBA(RGBA color)
          Set the selected colour.
 
Methods inherited from class org.gnome.gtk.Button
connect, emitClicked, getAlignmentX, getAlignmentY, getImage, getLabel, getRelatedAction, getRelief, setAlignment, setFocusOnClick, setImage, setLabel, setRelatedAction, setRelief
 
Methods inherited from class org.gnome.gtk.Bin
getChild
 
Methods inherited from class org.gnome.gtk.Container
add, getChildren, remove, setBorderWidth
 
Methods inherited from class org.gnome.gtk.Widget
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorButton

public ColorButton()
Create a new ColorButton.

Since:
4.0.12

ColorButton

public ColorButton(RGBA color)
Create a new ColorButton with the specified Color selected.

Since:
4.1.1
Method Detail

connect

public void connect(ColorButton.ColorSet handler)
Hook up a handler for ColorButton.ColorSet signal.

Since:
4.0.12

getRGBA

public RGBA getRGBA()
Get the colour currently selected.

Since:
4.1.1

setRGBA

public void setRGBA(RGBA color)
Set the selected colour.

Since:
4.1.1


java-gnome