Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.CellRenderer
org.gnu.gtk.CellRendererToggle
public class CellRendererToggle
extends CellRenderer
CellRenderer
for boolean data.
Nested Class Summary | |
static class |
|
Nested classes/interfaces inherited from class org.gnu.gtk.CellRenderer | |
CellRenderer.Attribute |
Constructor Summary | |
|
Method Summary | |
void |
|
void | |
Class |
|
EventType |
|
static Type |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.gnu.gtk.CellRenderer | |
getType |
public void addListener(CellRendererToggleListener l)
Register an object to handle CellRendererToggle events.
- See Also:
CellRendererTextListener
public Class getEventListenerClass(String signal)
public EventType getEventType(String signal)
public static Type getType()
Retrieve the runtime type used by the GLib library.
- Overrides:
- getType in interface CellRenderer
public void setRadio(boolean radio)
If radio is TRUE, the cell renderer renders a radio toggle (ie a toggle in a group of mutually-exclusive toggles). If FALSE, it renders a check toggle (a standalone boolean option). This can be set globally for the cell renderer, or changed just before rendering each cell in the model (forTreeView
, you set up a per-row setting usingTreeViewColumn
to associate model columns with cell renderer properties).
- Parameters:
radio
- TRUE to make the toggle look like a radio button
public void setToggled(boolean toggled)
Sets whether all cells are toggled. You will usually want to do this based on data in the model, usingTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
with theCellRendererToggle.Attribute.ACTIVE
attribute.
- Parameters:
toggled
- If true, all cells will be toggled, or cheked.
public void setUserEditable(boolean setting)
Sets whether the user can change the toggled status of the cell. This method will change the setting for all cells. It can be set on a cell by cell basis by including the data in the model and attaching theCellRendererToggle.Attribute.ACTIVATABLE
property, using theTreeViewColumn.addAttributeMapping(CellRenderer,CellRendererAttribute,DataColumn)
property
- Parameters:
setting
- If true, the value of all cells may be changed.