Package org.gnome.gtk
Class CellRendererText.Builder<B extends CellRendererText.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.CellRenderer.Builder<B>
org.gnome.gtk.CellRendererText.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
CellRendererAccel.Builder
,CellRendererCombo.Builder
,CellRendererSpin.Builder
- Enclosing class:
CellRendererText
public static class CellRendererText.Builder<B extends CellRendererText.Builder<B>>
extends CellRenderer.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theCellRendererText
object.onEdited
(CellRendererText.EditedCallback handler) This signal is emitted afterrenderer
has been edited.setAlignment
(Alignment alignment) Specifies how to align the lines of text with respect to each other.setAlignSet
(boolean alignSet) setAttributes
(AttrList attributes) setBackground
(String background) setBackgroundRgba
(RGBA backgroundRgba) Background color as aGdkRGBA
setBackgroundSet
(boolean backgroundSet) setEditable
(boolean editable) setEditableSet
(boolean editableSet) setEllipsize
(EllipsizeMode ellipsize) Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string.setEllipsizeSet
(boolean ellipsizeSet) setFamilySet
(boolean familySet) setFontDesc
(FontDescription fontDesc) setForeground
(String foreground) setForegroundRgba
(RGBA foregroundRgba) Foreground color as aGdkRGBA
setForegroundSet
(boolean foregroundSet) setLanguage
(String language) setLanguageSet
(boolean languageSet) setMaxWidthChars
(int maxWidthChars) The desired maximum width of the cell, in characters.setPlaceholderText
(String placeholderText) The text that will be displayed in theGtkCellRenderer
ifGtkCellRendererText:editable
istrue
and the cell is empty.setRise
(int rise) setRiseSet
(boolean riseSet) setScale
(double scale) setScaleSet
(boolean scaleSet) setSingleParagraphMode
(boolean singleParagraphMode) setSize
(int size) setSizePoints
(double sizePoints) setSizeSet
(boolean sizeSet) setStretch
(Stretch stretch) setStretchSet
(boolean stretchSet) setStrikethrough
(boolean strikethrough) setStrikethroughSet
(boolean strikethroughSet) setStyleSet
(boolean styleSet) setUnderline
(Underline underline) setUnderlineSet
(boolean underlineSet) setVariant
(Variant variant) setVariantSet
(boolean variantSet) setWeight
(int weight) setWeightSet
(boolean weightSet) setWidthChars
(int widthChars) The desired width of the cell, in characters.setWrapMode
(WrapMode wrapMode) Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string.setWrapWidth
(int wrapWidth) Specifies the minimum width at which the text is wrapped.Methods inherited from class org.gnome.gtk.CellRenderer.Builder
onEditingCanceled, onEditingStarted, setCellBackground, setCellBackgroundRgba, setCellBackgroundSet, setHeight, setIsExpanded, setIsExpander, setMode, setSensitive, setVisible, setWidth, setXalign, setXpad, setYalign, setYpad
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 theCellRendererText
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 toCellRendererText
.- Overrides:
build
in classCellRenderer.Builder<B extends CellRendererText.Builder<B>>
- Returns:
- a new instance of
CellRendererText
with the properties that were set in the Builder object.
-
setAlignSet
-
setAlignment
Specifies how to align the lines of text with respect to each other.Note that this property describes how to align the lines of text in case there are several of them. The "xalign" property of
GtkCellRenderer
, on the other hand, sets the horizontal alignment of the whole text.- Parameters:
alignment
- the value for thealignment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAttributes
-
setBackground
-
setBackgroundRgba
-
setBackgroundSet
-
setEditable
-
setEditableSet
-
setEllipsize
Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it toEllipsizeMode.NONE
turns off ellipsizing. See the wrap-width property for another way of making the text fit into a given width.- Parameters:
ellipsize
- the value for theellipsize
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEllipsizeSet
-
setFamily
-
setFamilySet
-
setFont
-
setFontDesc
-
setForeground
-
setForegroundRgba
-
setForegroundSet
-
setLanguage
-
setLanguageSet
-
setMarkup
-
setMaxWidthChars
The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically.For cell renderers that ellipsize or wrap text; this property controls the maximum reported width of the cell. The cell should not receive any greater allocation unless it is set to expand in its
GtkCellLayout
and all of the cell's siblings have received their natural width.- Parameters:
maxWidthChars
- the value for themax-width-chars
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPlaceholderText
The text that will be displayed in theGtkCellRenderer
ifGtkCellRendererText:editable
istrue
and the cell is empty.- Parameters:
placeholderText
- the value for theplaceholder-text
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRise
-
setRiseSet
-
setScale
-
setScaleSet
-
setSingleParagraphMode
-
setSize
-
setSizePoints
-
setSizeSet
-
setStretch
-
setStretchSet
-
setStrikethrough
-
setStrikethroughSet
-
setStyle
-
setStyleSet
-
setText
-
setUnderline
-
setUnderlineSet
-
setVariant
-
setVariantSet
-
setWeight
-
setWeightSet
-
setWidthChars
The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.- Parameters:
widthChars
- the value for thewidth-chars
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrapMode
Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.- Parameters:
wrapMode
- the value for thewrap-mode
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrapWidth
Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.- Parameters:
wrapWidth
- the value for thewrap-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onEdited
This signal is emitted afterrenderer
has been edited.It is the responsibility of the application to update the model and store
newText
at the position indicated bypath
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-