addAttributeMapping
public void addAttributeMapping(CellRenderer renderer,
CellRendererAttribute attribute,
DataColumn dataBlock)
TreeView
widgets contain
TreeViewColumn
objects. These
contain
CellRenderer
s to display data on the screen. This data is
stored in a
ListStore
or
TreeStore
. In order for data to
be displayed, a mapping has to be made between the data in the data store
and the attributes of the CellRenderers which determine what they render.
This method creates those mappings.
renderer
- The cell renderer to add the mapping to. This must have
been addded to this column.attribute
- The attribute to be mapped. This must be one of the
attributes for the given renderer.dataBlock
- the dataBlock in the store in which the data is
contained. This should be of the type required by the renderer attribute.
clear
public void clear()
Removes all the renderers from the column.
click
public void click()
Creates a Clicked event. This function will only work if tree_column
is clickable.
focusCell
public void focusCell(CellRenderer cell)
Sets the current keyboard focus to be at cell, if the column contains 2
or more editable and activatable cells.
- 2.2
getAlignment
public double getAlignment()
getCellRenderers
public CellRenderer[] getCellRenderers()
Returns an array of CellRenderers in the column in no particular
order.
getClickable
public boolean getClickable()
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface GObject
getEventType
public EventType getEventType(String signal)
- getEventType in interface GObject
getExpand
public boolean getExpand()
Return TRUE if the column expands to take any available space.
- true, if the column expands
- 2.4
getFixedWidth
public int getFixedWidth()
getIsVisible
public boolean getIsVisible()
Returns TRUE if any of the cells packed into the column are visible.
getMaxWidth
public int getMaxWidth()
getMinWidth
public int getMinWidth()
getReorderable
public boolean getReorderable()
getResizable
public boolean getResizable()
getSortIndicator
public boolean getSortIndicator()
getSortOrder
public SortType getSortOrder()
getSpacing
public int getSpacing()
getTitle
public String getTitle()
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
getVisible
public boolean getVisible()
getWidget
public Widget getWidget()
getWidth
public int getWidth()
Returns the current size of the column in pixels
- The current width, in pizels.
gtk_tree_view_column_add_attribute
protected static final void gtk_tree_view_column_add_attribute(Handle treeColumn,
Handle cellRenderer,
String attribute,
int column)
gtk_tree_view_column_cell_get_size
protected static final void gtk_tree_view_column_cell_get_size(Handle treeColumn,
Handle cellRectangle,
int[] xOffset,
int[] yOffset,
int[] width,
int[] height)
gtk_tree_view_column_cell_is_visible
protected static final boolean gtk_tree_view_column_cell_is_visible(Handle treeColumn)
gtk_tree_view_column_cell_set_cell_data
protected static final void gtk_tree_view_column_cell_set_cell_data(Handle treeColumn,
Handle treeModel,
Handle iter,
boolean isExpander,
boolean isExpanded)
gtk_tree_view_column_clear
protected static final void gtk_tree_view_column_clear(Handle treeColumn)
gtk_tree_view_column_clear_attributes
protected static final void gtk_tree_view_column_clear_attributes(Handle treeColumn,
Handle cellRenderer)
gtk_tree_view_column_clicked
protected static final void gtk_tree_view_column_clicked(Handle treeColumn)
gtk_tree_view_column_focus_cell
protected static final void gtk_tree_view_column_focus_cell(Handle treeColumn,
Handle cell)
gtk_tree_view_column_get_alignment
protected static final double gtk_tree_view_column_get_alignment(Handle treeColumn)
gtk_tree_view_column_get_cell_renderers
protected static final Handle[] gtk_tree_view_column_get_cell_renderers(Handle treeColumn)
gtk_tree_view_column_get_clickable
protected static final boolean gtk_tree_view_column_get_clickable(Handle treeColumn)
gtk_tree_view_column_get_expand
protected static final boolean gtk_tree_view_column_get_expand(Handle treeColumn)
gtk_tree_view_column_get_fixed_width
protected static final int gtk_tree_view_column_get_fixed_width(Handle treeColumn)
gtk_tree_view_column_get_max_width
protected static final int gtk_tree_view_column_get_max_width(Handle treeColumn)
gtk_tree_view_column_get_min_width
protected static final int gtk_tree_view_column_get_min_width(Handle treeColumn)
gtk_tree_view_column_get_reorderable
protected static final boolean gtk_tree_view_column_get_reorderable(Handle treeColumn)
gtk_tree_view_column_get_resizable
protected static final boolean gtk_tree_view_column_get_resizable(Handle treeColumn)
gtk_tree_view_column_get_sizing
protected static final int gtk_tree_view_column_get_sizing(Handle treeColumn)
gtk_tree_view_column_get_sort_column_id
protected static final int gtk_tree_view_column_get_sort_column_id(Handle treeColumn)
gtk_tree_view_column_get_sort_indicator
protected static final boolean gtk_tree_view_column_get_sort_indicator(Handle treeColumn)
gtk_tree_view_column_get_sort_order
protected static final int gtk_tree_view_column_get_sort_order(Handle treeColumn)
gtk_tree_view_column_get_spacing
protected static final int gtk_tree_view_column_get_spacing(Handle treeColumn)
gtk_tree_view_column_get_title
protected static final String gtk_tree_view_column_get_title(Handle treeColumn)
gtk_tree_view_column_get_type
protected static final int gtk_tree_view_column_get_type()
gtk_tree_view_column_get_visible
protected static final boolean gtk_tree_view_column_get_visible(Handle treeColumn)
gtk_tree_view_column_get_widget
protected static final Handle gtk_tree_view_column_get_widget(Handle treeColumn)
gtk_tree_view_column_get_width
protected static final int gtk_tree_view_column_get_width(Handle treeColumn)
gtk_tree_view_column_new
protected static final Handle gtk_tree_view_column_new()
gtk_tree_view_column_pack_end
protected static final void gtk_tree_view_column_pack_end(Handle treeColumn,
Handle cell,
boolean expand)
gtk_tree_view_column_pack_start
protected static final void gtk_tree_view_column_pack_start(Handle treeColumn,
Handle cell,
boolean expand)
gtk_tree_view_column_set_alignment
protected static final void gtk_tree_view_column_set_alignment(Handle treeColumn,
double xalign)
gtk_tree_view_column_set_clickable
protected static final void gtk_tree_view_column_set_clickable(Handle treeColumn,
boolean clickable)
gtk_tree_view_column_set_expand
protected static final void gtk_tree_view_column_set_expand(Handle treeColumn,
boolean expand)
gtk_tree_view_column_set_fixed_width
protected static final void gtk_tree_view_column_set_fixed_width(Handle treeColumn,
int fixedWidth)
gtk_tree_view_column_set_max_width
protected static final void gtk_tree_view_column_set_max_width(Handle treeColumn,
int maxWidth)
gtk_tree_view_column_set_min_width
protected static final void gtk_tree_view_column_set_min_width(Handle treeColumn,
int minWidth)
gtk_tree_view_column_set_reorderable
protected static final void gtk_tree_view_column_set_reorderable(Handle treeColumn,
boolean reorderable)
gtk_tree_view_column_set_resizable
protected static final void gtk_tree_view_column_set_resizable(Handle treeColumn,
boolean resizable)
gtk_tree_view_column_set_sizing
protected static final void gtk_tree_view_column_set_sizing(Handle treeColumn,
int type)
gtk_tree_view_column_set_sort_column_id
protected static final void gtk_tree_view_column_set_sort_column_id(Handle treeColumn,
int sortColumnID)
gtk_tree_view_column_set_sort_indicator
protected static final void gtk_tree_view_column_set_sort_indicator(Handle treeColumn,
boolean setting)
gtk_tree_view_column_set_sort_order
protected static final void gtk_tree_view_column_set_sort_order(Handle treeColumn,
int order)
gtk_tree_view_column_set_spacing
protected static final void gtk_tree_view_column_set_spacing(Handle treeColumn,
int spacing)
gtk_tree_view_column_set_title
protected static final void gtk_tree_view_column_set_title(Handle treeColumn,
String title)
gtk_tree_view_column_set_visible
protected static final void gtk_tree_view_column_set_visible(Handle treeColumn,
boolean visible)
gtk_tree_view_column_set_widget
protected static final void gtk_tree_view_column_set_widget(Handle treeColumn,
Handle widget)
packEnd
public void packEnd(CellRenderer cell,
boolean expand)
Packs the cell into the column. If expand is TRUE, then the cell is
allocated a share of all available space that the column has.
cell
- The CellRenderer.expand
- TRUE if cell is to be given extra space allocated to box.
packStart
public void packStart(CellRenderer cell,
boolean expand)
Packs the cell into the beginning column. If expand is TRUE, then
the cell is allocated a share of all available space that the
column has.
cell
- The CellRenderer.expand
- TRUE if cell is to be given extra space allocated to box.
setAlignment
public void setAlignment(double align)
Sets the alignment of the title or custom widget inside the column
header. The alignment determines its location inside the button --
0.0 for left, 0.5 for center, 1.0 for right.
align
- : The alignment, which is between [0.0 and 1.0] inclusive.
setClickable
public void setClickable(boolean clickable)
Sets the header to be active if active
is TRUE. When the
header is active, then it can take keyboard focus, and can be clicked.
clickable
- TRUE if the header is active.
setExpand
public void setExpand(boolean expand)
Sets the column to take available extra space. This space is shared
equally amongst all columns that have the expand set to TRUE. If no
column has this option set, then the last column gets all extra space. By
default, every column is created with this FALSE.
expand
-
- 2.4
setFixedWidth
public void setFixedWidth(int fixedWidth)
Sets the size of the column in pixels. This is meaningful only if the
sizing type is
TreeViewColumnSizing.FIXED
. The size of the column
is clamped to the min/max width for the column. Please note that the
min/max width of the column doesn't actually affect the "fixedWidth"
property of the widget, just the actual size when displayed.
fixedWidth
- The size to set the column to. Must be greater than 0.
setMaxWidth
public void setMaxWidth(int maxWidth)
Sets the maximum width of the column. If maxWidth is -1, then the
maximum width is unset. Note, the column can actually be wider than
max width if it's the last column in a view. In this case, the
column expands to fill any extra space.
maxWidth
- The maximum width of the column in pixels, or -1.
setMinWidth
public void setMinWidth(int minWidth)
Sets the minimum width of the column. If minWidth is -1, then the
minimum width is unset.
minWidth
- The minimum width of the column in pixels, or -1.
setReorderable
public void setReorderable(boolean reorderable)
If reorderable
is TRUE, then the column can be reordered by
the end user dragging the header. By using this method, the developer
does not have to deal with the drag events.
reorderable
- TRUE, if the column can be reordered.
setResizable
public void setResizable(boolean resizable)
If resizable is TRUE, then the user can explicitly resize the column by
grabbing the outer edge of the column button.
resizable
- TRUE, if the column can be resized.
setSizing
public void setSizing(TreeViewColumnSizing type)
Sets the growth behavior of the column
type
- The TreeViewColumnSizing.
setSortColumn
public void setSortColumn(DataColumn column)
Sets the logical DataColumn that this column sorts on when this column
is selected for sorting. Doing so makes the column header clickable.
column
- The DataColumn of the model to sort on.
setSortIndicator
public void setSortIndicator(boolean setting)
Call this function with a setting of
TRUE
to display an arrow
in the header button indicating the column is sorted. Call
setSortOrder(SortType)
to change the direction of the arrow.
setting
- TRUE to display an indicator that the column is sorted
setSortOrder
public void setSortOrder(SortType order)
Changes the appearance of the sort indicator.
This does not actually sort the model. Use
setSortColumn(DataColumn)
if you want automatic sorting
support. This function is primarily for
custom sorting behavior, and should be used in conjunction with
setSortColumn(DataColumn)
to do that.
For custom models, the mechanism will vary.
The sort indicator changes direction to indicate normal sort or
reverse sort. Note that you must have the sort indicator enabled
to see anything when calling this function;
order
- Sort order that the sort indicator should indicate
setSortIndicator(boolean)
, setSortColumn(DataColumn)
setSpacing
public void setSpacing(int spacing)
Sets the spacing field of the column, which is the number of pixels to
place between cell renderers packed into it.
spacing
- Distance between cell renderers in pixels.
setTitle
public void setTitle(String title)
Sets the title of the column. If a custom widget has been set, then this
value is ignored.
title
- The title of the column
setVisible
public void setVisible(boolean visible)
Sets the visibility of the column
visible
- If true, the column s visible.
setWidget
public void setWidget(Widget widget)
Sets the widget in the header to be
widget
. If widget is
null
, then the header button is set with a
Label
set to the title of column.
widget
- : A child Widget
, or null.