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
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
COMPONENT_VALUE, TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionstatic TabbedPaneBuilder
builder()
changeListener
(ChangeListener changeListener) tab
(String title, JComponent component) Adds a tab to this tabbed pane builder.tabBuilder
(String title, JComponent component) Returns a newTabbedPaneBuilder.TabBuilder
for adding a tabtabBuilder
(JComponent component) Returns a newTabbedPaneBuilder.TabBuilder
for 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, buildValue, clientProperty, componentListener, componentOrientation, consumer, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, keyEvent, keyListener, label, link, link, listener, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onBuildValue, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, value, 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.TabBuilder
for adding a tab- Parameters:
component
- the component to display in the tab- Returns:
- a new
TabbedPaneBuilder.TabBuilder
instance - See Also:
-
tabBuilder
Returns a newTabbedPaneBuilder.TabBuilder
for adding a tab- Parameters:
title
- the tab titlecomponent
- the component to display in the tab- Returns:
- a new
TabbedPaneBuilder.TabBuilder
instance - See Also:
-
builder
- Returns:
- a new
TabbedPaneBuilder
instance
-