Class NoSelection<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 NoSelection<T extends GObject> extends GObject implements ListModel<T>, SectionModel<T>, SelectionModel<T>

A selection model that does not allow selecting anything.

This model is meant to be used as a simple wrapper around a GListModel when a GtkSelectionModel is required.

GtkNoSelection passes through sections from the underlying model.

  • Constructor Details

    • NoSelection

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

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

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

    • getType

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

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

      protected NoSelection 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()
      Gets the model that this NoSelection is wrapping.
      Returns:
      The model being wrapped
    • setModel

      public void setModel(@Nullable ListModel model)

      Sets the model that this NoSelection should wrap.

      If model is null, this model will be empty.

      Parameters:
      model - A GListModel to wrap
    • builder

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