Module is.codion.swing.common.ui
Interface TabbedPaneBuilder
- All Superinterfaces:
ComponentBuilder<JTabbedPane,
,TabbedPaneBuilder> Supplier<JTabbedPane>
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)
.tab()
.title("First Tab")
.component(new JLabel("First"))
.mnemonic(KeyEvent.VK_1)
.toolTipText("This is the first tab")
.icon(firstTabIcon)
.add()
.tab()
.title("Second Tab")
.component(new JLabel("Second"))
.mnemonic(KeyEvent.VK_2)
.toolTipText("This is the second tab")
.icon(secondTabIcon)
.add()
.build();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TabbedPaneBuilder
builder()
changeListener
(ChangeListener changeListener) Returns a newTabbedPaneBuilder.TabBuilder
for adding a tabtab
(String title, Supplier<? extends JComponent> component) Adds a tab to this tabbed pane builder.tab
(String title, JComponent component) Adds a tab to this tabbed pane builder.tabLayoutPolicy
(int tabLayoutPolicy) tabPlacement
(int tabPlacement) Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, foreground, get, keyEvent, keyListener, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, 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 usetab(String)
.- Parameters:
title
- the tab titlecomponent
- the component to display in the tab- Returns:
- this builder instance
- See Also:
-
tab
Adds a tab to this tabbed pane builder. For further tab configuration usetab(String)
.- Parameters:
title
- the tab titlecomponent
- the component to display in the tab- Returns:
- this builder instance
- See Also:
-
tab
Returns a newTabbedPaneBuilder.TabBuilder
for adding a tab- Parameters:
title
- the tab title- Returns:
- a new
TabbedPaneBuilder.TabBuilder
instance
-
builder
- Returns:
- a new
TabbedPaneBuilder
instance
-