Search in sources :

Example 26 with JTabbedPane

use of javax.swing.JTabbedPane in project JMRI by JMRI.

the class VSDecoderPane method initComponents.

/**
     * initComponents()
     *
     * initialzies the GUI components.
     */
@Override
public void initComponents() {
    log.debug("initComponents()");
    //buildMenu();
    setLayout(new GridBagLayout());
    setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    // Add the tabbed pane to the VSDecoderPane.  The tabbedPane will contain all the other panes.
    tabbedPane = new JTabbedPane();
    GridBagConstraints gbc1 = new GridBagConstraints();
    gbc1.gridx = 0;
    gbc1.gridy = 0;
    gbc1.fill = GridBagConstraints.BOTH;
    gbc1.anchor = GridBagConstraints.CENTER;
    gbc1.weightx = 1.0;
    gbc1.weighty = 1.0;
    this.add(tabbedPane, gbc1);
    //-------------------------------------------------------------------
    // configPanel
    // The configPanel holds the stuff for addressing and configuration.
    configPanel = new VSDConfigPanel(decoder_id, this);
    tabbedPane.addTab("Config", configPanel);
    //-------------------------------------------------------------------
    // soundsPanel
    // The optionPanel holds controls for selecting sound options.
    optionPanel = new VSDOptionPanel(decoder_id, this);
    tabbedPane.addTab("Options", optionPanel);
    //-------------------------------------------------------------------
    // soundsPanel
    // The soundsPanel holds buttons for specific sounds.
    soundsPanel = new VSDSoundsPanel(decoder_id, this);
    tabbedPane.addTab("Sounds", soundsPanel);
    //-------------------------------------------------------------------
    // volumePanel
    // The volumePanel holds the master volume and mute controls.
    volumePanel = new JPanel();
    volumePanel.setLayout(new BorderLayout(10, 0));
    TitledBorder title = BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), "Volume");
    title.setTitlePosition(TitledBorder.DEFAULT_POSITION);
    volumePanel.setBorder(title);
    JSlider volume = new JSlider(0, 100);
    volume.setMinorTickSpacing(10);
    volume.setPaintTicks(true);
    volume.setValue(80);
    volume.setPreferredSize(new Dimension(200, 20));
    volume.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            volumeChange(e);
        }
    });
    volumePanel.add(volume, BorderLayout.LINE_START);
    JToggleButton mute_button = new JToggleButton("Mute");
    mute_button.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            muteButtonPressed(e);
        }
    });
    volumePanel.add(mute_button, BorderLayout.LINE_END);
    GridBagConstraints gbc2 = new GridBagConstraints();
    gbc2.gridx = 0;
    gbc2.gridy = 1;
    gbc2.fill = GridBagConstraints.BOTH;
    gbc2.anchor = GridBagConstraints.CENTER;
    gbc2.weightx = 1.0;
    gbc2.weighty = 0.1;
    this.add(volumePanel, gbc2);
    //-------------------------------------------------------------------
    // statusBar
    // The statusBar shows decoder status.
    statusBar = new jmri.util.swing.StatusBar();
    statusBar.setMessage("Status: No decoder assigned");
    GridBagConstraints gbc3 = new GridBagConstraints();
    gbc3.gridx = 0;
    gbc3.gridy = 2;
    gbc3.fill = GridBagConstraints.BOTH;
    gbc3.anchor = GridBagConstraints.PAGE_END;
    gbc3.weightx = 1.0;
    gbc3.weighty = 0.1;
    this.add(statusBar, gbc3);
    //-------------------------------------------------------------------
    // Pack and set visible
    parent.pack();
    parent.setVisible(true);
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) JTabbedPane(javax.swing.JTabbedPane) Dimension(java.awt.Dimension) TitledBorder(javax.swing.border.TitledBorder) BorderLayout(java.awt.BorderLayout) PropertyChangeEvent(java.beans.PropertyChangeEvent) ChangeEvent(javax.swing.event.ChangeEvent) JToggleButton(javax.swing.JToggleButton) ActionListener(java.awt.event.ActionListener) JSlider(javax.swing.JSlider) ChangeListener(javax.swing.event.ChangeListener) PropertyChangeListener(java.beans.PropertyChangeListener)

Example 27 with JTabbedPane

use of javax.swing.JTabbedPane in project processdash by dtuma.

the class AbstractCustomProcessEditor method buildTabPanel.

private Component buildTabPanel() {
    JTabbedPane tabPane = new JTabbedPane();
    tabPane.addTab("Size Metrics", buildSizeTable());
    tabPane.addTab("Process Phases", buildPhaseTable());
    return tabPane;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 28 with JTabbedPane

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

the class DefaultVisualizationNodeView method addVisualization.

/**
 * Adds another tab with title <code>title</code> containing a plotter.
 * @param plotter another visualization
 * @param title the title of the tab (if null a standard name is provided)
 */
public void addVisualization(final AbstractPlotter plotter, final String title) {
    m_plotterCounter++;
    String name = title;
    if (name == null) {
        name = "Visualization#" + m_plotterCounter;
    }
    // check if there is already a tab
    if (m_tabs == null) {
        m_tabs = new JTabbedPane();
        AbstractPlotter oldPlotter = m_plotters.get(1);
        m_tabs.addTab("Visualization#1", oldPlotter);
        m_tabs.addTab(name, plotter);
        setComponent(m_tabs);
    } else {
        m_tabs.addTab(name, plotter);
    }
    m_plotters.add(plotter);
}
Also used : JTabbedPane(javax.swing.JTabbedPane) AbstractPlotter(org.knime.base.node.viz.plotter.AbstractPlotter)

Example 29 with JTabbedPane

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

the class FileReaderAdvancedDialog method getJTabbedPane.

/**
 * This method initializes jTabbedPane.
 *
 * @return javax.swing.JTabbedPane
 */
private JTabbedPane getJTabbedPane() {
    if (m_jTabbedPane == null) {
        m_jTabbedPane = new JTabbedPane();
        m_jTabbedPane.addTab("Quote support", null, getQuotePanel(), "Adjust settings for quote characters here");
        m_jTabbedPane.addTab("Decimal Separator", null, getDecSepPanel(), "Set the decimal separator here");
        m_jTabbedPane.addTab("Ignore spaces", null, getIngoreWSatEORPanel(), "Ignore extra whitespaces at end of rows.");
        m_jTabbedPane.addTab("Short Lines", null, getShortLinesPanel(), "Add support for incomplete rows");
        m_jTabbedPane.addTab("unique RowIDs", null, getUniquifyPanel(), "Disable unique making of row IDs");
        m_jTabbedPane.addTab("Limit Rows", null, getLimitRowsPanel(), "Specify the max. number of rows read");
        m_jTabbedPane.addTab("Character decoding", null, getCharsetNamePanel(), "");
        m_jTabbedPane.addTab("Missing Value Pattern", null, getMissValPanel(), "Specify a missing value pattern for string columns");
    }
    return m_jTabbedPane;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 30 with JTabbedPane

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

the class CorrelationOperator method getSettingsPanel.

/**
 * {@inheritDoc}
 */
@Override
public JComponent getSettingsPanel() {
    if (m_rootPanel == null) {
        JComponent columnPanel = super.getSettingsPanel();
        m_rootPanel = new JTabbedPane();
        m_rootPanel.addTab("Column selection", columnPanel);
        m_rootPanel.addTab("Correlation method", getDialogComponent().getComponentPanel());
    }
    return m_rootPanel;
}
Also used : JTabbedPane(javax.swing.JTabbedPane) JComponent(javax.swing.JComponent)

Aggregations

JTabbedPane (javax.swing.JTabbedPane)250 JPanel (javax.swing.JPanel)129 BorderLayout (java.awt.BorderLayout)73 JScrollPane (javax.swing.JScrollPane)67 JButton (javax.swing.JButton)60 JLabel (javax.swing.JLabel)60 Dimension (java.awt.Dimension)53 ActionEvent (java.awt.event.ActionEvent)41 ActionListener (java.awt.event.ActionListener)37 GridLayout (java.awt.GridLayout)31 ChangeListener (javax.swing.event.ChangeListener)30 ChangeEvent (javax.swing.event.ChangeEvent)29 GridBagLayout (java.awt.GridBagLayout)26 JCheckBox (javax.swing.JCheckBox)26 JFrame (javax.swing.JFrame)26 JSplitPane (javax.swing.JSplitPane)26 Insets (java.awt.Insets)25 JComponent (javax.swing.JComponent)25 GridBagConstraints (java.awt.GridBagConstraints)24 ImageIcon (javax.swing.ImageIcon)23