Class PrintCompositor.Builder<B extends PrintCompositor.Builder<B>>

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

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

      public B setBodyFontName(String bodyFontName)

      Name of the font used for the text body.

      Accepted values are strings representing a font description Pango can understand. (e.g. "Monospace 10"). See FontDescription#fromString for a description of the format of the string representation.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      bodyFontName - the value for the body-font-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setBuffer

      public B setBuffer(Buffer buffer)
      The Buffer object to print.
      Parameters:
      buffer - the value for the buffer property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFooterFontName

      public B setFooterFontName(String footerFontName)

      Name of the font used to print page footer. If this property is unspecified, the text body font is used.

      Accepted values are strings representing a font description Pango can understand. (e.g. "Monospace 10"). See FontDescription#fromString for a description of the format of the string representation.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      footerFontName - the value for the footer-font-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHeaderFontName

      public B setHeaderFontName(String headerFontName)

      Name of the font used to print page header. If this property is unspecified, the text body font is used.

      Accepted values are strings representing a font description Pango can understand. (e.g. "Monospace 10"). See FontDescription#fromString for a description of the format of the string representation.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      headerFontName - the value for the header-font-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHighlightSyntax

      public B setHighlightSyntax(boolean highlightSyntax)

      Whether to print the document with highlighted syntax.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      highlightSyntax - the value for the highlight-syntax property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setLineNumbersFontName

      public B setLineNumbersFontName(String lineNumbersFontName)

      Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.

      Accepted values are strings representing a font description Pango can understand. (e.g. "Monospace 10"). See FontDescription#fromString for a description of the format of the string representation.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      lineNumbersFontName - the value for the line-numbers-font-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPrintFooter

      public B setPrintFooter(boolean printFooter)

      Whether to print a footer in each page.

      Note that by default the footer format is unspecified, and if it is unspecified the footer will not be printed, regardless of the value of this property.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      printFooter - the value for the print-footer property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPrintHeader

      public B setPrintHeader(boolean printHeader)

      Whether to print a header in each page.

      Note that by default the header format is unspecified, and if it is unspecified the header will not be printed, regardless of the value of this property.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      printHeader - the value for the print-header property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPrintLineNumbers

      public B setPrintLineNumbers(int printLineNumbers)

      Interval of printed line numbers.

      If this property is set to 0 no numbers will be printed. If greater than 0, a number will be printed every "print-line-numbers" lines (i.e. 1 will print all line numbers).

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      printLineNumbers - the value for the print-line-numbers property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTabWidth

      public B setTabWidth(int tabWidth)

      Width of a tab character expressed in spaces.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

      Parameters:
      tabWidth - the value for the tab-width property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setWrapMode

      public B setWrapMode(WrapMode wrapMode)

      Whether to wrap lines never, at word boundaries, or at character boundaries.

      The value of this property cannot be changed anymore after the first call to the PrintCompositor.paginate(PrintContext) function.

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