/** * will return the value in table cell locate in Row= row and Column=column * * @param paramTable * @param row * @param column * @return */ public Object getTableCellValue(JTableOperator paramTable, int row, int column) { return paramTable.getValueAt(row, column); }
/** * This method search for a String key in a table according to the given * table, column, and string key, and return the index (Row) of this key in * the table. * * @param tableOperator * - The table to search in * @param key * - The String to be found * @param keyColumn * - The column of the key to be search. * @return the row of the given key, in the table */ public int getTableRowIndexOfValue(JTableOperator tableOperator, String key, int keyColumn) { String value; for (int row = 0; row < tableOperator.getRowCount(); row++) { value = (String) tableOperator.getValueAt(row, keyColumn); if (value.equals(key)) { return row; } } return -1; }
public Component getCellRendererComponent(int row, int column) { TableCellRenderer renderer = jTableOperator.getCellRenderer(row, column); JTable table = (JTable) jTableOperator.getSource(); Object value = jTableOperator.getValueAt(row, column); boolean isSelected = jTableOperator.isCellSelected(row, column); boolean hasFocus = jTableOperator.hasFocus(); return getTableCellRendererComponentSmoothly(row, column, renderer, table, value, isSelected, hasFocus); }
report("----- Setting Table cell,Row=" + row + ",column=" + column + ",value=" + value + "-attempt " + i); currentValue = paramTable.getValueAt(row, column).toString(); i++;