Interface ColorChooser

All Superinterfaces:
Proxy
All Known Implementing Classes:
ColorButton, ColorChooser.ColorChooser$Impl, ColorChooserDialog, ColorChooserWidget

@Generated("org.javagi.JavaGI") @Deprecated public interface ColorChooser extends Proxy
Deprecated.
Use ColorDialog and ColorDialogButton instead of widgets implementing GtkColorChooser

GtkColorChooser is an interface that is implemented by widgets for choosing colors.

Depending on the situation, colors may be allowed to have alpha (translucency).

In GTK, the main widgets that implement this interface are ColorChooserWidget, ColorChooserDialog and ColorButton.

  • Method Details

    • getType

      static @Nullable Type getType()
      Deprecated.
      Get the GType of the ColorChooser class.
      Returns:
      the GType
    • addPalette

      @Deprecated default void addPalette(Orientation orientation, int colorsPerLine, @Nullable RGBA @Nullable [] colors)
      Deprecated.
      Use ColorDialog instead

      Adds a palette to the color chooser.

      If orientation is horizontal, the colors are grouped in rows, with colorsPerLine colors in each row. If horizontal is false, the colors are grouped in columns instead.

      The default color palette of ColorChooserWidget has 45 colors, organized in columns of 5 colors (this includes some grays).

      The layout of the color chooser widget works best when the palettes have 9-10 columns.

      Calling this function for the first time has the side effect of removing the default color palette from the color chooser.

      If colors is null, removes all previously added palettes.

      Parameters:
      orientation - Orientation.HORIZONTAL if the palette should be displayed in rows, Orientation.VERTICAL for columns
      colorsPerLine - the number of colors to show in each row/column
      colors - the colors of the palette
    • getRgba

      @Deprecated default void getRgba(RGBA color)
      Deprecated.
      Use ColorDialog instead
      Gets the currently-selected color.
      Parameters:
      color - a GdkRGBA to fill in with the current color
    • getUseAlpha

      @Deprecated default boolean getUseAlpha()
      Deprecated.
      Use ColorDialog instead
      Returns whether the color chooser shows the alpha channel.
      Returns:
      true if the color chooser uses the alpha channel, false if not
    • setRgba

      @Deprecated default void setRgba(RGBA color)
      Deprecated.
      Use ColorDialog instead
      Sets the color.
      Parameters:
      color - the new color
    • setUseAlpha

      @Deprecated default void setUseAlpha(boolean useAlpha)
      Deprecated.
      Use ColorDialog instead
      Sets whether or not the color chooser should use the alpha channel.
      Parameters:
      useAlpha - true if color chooser should use alpha channel, false if not
    • onColorActivated

      Deprecated.
      Use ColorDialog and ColorDialogButton instead of widgets implementing GtkColorChooser

      Emitted when a color is activated from the color chooser.

      This usually happens when the user clicks a color swatch, or a color is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitColorActivated

      @Deprecated default void emitColorActivated(@Nullable RGBA color)
      Deprecated.
      Emits the "color-activated" signal. See onColorActivated(ColorChooser.ColorActivatedCallback).