use of org.knime.core.node.util.DataTypeListCellRenderer in project knime-core by knime.
the class AddOutFieldDialog method initKnimeTypeComboBox.
/**
* Initialize the selection list for the knime type.
*/
private void initKnimeTypeComboBox() {
m_knimeType.removeAllItems();
if (m_fieldType.getSelectedItem().equals(FieldType.Column)) {
TypeProvider typeProvider = TypeProvider.getDefault();
for (DataType type : typeProvider.getColumnTypes()) {
m_knimeType.addItem(type);
}
m_knimeType.setRenderer(new DataTypeListCellRenderer());
} else {
TypeProvider typeProvider = TypeProvider.getDefault();
for (FlowVariable.Type type : typeProvider.getFlowVarTypes().keySet()) {
m_knimeType.addItem(type);
}
m_knimeType.setRenderer(new TypeListCellRender());
}
// string is the default value
m_knimeType.setSelectedItem(StringCell.TYPE);
}
use of org.knime.core.node.util.DataTypeListCellRenderer in project knime-core by knime.
the class AddOutFieldDialog method initKnimeTypeComboBox.
/**
* Initialize the selection list for the knime type.
*/
private void initKnimeTypeComboBox() {
m_knimeType.removeAllItems();
if (m_fieldType.getSelectedItem().equals(FieldType.Column)) {
for (final DataType type : ConverterUtil.getAllDestinationDataTypes()) {
m_knimeType.addItem(type);
}
m_knimeType.setRenderer(new DataTypeListCellRenderer());
} else {
TypeProvider typeProvider = TypeProvider.getDefault();
for (FlowVariable.Type type : typeProvider.getTypes()) {
m_knimeType.addItem(type);
}
m_knimeType.setRenderer(new TypeListCellRender());
}
// string is the default value
m_knimeType.setSelectedItem(StringCell.TYPE);
}
Aggregations