use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionAndRowTableCellRenderer in project knime-core by knime.
the class DBPatternAggregationFunctionPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<DBPatternAggregationFunctionRow>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final DBPatternAggregationFunctionRow row) {
c.setText(row.getInputPattern());
}
}, true, "Double click to remove column. Right mouse click for context menu."));
columnModel.getColumn(0).setCellEditor(new DBPatternTableCellEditor());
columnModel.getColumn(1).setCellRenderer(new BooleanCellRenderer("Tick if the pattern is a regular expression"));
columnModel.getColumn(1).setMinWidth(REGEX_SIZE);
columnModel.getColumn(1).setMaxWidth(REGEX_SIZE);
m_aggregationFunctionCellEditor = new DBPatternAggregationFunctionRowTableCellEditor(null);
columnModel.getColumn(2).setCellEditor(m_aggregationFunctionCellEditor);
columnModel.getColumn(2).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(250);
columnModel.getColumn(1).setPreferredWidth(150);
}
use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionAndRowTableCellRenderer in project knime-core by knime.
the class DBDataTypeAggregationFunctionPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<DBDataTypeAggregationFunctionRow>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final DBDataTypeAggregationFunctionRow row) {
final DataType dataType = row.getDataType();
c.setText(dataType.toString());
c.setIcon(dataType.getIcon());
}
}, true, "Double click to remove column. Right mouse click for context menu."));
m_aggregationFunctionCellEditor = new DBDataTypeAggregationFunctionRowTableCellEditor(null);
columnModel.getColumn(1).setCellEditor(m_aggregationFunctionCellEditor);
columnModel.getColumn(1).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(170);
columnModel.getColumn(1).setPreferredWidth(150);
}
use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionAndRowTableCellRenderer in project knime-core by knime.
the class AggregationColumnPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<ColumnAggregator>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final ColumnAggregator row) {
final DataColumnSpec spec = row.getOriginalColSpec();
c.setText(spec.getName());
c.setIcon(spec.getType().getIcon());
}
}, true, "Double click to remove column. Right mouse click for context menu."));
columnModel.getColumn(1).setCellEditor(new ColumnAggregatorTableCellEditor());
columnModel.getColumn(1).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(170);
columnModel.getColumn(1).setPreferredWidth(150);
}
use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionAndRowTableCellRenderer in project knime-core by knime.
the class DataTypeAggregationPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<DataTypeAggregator>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final DataTypeAggregator row) {
final DataType dataType = row.getDataType();
c.setText(dataType.toString());
c.setIcon(dataType.getIcon());
}
}, true, "Double click to remove data type. Right mouse click for context menu."));
columnModel.getColumn(1).setCellEditor(new DataTypeAggregatorTableCellEditor());
columnModel.getColumn(1).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(170);
columnModel.getColumn(1).setPreferredWidth(150);
}
use of org.knime.base.data.aggregation.dialogutil.AggregationFunctionAndRowTableCellRenderer in project knime-core by knime.
the class PatternAggregationPanel method adaptTableColumnModel.
/**
* {@inheritDoc}
*/
@Override
protected void adaptTableColumnModel(final TableColumnModel columnModel) {
columnModel.getColumn(0).setCellRenderer(new AggregationFunctionRowTableCellRenderer<>(new ValueRenderer<PatternAggregator>() {
@Override
public void renderComponent(final DefaultTableCellRenderer c, final PatternAggregator row) {
final String regex = row.getInputPattern();
c.setText(regex);
}
}, true, "Double click to change search pattern. Right mouse click for context menu."));
columnModel.getColumn(0).setCellEditor(new PatternTableCellEditor());
columnModel.getColumn(1).setCellRenderer(new BooleanCellRenderer("Tick if the pattern is a regular expression"));
columnModel.getColumn(1).setMinWidth(REGEX_SIZE);
columnModel.getColumn(1).setMaxWidth(REGEX_SIZE);
columnModel.getColumn(2).setCellEditor(new PatternAggregatorTableCellEditor());
columnModel.getColumn(2).setCellRenderer(new AggregationFunctionAndRowTableCellRenderer());
columnModel.getColumn(0).setPreferredWidth(250);
columnModel.getColumn(1).setPreferredWidth(150);
}
Aggregations