org.gnu.gtk

Class ColorButton

public class ColorButton extends Button

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.ColorButton. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

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.
Constructor Summary
ColorButton()
Create a new ColorButton.
ColorButton(Color color)
Create a new ColorButton initialized with the provided color.
ColorButton(Handle handle)
For internal use by Java-Gnome only.
Method Summary
voidaddListener(ColorButtonListener listener)
Register an object to handle dialog events.
intgetAlpha()
Returns the current alpha value.
ColorgetColor()
Returns the current color value.
static ColorButtongetColorButton(Handle handle)
For internal use by Java-Gnome only.
ClassgetEventListenerClass(String signal)
EventTypegetEventType(String signal)
StringgetTitle()
Returns the title from the ColorSelectionDialog.
booleangetUseAlpha()
Returns whether or not the ColorButton is using the alpha channel.
voidremoveListener(ColorButtonListener listener)
Removes a listener
voidsetAlpha(int alpha)
Sets the current opacity to be alpha
voidsetColor(Color color)
Set the current color for the widget.
voidsetTitle(String title)
Sets the color for the ColorSelectionDialog.
voidsetUseAlpha(boolean useAlpha)
Sets whether or not the ColorButton should use the alpha channel.

Constructor Detail

ColorButton

public ColorButton()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new ColorButton.

ColorButton

public ColorButton(Color color)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new ColorButton initialized with the provided color.

Parameters: color A Color to set the current color with.

ColorButton

public ColorButton(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

For internal use by Java-Gnome only.

Method Detail

addListener

public void addListener(ColorButtonListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Register an object to handle dialog events.

See Also: ColorButtonListener

getAlpha

public int getAlpha()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the current alpha value.

getColor

public Color getColor()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the current color value.

getColorButton

public static ColorButton getColorButton(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

For internal use by Java-Gnome only.

getEventListenerClass

public Class getEventListenerClass(String signal)

getEventType

public EventType getEventType(String signal)

getTitle

public String getTitle()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the title from the ColorSelectionDialog.

getUseAlpha

public boolean getUseAlpha()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns whether or not the ColorButton is using the alpha channel.

removeListener

public void removeListener(ColorButtonListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a listener

See Also: addListener

setAlpha

public void setAlpha(int alpha)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the current opacity to be alpha

Parameters: alpha

setColor

public void setColor(Color color)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Set the current color for the widget.

Parameters: color

setTitle

public void setTitle(String title)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the color for the ColorSelectionDialog.

Parameters: title

setUseAlpha

public void setUseAlpha(boolean useAlpha)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets whether or not the ColorButton should use the alpha channel.

Parameters: useAlpha