Class Tag.Builder<B extends Tag.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Tag

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

      public B setDrawSpaces(boolean drawSpaces)

      Whether to draw white spaces.

      This property takes precedence over the value defined by the SpaceDrawer's SpaceDrawer:matrix property (only where the tag is applied).

      Setting this property also changes Tag:draw-spaces-set to true.

      Parameters:
      drawSpaces - the value for the draw-spaces property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDrawSpacesSet

      public B setDrawSpacesSet(boolean drawSpacesSet)
      Whether the Tag:draw-spaces property is set and must be taken into account.
      Parameters:
      drawSpacesSet - the value for the draw-spaces-set property
      Returns:
      the Builder instance is returned, to allow method chaining