Class AspectFrame.Builder<B extends AspectFrame.Builder<B>>

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

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

      public B setChild(Widget child)
      The child widget.
      Parameters:
      child - the value for the child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setObeyChild

      public B setObeyChild(boolean obeyChild)
      Whether the GtkAspectFrame should use the aspect ratio of its child.
      Parameters:
      obeyChild - the value for the obey-child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRatio

      public B setRatio(float ratio)

      The aspect ratio to be used by the GtkAspectFrame.

      This property is only used if Gtk.AspectFrame:obey-child is set to false.

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

      public B setXalign(float xalign)
      The horizontal alignment of the child.
      Parameters:
      xalign - the value for the xalign property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setYalign

      public B setYalign(float yalign)
      The vertical alignment of the child.
      Parameters:
      yalign - the value for the yalign property
      Returns:
      the Builder instance is returned, to allow method chaining