lib
Class AUT_TBL_LIB


public class AUT_TBL_LIB

This library implements a set of low-level functions to manipulate table objects. The interface has been specially designed for the use in data tables as known from EMOS Framework. Start by looking at the comments for AUT_TBL_cell_action().

Stereotype compiled module
tsl AUT_TBL_LIB.tsl

Method Summary
 intAUT_TBL_cell_action(in tbl, in cmd, in frm_mode, in desc, in list)
          Performs the action on a table cell as specified by the command cmd.
 intAUT_TBL_CHK_data(in tbl, in row, in col, in val, in simple_select, in operation)
           
 intAUT_TBL_CHK_edit(in tbl, in row, in col, in obj, in val, in simple_select, in exact)
           
 intAUT_TBL_CHK_pick(in tbl, in row, in col, in obj, in list, in val, in simple_select, in exact)
           
 intAUT_TBL_determine_col(in tbl, in row, in col, in val, out out_col, in exact)
          Returns the name/index of the column depending on the specified row/col.
 intAUT_TBL_determine_row(in tbl, in row, in col, in val, out out_row, in exact)
          Returns the name/index of the row depending on the specified row/col.
 intAUT_TBL_find_cell(in tbl, in regex, out out_row, out out_col, in row, in col, in exact, in row_offset)
          Searches for a cell that contains a given regex.
 intAUT_TBL_find_row(in tbl, in row_spec, out out_row, in idx, in row_offset)
          Searches for a row that contains given data in specified coumns.
 intAUT_TBL_get_cols_count_adjustment()
          Function tbl_get_cols_count() sometimes returns count that is less than the physical number of columns.
 intAUT_TBL_GET_data(in tbl, in row, in col, out val, in simple_select)
           
 intAUT_TBL_get_rows_count_adjustment()
          Function tbl_get_rows_count() sometimes returns count that is less than the physical number of rows.
 intAUT_TBL_list_select_item(in obj, in list, in item)
          Pops a drop-down list on a Stingray-ComboBox-cell by performing a left-mouse click at some calculated position within the obj.
 intAUT_TBL_obj_drop_list(in obj)
          Pops a drop-down list on Stingray-ComboBox-cell by performing a left-mouse click at some calculated position within the obj.
 intAUT_TBL_popup_cell_menu(in tbl, in row, in col)
          Selects the cell and opens it's popup menue via the <kAppa> key.
 intAUT_TBL_popup_menu(in tbl, in x, in y)
          Opens a popup menue at the specified location within the table object or, if not specified, at the top-left corner of the table object.
 intAUT_TBL_select(in tbl, in row, in col, in simple_select)
           
 intAUT_TBL_set_cols_count_adjustment(in amount)
          Function tbl_get_cols_count() sometimes returns count that is less than the physical number of columns.
 intAUT_TBL_SET_data(in tbl, in row, in col, in val, in simple_select)
           
 intAUT_TBL_SET_edit(in tbl, in row, in col, in obj, in val, in simple_select)
           
 intAUT_TBL_SET_pick(in tbl, in row, in col, in obj, in list, in val, in simple_select)
           
 intAUT_TBL_set_rows_count_adjustment(in amount)
          Function tbl_get_rows_count() sometimes returns count that is less than the physical number of rows.
 intAUT_TBL_type(in tbl, in row, in col, in val, in simple_select)
           

Method Detail

AUT_TBL_cell_action

public int AUT_TBL_cell_action(in tbl, in cmd, in frm_mode, in desc, in list)
Performs the action on a table cell as specified by the command cmd. There are four types of actions you can perform on a table cell:

All actions can be specified by a generic syntax:

~action~[row]~[col][~val[~obj[~exact]]]

where

A few examples:

Parameters:
tbl (in) table name
cmd (in) command to be performed
frm_mode (in) [optional] FRM mode (FRM_SET_MODE|FRM_CHK_MODE|FRM_ATR_MODE|FRM_GEN_MODE)
desc (in) [optional] default physical description of the object to be acted upon this description is used unless overridden by the cmd, if you don't provide this argument, "{class:edit}" will be used
list (in) [optional] a description or a logical name of the combo box containing the obj.

AUT_TBL_CHK_data

public int AUT_TBL_CHK_data(in tbl, in row, in col, in val, in simple_select, in operation)

AUT_TBL_CHK_edit

public int AUT_TBL_CHK_edit(in tbl, in row, in col, in obj, in val, in simple_select, in exact)

AUT_TBL_CHK_pick

public int AUT_TBL_CHK_pick(in tbl, in row, in col, in obj, in list, in val, in simple_select, in exact)

AUT_TBL_determine_col

public int AUT_TBL_determine_col(in tbl, in row, in col, in val, out out_col, in exact)
Returns the name/index of the column depending on the specified row/col. If <col> is given (i.e. != ""), the unchanged value is returned. If <col> is not given (i.e. == ""), the column containing the given <val> is searched for in the row specified by <row>. If both <row> and <col> are not given, an error is returned.
Parameters:
tbl (in) table object
row (in) row to select (if row does not match "#[0-9][0-9]*", then column #0 is searched for the value <row>
col (in) column to select (if col does not equal "", no search is performed; if row equals "", last valid row determined by this function is returned (no search performed))
val (in) value to search for in the determined row
out_col (out) the name of the determined column
exact (in) [optinal] true indicates that an exact match is to be performed
Returns: E_OK: value was found (i.e. out_col contains the name of the column) else: error

AUT_TBL_determine_row

public int AUT_TBL_determine_row(in tbl, in row, in col, in val, out out_row, in exact)
Returns the name/index of the row depending on the specified row/col. If <row> is given (i.e. != ""), the unchanged value is returned. If <row> is not given (i.e. == ""), the row containing the given <val> is searched for in the column specified by <col>. If both <row> and <col> are not given, an error is returned.
Parameters:
tbl (in) table object
row (in) row to select (if row does not equal "", no search is performed; if row equals "", last valid row determined by this function is returned (no search performed))
col (in) column where <val> is searched for
val (in) value to search for in the given column
out_row (out) the name of the determined row
exact (in) [optinal] true indicates that an exact match is to be performed
Returns: E_OK: value was found (i.e. out_row contains the name of the row) else: error

AUT_TBL_find_cell

public int AUT_TBL_find_cell(in tbl, in regex, out out_row, out out_col, in row, in col, in exact, in row_offset)
Searches for a cell that contains a given regex. You can limit the search to a particular row or a col, by providing their names or indices (#idx).
Parameters:
tbl (in) table object
regex (in) text to search for (regular expression)
out_row (out) row where text was found
out_col (out) column where text was found
row (in) [optional] limit the search to this row only
col (in) [optional] limit the search to this column only
exact (in) [optional] TRUE=exact match, FALSE=tolerant match [default=FALSE]
row_offset (in) [optional] row index where the search begins [default=0]
Returns: E_OK: text found E_NOT_FOUND: text not found else: other error

AUT_TBL_find_row

public int AUT_TBL_find_row(in tbl, in row_spec, out out_row, in idx, in row_offset)
Searches for a row that contains given data in specified coumns. Note that an exact mtch is always performed. If such row is found (first from top!) the row index is returned otherwise an error is indicated. Cells can be specified using the following syntax:

col=val[;col=val]...

where col is either

Parameters:
tbl(in) table to search
row_spec (in) formated cell content specification (see above)
out_row (out) row index (only if retrn == E_OK)
idx (in) [optional] internal index needed for recursion
returns E_OK: row found E_NOT_FOUND: row not found else: other error

AUT_TBL_get_cols_count_adjustment

public int AUT_TBL_get_cols_count_adjustment()
Function tbl_get_cols_count() sometimes returns count that is less than the physical number of columns. If present, the headings column is typically not counted. So the returned count is one less than the physical count. For our search functions (e.g. AUT_TBL_find_cell()) we need to access the headings column to search for them. Increase the count_adjustment if you notice that our functions do not seem to find the value in the last column.
Returns: the row adjustment amount

AUT_TBL_GET_data

public int AUT_TBL_GET_data(in tbl, in row, in col, out val, in simple_select)

AUT_TBL_get_rows_count_adjustment

public int AUT_TBL_get_rows_count_adjustment()
Function tbl_get_rows_count() sometimes returns count that is less than the physical number of rows. If present, the headings row is typically not counted. So the returned count is one less than the physical count. For our search functions (e.g. AUT_TBL_find_cell()) we need to access the headings row to search them. Increase the count_adjustment if you notice that our functions do not seem to find the value in the last row.
Returns: the row adjustment amount

AUT_TBL_list_select_item

public int AUT_TBL_list_select_item(in obj, in list, in item)
Pops a drop-down list on a Stingray-ComboBox-cell by performing a left-mouse click at some calculated position within the obj.
Parameters:
obj (in) object to click
list (in) list object that drops down after the click
item (in) item to select
Returns: E_OK: success else: failure

AUT_TBL_obj_drop_list

public int AUT_TBL_obj_drop_list(in obj)
Pops a drop-down list on Stingray-ComboBox-cell by performing a left-mouse click at some calculated position within the obj.
Parameters:
obj (in) object to click
Returns: E_OK: success else: failure

AUT_TBL_popup_cell_menu

public int AUT_TBL_popup_cell_menu(in tbl, in row, in col)
Selects the cell and opens it's popup menue via the <kAppa> key.
Parameters:
tbl (in) table object
row (in) row to select
col (in) column to select

AUT_TBL_popup_menu

public int AUT_TBL_popup_menu(in tbl, in x, in y)
Opens a popup menue at the specified location within the table object or, if not specified, at the top-left corner of the table object.
Parameters:
tbl (in) table object
x (in) [optional] x-coordinate to click to [default: 0]
y (in) [optional] y-coordinate to click to [default: 0]

AUT_TBL_select

public int AUT_TBL_select(in tbl, in row, in col, in simple_select)

AUT_TBL_set_cols_count_adjustment

public int AUT_TBL_set_cols_count_adjustment(in amount)
Function tbl_get_cols_count() sometimes returns count that is less than the physical number of columns. If present, the headings column is typically not counted. So the returned count is one less than the physical count. For our search functions (e.g. AUT_TBL_find_cell()) we need to access the headings column to search for them. Increase the count_adjustment if you notice that our functions do not seem to find the value in the last column.
Parameters:
amount (in) amount to adjust

AUT_TBL_SET_data

public int AUT_TBL_SET_data(in tbl, in row, in col, in val, in simple_select)

AUT_TBL_SET_edit

public int AUT_TBL_SET_edit(in tbl, in row, in col, in obj, in val, in simple_select)

AUT_TBL_SET_pick

public int AUT_TBL_SET_pick(in tbl, in row, in col, in obj, in list, in val, in simple_select)

AUT_TBL_set_rows_count_adjustment

public int AUT_TBL_set_rows_count_adjustment(in amount)
Function tbl_get_rows_count() sometimes returns count that is less than the physical number of rows. If present, the headings row is typically not counted. So the returned count is one less than the physical count. For our search functions (e.g. AUT_TBL_find_cell()) we need to access the headings row to search them. Increase the count_adjustment if you notice that our functions do not seem to find the value in the last row.
Parameters:
amount (in) amount to adjust

AUT_TBL_type

public int AUT_TBL_type(in tbl, in row, in col, in val, in simple_select)