public class Layout extends BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>
Layout.create("Application title").show(ColorScheme.INDIGO);
| Modifier and Type | Class and Description |
|---|---|
static interface |
Layout.LayoutHandler
a function to implement logic for interacting with the layout during different phases of its
attach cycle
|
static class |
Layout.LeftPanelOpenStyle
An enum to list left panel open behaviors
|
static class |
Layout.LeftPanelSize
An enum to list left panel sizes that controls the panel width
|
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStyler| Modifier and Type | Field and Description |
|---|---|
static String |
FIT_HEIGHT |
static String |
FIT_WIDTH |
element| Constructor and Description |
|---|
Layout()
Creates a Layout without a title
|
Layout(String title)
Creates a Layout with a title
|
| Modifier and Type | Method and Description |
|---|---|
elemental2.dom.HTMLElement |
addActionItem(BaseIcon<?> icon)
Adds an action to the action bar at the right
|
elemental2.dom.HTMLElement |
addActionItem(elemental2.dom.HTMLElement element)
Adds an action to the action bar at the right
|
elemental2.dom.HTMLElement |
addActionItem(org.jboss.elemento.IsElement<?> element)
Adds an action to the action bar at the right
|
Layout |
addLeftPanel()
un-hide the left panel
|
Layout |
autoFixLeftPanel()
fix the left panel so the user wont be able to hide it using the hamburger menu icon while we
open the application on large device screen, while it will be collapsible when opened on small
screens
|
Layout |
content(Consumer<DominoElement<elemental2.dom.HTMLDivElement>> contentConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
static Layout |
create() |
static Layout |
create(String title) |
Layout |
disableLeftPanel()
Hides the left panel and hide the icon that toggle its open/close state
|
elemental2.dom.HTMLDivElement |
element() |
Layout |
enableLeftPanel()
if disable this will show the left panel and show its toggle icon
|
Layout |
fitHeight()
expands the content panel height to fit the screen without gaps and margins
|
Layout |
fitWidth()
expands the content panel width to fit the screen without gaps and margins
|
Layout |
fixFooter() |
Layout |
fixLeftPanelPosition()
Fix the left panel so it open and push the content panel and reduce its width instead of
showing on top of it
|
Layout |
footer(Consumer<Footer> footerConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
elemental2.dom.Text |
getAppTitle() |
DominoElement<elemental2.dom.HTMLDivElement> |
getContentPanel() |
Content |
getContentSection() |
Footer |
getFooter() |
DominoElement<elemental2.dom.HTMLElement> |
getLeftPanel() |
Layout.LeftPanelOpenStyle |
getLeftPanelOpenStyle() |
Layout.LeftPanelSize |
getLeftPanelSize() |
NavigationBar |
getNavigationBar() |
DominoElement<elemental2.dom.HTMLElement> |
getRightPanel() |
DominoElement<elemental2.dom.HTMLUListElement> |
getTopBar() |
Layout |
hideFooter() |
Layout |
hideLeftPanel()
Close the left panel
|
Layout |
hideNavBarExpand()
Hide the menu toggle icon from the navigation bar
|
Layout |
hideNavBarExpandOn(ScreenMedia screenMedia)
Hide the menu toggle icon from the navigation bar on provided screens only
|
Layout |
hideNavBarExpandOnSmallDown()
Hide the menu toggle icon from the navigation bar on small screens only
|
Layout |
hideRightPanel()
Close the left panel if it is open
|
boolean |
isFixedLeftPanel() |
boolean |
isFooterVisible() |
boolean |
isLeftPanelDisabled() |
boolean |
isLeftPanelVisible() |
boolean |
isNavigationBarExpanded()
Deprecated.
not used
|
boolean |
isOverlayVisible() |
boolean |
isRightPanelVisible() |
Layout |
leftPanel(Consumer<DominoElement<elemental2.dom.HTMLElement>> leftPanelConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
Layout |
navigationBar(Consumer<NavigationBar> navigationBarConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
Layout |
onLeftPanelStateChanged(Consumer<Boolean> leftPanelHandler)
Sets a handler to be called when the left open/closed state is changed
|
Layout |
onShow(Layout.LayoutHandler layoutHandler)
sets handler to be called when
show() is called |
Layout |
remove()
removes the layout from the page body
|
void |
remove(Layout.LayoutHandler removeHandler)
removes the layout from the page body and call the provided handler
|
Layout |
removeLeftPanel()
Hides the left panel permanently
|
Layout |
removeLeftPanelHandler(Consumer<Boolean> leftPanelHandler)
remove the handler that was set with
onLeftPanelStateChanged(Consumer) |
Layout |
rightPanel(Consumer<DominoElement<elemental2.dom.HTMLElement>> rightPanelConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
Layout |
setContent(org.jboss.elemento.IsElement<?> element)
clears the content panel and appends the provided element to it
|
Layout |
setContent(elemental2.dom.Node node)
clears the content panel and appends the provided Node to it
|
Layout |
setHeaderHeight(String height) |
Layout |
setLeftPanelOpenStyle(Layout.LeftPanelOpenStyle leftPanelOpenStyle)
Change the behavior of the left open/close
|
Layout |
setLeftPanelSize(Layout.LeftPanelSize leftPanelSize)
change the left panel size
|
Layout |
setLogo(elemental2.dom.HTMLImageElement imageElement) |
Layout |
setLogo(org.jboss.elemento.IsElement<elemental2.dom.HTMLImageElement> imageElement) |
Layout |
setTitle(String title) |
Layout |
show()
Reveal the layout and append it to the page body
|
Layout |
show(boolean autoFixLeftPanel)
Reveal the layout and append it to the page body
|
Layout |
show(ColorScheme theme)
Reveal the layout and append it to the page body and apply the specified theme color
|
Layout |
show(ColorScheme theme,
boolean autoFixLeftPanel)
Reveal the layout and append it to the page body and apply the specified theme color
|
Layout |
showFooter() |
Layout |
showLeftPanel()
Opens the left panel
|
Layout |
showRightPanel()
Opens the right panel, this will also hide the left panel if it is open
|
Layout |
spanLeftPanelUp()
the left panel will spread to the top of the browser page and push the header to the right
reducing its width
|
Layout |
toggleLeftPanel()
Toggle the state of the left panel, if it is open close it, if closed open it
|
Layout |
toggleRightPanel()
toggle the state of the right panel, if it is closed it will open and if it is open it will be
closed
|
Layout |
topBar(Consumer<DominoElement<elemental2.dom.HTMLUListElement>> topBarConsumer)
Deprecated.
not needed, use
BaseDominoElement.apply(ElementHandler) |
Layout |
unfitHeight()
restore the gaps and margins removed by
fitHeight() |
Layout |
unfitWidth()
restore the gaps and margins removed by
fitWidth() |
Layout |
unfixFooter() |
Layout |
unfixLeftPanelPosition()
The left panel will open on top the content panel with an overlay
|
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, 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, 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, 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 final String FIT_WIDTH
public static final String FIT_HEIGHT
public Layout()
public Layout(String title)
title - String titlepublic static Layout create()
public static Layout create(String title)
public Layout show()
show in interface IsCollapsible<Layout>show in class BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>Collapsible.show()public Layout show(boolean autoFixLeftPanel)
autoFixLeftPanel - boolean, if true left panel will be fixed and the user wont be able to
hide it using the hamburger menu icon while we open the application on large device screen,
while it will be collapsible when opened on small screenspublic Layout show(ColorScheme theme)
theme - ColorSchemepublic Layout show(ColorScheme theme, boolean autoFixLeftPanel)
theme - ColorSchemeautoFixLeftPanel - boolean, if true left panel will be fixed and and the user wont be able
to hide it using the hamburger menu icon while we open the application on large device
screen, while it will be collapsible when opened on small screenspublic void remove(Layout.LayoutHandler removeHandler)
removeHandler - Layout.LayoutHandlerpublic Layout remove()
remove in class BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>public Layout onShow(Layout.LayoutHandler layoutHandler)
show() is calledlayoutHandler - Layout.LayoutHandlerpublic Layout removeLeftPanel()
public Layout addLeftPanel()
public Layout toggleRightPanel()
public Layout showRightPanel()
public Layout hideRightPanel()
public Layout toggleLeftPanel()
public Layout setLeftPanelSize(Layout.LeftPanelSize leftPanelSize)
leftPanelSize - Layout.LeftPanelSizepublic Layout.LeftPanelOpenStyle getLeftPanelOpenStyle()
public Layout setLeftPanelOpenStyle(Layout.LeftPanelOpenStyle leftPanelOpenStyle)
leftPanelOpenStyle - Layout.LeftPanelOpenStylepublic Layout showLeftPanel()
public Layout hideLeftPanel()
public boolean isFooterVisible()
public DominoElement<elemental2.dom.HTMLElement> getRightPanel()
HTMLElement wrapped as a DominoElementpublic DominoElement<elemental2.dom.HTMLElement> getLeftPanel()
HTMLElement wrapped as a DominoElementpublic DominoElement<elemental2.dom.HTMLDivElement> getContentPanel()
HTMLDivElement wrapped as a DominoElementpublic DominoElement<elemental2.dom.HTMLUListElement> getTopBar()
HTMLUListElement wrapped as a DominoElementpublic NavigationBar getNavigationBar()
NavigationBarpublic Layout hideFooter()
public Layout showFooter()
public Layout setTitle(String title)
title - String application titlepublic elemental2.dom.HTMLElement addActionItem(BaseIcon<?> icon)
icon - BaseIcon for the actionHTMLElement of the created actionpublic elemental2.dom.HTMLElement addActionItem(org.jboss.elemento.IsElement<?> element)
element - IsElement action HTMLElement contentHTMLElement of the created actionpublic elemental2.dom.HTMLElement addActionItem(elemental2.dom.HTMLElement element)
element - HTMLElement action HTMLElement contentHTMLElement of the created actionpublic Layout fixLeftPanelPosition()
public Layout unfixLeftPanelPosition()
public Layout spanLeftPanelUp()
public Layout disableLeftPanel()
public Layout enableLeftPanel()
public Layout fixFooter()
Footer#fixed()}public Layout unfixFooter()
Footer#unfixed()}public Layout setHeaderHeight(String height)
height - String css height for the headerpublic elemental2.dom.Text getAppTitle()
public Layout setContent(elemental2.dom.Node node)
setContent in class BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>node - Node the new contentpublic Layout setContent(org.jboss.elemento.IsElement<?> element)
setContent in class BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>element - IsElement the new content@Deprecated public Layout content(Consumer<DominoElement<elemental2.dom.HTMLDivElement>> contentConsumer)
BaseDominoElement.apply(ElementHandler)@Deprecated public Layout leftPanel(Consumer<DominoElement<elemental2.dom.HTMLElement>> leftPanelConsumer)
BaseDominoElement.apply(ElementHandler)@Deprecated public Layout rightPanel(Consumer<DominoElement<elemental2.dom.HTMLElement>> rightPanelConsumer)
BaseDominoElement.apply(ElementHandler)@Deprecated public Layout footer(Consumer<Footer> footerConsumer)
BaseDominoElement.apply(ElementHandler)@Deprecated public Layout navigationBar(Consumer<NavigationBar> navigationBarConsumer)
BaseDominoElement.apply(ElementHandler)@Deprecated public Layout topBar(Consumer<DominoElement<elemental2.dom.HTMLUListElement>> topBarConsumer)
BaseDominoElement.apply(ElementHandler)public Layout setLogo(elemental2.dom.HTMLImageElement imageElement)
imageElement - HTMLImageElement logo to show on the left sidepublic Layout setLogo(org.jboss.elemento.IsElement<elemental2.dom.HTMLImageElement> imageElement)
imageElement - HTMLImageElement wrapped as IsElement logo to show on the
left sidepublic Layout autoFixLeftPanel()
public Layout hideNavBarExpand()
public Layout hideNavBarExpandOnSmallDown()
public Layout hideNavBarExpandOn(ScreenMedia screenMedia)
screenMedia - ScreenMedia for which we should the menu togglepublic Layout onLeftPanelStateChanged(Consumer<Boolean> leftPanelHandler)
leftPanelHandler - Consumer of Boolean, true for open, false for closedpublic Layout removeLeftPanelHandler(Consumer<Boolean> leftPanelHandler)
onLeftPanelStateChanged(Consumer)leftPanelHandler - the handlerpublic Layout fitWidth()
public Layout unfitWidth()
fitWidth()public Layout fitHeight()
public Layout unfitHeight()
fitHeight()public boolean isLeftPanelVisible()
public boolean isRightPanelVisible()
@Deprecated public boolean isNavigationBarExpanded()
public boolean isOverlayVisible()
public boolean isLeftPanelDisabled()
public boolean isFixedLeftPanel()
public Layout.LeftPanelSize getLeftPanelSize()
Layout.LeftPanelSizepublic elemental2.dom.HTMLDivElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>element in class BaseDominoElement<elemental2.dom.HTMLDivElement,Layout>Copyright © 2019–2022 Dominokit. All rights reserved.