Class MultiSelection<T extends GObject>

All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>, ListModel<T>, SectionModel<T>, SelectionModel<T>, Proxy, ListModelJavaList<T>

@Generated("org.javagi.JavaGI") public class MultiSelection<T extends GObject> extends GObject implements ListModel<T>, SectionModel<T>, SelectionModel<T>
A selection model that allows selecting multiple elements.
  • Constructor Details

    • MultiSelection

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

      public MultiSelection(@Nullable ListModel model)
      Creates a new selection to handle model.
      Parameters:
      model - the GListModel to manage
    • MultiSelection

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

    • getType

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

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

      protected MultiSelection 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
    • getModel

      public @Nullable ListModel getModel()
      Returns the underlying model of self.
      Returns:
      the underlying model
    • setModel

      public void setModel(@Nullable ListModel model)

      Sets the model that this MultiSelection should wrap.

      If model is null, this MultiSelection will be empty.

      Parameters:
      model - A GListModel to wrap
    • builder

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