Class Inscription.Builder<B extends Inscription.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Enclosing class:
Inscription
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theInscriptionobject.setAttributes(AttrList attributes) A list of style attributes to apply to the text of the inscription.Utility property that sets both theGtk.Inscription:textandGtk.Inscription:attributesproperties, mainly intended for use in GtkBuilder ui files to ease translation support and bindings.setMinChars(int minChars) The number of characters that should fit into the inscription at minimum.setMinLines(int minLines) The number of lines that should fit into the inscription at minimum.setNatChars(int natChars) The number of characters that should ideally fit into the inscription.setNatLines(int natLines) The number of lines that should ideally fit into the inscription.The displayed text.setTextOverflow(InscriptionOverflow textOverflow) The overflow method to use for the text.setWrapMode(WrapMode wrapMode) Controls how the line wrapping is done.setXalign(float xalign) The horizontal alignment of the text inside the allocated size.setYalign(float yalign) The vertical alignment of the text inside the allocated size.Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theInscriptionobject. 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 toInscription.- Overrides:
buildin classWidget.Builder<B extends Inscription.Builder<B>>- Returns:
- a new instance of
Inscriptionwith the properties that were set in the Builder object.
-
setAttributes
-
setMarkup
Utility property that sets both theGtk.Inscription:textandGtk.Inscription:attributesproperties, mainly intended for use in GtkBuilder ui files to ease translation support and bindings.This function uses
Pango.parseMarkup(java.lang.String, int, int, org.javagi.base.Out<org.gnome.pango.AttrList>, org.javagi.base.Out<java.lang.String>, org.javagi.base.Out<java.lang.Integer>)to parse the markup into text and attributes. The markup must be valid. If you cannot ensure that, consider usingPango.parseMarkup(java.lang.String, int, int, org.javagi.base.Out<org.gnome.pango.AttrList>, org.javagi.base.Out<java.lang.String>, org.javagi.base.Out<java.lang.Integer>)and setting the two properties yourself.- Parameters:
markup- the value for themarkupproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setMinChars
The number of characters that should fit into the inscription at minimum.This influences the requested width, not the width actually given to the widget, which might turn out to be larger.
Note that this is an approximate character width, so some characters might be wider and some might be thinner, so do not expect the number of characters to exactly match.
If you set this property to 0, the inscription will not request any width at all and its width will be determined entirely by its surroundings.
- Parameters:
minChars- the value for themin-charsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setMinLines
The number of lines that should fit into the inscription at minimum.This influences the requested height, not the height actually given to the widget, which might turn out to be larger.
Note that this is an approximate line height, so if the text uses things like fancy Unicode or attribute that influence the height, the text might not fit.
If you set this property to 0, the inscription will not request any height at all and its height will be determined entirely by its surroundings.
- Parameters:
minLines- the value for themin-linesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setNatChars
The number of characters that should ideally fit into the inscription.This influences the requested width, not the width actually given to the widget. The widget might turn out larger as well as smaller.
If this property is set to a value smaller than
Gtk.Inscription:min-chars, that value will be used. In particular, for the default value of 0, this will always be the case.- Parameters:
natChars- the value for thenat-charsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setNatLines
The number of lines that should ideally fit into the inscription.This influences the requested height, not the height actually given to the widget. The widget might turn out larger as well as smaller.
If this property is set to a value smaller than
Gtk.Inscription:min-lines, that value will be used. In particular, for the default value of 0, this will always be the case.- Parameters:
natLines- the value for thenat-linesproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setText
-
setTextOverflow
The overflow method to use for the text.- Parameters:
textOverflow- the value for thetext-overflowproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setWrapMode
Controls how the line wrapping is done.Note that unlike
GtkLabel, the default here isWrapMode.WORD_CHAR.- Parameters:
wrapMode- the value for thewrap-modeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setXalign
The horizontal alignment of the text inside the allocated size.Compare this to
Gtk.Widget:halign, which determines how the inscription's size allocation is positioned in the available space.- Parameters:
xalign- the value for thexalignproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setYalign
The vertical alignment of the text inside the allocated size.Compare this to
Gtk.Widget:valign, which determines how the inscription's size allocation is positioned in the available space.- Parameters:
yalign- the value for theyalignproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-