com.appperfect.devcommon.script.javaelement
Interface SwingTable

All Superinterfaces:
AwtComponent, AwtContainer, IScript, JavaComponent, SwingComponent

public interface SwingTable
extends SwingComponent

SwingTable is created to represent javax.swing.JTable component

The following code fragment illustrates how to create an SwingTable element.

 var element = engine.createSwingTable(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 java.lang.String getColumnClass(int column)
 Returns the type of the column appearing in the view at column position column.
 int getColumnCount()
 Returns the number of columns in the column model.
 java.lang.String getColumnName(int column)
 Returns the name of the column appearing in the view at column position column.
 int getRowCount()
 Returns the number of rows in this table's model.
 int getSelectedColumn()
 Returns the index of the first selected column, -1 if no column is selected.
 int getSelectedColumnCount()
 Returns the number of selected columns.
 int[] getSelectedColumns()
 Returns the indices of all selected columns.
 int getSelectedRow()
 Returns the index of the first selected row, -1 if no row is selected.
 int getSelectedRowCount()
 Returns the number of selected rows.
 int[] getSelectedRows()
 Returns the indices of all selected rows.
 java.lang.String getValueAt(int row, int column)
 Returns the cell value at row and column.
 boolean isCellEditable(int row, int column)
 Returns true if the cell at row and column is editable.
 boolean isCellSelected(int row, int column)
 Returns true if the cell at the specified position is selected.
 boolean isColumnSelected(int column)
 Returns true if the column at the specified index is selected.
 boolean isRowSelected(int row)
 Returns true if the row at the specified index is selected.
 boolean setValueAt(java.lang.String value, int row, int column)
 Sets the value for the cell in the table model at row and column.
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

getColumnClass

java.lang.String getColumnClass(int column)
Returns the type of the column appearing in the view at column position column.

Parameters:
column - the column in the view being queried
Returns:
the type of the column at position column in the view where the first column is column 0

getColumnCount

int getColumnCount()
Returns the number of columns in the column model. Note that this may be different from the number of columns in the table model.

Returns:
the number of columns in the table

getColumnName

java.lang.String getColumnName(int column)
Returns the name of the column appearing in the view at column position column.

Parameters:
column - the column in the view being queried
Returns:
the name of the column at position column in the view where the first column is column 0

getRowCount

int getRowCount()
Returns the number of rows in this table's model.

Returns:
the number of rows in this table's model

getSelectedColumn

int getSelectedColumn()
Returns the index of the first selected column, -1 if no column is selected.

Returns:
the index of the first selected column

getSelectedColumnCount

int getSelectedColumnCount()
Returns the number of selected columns.

Returns:
the number of selected columns, 0 if no columns are selected

getSelectedColumns

int[] getSelectedColumns()
Returns the indices of all selected columns.

Returns:
an array of integers containing the indices of all selected columns, or an empty array if no column is selected

getSelectedRow

int getSelectedRow()
Returns the index of the first selected row, -1 if no row is selected.

Returns:
the index of the first selected row

getSelectedRowCount

int getSelectedRowCount()
Returns the number of selected rows.

Returns:
the number of selected rows, 0 if no rows are selected

getSelectedRows

int[] getSelectedRows()
Returns the indices of all selected rows.

Returns:
an array of integers containing the indices of all selected rows, or an empty array if no row is selected

getValueAt

java.lang.String getValueAt(int row,
                            int column)
Returns the cell value at row and column.

Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
the value at the specified cell

isCellEditable

boolean isCellEditable(int row,
                       int column)
Returns true if the cell at row and column is editable.

Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
true if the cell is editable

isCellSelected

boolean isCellSelected(int row,
                       int column)
Returns true if the cell at the specified position is selected.

Parameters:
row - the row being queried
column - the column being queried
Returns:
true if the cell at index (row, column) is selected, where the first row and first column are at index 0

isColumnSelected

boolean isColumnSelected(int column)
Returns true if the column at the specified index is selected.

Parameters:
column - index
Returns:
true if the column at index column is selected, where 0 is the first column

isRowSelected

boolean isRowSelected(int row)
Returns true if the row at the specified index is selected.

Parameters:
row - index
Returns:
true if the row at index row is selected, where 0 is the first row

setValueAt

boolean setValueAt(java.lang.String value,
                   int row,
                   int column)
Sets the value for the cell in the table model at row and column.

Parameters:
value - the new value
row - the row of the cell to be changed
column - the column of the cell to be changed
Returns:
true if event was executed successfully, returns false if there is any failure during execution


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.