Class Adjustment.Builder<B extends Adjustment.Builder<B>>

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

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

      public B setLower(double lower)
      The minimum value of the adjustment.
      Parameters:
      lower - the value for the lower property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPageIncrement

      public B setPageIncrement(double pageIncrement)
      The page increment of the adjustment.
      Parameters:
      pageIncrement - the value for the page-increment property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPageSize

      public B setPageSize(double pageSize)

      The page size of the adjustment.

      Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.

      Parameters:
      pageSize - the value for the page-size property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setStepIncrement

      public B setStepIncrement(double stepIncrement)
      The step increment of the adjustment.
      Parameters:
      stepIncrement - the value for the step-increment property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUpper

      public B setUpper(double upper)

      The maximum value of the adjustment.

      Note that values will be restricted by upper - page-size if the page-size property is nonzero.

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

      public B setValue(double value)
      The value of the adjustment.
      Parameters:
      value - the value for the value property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onChanged

      public B onChanged(Adjustment.ChangedCallback handler)

      Emitted when one or more of the GtkAdjustment properties have been changed.

      Note that the Gtk.Adjustment:value property is covered by the Gtk.Adjustment::value-changed signal.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onValueChanged

      public B onValueChanged(Adjustment.ValueChangedCallback handler)
      Emitted when the value has been changed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: