Class ColumnViewCell
- All Implemented Interfaces:
Proxy
GtkColumnViewCell
is used by ColumnViewColumn
to represent items
in a cell in ColumnView
.
The GtkColumnViewCell
s 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)
.
GtkColumnViewCell
s 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
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ColumnViewCell.Builder<B extends ColumnViewCell.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gtk.ListItem
ListItem.ListItemClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionColumnViewCell
(MemorySegment address) Create a ColumnViewCell proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ColumnViewCell
asParent()
Returns this instance as if it were its parent type.static ColumnViewCell.Builder
<? extends ColumnViewCell.Builder> builder()
AColumnViewCell.Builder
object constructs aColumnViewCell
with the specified properties.getChild()
Gets the child previously set via gtk_column_view_cell_set_child() ornull
if none was set.boolean
Checks if a list item has been set to be focusable via gtk_column_view_cell_set_focusable().getItem()
Gets the model item that associated with this ColumnViewCell.int
Gets the position in the model that this ColumnViewCell currently displays.boolean
Checks if the item is displayed as selected.static Type
getType()
Get the GType of the ColumnViewCell classvoid
Sets the child to be used for this listitem.void
setFocusable
(boolean focusable) Sets this ColumnViewCell to be focusable.Methods inherited from class org.gnome.gtk.ListItem
getAccessibleDescription, getAccessibleLabel, getActivatable, getSelectable, setAccessibleDescription, setAccessibleLabel, setActivatable, setSelectable
Methods 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.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
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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:
getFocusable
in classListItem
- Returns:
true
if the item is focusable
-
getItem
-
getPosition
public int getPosition()Gets the position in the model that this ColumnViewCell currently displays.If this ColumnViewCell is unbound,
GTK_INVALID_LIST_POSITION
is returned.- Overrides:
getPosition
in classListItem
- Returns:
- The position of this item
-
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:
getSelected
in classListItem
- Returns:
true
if the item is selected.
-
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:
setFocusable
in classListItem
- Parameters:
focusable
- if the item should be focusable
-
builder
AColumnViewCell.Builder
object constructs aColumnViewCell
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withColumnViewCell.Builder.build()
.
-