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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theTextTagobject.setAccumulativeMargin(boolean accumulativeMargin) Whether the margins accumulate or override each other.setAllowBreaks(boolean allowBreaks) Whether breaks are allowed.setAllowBreaksSet(boolean allowBreaksSet) Whether theallow-breaksproperty 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-heightproperty is set.setBackgroundRgba(RGBA backgroundRgba) Background color as aGdkRGBA.setBackgroundSet(boolean backgroundSet) Whether thebackgroundproperty 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 theeditableproperty is set.setFallback(boolean fallback) Whether font fallback is enabled.setFallbackSet(boolean fallbackSet) Whether thefallbackproperty is set.Name of the font family, e.g.setFamilySet(boolean familySet) Whether thefamilyproperty 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-featuresproperty is set.setForeground(String foreground) Foreground color as a string.setForegroundRgba(RGBA foregroundRgba) Foreground color as aGdkRGBA.setForegroundSet(boolean foregroundSet) Whether theforegroundproperty is set.setIndent(int indent) Amount to indent the paragraph, in pixels.setIndentSet(boolean indentSet) Whether theindentproperty is set.setInsertHyphens(boolean insertHyphens) Whether to insert hyphens at breaks.setInsertHyphensSet(boolean insertHyphensSet) Whether theinsert-hyphensproperty is set.setInvisible(boolean invisible) Whether this text is hidden.setInvisibleSet(boolean invisibleSet) Whether theinvisibleproperty is set.setJustification(Justification justification) Left, right, or center justification.setJustificationSet(boolean justificationSet) Whether thejustificationproperty is set.setLanguage(String language) The language this text is in, as an ISO code.setLanguageSet(boolean languageSet) Whether thelanguageproperty is set.setLeftMargin(int leftMargin) Width of the left margin in pixels.setLeftMarginSet(boolean leftMarginSet) Whether theleft-marginproperty is set.setLetterSpacing(int letterSpacing) Extra spacing between graphemes, in Pango units.setLetterSpacingSet(boolean letterSpacingSet) Whether theletter-spacingproperty is set.setLineHeight(float lineHeight) Factor to scale line height by.setLineHeightSet(boolean lineHeightSet) Whether theline-heightproperty 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-rgbaproperty is set.setOverlineSet(boolean overlineSet) Whether theoverlineproperty 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-backgroundproperty is set.setPixelsAboveLines(int pixelsAboveLines) Pixels of blank space above paragraphs.setPixelsAboveLinesSet(boolean pixelsAboveLinesSet) Whether thepixels-above-linesproperty is set.setPixelsBelowLines(int pixelsBelowLines) Pixels of blank space below paragraphs.setPixelsBelowLinesSet(boolean pixelsBelowLinesSet) Whether thepixels-below-linesproperty is set.setPixelsInsideWrap(int pixelsInsideWrap) Pixels of blank space between wrapped lines in a paragraph.setPixelsInsideWrapSet(boolean pixelsInsideWrapSet) Whether thepixels-inside-wrapproperty is set.setRightMargin(int rightMargin) Width of the right margin, in pixels.setRightMarginSet(boolean rightMarginSet) Whether theright-marginproperty is set.setRise(int rise) Offset of text above the baseline, in Pango units.setRiseSet(boolean riseSet) Whether theriseproperty is set.setScale(double scale) Font size as a scale factor relative to the default font size.setScaleSet(boolean scaleSet) Whether thescaleproperty is set.setSentence(boolean sentence) Whether this tag represents a single sentence.setSentenceSet(boolean sentenceSet) Whether thesentenceproperty is set.setShowSpaces(Set<ShowFlags> showSpaces) How to render invisible characters.setShowSpaces(ShowFlags... showSpaces) How to render invisible characters.setShowSpacesSet(boolean showSpacesSet) Whether theshow-spacesproperty is set.setSize(int size) Font size in Pango units.setSizePoints(double sizePoints) Font size in points.setSizeSet(boolean sizeSet) Whether thesizeproperty is set.setStretch(Stretch stretch) Font stretch as aPangoStretch, e.g.setStretchSet(boolean stretchSet) Whether thestretchproperty 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-rgbaproperty has been set.setStrikethroughSet(boolean strikethroughSet) Whether thestrikethroughproperty is set.Font style as aPangoStyle, e.g.setStyleSet(boolean styleSet) Whether thestyleproperty is set.Custom tabs for this text.setTabsSet(boolean tabsSet) Whether thetabsproperty is set.setTextTransform(TextTransform textTransform) How to transform the text for display.setTextTransformSet(boolean textTransformSet) Whether thetext-transformproperty 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-rgbaproperty has been set.setUnderlineSet(boolean underlineSet) Whether theunderlineproperty is set.setVariant(Variant variant) Font variant as aPangoVariant, e.g.setVariantSet(boolean variantSet) Whether thevariantproperty is set.setWeight(int weight) Font weight as an integer.setWeightSet(boolean weightSet) Whether theweightproperty is set.setWord(boolean word) Whether this tag represents a single word.setWordSet(boolean wordSet) Whether thewordproperty is set.setWrapMode(WrapMode wrapMode) Whether to wrap lines never, at word boundaries, or at character boundaries.setWrapModeSet(boolean wrapModeSet) Whether thewrap-modeproperty is set.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theTextTagobject. 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:
buildin classGObject.Builder<B extends TextTag.Builder<B>>- Returns:
- a new instance of
TextTagwith the properties that were set in the Builder object.
-
setAccumulativeMargin
Whether the margins accumulate or override each other.When set to
truethe margins of this tag are added to the margins of any other non-accumulative margins present. When set tofalsethe margins override one another (the default).- Parameters:
accumulativeMargin- the value for theaccumulative-marginproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setAllowBreaks
Whether breaks are allowed.- Parameters:
allowBreaks- the value for theallow-breaksproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setAllowBreaksSet
Whether theallow-breaksproperty is set.- Parameters:
allowBreaksSet- the value for theallow-breaks-setproperty- Returns:
- the
Builderinstance 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-heightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setBackgroundFullHeightSet
Whether thebackground-full-heightproperty is set.- Parameters:
backgroundFullHeightSet- the value for thebackground-full-height-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setBackgroundRgba
-
setBackgroundSet
Whether thebackgroundproperty is set.- Parameters:
backgroundSet- the value for thebackground-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setDirection
Text direction, e.g. right-to-left or left-to-right.- Parameters:
direction- the value for thedirectionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setEditable
Whether the text can be modified by the user.- Parameters:
editable- the value for theeditableproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setEditableSet
Whether theeditableproperty is set.- Parameters:
editableSet- the value for theeditable-setproperty- Returns:
- the
Builderinstance 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 thefallbackproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFallbackSet
Whether thefallbackproperty is set.- Parameters:
fallbackSet- the value for thefallback-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFamily
-
setFamilySet
Whether thefamilyproperty is set.- Parameters:
familySet- the value for thefamily-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFont
-
setFontDesc
Font description as aPangoFontDescription.- Parameters:
fontDesc- the value for thefont-descproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFontFeatures
-
setFontFeaturesSet
Whether thefont-featuresproperty is set.- Parameters:
fontFeaturesSet- the value for thefont-features-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setForeground
-
setForegroundRgba
-
setForegroundSet
Whether theforegroundproperty is set.- Parameters:
foregroundSet- the value for theforeground-setproperty- Returns:
- the
Builderinstance 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 theindentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setIndentSet
Whether theindentproperty is set.- Parameters:
indentSet- the value for theindent-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInsertHyphens
Whether to insert hyphens at breaks.- Parameters:
insertHyphens- the value for theinsert-hyphensproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInsertHyphensSet
Whether theinsert-hyphensproperty is set.- Parameters:
insertHyphensSet- the value for theinsert-hyphens-setproperty- Returns:
- the
Builderinstance 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 theinvisibleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInvisibleSet
Whether theinvisibleproperty is set.- Parameters:
invisibleSet- the value for theinvisible-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setJustification
Left, right, or center justification.- Parameters:
justification- the value for thejustificationproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setJustificationSet
Whether thejustificationproperty is set.- Parameters:
justificationSet- the value for thejustification-setproperty- Returns:
- the
Builderinstance 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 thelanguageproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLanguageSet
Whether thelanguageproperty is set.- Parameters:
languageSet- the value for thelanguage-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLeftMargin
Width of the left margin in pixels.- Parameters:
leftMargin- the value for theleft-marginproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLeftMarginSet
Whether theleft-marginproperty is set.- Parameters:
leftMarginSet- the value for theleft-margin-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLetterSpacing
Extra spacing between graphemes, in Pango units.- Parameters:
letterSpacing- the value for theletter-spacingproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLetterSpacingSet
Whether theletter-spacingproperty is set.- Parameters:
letterSpacingSet- the value for theletter-spacing-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLineHeight
Factor to scale line height by.- Parameters:
lineHeight- the value for theline-heightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.6
-
setLineHeightSet
Whether theline-heightproperty is set.- Parameters:
lineHeightSet- the value for theline-height-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setName
-
setOverline
-
setOverlineRgba
-
setOverlineRgbaSet
Whether theoverline-rgbaproperty is set.- Parameters:
overlineRgbaSet- the value for theoverline-rgba-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setOverlineSet
Whether theoverlineproperty is set.- Parameters:
overlineSet- the value for theoverline-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setParagraphBackground
-
setParagraphBackgroundRgba
-
setParagraphBackgroundSet
Whether theparagraph-backgroundproperty is set.- Parameters:
paragraphBackgroundSet- the value for theparagraph-background-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsAboveLines
Pixels of blank space above paragraphs.- Parameters:
pixelsAboveLines- the value for thepixels-above-linesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsAboveLinesSet
Whether thepixels-above-linesproperty is set.- Parameters:
pixelsAboveLinesSet- the value for thepixels-above-lines-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsBelowLines
Pixels of blank space below paragraphs.- Parameters:
pixelsBelowLines- the value for thepixels-below-linesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsBelowLinesSet
Whether thepixels-below-linesproperty is set.- Parameters:
pixelsBelowLinesSet- the value for thepixels-below-lines-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsInsideWrap
Pixels of blank space between wrapped lines in a paragraph.- Parameters:
pixelsInsideWrap- the value for thepixels-inside-wrapproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPixelsInsideWrapSet
Whether thepixels-inside-wrapproperty is set.- Parameters:
pixelsInsideWrapSet- the value for thepixels-inside-wrap-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setRightMargin
Width of the right margin, in pixels.- Parameters:
rightMargin- the value for theright-marginproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setRightMarginSet
Whether theright-marginproperty is set.- Parameters:
rightMarginSet- the value for theright-margin-setproperty- Returns:
- the
Builderinstance 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 theriseproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setRiseSet
Whether theriseproperty is set.- Parameters:
riseSet- the value for therise-setproperty- Returns:
- the
Builderinstance 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 thescaleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setScaleSet
Whether thescaleproperty is set.- Parameters:
scaleSet- the value for thescale-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSentence
Whether this tag represents a single sentence.This affects cursor movement.
- Parameters:
sentence- the value for thesentenceproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.6
-
setSentenceSet
Whether thesentenceproperty is set.- Parameters:
sentenceSet- the value for thesentence-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setShowSpaces
-
setShowSpacesSet
Whether theshow-spacesproperty is set.- Parameters:
showSpacesSet- the value for theshow-spaces-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSize
Font size in Pango units.- Parameters:
size- the value for thesizeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSizePoints
Font size in points.- Parameters:
sizePoints- the value for thesize-pointsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSizeSet
Whether thesizeproperty is set.- Parameters:
sizeSet- the value for thesize-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStretch
Font stretch as aPangoStretch, e.g.Stretch.CONDENSED.- Parameters:
stretch- the value for thestretchproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStretchSet
Whether thestretchproperty is set.- Parameters:
stretchSet- the value for thestretch-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStrikethrough
Whether to strike through the text.- Parameters:
strikethrough- the value for thestrikethroughproperty- Returns:
- the
Builderinstance 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-rgbaproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStrikethroughRgbaSet
If thestrikethrough-rgbaproperty has been set.- Parameters:
strikethroughRgbaSet- the value for thestrikethrough-rgba-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStrikethroughSet
Whether thestrikethroughproperty is set.- Parameters:
strikethroughSet- the value for thestrikethrough-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStyle
Font style as aPangoStyle, e.g.Style.ITALIC.- Parameters:
style- the value for thestyleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStyleSet
Whether thestyleproperty is set.- Parameters:
styleSet- the value for thestyle-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTabs
-
setTabsSet
Whether thetabsproperty is set.- Parameters:
tabsSet- the value for thetabs-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTextTransform
How to transform the text for display.- Parameters:
textTransform- the value for thetext-transformproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.6
-
setTextTransformSet
Whether thetext-transformproperty is set.- Parameters:
textTransformSet- the value for thetext-transform-setproperty- Returns:
- the
Builderinstance 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:underlineis 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-rgbaproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setUnderlineRgbaSet
If theunderline-rgbaproperty has been set.- Parameters:
underlineRgbaSet- the value for theunderline-rgba-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setUnderlineSet
Whether theunderlineproperty is set.- Parameters:
underlineSet- the value for theunderline-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setVariant
Font variant as aPangoVariant, e.g.Variant.SMALL_CAPS.- Parameters:
variant- the value for thevariantproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setVariantSet
Whether thevariantproperty is set.- Parameters:
variantSet- the value for thevariant-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setWeight
Font weight as an integer.- Parameters:
weight- the value for theweightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setWeightSet
Whether theweightproperty is set.- Parameters:
weightSet- the value for theweight-setproperty- Returns:
- the
Builderinstance 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 thewordproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.6
-
setWordSet
Whether thewordproperty is set.- Parameters:
wordSet- the value for theword-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setWrapMode
-
setWrapModeSet
Whether thewrap-modeproperty is set.- Parameters:
wrapModeSet- the value for thewrap-mode-setproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setShowSpaces
-