Class PrintCompositor.Builder<B extends PrintCompositor.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
PrintCompositor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building thePrintCompositor
object.setBodyFontName
(String bodyFontName) Name of the font used for the text body.TheBuffer
object to print.setFooterFontName
(String footerFontName) Name of the font used to print page footer.setHeaderFontName
(String headerFontName) Name of the font used to print page header.setHighlightSyntax
(boolean highlightSyntax) Whether to print the document with highlighted syntax.setLineNumbersFontName
(String lineNumbersFontName) Name of the font used to print line numbers on the left margin.setPrintFooter
(boolean printFooter) Whether to print a footer in each page.setPrintHeader
(boolean printHeader) Whether to print a header in each page.setPrintLineNumbers
(int printLineNumbers) Interval of printed line numbers.setTabWidth
(int tabWidth) Width of a tab character expressed in spaces.setWrapMode
(WrapMode wrapMode) Whether to wrap lines never, at word boundaries, or at character boundaries.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building thePrintCompositor
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toPrintCompositor
.- Overrides:
build
in classGObject.Builder<B extends PrintCompositor.Builder<B>>
- Returns:
- a new instance of
PrintCompositor
with the properties that were set in the Builder object.
-
setBodyFontName
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(java.lang.String)
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(org.gnome.gtk.PrintContext)
function.- Parameters:
bodyFontName
- the value for thebody-font-name
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBuffer
-
setHeaderFontName
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(java.lang.String)
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(org.gnome.gtk.PrintContext)
function.- Parameters:
headerFontName
- the value for theheader-font-name
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHighlightSyntax
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(org.gnome.gtk.PrintContext)
function.- Parameters:
highlightSyntax
- the value for thehighlight-syntax
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLineNumbersFontName
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(java.lang.String)
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(org.gnome.gtk.PrintContext)
function.- Parameters:
lineNumbersFontName
- the value for theline-numbers-font-name
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrintHeader
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(org.gnome.gtk.PrintContext)
function.- Parameters:
printHeader
- the value for theprint-header
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrintLineNumbers
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(org.gnome.gtk.PrintContext)
function.- Parameters:
printLineNumbers
- the value for theprint-line-numbers
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTabWidth
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(org.gnome.gtk.PrintContext)
function.- Parameters:
tabWidth
- the value for thetab-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrapMode
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(org.gnome.gtk.PrintContext)
function.- Parameters:
wrapMode
- the value for thewrap-mode
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-