Search in sources :

Example 81 with Box

use of javax.swing.Box in project knime-core by knime.

the class UniquifyPanel method getTextBox.

private Container getTextBox() {
    Box result = Box.createVerticalBox();
    result.add(Box.createVerticalGlue());
    result.add(new JLabel("If you check this, the reader checks each row ID"));
    result.add(new JLabel("that it reads from the file and appends a suffix"));
    result.add(new JLabel("if it has read the ID before. Huge files will cause"));
    result.add(new JLabel("it to fail with an out of memory error."));
    result.add(Box.createVerticalStrut(7));
    result.add(new JLabel("If this is not checked and the file reader reads"));
    result.add(new JLabel("rows with identical row IDs, it will refuse to read the"));
    result.add(new JLabel("data and fail during execution."));
    result.add(Box.createVerticalStrut(10));
    result.add(new JLabel("This option is ignored if the file doesn't contain"));
    result.add(new JLabel("row IDs."));
    result.add(Box.createVerticalGlue());
    return result;
}
Also used : JLabel(javax.swing.JLabel) JCheckBox(javax.swing.JCheckBox) Box(javax.swing.Box)

Example 82 with Box

use of javax.swing.Box in project knime-core by knime.

the class UniquifyPanel method getPanel.

private Container getPanel() {
    m_uniquifyRowIDs = new JCheckBox("generate unique row IDs");
    Box result = Box.createHorizontalBox();
    result.add(Box.createHorizontalGlue());
    result.add(m_uniquifyRowIDs);
    result.add(Box.createHorizontalStrut(5));
    result.add(Box.createHorizontalGlue());
    return result;
}
Also used : JCheckBox(javax.swing.JCheckBox) JCheckBox(javax.swing.JCheckBox) Box(javax.swing.Box)

Example 83 with Box

use of javax.swing.Box in project knime-core by knime.

the class DBTableCreatorNodeDialog method createTableSettingsPanel.

/**
 * @return a newly created table settings panel
 */
private JPanel createTableSettingsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JPanel tablePanel = new JPanel();
    tablePanel.setLayout(new BoxLayout(tablePanel, BoxLayout.Y_AXIS));
    tablePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Table Settings"));
    final Box box = new Box(BoxLayout.Y_AXIS);
    final DialogComponentString schemaComp = new DialogComponentString(m_config.getSchemaSettingsModel(), "Schema: ");
    box.add(schemaComp.getComponentPanel());
    box.add(Box.createVerticalGlue());
    final DialogComponentString tableNameComp = new DialogComponentString(m_config.getTableNameSettingsModel(), "Table name: ");
    box.add(tableNameComp.getComponentPanel());
    box.add(Box.createVerticalGlue());
    final DialogComponentBoolean tempTableComp = new DialogComponentBoolean(m_config.getTempTableSettingsModel(), "Create temporary table");
    box.add(tempTableComp.getComponentPanel());
    box.add(Box.createVerticalGlue());
    final DialogComponentBoolean ifNotExistsComp = new DialogComponentBoolean(m_config.getIfNotExistsSettingsModel(), "Create table if it does not exist");
    box.add(ifNotExistsComp.getComponentPanel());
    box.add(Box.createVerticalGlue());
    tablePanel.add(box);
    final JPanel dynamicPanel = new JPanel(new BorderLayout());
    dynamicPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Dynamic Settings"));
    final DialogComponentBoolean useDynamicSettingsComp = new DialogComponentBoolean(m_config.getUseDynamicSettingsModel(), "Use dynamic settings");
    dynamicPanel.add(useDynamicSettingsComp.getComponentPanel());
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(dynamicPanel, BorderLayout.SOUTH);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) DialogComponentString(org.knime.core.node.defaultnodesettings.DialogComponentString) BoxLayout(javax.swing.BoxLayout) DialogComponentBoolean(org.knime.core.node.defaultnodesettings.DialogComponentBoolean) Box(javax.swing.Box)

Example 84 with Box

use of javax.swing.Box in project knime-core by knime.

the class CommentPanel method createWhatPanel.

private JPanel createWhatPanel() {
    m_addDate.setText("the current creation time");
    m_addDate.addChangeListener(new ChangeListener() {

        public void stateChanged(final ChangeEvent e) {
            selectionChanged();
        }
    });
    m_addUser.setText("the user account name");
    m_addUser.addChangeListener(new ChangeListener() {

        public void stateChanged(final ChangeEvent e) {
            selectionChanged();
        }
    });
    m_addTableName.setText("the input table name");
    m_addTableName.addChangeListener(new ChangeListener() {

        public void stateChanged(final ChangeEvent e) {
            selectionChanged();
        }
    });
    m_addCustom.setText("this text:");
    m_addCustom.addChangeListener(new ChangeListener() {

        public void stateChanged(final ChangeEvent e) {
            selectionChanged();
        }
    });
    m_commentLine.setToolTipText("Use \\n or \\t for a new line or the " + "tab character");
    m_commentLine.setPreferredSize(new Dimension(150, 25));
    m_commentLine.setMaximumSize(new Dimension(150, 25));
    final int leftInset = 50;
    Box textBox = Box.createHorizontalBox();
    textBox.add(new JLabel("Create a comment header with the following content:"));
    // make it left aligned.
    textBox.add(Box.createHorizontalGlue());
    Box userBox = Box.createHorizontalBox();
    userBox.add(Box.createHorizontalStrut(leftInset));
    userBox.add(m_addUser);
    userBox.add(Box.createHorizontalGlue());
    userBox.setMaximumSize(new Dimension(Integer.MAX_VALUE, m_addUser.getMaximumSize().height));
    Box dateBox = Box.createHorizontalBox();
    dateBox.add(Box.createHorizontalStrut(leftInset));
    dateBox.add(m_addDate);
    dateBox.add(Box.createHorizontalGlue());
    dateBox.setMaximumSize(new Dimension(Integer.MAX_VALUE, m_addDate.getMaximumSize().height));
    Box nameBox = Box.createHorizontalBox();
    nameBox.add(Box.createHorizontalStrut(leftInset));
    nameBox.add(m_addTableName);
    nameBox.add(Box.createHorizontalGlue());
    nameBox.setMaximumSize(new Dimension(Integer.MAX_VALUE, m_addTableName.getMaximumSize().height));
    Box customBox = Box.createHorizontalBox();
    customBox.add(Box.createHorizontalStrut(leftInset));
    customBox.add(m_addCustom);
    customBox.add(Box.createHorizontalStrut(3));
    customBox.add(m_commentLine);
    customBox.add(Box.createHorizontalGlue());
    customBox.setMaximumSize(new Dimension(Integer.MAX_VALUE, m_commentLine.getMaximumSize().height));
    JPanel whatPanel = new JPanel();
    whatPanel.setLayout(new BoxLayout(whatPanel, BoxLayout.Y_AXIS));
    whatPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Comment Header Content"));
    whatPanel.add(textBox);
    whatPanel.add(Box.createVerticalStrut(10));
    whatPanel.add(dateBox);
    whatPanel.add(Box.createVerticalStrut(10));
    whatPanel.add(userBox);
    whatPanel.add(Box.createVerticalStrut(10));
    whatPanel.add(nameBox);
    whatPanel.add(Box.createVerticalStrut(10));
    whatPanel.add(customBox);
    whatPanel.add(Box.createVerticalStrut(10));
    return whatPanel;
}
Also used : JPanel(javax.swing.JPanel) ChangeEvent(javax.swing.event.ChangeEvent) BoxLayout(javax.swing.BoxLayout) JLabel(javax.swing.JLabel) ChangeListener(javax.swing.event.ChangeListener) JCheckBox(javax.swing.JCheckBox) Box(javax.swing.Box) Dimension(java.awt.Dimension)

Example 85 with Box

use of javax.swing.Box in project knime-core by knime.

the class QuotePanel method createQuotePanel.

private JPanel createQuotePanel() {
    Box textBox = Box.createHorizontalBox();
    textBox.add(new JLabel("Specify the quote patterns that will be " + "put around quoted data:"));
    // make it left aligned.
    textBox.add(Box.createHorizontalGlue());
    Box patternBox = Box.createHorizontalBox();
    patternBox.add(Box.createHorizontalStrut(50));
    patternBox.add(new JLabel("left quote:"));
    patternBox.add(Box.createHorizontalStrut(4));
    m_leftQuote = new JTextField("", 6);
    m_leftQuote.setPreferredSize(TEXTFIELDDIM);
    m_leftQuote.setMaximumSize(TEXTFIELDDIM);
    patternBox.add(m_leftQuote);
    patternBox.add(Box.createHorizontalStrut(25));
    patternBox.add(new JLabel("right quote:"));
    patternBox.add(Box.createHorizontalStrut(4));
    m_rightQuote = new JTextField("", 6);
    m_rightQuote.setPreferredSize(TEXTFIELDDIM);
    m_rightQuote.setMaximumSize(TEXTFIELDDIM);
    patternBox.add(m_rightQuote);
    patternBox.add(Box.createHorizontalGlue());
    patternBox.setMaximumSize(new Dimension(Integer.MAX_VALUE, TEXTFIELDDIM.height));
    JPanel quotePanel = new JPanel();
    quotePanel.setLayout(new BoxLayout(quotePanel, BoxLayout.Y_AXIS));
    quotePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Quote Pattern"));
    quotePanel.add(textBox);
    quotePanel.add(Box.createVerticalStrut(10));
    quotePanel.add(patternBox);
    quotePanel.add(Box.createVerticalStrut(10));
    return quotePanel;
}
Also used : JPanel(javax.swing.JPanel) BoxLayout(javax.swing.BoxLayout) JLabel(javax.swing.JLabel) Box(javax.swing.Box) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField)

Aggregations

Box (javax.swing.Box)192 JCheckBox (javax.swing.JCheckBox)95 JLabel (javax.swing.JLabel)93 JPanel (javax.swing.JPanel)87 Dimension (java.awt.Dimension)65 BorderLayout (java.awt.BorderLayout)51 JButton (javax.swing.JButton)48 JComboBox (javax.swing.JComboBox)46 JScrollPane (javax.swing.JScrollPane)42 BoxLayout (javax.swing.BoxLayout)38 ActionEvent (java.awt.event.ActionEvent)31 ActionListener (java.awt.event.ActionListener)28 JTextField (javax.swing.JTextField)25 EmptyBorder (javax.swing.border.EmptyBorder)19 Insets (java.awt.Insets)17 SearchFilterPanel (pcgen.gui2.filter.SearchFilterPanel)14 FlippingSplitPane (pcgen.gui2.tools.FlippingSplitPane)14 TitledBorder (javax.swing.border.TitledBorder)13 FilterBar (pcgen.gui2.filter.FilterBar)13 GridBagConstraints (java.awt.GridBagConstraints)12