Class ColorDialogButton.Builder<B extends ColorDialogButton.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
ColorDialogButton

public static class ColorDialogButton.Builder<B extends ColorDialogButton.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
4.10
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public ColorDialogButton build()
      Finish building the ColorDialogButton object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to ColorDialogButton.
      Overrides:
      build in class Widget.Builder<B extends ColorDialogButton.Builder<B>>
      Returns:
      a new instance of ColorDialogButton with the properties that were set in the Builder object.
    • setDialog

      public B setDialog(ColorDialog dialog)
      The GtkColorDialog that contains parameters for the color chooser dialog.
      Parameters:
      dialog - the value for the dialog property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setRgba

      public B setRgba(RGBA rgba)

      The selected color.

      This property can be set to give the button its initial color, and it will be updated to reflect the users choice in the color chooser dialog.

      Listen to notify::rgba to get informed about changes to the buttons color.

      Parameters:
      rgba - the value for the rgba property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • onActivate

      public B onActivate(ColorDialogButton.ActivateCallback handler)

      Emitted when the color dialog button is activated.

      The ::activate signal on GtkColorDialogButton is an action signal and emitting it causes the button to pop up its dialog.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.14
      See Also: