nsIAccessibleTable 编辑

accessible/public/nsIAccessibleTable.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

nsIAccessible getCellAt(in long rowIndex, in long columnIndex); Note: Renamed from cellRefAt in Gecko 1.9.2
long getCellIndexAt(in long rowIndex, in long columnIndex); Note: Renamed from getIndexAt in Gecko 1.9.2
AString getColumnDescription(in long columnIndex);
long getColumnExtentAt(in long row, in long column);
long getColumnIndexAt(in long cellIndex); Note: Renamed from getColumnAtIndex in Gecko 1.9.2
void getRowAndColumnIndicesAt(in long cellIndex, out long rowIndex, out long columnIndex);
AString getRowDescription(in long rowIndex);
long getRowExtentAt(in long row, in long column);
long getRowIndexAt(in long cellIndex); Note: Renamed from getRowAtIndex in Gecko 1.9.2
void getSelectedCellIndices(out unsigned long cellsArraySize, [retval, array, size_is(cellsArraySize)] out long cellsArray); Note: Renamed from getSelectedCells in Gecko 1.9.2
void getSelectedColumnIndices(out unsigned long columnsArraySize, [retval, array, size_is(columnsArraySize)] out long columnsArray); Note: Renamed from getSelectedColumns in Gecko 1.9.2
void getSelectedRowIndices(out unsigned long rowsArraySize, [retval, array, size_is(rowsArraySize)] out long rowsArray); Note: Renamed from getSelectedRows in Gecko 1.9.2
boolean isCellSelected(in long rowIndex, in long columnIndex);
boolean isColumnSelected(in long columnIndex);
boolean isProbablyForLayout();
boolean isRowSelected(in long rowIndex);
void selectColumn(in long columnIndex);
void selectRow(in long rowIndex);
void unselectColumn(in long columnIndex);
void unselectRow(in long rowIndex);

Attributes

AttributeTypeDescription
captionnsIAccessibleThe caption accessible for the table. For example, html:caption element of html:table element. Read only.
columnCountlongThe number of columns in the table. Read only. Note: Renamed from columns in Gecko 1.9.2
columnHeadernsIAccessibleTableRead only. Obsolete since Gecko 1.9.2
rowCountlongThe number of rows in the table. Read only. Note: Renamed from rows in Gecko 1.9.2
rowHeadernsIAccessibleTableRead only. Obsolete since Gecko 1.9.2
selectedCellCountunsigned longThe total number of selected cells. Read only. Note: Renamed from selectedCellsCount in Gecko 1.9.2
selectedCellsnsIArrayAn array of selected cells. Read only.
selectedColumnCountunsigned longThe total number of selected columns. Read only. Note: Renamed from selectedColumnsCount in Gecko 1.9.2
selectedRowCountunsigned longThe total number of selected rows. Read only. Note: Renamed from selectedRowsCount in Gecko 1.9.2
summaryAStringThe summary description for the table. For example, @summary attribute on html:table element. Read only.

Methods

Return the accessible object at the specified row and column in the table. If both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).

nsIAccessible getCellAt(
  in long rowIndex,
  in long columnIndex
);
Parameters
rowIndex
The row index of the cell.
columnIndex
The column index of the cell.
Return value

An nsIAccessible object.

Translate the given row and column indices into the corresponding cell index.

long getCellIndexAt(
  in long rowIndex,
  in long columnIndex
);
Parameters
rowIndex
The row index of the cell.
columnIndex
The column index of the cell.
Return value

A cell index.

getColumnDescription()

Return the description text of the specified column in the table.

AString getColumnDescription(
  in long columnIndex
);
Parameters
columnIndex
The column index.
Return value

The column description.

getColumnExtentAt()

Return the number of columns occupied by the accessible cell at the specified row and column in the table. The result differs from 1 if the specified cell spans multiple columns.

long getColumnExtentAt(
  in long row,
  in long column
);
Parameters
row
The row index of the cell.
column
The column index of the cell.
Return value

The number of columns the cell spans.

Return the index of the column containg the given cell index.

long getColumnIndexAt(
  in long cellIndex
);
Parameters
cellIndex
The cell index.
Return value

The column index.

getRowAndColumnIndicesAt()

Translate the given cell index into the corresponding row and column indices.

void getRowAndColumnIndicesAt(
  in long cellIndex,
  out long rowIndex,
  out long columnIndex
);
Parameters
cellIndex
Cell index to return row and column indices for.
rowIndex
Row index at the given cell index.
columnIndex
Column index at the given cell index.

getRowDescription()

Return the description text of the specified row in the table.

AString getRowDescription(
  in long rowIndex
);
Parameters
rowIndex
The row index.
Return value

The row description

getRowExtentAt()

Return the number of rows occupied by the accessible cell at the specified row and column in the table. The result differs from 1 if the specified cell spans multiple rows.

long getRowExtentAt(
  in long row,
  in long column
);
Parameters
row
Row index of the cell.
column
Column index of the cell.
Return value

The number of rows the cell spans.

Return the index of the row containg the given cell index.

long getRowIndexAt(
  in long cellIndex
);
Parameters
cellIndex
The cell index.
Return value

The row index.

getSelectedCellIndices()

Renamed from getSelectedCells in Gecko 1.9.2

Return an array of cell indices currently selected.

void getSelectedCellIndices(
  out unsigned long cellsArraySize,
  [retval, array, size_is(cellsArraySize)] out long cellsArray
);
Parameters
cellsArraySize
Length of array.
cellsArray
Array of indexes of selected cells.

Return an array of column indices currently selected.

void getSelectedColumnIndices(
  out unsigned long columnsArraySize,
  [retval, array, size_is(columnsArraySize)] out long columnsArray
);
Parameters
columnsArraySize
Length of array.
columnsArray
Array of indices of selected columns.

Return an array of row indices currently selected.

void getSelectedRowIndices(
  out unsigned long rowsArraySize,
  [retval, array, size_is(rowsArraySize)] out long rowsArray
);
Parameters
rowsArraySize
Length of array.
rowsArray
Array of indices of selected rows.

isCellSelected()

Return a boolean value indicating whether the specified cell is selected.

boolean isCellSelected(
  in long rowIndex,
  in long columnIndex
);
Parameters
rowIndex
The row index of the cell.
columnIndex
The column index of the cell.
Return value

true if the cell is selected, false if the cell is not selected.

isColumnSelected()

Return a boolean value indicating whether the specified column is selected, that is all cells within the column are selected.

boolean isColumnSelected(
  in long columnIndex
);
Parameters
columnIndex
The column index.
Return value

true if the column is selected, false if the column is not selected.

isProbablyForLayout()

Use heuristics to determine if table is most likely used for layout.

boolean isProbablyForLayout();
Parameters

None.

Return value

true if the table is probably for layout, false if the table is probably not for layout.

isRowSelected()

Return a boolean value indicating whether the specified row is selected, that is all cells within the row are selected.

boolean isRowSelected(
  in long rowIndex
);
Parameters
rowIndex
The row index.
Return value

true if the row is selected, false if the row is not selected.

selectColumn()

Select a column and unselects all previously selected columns.

void selectColumn(
  in long columnIndex
);
Parameters
columnIndex
The index of the column to select.

selectRow()

Select a row and unselects all previously selected rows.

void selectRow(
  in long rowIndex
);
Parameters
rowIndex
The index of the row to select.

unselectColumn()

Unselect the given column, leaving other selected columns selected (if any).

void unselectColumn(
  in long columnIndex
);
Parameters
columnIndex
The index of the column to unselect.

unselectRow()

Unselect the given row, leaving other selected rows selected (if any).

void unselectRow(
  in long rowIndex
);
Parameters
rowIndex
The index of the row to unselect.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:79 次

字数:18034

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文