Search in sources :

Example 1 with OutFieldsTable

use of org.knime.base.node.jsnippet.ui.OutFieldsTable in project knime-core by knime.

the class JavaEditVarNodeDialog method createOutFieldsTable.

/**
 * {@inheritDoc}
 */
@Override
protected OutFieldsTable createOutFieldsTable() {
    OutFieldsTable table = new OutFieldsTable(true);
    FieldsTableModel model = (FieldsTableModel) table.getTable().getModel();
    model.setColumnName(model.getIndex(Column.COLUMN), "Flow Variable");
    table.getTable().getColumnModel().getColumn(model.getIndex(Column.REPLACE_EXISTING)).setPreferredWidth(15);
    return table;
}
Also used : OutFieldsTable(org.knime.base.node.jsnippet.ui.OutFieldsTable) FieldsTableModel(org.knime.base.node.jsnippet.ui.FieldsTableModel)

Example 2 with OutFieldsTable

use of org.knime.base.node.jsnippet.ui.OutFieldsTable in project knime-core by knime.

the class JavaSnippetNodeDialog method createOutFieldsTable.

/**
 * Create table do display the output fields.
 *
 * @return the table
 */
protected OutFieldsTable createOutFieldsTable() {
    final OutFieldsTable table = new OutFieldsTable(false);
    final FieldsTableModel model = (FieldsTableModel) table.getTable().getModel();
    final TableColumnModel columnModel = table.getTable().getColumnModel();
    columnModel.getColumn(model.getIndex(Column.FIELD_TYPE)).setPreferredWidth(30);
    columnModel.getColumn(model.getIndex(Column.REPLACE_EXISTING)).setPreferredWidth(15);
    columnModel.getColumn(model.getIndex(Column.IS_COLLECTION)).setPreferredWidth(15);
    return table;
}
Also used : OutFieldsTable(org.knime.base.node.jsnippet.ui.OutFieldsTable) TableColumnModel(javax.swing.table.TableColumnModel) FieldsTableModel(org.knime.base.node.jsnippet.ui.FieldsTableModel) OutFieldsTableModel(org.knime.base.node.jsnippet.ui.OutFieldsTableModel)

Aggregations

FieldsTableModel (org.knime.base.node.jsnippet.ui.FieldsTableModel)2 OutFieldsTable (org.knime.base.node.jsnippet.ui.OutFieldsTable)2 TableColumnModel (javax.swing.table.TableColumnModel)1 OutFieldsTableModel (org.knime.base.node.jsnippet.ui.OutFieldsTableModel)1