public SComponent prepareRenderer(STableCellRenderer r, int row, int col) { final SComponent tableCellRendererComponent = r.getTableCellRendererComponent(this, getValueAt(row, col), isRowSelected(row), row, col); nameRendererComponent(tableCellRendererComponent, row, col); return tableCellRendererComponent; }
/** * Prepares the specified editor using the value at the specified cell. * * @param editor the TableCellEditor to set up * @param row the row of the cell to edit, where 0 is the first * @param col the column of the cell to edit, where 0 is the first */ protected SComponent prepareEditor(STableCellEditor editor, int row, int col) { SComponent component = editor.getTableCellEditorComponent(this, getValueAt(row, col), isRowSelected(row), // true? row, col); nameEditorComponent(component, row, col); cellEditorComponent = (component instanceof LowLevelEventListener) ? (LowLevelEventListener)component : null; return component; }
@MacroTag public static void cell(MacroContext context, int row, int col) throws IOException { Device device = context.getDevice(); SComponent component = context.getComponent(); // RenderHelper.getInstance(component).forbidCaching(); STable table = (STable) component; STableCellRenderer renderer = table.getCellRenderer(row, col); if (renderer != null) { SComponent cellComponent = table.prepareRenderer(renderer, row, col); SCellRendererPane rendererPane = table.getCellRendererPane(); rendererPane.writeComponent(device, cellComponent, table); } else { device.print(table.getValueAt(row, col)); } // RenderHelper.getInstance(component).allowCaching(); }