Search in sources :

Example 1 with DataTableSpecView

use of org.knime.core.node.workflow.DataTableSpecView in project knime-core by knime.

the class DatabasePortObjectSpec method getViews.

/**
 * {@inheritDoc}
 */
@Override
public JComponent[] getViews() {
    JComponent[] views = super.getViews();
    views = Arrays.copyOf(views, views.length + 1);
    views[views.length - 1] = new DataTableSpecView(m_spec);
    return views;
}
Also used : DataTableSpecView(org.knime.core.node.workflow.DataTableSpecView) JComponent(javax.swing.JComponent)

Example 2 with DataTableSpecView

use of org.knime.core.node.workflow.DataTableSpecView in project knime-core by knime.

the class DataValidatorNodeDialogPane method updateDataTableSpecComparison.

private void updateDataTableSpecComparison() {
    m_refTableSpecTab.removeAll();
    JPanel northern = new JPanel(new GridLayout(0, 1));
    DataTableSpecView refTableSpecView = new DataTableSpecView(m_referenceDataTableSpec);
    refTableSpecView.setPreferredSize(new Dimension(-1, 150));
    northern.add(new JScrollPane(refTableSpecView, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED));
    northern.setBorder(BorderFactory.createTitledBorder("Reference Table Spec"));
    if (!m_referenceDataTableSpec.equals(m_inputDataTableSpec)) {
        m_refTableSpecTab.add(northern);
        JPanel southern = new JPanel(new GridLayout(0, 1));
        southern.setBorder(BorderFactory.createTitledBorder("Input Table Spec"));
        DataTableSpecView inputTableSpec = new DataTableSpecView(m_inputDataTableSpec);
        inputTableSpec.setPreferredSize(new Dimension(-1, 150));
        southern.add(new JScrollPane(inputTableSpec, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED));
        m_refTableSpecTab.add(new JSplitPane(JSplitPane.VERTICAL_SPLIT, northern, southern));
    } else {
        m_refTableSpecTab.add(northern);
    }
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) DataTableSpecView(org.knime.core.node.workflow.DataTableSpecView) Dimension(java.awt.Dimension) JSplitPane(javax.swing.JSplitPane)

Aggregations

DataTableSpecView (org.knime.core.node.workflow.DataTableSpecView)2 Dimension (java.awt.Dimension)1 GridLayout (java.awt.GridLayout)1 JComponent (javax.swing.JComponent)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSplitPane (javax.swing.JSplitPane)1