Class TextTag.Builder<B extends TextTag.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
Tag.Builder
- Enclosing class:
TextTag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theTextTag
object.setAccumulativeMargin
(boolean accumulativeMargin) Whether the margins accumulate or override each other.setAllowBreaks
(boolean allowBreaks) Whether breaks are allowed.setAllowBreaksSet
(boolean allowBreaksSet) Whether theallow-breaks
property is set.setBackground
(String background) Background color as a string.setBackgroundFullHeight
(boolean backgroundFullHeight) Whether the background color fills the entire line height or only the height of the tagged characters.setBackgroundFullHeightSet
(boolean backgroundFullHeightSet) Whether thebackground-full-height
property is set.setBackgroundRgba
(RGBA backgroundRgba) Background color as aGdkRGBA
.setBackgroundSet
(boolean backgroundSet) Whether thebackground
property is set.setDirection
(TextDirection direction) Text direction, e.g.setEditable
(boolean editable) Whether the text can be modified by the user.setEditableSet
(boolean editableSet) Whether theeditable
property is set.setFallback
(boolean fallback) Whether font fallback is enabled.setFallbackSet
(boolean fallbackSet) Whether thefallback
property is set.Name of the font family, e.g.setFamilySet
(boolean familySet) Whether thefamily
property is set.Font description as string, e.g.setFontDesc
(FontDescription fontDesc) Font description as aPangoFontDescription
.setFontFeatures
(String fontFeatures) OpenType font features, as a string.setFontFeaturesSet
(boolean fontFeaturesSet) Whether thefont-features
property is set.setForeground
(String foreground) Foreground color as a string.setForegroundRgba
(RGBA foregroundRgba) Foreground color as aGdkRGBA
.setForegroundSet
(boolean foregroundSet) Whether theforeground
property is set.setIndent
(int indent) Amount to indent the paragraph, in pixels.setIndentSet
(boolean indentSet) Whether theindent
property is set.setInsertHyphens
(boolean insertHyphens) Whether to insert hyphens at breaks.setInsertHyphensSet
(boolean insertHyphensSet) Whether theinsert-hyphens
property is set.setInvisible
(boolean invisible) Whether this text is hidden.setInvisibleSet
(boolean invisibleSet) Whether theinvisible
property is set.setJustification
(Justification justification) Left, right, or center justification.setJustificationSet
(boolean justificationSet) Whether thejustification
property is set.setLanguage
(String language) The language this text is in, as an ISO code.setLanguageSet
(boolean languageSet) Whether thelanguage
property is set.setLeftMargin
(int leftMargin) Width of the left margin in pixels.setLeftMarginSet
(boolean leftMarginSet) Whether theleft-margin
property is set.setLetterSpacing
(int letterSpacing) Extra spacing between graphemes, in Pango units.setLetterSpacingSet
(boolean letterSpacingSet) Whether theletter-spacing
property is set.setLineHeight
(float lineHeight) Factor to scale line height by.setLineHeightSet
(boolean lineHeightSet) Whether theline-height
property is set.The name used to refer to the tag.setOverline
(Overline overline) Style of overline for this text.setOverlineRgba
(RGBA overlineRgba) This property modifies the color of overlines.setOverlineRgbaSet
(boolean overlineRgbaSet) Whether theoverline-rgba
property is set.setOverlineSet
(boolean overlineSet) Whether theoverline
property is set.setParagraphBackground
(String paragraphBackground) The paragraph background color as a string.setParagraphBackgroundRgba
(RGBA paragraphBackgroundRgba) The paragraph background color as aGdkRGBA
.setParagraphBackgroundSet
(boolean paragraphBackgroundSet) Whether theparagraph-background
property is set.setPixelsAboveLines
(int pixelsAboveLines) Pixels of blank space above paragraphs.setPixelsAboveLinesSet
(boolean pixelsAboveLinesSet) Whether thepixels-above-lines
property is set.setPixelsBelowLines
(int pixelsBelowLines) Pixels of blank space below paragraphs.setPixelsBelowLinesSet
(boolean pixelsBelowLinesSet) Whether thepixels-below-lines
property is set.setPixelsInsideWrap
(int pixelsInsideWrap) Pixels of blank space between wrapped lines in a paragraph.setPixelsInsideWrapSet
(boolean pixelsInsideWrapSet) Whether thepixels-inside-wrap
property is set.setRightMargin
(int rightMargin) Width of the right margin, in pixels.setRightMarginSet
(boolean rightMarginSet) Whether theright-margin
property is set.setRise
(int rise) Offset of text above the baseline, in Pango units.setRiseSet
(boolean riseSet) Whether therise
property is set.setScale
(double scale) Font size as a scale factor relative to the default font size.setScaleSet
(boolean scaleSet) Whether thescale
property is set.setSentence
(boolean sentence) Whether this tag represents a single sentence.setSentenceSet
(boolean sentenceSet) Whether thesentence
property is set.setShowSpaces
(Set<ShowFlags> showSpaces) How to render invisible characters.setShowSpaces
(ShowFlags... showSpaces) How to render invisible characters.setShowSpacesSet
(boolean showSpacesSet) Whether theshow-spaces
property is set.setSize
(int size) Font size in Pango units.setSizePoints
(double sizePoints) Font size in points.setSizeSet
(boolean sizeSet) Whether thesize
property is set.setStretch
(Stretch stretch) Font stretch as aPangoStretch
, e.g.setStretchSet
(boolean stretchSet) Whether thestretch
property is set.setStrikethrough
(boolean strikethrough) Whether to strike through the text.setStrikethroughRgba
(RGBA strikethroughRgba) This property modifies the color of strikeouts.setStrikethroughRgbaSet
(boolean strikethroughRgbaSet) If thestrikethrough-rgba
property has been set.setStrikethroughSet
(boolean strikethroughSet) Whether thestrikethrough
property is set.Font style as aPangoStyle
, e.g.setStyleSet
(boolean styleSet) Whether thestyle
property is set.Custom tabs for this text.setTabsSet
(boolean tabsSet) Whether thetabs
property is set.setTextTransform
(TextTransform textTransform) How to transform the text for display.setTextTransformSet
(boolean textTransformSet) Whether thetext-transform
property is set.setUnderline
(Underline underline) Style of underline for this text.setUnderlineRgba
(RGBA underlineRgba) This property modifies the color of underlines.setUnderlineRgbaSet
(boolean underlineRgbaSet) If theunderline-rgba
property has been set.setUnderlineSet
(boolean underlineSet) Whether theunderline
property is set.setVariant
(Variant variant) Font variant as aPangoVariant
, e.g.setVariantSet
(boolean variantSet) Whether thevariant
property is set.setWeight
(int weight) Font weight as an integer.setWeightSet
(boolean weightSet) Whether theweight
property is set.setWord
(boolean word) Whether this tag represents a single word.setWordSet
(boolean wordSet) Whether theword
property is set.setWrapMode
(WrapMode wrapMode) Whether to wrap lines never, at word boundaries, or at character boundaries.setWrapModeSet
(boolean wrapModeSet) Whether thewrap-mode
property is set.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 theTextTag
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 toTextTag
.- Overrides:
build
in classGObject.Builder<B extends TextTag.Builder<B>>
- Returns:
- a new instance of
TextTag
with the properties that were set in the Builder object.
-
setAccumulativeMargin
Whether the margins accumulate or override each other.When set to
true
the margins of this tag are added to the margins of any other non-accumulative margins present. When set tofalse
the margins override one another (the default).- Parameters:
accumulativeMargin
- the value for theaccumulative-margin
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAllowBreaks
Whether breaks are allowed.- Parameters:
allowBreaks
- the value for theallow-breaks
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAllowBreaksSet
Whether theallow-breaks
property is set.- Parameters:
allowBreaksSet
- the value for theallow-breaks-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBackground
-
setBackgroundFullHeight
Whether the background color fills the entire line height or only the height of the tagged characters.- Parameters:
backgroundFullHeight
- the value for thebackground-full-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBackgroundFullHeightSet
Whether thebackground-full-height
property is set.- Parameters:
backgroundFullHeightSet
- the value for thebackground-full-height-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setBackgroundRgba
-
setBackgroundSet
Whether thebackground
property is set.- Parameters:
backgroundSet
- the value for thebackground-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDirection
Text direction, e.g. right-to-left or left-to-right.- Parameters:
direction
- the value for thedirection
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEditable
Whether the text can be modified by the user.- Parameters:
editable
- the value for theeditable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEditableSet
Whether theeditable
property is set.- Parameters:
editableSet
- the value for theeditable-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFallback
Whether font fallback is enabled.When set to
true
, other fonts will be substituted where the current font is missing glyphs.- Parameters:
fallback
- the value for thefallback
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFallbackSet
Whether thefallback
property is set.- Parameters:
fallbackSet
- the value for thefallback-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFamily
-
setFamilySet
Whether thefamily
property is set.- Parameters:
familySet
- the value for thefamily-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFont
-
setFontDesc
Font description as aPangoFontDescription
.- Parameters:
fontDesc
- the value for thefont-desc
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFontFeatures
-
setFontFeaturesSet
Whether thefont-features
property is set.- Parameters:
fontFeaturesSet
- the value for thefont-features-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setForeground
-
setForegroundRgba
-
setForegroundSet
Whether theforeground
property is set.- Parameters:
foregroundSet
- the value for theforeground-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndent
Amount to indent the paragraph, in pixels.A negative value of indent will produce a hanging indentation. That is, the first line will have the full width, and subsequent lines will be indented by the absolute value of indent.
- Parameters:
indent
- the value for theindent
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndentSet
Whether theindent
property is set.- Parameters:
indentSet
- the value for theindent-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInsertHyphens
Whether to insert hyphens at breaks.- Parameters:
insertHyphens
- the value for theinsert-hyphens
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInsertHyphensSet
Whether theinsert-hyphens
property is set.- Parameters:
insertHyphensSet
- the value for theinsert-hyphens-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInvisible
Whether this text is hidden.Note that there may still be problems with the support for invisible text, in particular when navigating programmatically inside a buffer containing invisible segments.
- Parameters:
invisible
- the value for theinvisible
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInvisibleSet
Whether theinvisible
property is set.- Parameters:
invisibleSet
- the value for theinvisible-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setJustification
Left, right, or center justification.- Parameters:
justification
- the value for thejustification
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setJustificationSet
Whether thejustification
property is set.- Parameters:
justificationSet
- the value for thejustification-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLanguage
The language this text is in, as an ISO code.Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used.
Note that the initial value of this property depends on the current locale, see also
Gtk.getDefaultLanguage()
.- Parameters:
language
- the value for thelanguage
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLanguageSet
Whether thelanguage
property is set.- Parameters:
languageSet
- the value for thelanguage-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLeftMargin
Width of the left margin in pixels.- Parameters:
leftMargin
- the value for theleft-margin
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLeftMarginSet
Whether theleft-margin
property is set.- Parameters:
leftMarginSet
- the value for theleft-margin-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLetterSpacing
Extra spacing between graphemes, in Pango units.- Parameters:
letterSpacing
- the value for theletter-spacing
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLetterSpacingSet
Whether theletter-spacing
property is set.- Parameters:
letterSpacingSet
- the value for theletter-spacing-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLineHeight
Factor to scale line height by.- Parameters:
lineHeight
- the value for theline-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLineHeightSet
Whether theline-height
property is set.- Parameters:
lineHeightSet
- the value for theline-height-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setName
-
setOverline
-
setOverlineRgba
-
setOverlineRgbaSet
Whether theoverline-rgba
property is set.- Parameters:
overlineRgbaSet
- the value for theoverline-rgba-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setOverlineSet
Whether theoverline
property is set.- Parameters:
overlineSet
- the value for theoverline-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setParagraphBackground
-
setParagraphBackgroundRgba
-
setParagraphBackgroundSet
Whether theparagraph-background
property is set.- Parameters:
paragraphBackgroundSet
- the value for theparagraph-background-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsAboveLines
Pixels of blank space above paragraphs.- Parameters:
pixelsAboveLines
- the value for thepixels-above-lines
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsAboveLinesSet
Whether thepixels-above-lines
property is set.- Parameters:
pixelsAboveLinesSet
- the value for thepixels-above-lines-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsBelowLines
Pixels of blank space below paragraphs.- Parameters:
pixelsBelowLines
- the value for thepixels-below-lines
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsBelowLinesSet
Whether thepixels-below-lines
property is set.- Parameters:
pixelsBelowLinesSet
- the value for thepixels-below-lines-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsInsideWrap
Pixels of blank space between wrapped lines in a paragraph.- Parameters:
pixelsInsideWrap
- the value for thepixels-inside-wrap
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPixelsInsideWrapSet
Whether thepixels-inside-wrap
property is set.- Parameters:
pixelsInsideWrapSet
- the value for thepixels-inside-wrap-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRightMargin
Width of the right margin, in pixels.- Parameters:
rightMargin
- the value for theright-margin
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRightMarginSet
Whether theright-margin
property is set.- Parameters:
rightMarginSet
- the value for theright-margin-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRise
Offset of text above the baseline, in Pango units.Negative values go below the baseline.
- Parameters:
rise
- the value for therise
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRiseSet
Whether therise
property is set.- Parameters:
riseSet
- the value for therise-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setScale
Font size as a scale factor relative to the default font size.This properly adapts to theme changes, etc. so is recommended. Pango predefines some scales such as
PANGO_SCALE_X_LARGE
.- Parameters:
scale
- the value for thescale
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setScaleSet
Whether thescale
property is set.- Parameters:
scaleSet
- the value for thescale-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSentence
Whether this tag represents a single sentence.This affects cursor movement.
- Parameters:
sentence
- the value for thesentence
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSentenceSet
Whether thesentence
property is set.- Parameters:
sentenceSet
- the value for thesentence-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowSpaces
-
setShowSpacesSet
Whether theshow-spaces
property is set.- Parameters:
showSpacesSet
- the value for theshow-spaces-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSize
Font size in Pango units.- Parameters:
size
- the value for thesize
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSizePoints
Font size in points.- Parameters:
sizePoints
- the value for thesize-points
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSizeSet
Whether thesize
property is set.- Parameters:
sizeSet
- the value for thesize-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStretch
Font stretch as aPangoStretch
, e.g.Stretch.CONDENSED
.- Parameters:
stretch
- the value for thestretch
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStretchSet
Whether thestretch
property is set.- Parameters:
stretchSet
- the value for thestretch-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStrikethrough
Whether to strike through the text.- Parameters:
strikethrough
- the value for thestrikethrough
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStrikethroughRgba
This property modifies the color of strikeouts.If not set, strikeouts will use the foreground color.
- Parameters:
strikethroughRgba
- the value for thestrikethrough-rgba
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStrikethroughRgbaSet
If thestrikethrough-rgba
property has been set.- Parameters:
strikethroughRgbaSet
- the value for thestrikethrough-rgba-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStrikethroughSet
Whether thestrikethrough
property is set.- Parameters:
strikethroughSet
- the value for thestrikethrough-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStyle
Font style as aPangoStyle
, e.g.Style.ITALIC
.- Parameters:
style
- the value for thestyle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStyleSet
Whether thestyle
property is set.- Parameters:
styleSet
- the value for thestyle-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTabs
-
setTabsSet
Whether thetabs
property is set.- Parameters:
tabsSet
- the value for thetabs-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTextTransform
How to transform the text for display.- Parameters:
textTransform
- the value for thetext-transform
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTextTransformSet
Whether thetext-transform
property is set.- Parameters:
textTransformSet
- the value for thetext-transform-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUnderline
-
setUnderlineRgba
This property modifies the color of underlines.If not set, underlines will use the foreground color.
If
Gtk.TextTag:underline
is set toUnderline.ERROR
, an alternate color may be applied instead of the foreground. Setting this property will always override those defaults.- Parameters:
underlineRgba
- the value for theunderline-rgba
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUnderlineRgbaSet
If theunderline-rgba
property has been set.- Parameters:
underlineRgbaSet
- the value for theunderline-rgba-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUnderlineSet
Whether theunderline
property is set.- Parameters:
underlineSet
- the value for theunderline-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVariant
Font variant as aPangoVariant
, e.g.Variant.SMALL_CAPS
.- Parameters:
variant
- the value for thevariant
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVariantSet
Whether thevariant
property is set.- Parameters:
variantSet
- the value for thevariant-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWeight
Font weight as an integer.- Parameters:
weight
- the value for theweight
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWeightSet
Whether theweight
property is set.- Parameters:
weightSet
- the value for theweight-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWord
Whether this tag represents a single word.This affects line breaks and cursor movement.
- Parameters:
word
- the value for theword
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWordSet
Whether theword
property is set.- Parameters:
wordSet
- the value for theword-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrapMode
-
setWrapModeSet
Whether thewrap-mode
property is set.- Parameters:
wrapModeSet
- the value for thewrap-mode-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowSpaces
-