Class SpaceDrawer.Builder<B extends SpaceDrawer.Builder<B>>

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

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

      public B setEnableMatrix(boolean enableMatrix)
      Whether the SpaceDrawer:matrix property is enabled.
      Parameters:
      enableMatrix - the value for the enable-matrix property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMatrix

      public B setMatrix(Variant matrix)

      The property is a GLib.Variant property to specify where and what kind of white spaces to draw.

      The GLib.Variant is of type "au", an array of unsigned integers. Each integer is a combination of SpaceTypeFlags. There is one integer for each SpaceLocationFlags, in the same order as they are defined in the enum (SpaceLocationFlags.NONE and SpaceLocationFlags.ALL are not taken into account).

      If the array is shorter than the number of locations, then the value for the missing locations will be SpaceTypeFlags.NONE.

      By default, SpaceTypeFlags.ALL is set for all locations.4

      Parameters:
      matrix - the value for the matrix property
      Returns:
      the Builder instance is returned, to allow method chaining