Services Builder for Screens

com.attachmate.sc.ssa
Interface ITable


public interface ITable

This interface provides methods for populating and querying tabular data as it is supported in the navigation engine.


Method Summary
 int addRow(java.lang.String[] row)
          Adds a row of tabular data to the table.
 java.lang.String[] getColumnNames()
          Returns the names of the columns specified for this instance of ITable
 java.lang.String[] getRow(int index)
          Returns a row of data from this instance of ITable
 int getRowCount()
          Returns the number of rows in this instance of ITable
 java.lang.String[] removeRow(int index)
          Removes and returns a row of data from this instance of ITable.
 

Method Detail

addRow

public int addRow(java.lang.String[] row)
Adds a row of tabular data to the table.

Parameters:
row - A String array containing the values for each column in the row. The order of the columns will be assumed to be the same order specified in the columnNames parameter of the ITaskData.createTable method or the order found in the return value of the getColumnNames method. If need be a user can pad columns with null.
Returns:
The index of the row that was added. The number of rows in the table will always be 1 greater than the index returned.
Throws:
java.lang.NullPointerException - if the row parameter is null
java.lang.IllegalArgumentException - if the length of the row parameter does not have the correct number of column entries
See Also:
ITaskData.createTable(java.lang.String[]), ITaskData.getTable(java.lang.String), getColumnNames()

getRow

public java.lang.String[] getRow(int index)
Returns a row of data from this instance of ITable

Parameters:
index - The index of the row to be retrieved
Returns:
A string array containing the row data. Each element in the array is a column value in the row. The order of the columns will be the order of the columns specified in the columnNames parameter of the corresponding call to the ITaskData.createTable method or the order found in the return value of the getColumnNames method.
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range
See Also:
ITaskData.createTable(java.lang.String[]), ITaskData.getTable(java.lang.String), getColumnNames(), addRow(java.lang.String[])

removeRow

public java.lang.String[] removeRow(int index)
Removes and returns a row of data from this instance of ITable. All subsequent rows will be moved up one

Parameters:
index - The index of the row to be removed
Returns:
A String array containing the row data that was removed
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range
See Also:
ITaskData.createTable(java.lang.String[]), ITaskData.getTable(java.lang.String), addRow(java.lang.String[])

getRowCount

public int getRowCount()
Returns the number of rows in this instance of ITable

Returns:
The number of rows in this instance of ITable as an int
See Also:
addRow(java.lang.String[]), removeRow(int)

getColumnNames

public java.lang.String[] getColumnNames()
Returns the names of the columns specified for this instance of ITable

Returns:
A String array containing the names of the columns.
See Also:
ITaskData.createTable(java.lang.String[])

Services Builder for Screens