Class EnumListModel

All Implemented Interfaces:
Iterable<EnumListItem>, Collection<EnumListItem>, List<EnumListItem>, SequencedCollection<EnumListItem>, ListModel<EnumListItem>, Proxy, ListModelJavaList<EnumListItem>

@Generated("org.javagi.JavaGI") public final class EnumListModel extends GObject implements ListModel<EnumListItem>

A ListModel representing values of a given enum.

AdwEnumListModel contains objects of type EnumListItem.

  • Constructor Details

    • EnumListModel

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

      public EnumListModel(Type enumType)
      Creates a new AdwEnumListModel for enumType.
      Parameters:
      enumType - the type of the enum to construct the model from
    • EnumListModel

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

    • getType

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

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

      protected EnumListModel 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
    • findPosition

      public int findPosition(int value)

      Finds the position of a given enum value in self.

      If the value is not found, Gtk.INVALID_LIST_POSITION is returned.

      Parameters:
      value - an enum value
      Returns:
      the position of the value
    • getEnumType

      public Type getEnumType()
      Gets the type of the enum represented by self.
      Returns:
      the enum type
    • builder

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