- All Superinterfaces:
AttributeReadAttached,AttributeReadEnabled,AttributeReadId,AttributeReadValid,AttributeReadVisible,AttributeWriteEnabled,AttributeWriteId,AttributeWriteReadOnly,AttributeWriteTooltip,AttributeWriteVisible,io.github.mmm.event.EventSource<UiEvent,,UiEventListener> UiComposite<UiTab>,UiMutableComposite<UiTab>,UiNativeWidget,UiRegularWidget,UiRemovableComposite<UiTab>,UiSwitchComposite<UiTab>,UiWidget
UiSwitchComposite representing a tab panel. It contains a number of children
but only shows one of them at a time. It shows a tab bar (typically at the top as a header) with the
labels of its children. The user can click on one of these tabs in
order to see the actual content of the according tab. This design might look a little complicated but gives a lot more flexibility for setting and changing attributes of the
tab. For convenience usage there is also addTab(String, UiRegularWidget).IMPORTANT: In case you
make the UiTab closable, it will remove itself as child from this UiTabPanel when the end-user
closes it.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault UiTabaddTab(String text, UiRegularWidget child) Adds the givenUiRegularWidgetas new tab (and the end of all existing tabs).
IMPORTANT: In case youmaketheUiTabclosable, it will remove itself aschildfrom thisUiTabPanelwhen the end-user closes it.addTab(String text, UiRegularWidget child, int index) Adds the givenUiRegularWidgetas new tab at the givenindex.default UiTabaddTab(String text, Supplier<UiRegularWidget> childSupplier) Adds a new tab (and the end of all existing tabs) with the content provided lazily from the givenSupplier(when the tab is selected for the first time).addTab(String text, Supplier<UiRegularWidget> childSupplier, int index) Adds a new tab at the givenindexwith the content provided lazily from the givenSupplier(when the tab is selected for the first time).static UiTabPanelof()static UiTabPanelMethods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadAttached
isAttachedMethods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadId
getIdMethods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteId
setIdMethods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteTooltip
getTooltip, setTooltipMethods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListenerMethods inherited from interface io.github.mmm.ui.api.widget.composite.UiComposite
getChild, getChild, getChildById, getChildCount, getChildIndex, getChildSibling, getChildSibling, getDescendant, getModificationTimestamp, getPropagation, isModified, isValid, reset, setFocusedMethods inherited from interface io.github.mmm.ui.api.widget.composite.UiMutableComposite
addChild, addChildMethods inherited from interface io.github.mmm.ui.api.widget.composite.UiRemovableComposite
removeChild, removeChildMethods inherited from interface io.github.mmm.ui.api.widget.composite.UiSwitchComposite
getActiveChild, getActiveChildIndex, setActiveChild, setActiveChildId, setActiveChildIndexMethods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isReadOnly, isVisible, isVisible, setEnabled, setEnabled, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
Method Details
-
addTab
Adds the givenUiRegularWidgetas new tab (and the end of all existing tabs).
IMPORTANT: In case youmaketheUiTabclosable, it will remove itself aschildfrom thisUiTabPanelwhen the end-user closes it.- Parameters:
text- the label that will be displayed to identify the tab.child- thetab content.- Returns:
- the
UiTabfor this tab.
-
addTab
Adds a new tab (and the end of all existing tabs) with the content provided lazily from the givenSupplier(when the tab is selected for the first time).- Parameters:
text- the label that will be displayed to identify the tab.childSupplier- theSupplierprovidingthetab content. Allows lazy creation of the child when the tab is selected for the first time.- Returns:
- the
UiTabfor this tab.
-
addTab
Adds the givenUiRegularWidgetas new tab at the givenindex.- Parameters:
text- the label that will be displayed to identify the tab.child- thetab content.index- is theindexwhere to insert the newUiTab.- Returns:
- the
UiTabfor this tab.
-
addTab
Adds a new tab at the givenindexwith the content provided lazily from the givenSupplier(when the tab is selected for the first time).- Parameters:
text- the label that will be displayed to identify the tab.childSupplier- theSupplierprovidingthetab content. Allows lazy creation of the child when the tab is selected for the first time.index- is theindexwhere to insert the newUiTab.- Returns:
- the
UiTabfor this tab. It allows to change the title, set tooltip or image (icon), etc.
-
of
- Returns:
- the new
UiTabPanel.
-
of
- Parameters:
children- theUiRegularWidgets to add as children.- Returns:
- the new
UiTabPanel.
-