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);
}
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;
}
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);
}
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;
}
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;
}
Aggregations