use of org.knime.core.node.tableview.TableContentModel in project knime-core by knime.
the class DataTableSpecView method dispose.
/**
* {@inheritDoc}
* @since 3.6
*/
@Override
public void dispose() {
TableContentModel contentModel = m_specView.getContentModel();
DataTable dataTable = contentModel.getDataTable();
contentModel.setDataTable(null);
if (dataTable instanceof ContainerTable) {
((ContainerTable) dataTable).clear();
}
}
use of org.knime.core.node.tableview.TableContentModel in project knime-core by knime.
the class PMCCNodeView method modelChanged.
/**
* {@inheritDoc}
*/
@Override
protected void modelChanged() {
DataTable table = getNodeModel().getCorrelationTable();
TableContentModel cntModel = m_tableView.getContentModel();
cntModel.setDataTable(table);
changeRenderer(m_currentRendererID);
// must not call this on cntView as that would not affect the
// row header column
m_tableView.setRowHeight(16);
}
use of org.knime.core.node.tableview.TableContentModel in project knime-core by knime.
the class TableNodeView method updateTitle.
/**
* Updates the title of the frame. It prints: "Table (#rows[+] x #cols)". It
* is invoked each time new rows are inserted (user scrolls down).
*/
protected void updateTitle() {
final TableContentView view = m_tableView.getContentTable();
TableContentModel model = view.getContentModel();
StringBuffer title = new StringBuffer();
if (model.hasData()) {
String tableName = model.getTableName();
if (!tableName.equals("default")) {
title.append(" \"");
title.append(tableName);
title.append("\"");
}
title.append(" (");
int rowCount = model.getRowCount();
boolean isFinal = model.isRowCountFinal();
title.append(rowCount);
title.append(isFinal ? " x " : "+ x ");
title.append(model.getColumnCount());
title.append(")");
} else {
title.append(" <no data>");
}
super.setViewTitleSuffix(title.toString());
}
use of org.knime.core.node.tableview.TableContentModel in project knime-core by knime.
the class DataColumnPropertiesView method dispose.
/**
* {@inheritDoc}
* @since 3.6
*/
@Override
public void dispose() {
TableContentModel contentModel = m_propsView.getContentModel();
DataTable dataTable = contentModel.getDataTable();
contentModel.setDataTable(null);
if (dataTable instanceof ContainerTable) {
((ContainerTable) dataTable).clear();
}
}
use of org.knime.core.node.tableview.TableContentModel in project knime-core by knime.
the class AbstractCorrelationComputeNodeView method tableChanged.
/**
* Call whenever the {@link DataTable} changed e.g. in the modelChanged() method.
* @param table new {@link DataTable}
*/
protected void tableChanged(final DataTable table) {
TableContentModel cntModel = getTableViewContentModel();
cntModel.setDataTable(table);
changeRenderer(getCurrentRendererID());
// must not call this on cntView as that would not affect the
// row header column
setTableViewRowHeight(16);
}
Aggregations