org.gnome.gtk
Class ColorButton
Object
org.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Bin
org.gnome.gtk.Button
org.gnome.gtk.ColorButton
- All Implemented Interfaces:
- Activatable
public class ColorButton
- extends Button
A Button used to select a Color
.
This is a Button that presents a little rectangle filled with the currently
selected Color. When pressed, it opens a ColorSelectionDialog where the
user can select a Color.
You will usually want to connect to the ColorButton.ColorSet
signal, that is
emitted each time the user changes the Color. You can get the currently
selected Color with the getColor()
method.
- Since:
- 4.0.12
- Author:
- Vreixo Formoso
Nested Class Summary |
static interface |
ColorButton.ColorSet
Signal emitted when the user selects a different Color. |
Nested classes/interfaces inherited from class org.gnome.gtk.Widget |
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent |
Constructor Summary |
ColorButton()
Create a new ColorButton. |
ColorButton(Color color)
Create a new ColorButton with the specified Color selected. |
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.Widget |
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, 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 |
ColorButton
public ColorButton()
- Create a new ColorButton.
- Since:
- 4.0.12
ColorButton
public ColorButton(Color color)
- Create a new ColorButton with the specified Color selected.
- Since:
- 4.0.12
connect
public void connect(ColorButton.ColorSet handler)
- Hook up a handler for
ColorButton.ColorSet
signal.
- Since:
- 4.0.12
getColor
public Color getColor()
- Get the Color currently selected.
- Since:
- 4.0.12
setColor
public void setColor(Color color)
- Set the selected Color.
- Since:
- 4.0.12