Package org.gnome.gtk
Class CellRenderer.Builder<B extends CellRenderer.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>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
CellRendererPixbuf.Builder
,CellRendererProgress.Builder
,CellRendererSpinner.Builder
,CellRendererText.Builder
,CellRendererToggle.Builder
- Enclosing class:
CellRenderer
public static class CellRenderer.Builder<B extends CellRenderer.Builder<B>>
extends InitiallyUnowned.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theCellRenderer
object.This signal gets emitted when the user cancels the process of editing a cell.This signal gets emitted when a cell starts to be edited.setCellBackground
(String cellBackground) setCellBackgroundRgba
(RGBA cellBackgroundRgba) Cell background as aGdkRGBA
setCellBackgroundSet
(boolean cellBackgroundSet) setHeight
(int height) setIsExpanded
(boolean isExpanded) setIsExpander
(boolean isExpander) setMode
(CellRendererMode mode) setSensitive
(boolean sensitive) setVisible
(boolean visible) setWidth
(int width) setXalign
(float xalign) setXpad
(int xpad) setYalign
(float yalign) setYpad
(int ypad) 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 theCellRenderer
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 toCellRenderer
.- Overrides:
build
in classInitiallyUnowned.Builder<B extends CellRenderer.Builder<B>>
- Returns:
- a new instance of
CellRenderer
with the properties that were set in the Builder object.
-
setCellBackground
-
setCellBackgroundRgba
-
setCellBackgroundSet
-
setHeight
-
setIsExpanded
-
setIsExpander
-
setMode
-
setSensitive
-
setVisible
-
setWidth
-
setXalign
-
setXpad
-
setYalign
-
setYpad
-
onEditingCanceled
This signal gets emitted when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.See also: gtk_cell_renderer_stop_editing().
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onEditingStarted
This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup oneditable
, e.g. adding aGtkEntryCompletion
or setting up additional columns in aGtkComboBox
.See gtk_cell_editable_start_editing() for information on the lifecycle of the
editable
and a way to do setup that doesn’t depend on therenderer
.Note that GTK doesn't guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of
editable
before doing any specific setup, as in the following example:static void text_editing_started (GtkCellRenderer *cell, GtkCellEditable *editable, const char *path, gpointer data) { if (GTK_IS_ENTRY (editable)) { GtkEntry *entry = GTK_ENTRY (editable); // ... create a GtkEntryCompletion gtk_entry_set_completion (entry, completion); } }
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-