Class Window.Builder<B extends Window.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Direct Known Subclasses:
AboutWindow.Builder, PreferencesWindow.Builder
Enclosing class:
Window

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

      public B setAdaptivePreview(boolean adaptivePreview)

      Whether adaptive preview is currently open.

      Adaptive preview is a debugging tool used for testing the window contents at specific screen sizes, simulating mobile environment.

      Adaptive preview can always be accessed from inspector. This function allows applications to open it manually.

      Most applications should not use this property.

      Parameters:
      adaptivePreview - the value for the adaptive-preview property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • setContent

      public B setContent(Widget content)

      The content widget.

      This property should always be used instead of Gtk.Window:child.

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