Class WindowControls.Builder<B extends WindowControls.Builder<B>>

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

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

    • Builder

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

    • build

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

      public B setDecorationLayout(String decorationLayout)

      The decoration layout for window buttons.

      If this property is not set, the Gtk.Settings:gtk-decoration-layout setting is used.

      Parameters:
      decorationLayout - the value for the decoration-layout property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSide

      public B setSide(PackType side)

      Whether the widget shows start or end side of the decoration layout.

      See Gtk.WindowControls:decoration_layout.

      Parameters:
      side - the value for the side property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseNativeControls

      public B setUseNativeControls(boolean useNativeControls)

      Whether to show platform native close/minimize/maximize buttons.

      For macOS, the Gtk.HeaderBar:decoration-layout property controls the use of native window controls.

      On other platforms, this option has no effect.

      See also Using GTK on Apple macOS.

      Parameters:
      useNativeControls - the value for the use-native-controls property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.18