Class CellRendererSpinner.Builder<B extends CellRendererSpinner.Builder<B>>

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

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

      public B setActive(boolean active)
      Whether the spinner is active (ie. shown) in the cell
      Parameters:
      active - the value for the active property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPulse

      public B setPulse(int pulse)

      Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually, you would update this value in a timeout.

      By default, the GtkSpinner widget draws one full cycle of the animation, consisting of 12 frames, in 750 milliseconds.

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

      public B setSize(IconSize size)
      The GtkIconSize value that specifies the size of the rendered spinner.
      Parameters:
      size - the value for the size property
      Returns:
      the Builder instance is returned, to allow method chaining