Class ColorDialog.Builder<B extends ColorDialog.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
ColorDialog

public static class ColorDialog.Builder<B extends ColorDialog.Builder<B>> extends GObject.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 ColorDialog build()
      Finish building the ColorDialog object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to ColorDialog.
      Overrides:
      build in class GObject.Builder<B extends ColorDialog.Builder<B>>
      Returns:
      a new instance of ColorDialog with the properties that were set in the Builder object.
    • setModal

      public B setModal(boolean modal)
      Whether the color chooser dialog is modal.
      Parameters:
      modal - the value for the modal property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setTitle

      public B setTitle(String title)
      A title that may be shown on the color chooser dialog.
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setWithAlpha

      public B setWithAlpha(boolean withAlpha)

      Whether colors may have alpha (translucency).

      When with-alpha is false, the color that is selected will be forced to have alpha == 1.

      Parameters:
      withAlpha - the value for the with-alpha property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10