public Object getValueAt(int row, int column) { return model.getValueAt(row, convertColumnIndexToModel(column)); }
public void setValueAt(Object v, int row, int column) { Object oldVal = model.getValueAt(row, column); model.setValueAt(v, row, convertColumnIndexToModel(column)); propertyChangeSupport.firePropertyChange("valueAt", oldVal, model.getValueAt(row, column)); }
public Class getColumnClass(int col) { return model.getColumnClass(convertColumnIndexToModel(col)); }
public String getColumnName(int col) { return model.getColumnName(convertColumnIndexToModel(col)); }
/** * Returns true if the cell at <I>row</I> and <I>column</I> * is editable. Otherwise, setValueAt() on the cell will not change * the value of that cell. * * @param row the row whose value is to be looked up * @param col the column whose value is to be looked up * @return true if the cell is editable. * @see #setValueAt */ public boolean isCellEditable(int row, int col) { if (col >= getColumnCount() || row == -1) return false; else { return model.isCellEditable(row, convertColumnIndexToModel(col)); } }
@MacroTag public static void cellEvent(MacroContext context, int row, int col) throws IOException { Device device = context.getDevice(); SComponent _c = context.getComponent(); STable table = (STable) _c; final boolean isEditingCell = table.isEditing() && row == table.getEditingRow() && col == table.getEditingColumn(); final boolean editableCell = table.isCellEditable(row, col); final boolean clickableCell = table instanceof XTable && ((XTable)table).isClickListenerSet(table.convertColumnIndexToModel(col)); final boolean selectableCell = table.getSelectionMode() != SListSelectionModel.NO_SELECTION && !table.isEditable() && table.isSelectable(); final boolean isClickable = _c instanceof SClickable; String parameter = null; if ((table.isEditable() && editableCell) || clickableCell) parameter = STable.getEditParameter(row, col); else if (selectableCell) parameter = STable.getToggleSelectionParameter(row, col) + ";shiftKey='+event.shiftKey+';ctrlKey='+event.ctrlKey+'"; if (parameter != null && (selectableCell || editableCell || clickableCell) && !isClickable) { Utils.printClickability(device, table, parameter, true, table.getShowAsFormComponent()); } }