Class Table

Superclasses :
gui::Component
Subclasses :
gui::TreeTable
Package :
gui

This class displays a table, the columns of which are set up using TableColumns.

Source

Class summary
Methods inherited from gui::Component
accepts_focus() add(c, i) all_valid() can_drag(ev) can_drop(d) child_validated(c) clear_accepts_focus() clear_allow_drag() clear_allow_drop() clear_draw_border() clear_is_shaded() compute_absolutes() create_event_and_fire(type, param) do_handle_event(e) do_shading(W) drag_event(d) drag_reset() end_drag(d, c) fatal(s) finally() find_focus() fire_icon_events_on_mouse(p, e) firstly() generate_components() get_accel() get_cbwin_reference() get_children() get_cwin_reference() get_h_reference() get_parent() get_parent_buffer_win() get_parent_dialog() get_parent_dialog_reference() get_parent_win() get_w_reference() get_x_reference() get_y_reference() got_focus(e) handle_accel(e) handle_event(e) in_region() init() invalidate() invoke_can_drag(ev) invoke_can_drop(d) invoke_drag_event(d) invoke_drag_reset() invoke_end_drag(d, c) is_attrib(s) is_dialog_open() is_hidden() is_shaded() is_ticking() is_unhidden() is_unshaded() keeps(e) lost_focus(e) parse_pos(total, s) remove(c) retime_ticker(n) set_abs_coords(x, y) set_abs_size(w, h) set_accel(k) set_accepts_focus() set_align(x_align, y_align) set_allow_drag() set_allow_drop() set_attribs(x[]) set_attribs_list(l) set_draw_border() set_is_shaded() set_parent(c) set_parent_dialog(c) set_pos(x_spec, y_spec) set_size(w_spec, h_spec) set_ticker(n, d) set_tooltip(x) stop_ticker() tick() toggle_draw_border() toggle_is_shaded() unique_end(x) unique_start() validate()
Variables inherited from gui::Component
accel accepts_focus_flag allow_drag_flag allow_drop_flag attribs cbwin children cwin draw_border_flag h h_spec has_focus is_shaded_flag parent parent_dialog ticker tooltip valid w w_spec x x_align x_spec y y_align y_spec
Methods inherited from lang::Object
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen)
Methods inherited from util::SetFields
as_attrib(attr, val) attrib(a[]) cset_val(attr, val) field_error(s) int_val(attr, val) int_vals(attr, val, n) numeric_val(attr, val) numeric_vals(attr, val, n) set_fields(l) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods inherited from util::Connectable
connect(obj, meth, type) disconnect(l) fire(type, param) fire_event(e)
Variables inherited from util::Connectable
listeners
Methods defined in this class
add_column(c) clear_selections() contents_changed() display(buffer_flag) find_accel(e) get_checked() get_column(n) get_columns() get_contents() get_curr_lines() get_cursor() get_first_line() get_last_line() get_prev_down() get_selections() get_table_content() goto_pos(line, horiz) initially() on_table_content(ev) resize() row_get_cursor() row_get_prev_down() set_checked(l) set_contents(x) set_cursor(row) set_header_height(x) set_one(attr, val) set_select_many() set_select_none() set_select_one() set_selections(l) set_table_content(tc) set_table_header(th)
Variables defined in this class
head_h table_content table_header

Method detail

add_column(c)

Add the given TableColumn to the Table.
Parameters :
c - The column to add.
Source

clear_selections()

Source

contents_changed()

Call this method if the contents list, previously set with set_contents(), has changed.
Source

display(buffer_flag)

Overrides display(buffer_flag) in gui::Component
Source

find_accel(e)

Overrides find_accel(e) in gui::Component
Send accelerator focus to the table_content.
Source

get_checked()

Source

get_column(n)

Return the nth TableColumn.
Source

get_columns()

Get the columns of the table
Source

get_contents()

Source

get_curr_lines()

Present number of lines on screen
Source

get_cursor()

Private method, not intended for client invocation

get_first_line()

Get the number of the first visible line
Source

get_last_line()

The index of the last line in the area, or zero if there are no lines.
Source

get_prev_down()

Private method, not intended for client invocation

get_selections()

Return a list of rows selected
Returns :
A list of rows currently selected
Source

get_table_content()

Return the component used to display the table contents, which is a subclass of SelectableScrollArea.
Source

goto_pos(line, horiz)

Move to the given position. Either parameter may be omitted.
Parameters :
line - The row to move to
horiz - The left offset to move to
Source

initially()

Overrides initially() in util::Connectable

on_table_content(ev)

Source

resize()

Overrides resize() in gui::Component
Source

row_get_cursor()

Private method, not intended for client invocation

row_get_prev_down()

Private method, not intended for client invocation

set_checked(l)

Source

set_contents(x)

Set the contents of the table. The parameter should be a two dimensional list. Each element of the list should correspond to one row of the table.
Parameters :
x - The contents
Source

set_cursor(row)

Private method, not intended for client invocation

set_header_height(x)

Set the height of the buttons at the top in pixels. If not invoked, a sensible default will be used.
Parameters :
x - The height
Source

set_one(attr, val)

Overrides set_one(attr, val) in util::SetFields
Source

set_select_many()

Configure the table so that several rows of the table may be highlighted.
Source

set_select_none()

Configure the table so that no lines may be highlighted (this is the default).
Source

set_select_one()

Configure the table so that one row of the table may be highlighted.
Source

set_selections(l)

Set the current selections to the list l, which is a list of row numbers.
Parameters :
l - The list of item numbers.
Source

set_table_content(tc)

This method can be used to change the TableContent object, which makes up the main area of the component. To use it, extend TableContent and insert the customized object with this method.
Source

set_table_header(th)

This method can be used to change the TableHeader object, which makes up the header of the table. To use it, extend TableHeader and insert the customized object with this method.
Source

Variable detail

head_h


table_content


table_header