This widget displays color information in such a way that the user can
specify, with the mouse, any available color.
addListener
public void addListener(ColorSelectionListener listener)
Register an object to handle dialog events.
getColorSelection
public static ColorSelection getColorSelection(Handle handle)
construct a ColorSelection from a handle to a native peer.
getCurrentAlpha
public int getCurrentAlpha()
Returns the current opacity.
- An integer between 0 and 65535.
getCurrentColor
public Color getCurrentColor()
Returns the color which is set in the widget
getHasOpacityControl
public boolean getHasOpacityControl()
Determines whether the ColorSelection has an opacity control.
- true if the widget has the opacity control.
getHasPalette
public boolean getHasPalette()
Determines whether the widget's palette is visible.
- true if the palette is visible.
getPreviousAlpha
public int getPreviousAlpha()
Returns the previous alpha value.
getPreviousColor
public Color getPreviousColor()
Returns the previous color.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface VBox
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.
alpha
- An integer between 0 and 65535.
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.
setHasOpacity
public void setHasOpacity(boolean hasOpacity)
Sets the widget to have an opacity control
setHasOpacityControl
public void setHasOpacityControl(boolean hasOpacity)
Sets the ColorSelection to use or not to use the opacity control.
hasOpacity
- true if this widget can set the opacity.
setHasPalette
public void setHasPalette(boolean hasPalette)
Shows and hides the palette based upon the value of hasPalette.
hasPalette
- true if the palette should be visible.
setPreviousAlpha
public void setPreviousAlpha(int alpha)
Sets the previous alpha value.
setPreviousColor
public void setPreviousColor(Color color)
Sets the previous color value.