Search in sources :

Example 76 with GridLayout

use of java.awt.GridLayout in project knime-core by knime.

the class DataValidatorColPanel method createWarningLabel.

/**
 * @param warningMessages
 * @return
 */
private static Component createWarningLabel(final List<String> warningMessages) {
    JPanel thin = new JPanel(new GridLayout(warningMessages.size(), 1));
    for (int i = 0; i < warningMessages.size(); i++) {
        String message = warningMessages.get(i);
        thin.add(new JLabel(message));
    }
    return thin;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) JLabel(javax.swing.JLabel)

Example 77 with GridLayout

use of java.awt.GridLayout 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)

Example 78 with GridLayout

use of java.awt.GridLayout in project knime-core by knime.

the class DomainNodeDialogPane method createMinMaxTab.

private JPanel createMinMaxTab() {
    JPanel minMaxPanel = new JPanel(new BorderLayout());
    minMaxPanel.add(m_filterPanelMinMax, BorderLayout.CENTER);
    JPanel retainMinMaxPanel = new JPanel(new GridLayout(0, 1));
    retainMinMaxPanel.setBorder(BorderFactory.createTitledBorder(UNSELECTED_LABEL));
    ButtonGroup group = new ButtonGroup();
    group.add(m_minMaxUnselectedRetainButton);
    group.add(m_minMaxUnselectedDropButton);
    m_minMaxUnselectedRetainButton.doClick();
    retainMinMaxPanel.add(m_minMaxUnselectedRetainButton);
    retainMinMaxPanel.add(m_minMaxUnselectedDropButton);
    JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    southPanel.add(retainMinMaxPanel);
    minMaxPanel.add(southPanel, BorderLayout.SOUTH);
    return minMaxPanel;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) ButtonGroup(javax.swing.ButtonGroup)

Example 79 with GridLayout

use of java.awt.GridLayout in project knime-core by knime.

the class DomainNodeDialogPane method createPossValueTab.

private JPanel createPossValueTab() {
    JPanel possValPanel = new JPanel(new BorderLayout());
    possValPanel.add(m_filterPanelPossValues, BorderLayout.CENTER);
    JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    JPanel retainPossValPanel = new JPanel(new GridLayout(0, 1));
    retainPossValPanel.setBorder(BorderFactory.createTitledBorder(UNSELECTED_LABEL));
    ButtonGroup group = new ButtonGroup();
    group.add(m_possValUnselectedRetainButton);
    group.add(m_possValUnselectedDropButton);
    m_possValUnselectedRetainButton.doClick();
    retainPossValPanel.add(m_possValUnselectedRetainButton);
    retainPossValPanel.add(m_possValUnselectedDropButton);
    southPanel.add(retainPossValPanel);
    southPanel.add(new JLabel("   "));
    southPanel.add(m_maxValuesChecker);
    southPanel.add(m_maxValuesSpinner);
    possValPanel.add(southPanel, BorderLayout.SOUTH);
    return possValPanel;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) ButtonGroup(javax.swing.ButtonGroup) JLabel(javax.swing.JLabel)

Example 80 with GridLayout

use of java.awt.GridLayout in project knime-core by knime.

the class Joiner2NodeDialog method createDuplicateColumnHandlingUIConstrols.

/**
 * @return the duplicate column handling panel
 * @since 2.12
 * @noreference This method is not intended to be referenced by clients.
 */
protected JPanel createDuplicateColumnHandlingUIConstrols() {
    JPanel left = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTHWEST;
    c.insets = new Insets(2, 2, 2, 2);
    c.gridx = 0;
    c.gridy = 0;
    c.weightx = 0;
    c.gridwidth = 1;
    left.add(m_filterDuplicates, c);
    c.gridy++;
    left.add(m_dontExecute, c);
    c.gridy++;
    left.add(m_appendSuffixAutomatic, c);
    c.gridy++;
    left.add(m_appendSuffix, c);
    c.gridx++;
    m_suffix.setPreferredSize(new Dimension(100, m_suffix.getPreferredSize().height));
    left.add(m_suffix, c);
    m_appendSuffix.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(final ChangeEvent e) {
            m_suffix.setEnabled(m_appendSuffix.isSelected());
        }
    });
    ButtonGroup duplicateColGroup = new ButtonGroup();
    duplicateColGroup.add(m_filterDuplicates);
    duplicateColGroup.add(m_dontExecute);
    duplicateColGroup.add(m_appendSuffixAutomatic);
    duplicateColGroup.add(m_appendSuffix);
    left.setBorder(BorderFactory.createTitledBorder("Duplicate Column Handling"));
    JPanel right = new JPanel(new GridBagLayout());
    c.gridx = 0;
    c.gridy = 0;
    right.add(m_removeLeftJoinCols, c);
    c.gridy++;
    right.add(m_removeRightJoinCols, c);
    right.setBorder(BorderFactory.createTitledBorder("Joining Columns Handling"));
    JPanel p = new JPanel(new GridLayout(1, 2));
    p.add(left);
    p.add(right);
    return p;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridLayout(java.awt.GridLayout) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ChangeEvent(javax.swing.event.ChangeEvent) ButtonGroup(javax.swing.ButtonGroup) ChangeListener(javax.swing.event.ChangeListener) Dimension(java.awt.Dimension)

Aggregations

GridLayout (java.awt.GridLayout)189 JPanel (javax.swing.JPanel)149 JLabel (javax.swing.JLabel)79 BorderLayout (java.awt.BorderLayout)67 Dimension (java.awt.Dimension)51 JButton (javax.swing.JButton)41 ActionEvent (java.awt.event.ActionEvent)36 JScrollPane (javax.swing.JScrollPane)34 ActionListener (java.awt.event.ActionListener)32 Insets (java.awt.Insets)28 JCheckBox (javax.swing.JCheckBox)28 JTextField (javax.swing.JTextField)28 GridBagConstraints (java.awt.GridBagConstraints)24 GridBagLayout (java.awt.GridBagLayout)23 ButtonGroup (javax.swing.ButtonGroup)22 FlowLayout (java.awt.FlowLayout)21 BoxLayout (javax.swing.BoxLayout)21 TitledBorder (javax.swing.border.TitledBorder)19 PlotCanvas (smile.plot.PlotCanvas)16 EmptyBorder (javax.swing.border.EmptyBorder)15