public class TabsPanel extends BaseDominoElement<elemental2.dom.HTMLDivElement,TabsPanel> implements org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>
Tab can be active at a time
The tabs in this component will be always aligned horizontally
TabsPanel.create()
.appendChild(
Tab.create("HOME")
.appendChild(b().textContent("Home Content"))
.appendChild(Paragraph.create("SAMPLE_TEXT")))
.appendChild(
Tab.create("PROFILE")
.appendChild(b().textContent("Profile Content"))
.appendChild(Paragraph.create("SAMPLE_TEXT")))
.appendChild(
Tab.create("MESSAGES")
.appendChild(b().textContent("Messages Content"))
.appendChild(Paragraph.create("SAMPLE_TEXT"))
.activate())
.appendChild(
Tab.create("SETTINGS")
.appendChild(b().textContent("Settings Content"))
.appendChild(Paragraph.create("SAMPLE_TEXT"))
);
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStyler| Constructor and Description |
|---|
TabsPanel() |
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, disable, elevate, elevate, enable, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic static TabsPanel create()
public TabsPanel insertAt(int index, Tab tab)
index - inttab - Tabpublic TabsPanel appendChild(Tab tab)
tab - Tab to be added to the TabsPanel, the tab will be added as the last Tabpublic void activateTab(int index)
index - int index of the Tab to be activated, this will show the tab contentpublic void deActivateTab(int index)
index - int index of the tab to be deactivated, this will hide the tab contentpublic void activateTab(Tab tab)
tab - Tab to be activated, this will show the tab contentpublic void activateTab(Tab tab, boolean silent)
tab - Tab to be activated, this will show the tab contentsilent - boolean, if true the tab will be activated without triggering the Tab.ActivationHandlerspublic void deActivateTab(Tab tab)
tab - Tab to be deactivated, this will hide the tab contentpublic void deActivateTab(Tab tab, boolean silent)
tab - Tab to be deactivated, this will hide the tab contentsilent - boolean, if true the tab will be deactivated without triggering the Tab.ActivationHandlerspublic TabsPanel setColor(Color color)
color - Color of the focus/active color of the tabpublic TabsPanel setBackgroundColor(Color background)
background - Color of the TabsPanel headerpublic elemental2.dom.HTMLDivElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>element in class BaseDominoElement<elemental2.dom.HTMLDivElement,TabsPanel>public TabsPanel setTransition(Transition transition)
transition - Transition for activating/deactivating tabs animationspublic TabsPanel setContentContainer(elemental2.dom.HTMLElement contentContainer)
contentContainer - HTMLElement to used as a container element to render active tab
contentpublic TabsPanel setContentContainer(org.jboss.elemento.IsElement<?> contentContainer)
contentContainer - IsElement to used as a container element to render active tab
contentpublic DominoElement<elemental2.dom.HTMLElement> getTabsContent()
HTMLElement that is used to as a container element to render active tab
content wrapped as DominoElementpublic void closeTab(Tab tab)
tab - Tab to be closed and removed from the TabsPanelpublic TabsPanel addActivationHandler(Tab.ActivationHandler activationHandler)
activationHandler - Tab.ActivationHandlerpublic TabsPanel removeActivationHandler(Tab.ActivationHandler activationHandler)
activationHandler - Tab.ActivationHandlerpublic TabsPanel activateByKey(String key)
key - String unique key of the currently active tabpublic TabsPanel activateByKey(String key, boolean silent)
key - String unique key of the Tab to be activatedsilent - boolean, if true the tab will be activated without triggering the Tab.ActivationHandlerspublic boolean isAutoActivate()
public TabsPanel setAutoActivate(boolean autoActivate)
autoActivate - boolean, if true then the first tab will be automatically activated when
the TabsPanel is attached to the DOMCopyright © 2019–2022 Dominokit. All rights reserved.