Class ColumnViewCell
- All Implemented Interfaces:
Proxy
ColumnView.
The GtkColumnViewCells are managed by the ColumnView
widget (with its factory) and cannot be created by applications, but
they need to be populated by application code. This is done by calling
setChild(org.gnome.gtk.Widget).
GtkColumnViewCells exist in 2 stages:
1. The unbound stage where the listitem is not currently connected to
an item in the list. In that case, the Gtk.ColumnViewCell:item
property is set to null.
2. The bound stage where the listitem references an item from the list.
The Gtk.ColumnViewCell:item property is not null.
- Since:
- 4.12
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classColumnViewCell.Builder<B extends ColumnViewCell.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gtk.ListItem
ListItem.ListItemClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ColumnViewCell.ColumnViewCell(MemorySegment address) Create a ColumnViewCell proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ColumnViewCellasParent()Returns this instance as if it were its parent type.static ColumnViewCell.Builder<? extends ColumnViewCell.Builder> builder()AColumnViewCell.Builderobject constructs aColumnViewCellwith the specified properties.@Nullable WidgetgetChild()Gets the child previously set via gtk_column_view_cell_set_child() ornullif none was set.booleanChecks if a list item has been set to be focusable via gtk_column_view_cell_set_focusable().@Nullable GObjectgetItem()Gets the model item that associated withself.intGets the position in the model that this ColumnViewCell currently displays.booleanChecks if the item is displayed as selected.static @Nullable TypegetType()Get the GType of the ColumnViewCell classvoidSets the child to be used for this listitem.voidsetFocusable(boolean focusable) Sets this ColumnViewCell to be focusable.Methods inherited from class org.gnome.gtk.ListItem
getAccessibleDescription, getAccessibleLabel, getActivatable, getSelectable, setAccessibleDescription, setAccessibleLabel, setActivatable, setSelectableMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ColumnViewCell
Create a ColumnViewCell proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
ColumnViewCell
public ColumnViewCell()Creates a new ColumnViewCell.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getChild
-
getFocusable
public boolean getFocusable()Checks if a list item has been set to be focusable via gtk_column_view_cell_set_focusable().- Overrides:
getFocusablein classListItem- Returns:
trueif the item is focusable- Since:
- 4.12
-
getItem
-
getPosition
public int getPosition()Gets the position in the model that this ColumnViewCell currently displays.If this ColumnViewCell is unbound,
GTK_INVALID_LIST_POSITIONis returned.- Overrides:
getPositionin classListItem- Returns:
- The position of this item
- Since:
- 4.12
-
getSelected
public boolean getSelected()Checks if the item is displayed as selected.The selected state is maintained by the list widget and its model and cannot be set otherwise.
- Overrides:
getSelectedin classListItem- Returns:
trueif the item is selected.- Since:
- 4.12
-
setChild
Sets the child to be used for this listitem.This function is typically called by applications when setting up a listitem so that the widget can be reused when binding it multiple times.
-
setFocusable
public void setFocusable(boolean focusable) Sets this ColumnViewCell to be focusable.If an item is focusable, it can be focused using the keyboard. This works similar to
Widget.setFocusable(boolean).Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem's children is focusable.
By default, list items are focusable.
- Overrides:
setFocusablein classListItem- Parameters:
focusable- if the item should be focusable- Since:
- 4.12
-
builder
AColumnViewCell.Builderobject constructs aColumnViewCellwith the specified properties. Use the variousset...()methods to set properties, and finish construction withColumnViewCell.Builder.build().- Returns:
- the builder object
-