Module is.codion.swing.common.ui
Interface TabbedPaneBuilder
- All Superinterfaces:
ComponentBuilder<Void,JTabbedPane, TabbedPaneBuilder>
A builder for a JTabbedPane.
Components.tabbedPane()
.tab("First Tab", new JLabel("First"))
.tab("Second Tab", new JLabel("Second"))
.build();
Components.tabbedPane()
.tabPlacement(SwingConstants.TOP)
.tabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT)
.tabBuilder("First Tab", new JLabel("First"))
.mnemonic(KeyEvent.VK_1)
.toolTipText("This is the first tab")
.icon(firstTabIcon)
.add()
.tabBuilder("Second Tab", new JLabel("Second"))
.mnemonic(KeyEvent.VK_2)
.toolTipText("This is the second tab")
.icon(secondTabIcon)
.add()
.build();
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
TRANSFER_FOCUS_ON_ENTER -
Method Summary
Modifier and TypeMethodDescriptionstatic TabbedPaneBuilderbuilder()changeListener(ChangeListener changeListener) tab(String title, JComponent component) Adds a tab to this tabbed pane builder.tabBuilder(String title, JComponent component) Returns a newTabbedPaneBuilder.TabBuilderfor adding a tabtabBuilder(JComponent component) Returns a newTabbedPaneBuilder.TabBuilderfor adding a tabtabLayoutPolicy(int tabLayoutPolicy) tabPlacement(int tabPlacement) Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, buildValue, clear, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, link, link, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, visible
-
Method Details
-
tabPlacement
- Parameters:
tabPlacement- the tab placement- Returns:
- this builder instance
- See Also:
-
tabLayoutPolicy
- Parameters:
tabLayoutPolicy- the tab layout policy- Returns:
- this builder instance
- See Also:
-
changeListener
- Parameters:
changeListener- the change listener- Returns:
- this builder instance
- See Also:
-
tab
Adds a tab to this tabbed pane builder. For further tab configuration usetabBuilder(JComponent).- Parameters:
title- the tab titlecomponent- the component to display in the tab- Returns:
- this builder instance
- See Also:
-
tabBuilder
Returns a newTabbedPaneBuilder.TabBuilderfor adding a tab- Parameters:
component- the component to display in the tab- Returns:
- a new
TabbedPaneBuilder.TabBuilderinstance - See Also:
-
tabBuilder
Returns a newTabbedPaneBuilder.TabBuilderfor adding a tab- Parameters:
title- the tab titlecomponent- the component to display in the tab- Returns:
- a new
TabbedPaneBuilder.TabBuilderinstance - See Also:
-
builder
- Returns:
- a new
TabbedPaneBuilderinstance
-