## org.gnu.gtk
Class ColorSelection

    java.lang.Object
      org.gnu.glib.Struct
          org.gnu.glib.GObject
              org.gnu.gtk.GtkObject
                  org.gnu.gtk.Widget
                      org.gnu.gtk.Container
                          org.gnu.gtk.Box
                              org.gnu.gtk.VBox
                                  org.gnu.gtk.ColorSelection

public class ColorSelection
extends VBox

This widget displays color information in such a way that the user can specify, with the mouse, any available color.

See Also:
  `ColorSelectionDialog`

Constructor Summary
`ColorSelection()` Creates a new gtk.ColorSelection.
`ColorSelection(org.gnu.glib.Handle handle)` construct a ColorSelection from a handle to a native peer.

Method Summary
`void` `addListener(ColorSelectionListener listener)` Register an object to handle dialog events.
`static ColorSelection` `getColorSelection(org.gnu.glib.Handle handle)` construct a ColorSelection from a handle to a native peer.
`int` `getCurrentAlpha()` Returns the current opacity.
`Color` `getCurrentColor()` Returns the color which is set in the widget
`java.lang.Class` `getEventListenerClass(java.lang.String signal)`
`EventType` `getEventType(java.lang.String signal)`
`boolean` `getHasOpacityControl()` Determines whether the ColorSelection has an opacity control.
`boolean` `getHasPalette()` Determines whether the widget's palette is visible.
`int` `getPreviousAlpha()` Returns the previous alpha value.
`Color` `getPreviousColor()` Returns the previous color.
`static Type` `getType()` Retrieve the runtime type used by the GLib library.
`void` `removeListener(ColorSelectionListener listener)` Removes a listener
`void` `setCurrentAlpha(int alpha)` Sets the current opacity to be alpha.
`void` `setCurrentColor(Color color)` Sets the current color to be color.
`void` `setHasOpacity(boolean hasOpacity)` Sets the widget to have an opacity control
`void` `setHasOpacityControl(boolean hasOpacity)` Sets the ColorSelection to use or not to use the opacity control.
`void` `setHasPalette(boolean hasPalette)` Shows and hides the palette based upon the value of hasPalette.
`void` `setPreviousAlpha(int alpha)` Sets the previous alpha value.
`void` `setPreviousColor(Color color)` Sets the previous color value.

Methods inherited from class org.gnu.gtk.VBox
`getVBox`

Methods inherited from class org.gnu.gtk.Box
`getHomogeneous, getSpacing, packEnd, packEnd, packStart, packStart, reorderChild, setHomogeneous, setSpacing`

Methods inherited from class org.gnu.gtk.Container
`add, addListener, getBorderWidth, getChildren, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode`

Methods inherited from class org.gnu.gtk.Widget

`activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, 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, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight`

Methods inherited from class org.gnu.gtk.GtkObject
`destroy, sink`

Methods inherited from class org.gnu.glib.GObject

`addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify`

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

### ColorSelection

    public ColorSelection()

  Creates a new gtk.ColorSelection.

### ColorSelection

    public ColorSelection(org.gnu.glib.Handle handle)

  construct a ColorSelection from a handle to a native peer.

Method Detail

### getColorSelection

    public static ColorSelection getColorSelection(org.gnu.glib.Handle handle)

  construct a ColorSelection from a handle to a native peer.

### setHasOpacity

    public void setHasOpacity(boolean hasOpacity)

  Sets the widget to have an opacity control

### setCurrentColor

    public void setCurrentColor(Color color)

  Sets the current color to be color. The first time this is called, it will also set the original color to be color too.

  Parameters:
    `color` -

### getCurrentColor

    public Color getCurrentColor()

  Returns the color which is set in the widget

  Returns:
    the set colour

### setHasOpacityControl

    public void setHasOpacityControl(boolean hasOpacity)

  Sets the ColorSelection to use or not to use the opacity control.

  Parameters:
    `hasOpacity` - true if this widget can set the opacity.

### getHasOpacityControl

    public boolean getHasOpacityControl()

  Determines whether the ColorSelection has an opacity control.

  Returns:
    true if the widget has the opacity control.

### setHasPalette

    public void setHasPalette(boolean hasPalette)

  Shows and hides the palette based upon the value of hasPalette.

  Parameters:
    `hasPalette` - true if the palette should be visible.

### getHasPalette

    public boolean getHasPalette()

  Determines whether the widget's palette is visible.

  Returns:
    true if the palette is visible.

### setCurrentAlpha

    public void setCurrentAlpha(int alpha)

  Sets the current opacity to be alpha. The first time this is called it will also set the original opacity to be alpha too.

  Parameters:
    `alpha` - An integer between 0 and 65535.

### getCurrentAlpha

    public int getCurrentAlpha()

  Returns the current opacity.

  Returns:
    An integer between 0 and 65535.

### setPreviousAlpha

    public void setPreviousAlpha(int alpha)

  Sets the previous alpha value.

### getPreviousAlpha

    public int getPreviousAlpha()

  Returns the previous alpha value.

### setPreviousColor

    public void setPreviousColor(Color color)

  Sets the previous color value.

### getPreviousColor

    public Color getPreviousColor()

  Returns the previous color.

### getType

    public static Type getType()

  Retrieve the runtime type used by the GLib library.

### addListener

    public void addListener(ColorSelectionListener listener)

  Register an object to handle dialog events.

  See Also:
    `ColorSelectionListener`

### removeListener

    public void removeListener(ColorSelectionListener listener)

  Removes a listener

  See Also:
    `addListener(ColorSelectionListener)`

### getEventListenerClass

    public java.lang.Class getEventListenerClass(java.lang.String signal)

  Overrides:
    `getEventListenerClass` in class `Container`

### getEventType

    public EventType getEventType(java.lang.String signal)

  Overrides:
    `getEventType` in class `Container`