Java Code Examples for javax.swing.JTabbedPane#insertTab()
The following examples show how to use
javax.swing.JTabbedPane#insertTab() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultPolarPlotEditor.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 2
Source File: DefaultPolarPlotEditor.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 3
Source File: DefaultPolarPlotEditor.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 4
Source File: DefaultPolarPlotEditor.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 5
Source File: ExploreNodeAction.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
public void actionPerformed(ActionEvent ae) { JTabbedPane tabs = cliGuiCtx.getTabs(); int newTabIndex = tabs.getSelectedIndex() + 1; ManagementModelNode newRoot = node.clone(); tabs.insertTab(calcTabName(this.node), null, new ManagementModel(newRoot, cliGuiCtx), newRoot.addressPath(), newTabIndex); tabs.setTabComponentAt(newTabIndex, new ButtonTabComponent(tabs)); tabs.setSelectedIndex(newTabIndex); }
Example 6
Source File: DatabaseOperationsPanel.java From importer-exporter with Apache License 2.0 | 5 votes |
private void init() { setLayout(new GridBagLayout()); workspace = new JXTextField(); workspace.setPromptForeground(Color.LIGHT_GRAY); workspace.setFocusBehavior(FocusBehavior.SHOW_PROMPT); datePicker = new DatePicker(); workspaceLabel = new JLabel(); timestampLabel = new JLabel(); add(workspaceLabel, GuiUtil.setConstraints(0,0,0.0,0.0,GridBagConstraints.BOTH,0,0,5,5)); add(workspace, GuiUtil.setConstraints(1,0,1.0,0.0,GridBagConstraints.HORIZONTAL,0,5,5,5)); add(timestampLabel, GuiUtil.setConstraints(2,0,0.0,0.0,GridBagConstraints.NONE,0,10,5,5)); add(datePicker, GuiUtil.setConstraints(3,0,0.0,0.0,GridBagConstraints.HORIZONTAL,0,5,5,0)); operationsTab = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT); add(operationsTab, GuiUtil.setConstraints(0,2,4,1,1.0,1.0,GridBagConstraints.BOTH,5,0,0,0)); operations = new DatabaseOperationView[]{ new ReportOperation(this), new BoundingBoxOperation(this, config), new IndexOperation(this, config), new SrsOperation(this, config), new ADEInfoOperation(this) }; for (int i = 0; i < operations.length; ++i) operationsTab.insertTab(null, operations[i].getIcon(), null, operations[i].getToolTip(), i); operationsTab.addChangeListener(e -> { int index = operationsTab.getSelectedIndex(); for (int i = 0; i < operationsTab.getTabCount(); i++) operationsTab.setComponentAt(i, index == i ? operations[index].getViewComponent() : null); }); PopupMenuDecorator.getInstance().decorate(workspace, datePicker.getEditor()); }
Example 7
Source File: DefaultPolarPlotEditor.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 8
Source File: DefaultPolarPlotEditor.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Creates a tabbed pane for editing the plot attributes. * * @param plot the plot. * * @return A tabbed pane. */ @Override protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = super.createPlotTabs(plot); // TODO find a better localization key tabs.insertTab(localizationResources.getString("General1"), null, createPlotPanel(), null, 0); tabs.setSelectedIndex(0); return tabs; }
Example 9
Source File: TestDataComponent.java From Cognizant-Intelligent-Test-Scripter with Apache License 2.0 | 4 votes |
private TestDataTablePanel addToLastTab(JTabbedPane testdataTab, AbstractDataModel std) { TestDataTablePanel tdPanel = new TestDataTablePanel(std); testdataTab.insertTab(std.getName(), null, tdPanel, null, testdataTab.getTabCount() - 1); testdataTab.setSelectedIndex(testdataTab.getTabCount() - 2); return tdPanel; }