use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionRowTableCellRenderer.ValueRenderer in project knime-core by knime.
the class DBColumnAggregationFunctionPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<DBColumnAggregationFunctionRow>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final DBColumnAggregationFunctionRow row) {
final DataColumnSpec spec = row.getColumnSpec();
c.setText(spec.getName());
c.setIcon(spec.getType().getIcon());
}
}, true, "Double click to remove column. Right mouse click for context menu."));
m_aggregationFunctionCellEditor = new DBColumnAggregationFunctionRowTableCellEditor(null);
columnModel.getColumn(1).setCellEditor(m_aggregationFunctionCellEditor);
columnModel.getColumn(1).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(170);
columnModel.getColumn(1).setPreferredWidth(150);
}
Aggregations