Class TextMark.Builder<B extends TextMark.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
Mark.Builder
Enclosing class:
TextMark

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

      public B setLeftGravity(boolean leftGravity)

      Whether the mark has left gravity.

      When text is inserted at the mark’s current location, if the mark has left gravity it will be moved to the left of the newly-inserted text, otherwise to the right.

      Parameters:
      leftGravity - the value for the left-gravity property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setName

      public B setName(String name)
      The name of the mark or null if the mark is anonymous.
      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining