Class SpinnerPaintable

All Implemented Interfaces:
Paintable, SymbolicPaintable, Proxy

@Generated("org.javagi.JavaGI") public final class SpinnerPaintable extends GObject implements Paintable, SymbolicPaintable

A paintable showing a loading spinner.

spinner

AdwSpinnerPaintable size varies depending on the available space, but is capped at 64×64 pixels.

To be able to animate, AdwSpinnerPaintable needs a widget. It will be animated according to that widget's frame clock, and only if that widget is mapped. Ideally it should be the same widget the paintable is displayed in, but that's not a requirement.

Most applications should be using Spinner instead. AdwSpinnerPaintable is provided for the cases where using a widget is impractical or impossible, such as StatusPage:paintable:

<object class="AdwStatusPage" id="status_page">
  <property name="paintable">
    <object class="AdwSpinnerPaintable">
      <property name="widget">status_page</property>
    </object>
  </property>
  <!-- ... -->
</object>
Since:
1.6
  • Constructor Details

    • SpinnerPaintable

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

      public SpinnerPaintable(@Nullable Widget widget)
      Creates a new AdwSpinnerPaintable for widget.
      Parameters:
      widget - the widget used for frame clock
      Since:
      1.6
    • SpinnerPaintable

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

    • getType

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

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

      protected SpinnerPaintable 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 GObject
      Returns:
      the instance as if it were its parent type
    • getWidget

      public @Nullable Widget getWidget()
      Gets the widget used for frame clock.
      Returns:
      the widget
      Since:
      1.6
    • setWidget

      public void setWidget(@Nullable Widget widget)
      Sets the widget used for frame clock.
      Parameters:
      widget - the widget to use for frame clock
      Since:
      1.6
    • builder

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