Class Spinner

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public final class Spinner extends Widget implements Accessible, Buildable, ConstraintTarget

A widget showing a loading spinner.

spinner

The size of the spinner depends on the available size, never smaller than 16×16 pixels and never larger than 64×64 pixels.

Use the Gtk.Widget:halign and Gtk.Widget:valign properties in combination with Gtk.Widget:width-request and Gtk.Widget:height-request for fine sizing control.

For example, the following snippet shows the spinner at 48×48 pixels:

<object class="AdwSpinner">
  <property name="halign">center</property>
  <property name="valign">center</property>
  <property name="width-request">48</property>
  <property name="height-request">48</property>
</object>

See SpinnerPaintable for cases where using a widget is impractical or impossible, such as StatusPage:paintable.

CSS nodes

AdwSpinner has a single node with the name image and the style class .spinner.

Accessibility

AdwSpinner uses the Gtk.AccessibleRole.progress-bar role.

Since:
1.6
  • Constructor Details

    • Spinner

      public Spinner(MemorySegment address)
      Create a Spinner instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Spinner

      public Spinner()
      Create a new Spinner.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Spinner class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Spinner asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • builder

      public static Spinner.Builder<? extends Spinner.Builder> builder()
      A Spinner.Builder object constructs a Spinner with the specified properties. Use the various set...() methods to set properties, and finish construction with Spinner.Builder.build().
      Returns:
      the builder object