Class Frame.Builder<B extends Frame.Builder<B>>

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

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

      public B setLabel(String label)
      Text of the frame's label.
      Parameters:
      label - the value for the label property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setLabelWidget

      public B setLabelWidget(Widget labelWidget)
      Widget to display in place of the usual frame label.
      Parameters:
      labelWidget - the value for the label-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setLabelXalign

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