|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gtk.TreeViewColumn
The TreeViewColumn object is a visible column in a TreeView
widget,
which is the base widget for all Tree, list and table widgets.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
|
TreeViewColumn()
Creates a new Column |
protected |
TreeViewColumn(Handle handle)
|
Method Summary | |
void |
addAttributeMapping(CellRenderer renderer,
CellRendererAttribute attribute,
DataColumn dataBlock)
TreeView widgets contain TreeViewColumn objects. |
void |
addListener(TreeViewColumnListener listener)
Register an object to handle events on the column header. |
void |
clear()
Removes all the renderers from the column. |
void |
clearAttributeMappings(CellRenderer renderer)
Clears all attribute mappings |
void |
click()
Creates a Clicked event. |
protected void |
fireSelectionEvent(TreeViewColumnEvent event)
|
void |
focusCell(CellRenderer cell)
Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells. |
double |
getAlignment()
|
CellRenderer[] |
getCellRenderers()
Returns an array of CellRenderers in the column in no particular order. |
boolean |
getClickable()
|
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
boolean |
getExpand()
Return TRUE if the column expands to take any available space. |
int |
getFixedWidth()
|
boolean |
getIsVisible()
Returns TRUE if any of the cells packed into the column are visible. |
int |
getMaxWidth()
|
int |
getMinWidth()
|
boolean |
getReorderable()
|
boolean |
getResizable()
|
TreeViewColumnSizing |
getSizing()
|
boolean |
getSortIndicator()
|
SortType |
getSortOrder()
|
int |
getSpacing()
|
java.lang.String |
getTitle()
|
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
boolean |
getVisible()
|
Widget |
getWidget()
|
int |
getWidth()
Returns the current size of the column in pixels |
protected static void |
gtk_tree_view_column_add_attribute(Handle treeColumn,
Handle cellRenderer,
java.lang.String attribute,
int column)
|
protected static void |
gtk_tree_view_column_cell_get_size(Handle treeColumn,
Handle cellRectangle,
int[] xOffset,
int[] yOffset,
int[] width,
int[] height)
|
protected static boolean |
gtk_tree_view_column_cell_is_visible(Handle treeColumn)
|
protected static void |
gtk_tree_view_column_cell_set_cell_data(Handle treeColumn,
Handle treeModel,
Handle iter,
boolean isExpander,
boolean isExpanded)
|
protected static void |
gtk_tree_view_column_clear_attributes(Handle treeColumn,
Handle cellRenderer)
|
protected static void |
gtk_tree_view_column_clear(Handle treeColumn)
|
protected static void |
gtk_tree_view_column_clicked(Handle treeColumn)
|
protected static void |
gtk_tree_view_column_focus_cell(Handle treeColumn,
Handle cell)
|
protected static double |
gtk_tree_view_column_get_alignment(Handle treeColumn)
|
protected static Handle[] |
gtk_tree_view_column_get_cell_renderers(Handle treeColumn)
|
protected static boolean |
gtk_tree_view_column_get_clickable(Handle treeColumn)
|
protected static boolean |
gtk_tree_view_column_get_expand(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_fixed_width(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_max_width(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_min_width(Handle treeColumn)
|
protected static boolean |
gtk_tree_view_column_get_reorderable(Handle treeColumn)
|
protected static boolean |
gtk_tree_view_column_get_resizable(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_sizing(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_sort_column_id(Handle treeColumn)
|
protected static boolean |
gtk_tree_view_column_get_sort_indicator(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_sort_order(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_spacing(Handle treeColumn)
|
protected static java.lang.String |
gtk_tree_view_column_get_title(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_type()
|
protected static boolean |
gtk_tree_view_column_get_visible(Handle treeColumn)
|
protected static Handle |
gtk_tree_view_column_get_widget(Handle treeColumn)
|
protected static int |
gtk_tree_view_column_get_width(Handle treeColumn)
|
protected static Handle |
gtk_tree_view_column_new()
|
protected static void |
gtk_tree_view_column_pack_end(Handle treeColumn,
Handle cell,
boolean expand)
|
protected static void |
gtk_tree_view_column_pack_start(Handle treeColumn,
Handle cell,
boolean expand)
|
protected static void |
gtk_tree_view_column_set_alignment(Handle treeColumn,
double xalign)
|
protected static void |
gtk_tree_view_column_set_clickable(Handle treeColumn,
boolean clickable)
|
protected static void |
gtk_tree_view_column_set_expand(Handle treeColumn,
boolean expand)
|
protected static void |
gtk_tree_view_column_set_fixed_width(Handle treeColumn,
int fixedWidth)
|
protected static void |
gtk_tree_view_column_set_max_width(Handle treeColumn,
int maxWidth)
|
protected static void |
gtk_tree_view_column_set_min_width(Handle treeColumn,
int minWidth)
|
protected static void |
gtk_tree_view_column_set_reorderable(Handle treeColumn,
boolean reorderable)
|
protected static void |
gtk_tree_view_column_set_resizable(Handle treeColumn,
boolean resizable)
|
protected static void |
gtk_tree_view_column_set_sizing(Handle treeColumn,
int type)
|
protected static void |
gtk_tree_view_column_set_sort_column_id(Handle treeColumn,
int sortColumnID)
|
protected static void |
gtk_tree_view_column_set_sort_indicator(Handle treeColumn,
boolean setting)
|
protected static void |
gtk_tree_view_column_set_sort_order(Handle treeColumn,
int order)
|
protected static void |
gtk_tree_view_column_set_spacing(Handle treeColumn,
int spacing)
|
protected static void |
gtk_tree_view_column_set_title(Handle treeColumn,
java.lang.String title)
|
protected static void |
gtk_tree_view_column_set_visible(Handle treeColumn,
boolean visible)
|
protected static void |
gtk_tree_view_column_set_widget(Handle treeColumn,
Handle widget)
|
void |
packEnd(CellRenderer cell,
boolean expand)
Packs the cell into the column. |
void |
packStart(CellRenderer cell,
boolean expand)
Packs the cell into the beginning column. |
void |
removeListener(TreeViewColumnListener listener)
Removes a listener |
void |
setAlignment(double align)
Sets the alignment of the title or custom widget inside the column header. |
void |
setClickable(boolean clickable)
Sets the header to be active if active is TRUE. |
void |
setExpand(boolean expand)
Sets the column to take available extra space. |
void |
setFixedWidth(int fixedWidth)
Sets the size of the column in pixels. |
void |
setMaxWidth(int maxWidth)
Sets the maximum width of the column. |
void |
setMinWidth(int minWidth)
Sets the minimum width of the column. |
void |
setReorderable(boolean reorderable)
If reorderable is TRUE, then the column can be reordered by
the end user dragging the header. |
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. |
void |
setSizing(TreeViewColumnSizing type)
Sets the growth behavior of the column |
void |
setSortColumn(DataColumn column)
Sets the logical DataColumn that this column sorts on when this column is selected for sorting. |
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. |
void |
setSortOrder(SortType order)
Changes the appearance of the sort indicator. |
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. |
void |
setTitle(java.lang.String title)
Sets the title of the column. |
void |
setVisible(boolean visible)
Sets the visibility of the column |
void |
setWidget(Widget widget)
Sets the widget in the header to be widget |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TreeViewColumn()
protected TreeViewColumn(Handle handle)
Method Detail |
public void packStart(CellRenderer cell, boolean expand)
cell
- The CellRenderer.expand
- TRUE if cell is to be given extra space allocated to box.public void packEnd(CellRenderer cell, boolean expand)
cell
- The CellRenderer.expand
- TRUE if cell is to be given extra space allocated to box.public void clear()
public CellRenderer[] getCellRenderers()
public void setSpacing(int spacing)
spacing
- Distance between cell renderers in pixels.public int getSpacing()
public void setVisible(boolean visible)
visible
- If true, the column s visible.public boolean getVisible()
public void setResizable(boolean resizable)
resizable
- TRUE, if the column can be resized.public boolean getResizable()
public void setSizing(TreeViewColumnSizing type)
type
- The TreeViewColumnSizing.public TreeViewColumnSizing getSizing()
public int getWidth()
public void setFixedWidth(int fixedWidth)
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.public int getFixedWidth()
public void setMinWidth(int minWidth)
minWidth
- The minimum width of the column in pixels, or -1.public int getMinWidth()
public void setMaxWidth(int maxWidth)
maxWidth
- The maximum width of the column in pixels, or -1.public int getMaxWidth()
public void click()
public void setTitle(java.lang.String title)
title
- The title of the columnpublic java.lang.String getTitle()
public void setClickable(boolean clickable)
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.public boolean getClickable()
public void setWidget(Widget widget)
widget. If widget is
null
, then the header button is set with a Label
set to the title of column.
- Parameters:
widget
- : A child Widget
, or null.
public Widget getWidget()
public void setAlignment(double align)
align
- : The alignment, which is between [0.0 and 1.0] inclusive.public double getAlignment()
public void setReorderable(boolean reorderable)
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.public boolean getReorderable()
public void setSortColumn(DataColumn column)
column
- The DataColumn of the model to sort on.public void setSortIndicator(boolean setting)
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 sortedpublic boolean getSortIndicator()
public void setSortOrder(SortType order)
This does not actually sort the model. Use
setSortColumn(org.gnu.gtk.DataColumn)
if you want automatic sorting
support. This function is primarily for
custom sorting behavior, and should be used in conjunction with
setSortColumn(org.gnu.gtk.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 indicatesetSortIndicator(boolean)
,
setSortColumn(org.gnu.gtk.DataColumn)
public SortType getSortOrder()
public boolean getIsVisible()
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.public void clearAttributeMappings(CellRenderer renderer)
addAttributeMapping(CellRenderer, CellRendererAttribute, DataColumn)
public void setExpand(boolean expand)
expand
- public boolean getExpand()
public void focusCell(CellRenderer cell)
public void addListener(TreeViewColumnListener listener)
TreeViewColumnListener
public void removeListener(TreeViewColumnListener listener)
addListener(TreeViewColumnListener)
protected void fireSelectionEvent(TreeViewColumnEvent event)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class GObject
public EventType getEventType(java.lang.String signal)
getEventType
in class GObject
public static Type getType()
protected static final int gtk_tree_view_column_get_type()
protected static final Handle gtk_tree_view_column_new()
protected static final void gtk_tree_view_column_pack_start(Handle treeColumn, Handle cell, boolean expand)
protected static final void gtk_tree_view_column_pack_end(Handle treeColumn, Handle cell, boolean expand)
protected static final void gtk_tree_view_column_clear(Handle treeColumn)
protected static final Handle[] gtk_tree_view_column_get_cell_renderers(Handle treeColumn)
protected static final void gtk_tree_view_column_add_attribute(Handle treeColumn, Handle cellRenderer, java.lang.String attribute, int column)
protected static final void gtk_tree_view_column_clear_attributes(Handle treeColumn, Handle cellRenderer)
protected static final void gtk_tree_view_column_set_spacing(Handle treeColumn, int spacing)
protected static final int gtk_tree_view_column_get_spacing(Handle treeColumn)
protected static final void gtk_tree_view_column_set_visible(Handle treeColumn, boolean visible)
protected static final boolean gtk_tree_view_column_get_visible(Handle treeColumn)
protected static final void gtk_tree_view_column_set_resizable(Handle treeColumn, boolean resizable)
protected static final boolean gtk_tree_view_column_get_resizable(Handle treeColumn)
protected static final void gtk_tree_view_column_set_sizing(Handle treeColumn, int type)
protected static final int gtk_tree_view_column_get_sizing(Handle treeColumn)
protected static final int gtk_tree_view_column_get_width(Handle treeColumn)
protected static final int gtk_tree_view_column_get_fixed_width(Handle treeColumn)
protected static final void gtk_tree_view_column_set_fixed_width(Handle treeColumn, int fixedWidth)
protected static final void gtk_tree_view_column_set_min_width(Handle treeColumn, int minWidth)
protected static final int gtk_tree_view_column_get_min_width(Handle treeColumn)
protected static final void gtk_tree_view_column_set_max_width(Handle treeColumn, int maxWidth)
protected static final int gtk_tree_view_column_get_max_width(Handle treeColumn)
protected static final void gtk_tree_view_column_clicked(Handle treeColumn)
protected static final void gtk_tree_view_column_set_title(Handle treeColumn, java.lang.String title)
protected static final java.lang.String gtk_tree_view_column_get_title(Handle treeColumn)
protected static final void gtk_tree_view_column_set_expand(Handle treeColumn, boolean expand)
protected static final boolean gtk_tree_view_column_get_expand(Handle treeColumn)
protected static final void gtk_tree_view_column_set_clickable(Handle treeColumn, boolean clickable)
protected static final boolean gtk_tree_view_column_get_clickable(Handle treeColumn)
protected static final void gtk_tree_view_column_set_widget(Handle treeColumn, Handle widget)
protected static final Handle gtk_tree_view_column_get_widget(Handle treeColumn)
protected static final void gtk_tree_view_column_set_alignment(Handle treeColumn, double xalign)
protected static final double gtk_tree_view_column_get_alignment(Handle treeColumn)
protected static final void gtk_tree_view_column_set_reorderable(Handle treeColumn, boolean reorderable)
protected static final boolean gtk_tree_view_column_get_reorderable(Handle treeColumn)
protected static final void gtk_tree_view_column_set_sort_column_id(Handle treeColumn, int sortColumnID)
protected static final int gtk_tree_view_column_get_sort_column_id(Handle treeColumn)
protected static final void gtk_tree_view_column_set_sort_indicator(Handle treeColumn, boolean setting)
protected static final boolean gtk_tree_view_column_get_sort_indicator(Handle treeColumn)
protected static final void gtk_tree_view_column_set_sort_order(Handle treeColumn, int order)
protected static final int gtk_tree_view_column_get_sort_order(Handle treeColumn)
protected static final void gtk_tree_view_column_cell_set_cell_data(Handle treeColumn, Handle treeModel, Handle iter, boolean isExpander, boolean isExpanded)
protected static final void gtk_tree_view_column_cell_get_size(Handle treeColumn, Handle cellRectangle, int[] xOffset, int[] yOffset, int[] width, int[] height)
protected static final boolean gtk_tree_view_column_cell_is_visible(Handle treeColumn)
protected static final void gtk_tree_view_column_focus_cell(Handle treeColumn, Handle cell)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |