Class SingleSelection.Builder<B extends SingleSelection.Builder<B>>

java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.SingleSelection.Builder<B>
Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
SingleSelection<T extends GObject>

public static class SingleSelection.Builder<B extends SingleSelection.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public SingleSelection build()
      Finish building the SingleSelection object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to SingleSelection.
      Overrides:
      build in class GObject.Builder<B extends SingleSelection.Builder<B>>
      Returns:
      a new instance of SingleSelection with the properties that were set in the Builder object.
    • setAutoselect

      public B setAutoselect(boolean autoselect)
      If the selection will always select an item.
      Parameters:
      autoselect - the value for the autoselect property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setCanUnselect

      public B setCanUnselect(boolean canUnselect)
      If unselecting the selected item is allowed.
      Parameters:
      canUnselect - the value for the can-unselect property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setModel

      public B setModel(ListModel model)
      The model being managed.
      Parameters:
      model - the value for the model property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSelected

      public B setSelected(int selected)
      Position of the selected item.
      Parameters:
      selected - the value for the selected property
      Returns:
      the Builder instance is returned, to allow method chaining