Package com.flowingcode.addons.applayout
Class AppLayout
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.HtmlComponent
-
- com.vaadin.flow.component.HtmlContainer
-
- com.vaadin.flow.component.html.Div
-
- com.flowingcode.addons.applayout.AppLayout
-
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasText,com.vaadin.flow.router.RouterLayout,java.io.Serializable
@Tag("fc-applayout") @JsModule("@flowingcode/fc-applayout/src/fc-applayout.ts") @NpmPackage(value="@flowingcode/fc-applayout", version="1.0.0") @CssImport(value="./styles/applayout-styles.css", themeFor="fc-applayout") public class AppLayout extends com.vaadin.flow.component.html.Div implements com.vaadin.flow.router.RouterLayoutComponent that renders the div that contains the entire layout.- Author:
- mlopez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AppLayout()AppLayout(com.vaadin.flow.component.Component menuHeader, java.lang.String title)AppLayout(com.vaadin.flow.component.html.Image logo, com.vaadin.flow.component.Component menuHeader, java.lang.String title)AppLayout(java.lang.String title)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToolbarIconButtonAsFirst(com.vaadin.flow.component.Component component)voidaddToolbarIconButtons(com.vaadin.flow.component.Component... components)voidaddToTitleSection(com.vaadin.flow.component.Component component)voidclearMenuItems()voidclearToolbarIconButtons()booleanisMenuVisible()voidsetCaption(java.lang.String caption)Sets the toolbar titlevoidsetDrawerBelowHeader(boolean drawerBelowHeader)Sets the drawerBelowHeader attribute so the drawer will be show below the header of the applayoutvoidsetDrawerPersistent(boolean drawerPersistent)Sets the persistent attribute so it will make the drawer to be always opened in a non-modal wayvoidsetDrawerRightAlignment(boolean drawerRightAlignment)Sets the drawerBelowHeader attribute so the drawer will be show below the header of the applayoutvoidsetFixed(boolean fixed)Sets the fixed attribute so it mantains the header fixed at the top so it never moves away.voidsetMenuHeader(com.vaadin.flow.component.Component menuHeader)Sets the component to be shown before the menu in the drawer.voidsetMenuItems(com.vaadin.flow.component.Component... someMenuitems)voidsetMenuVisible(boolean visible)voidsetReveals(boolean reveals)Sets the reveals attribute so it slides back the header when scrolling back up.voidsetSwipeOpen(boolean swipeOpen)Sets the swipeOpen attribute so it creates an area at the edge of the screen to swipe open the app-drawervoidsetToolbarIconButtons(com.vaadin.flow.component.Component... components)-
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut
-
Methods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
-
Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replace
-
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
-
-
-
Constructor Detail
-
AppLayout
public AppLayout()
-
AppLayout
public AppLayout(java.lang.String title)
-
AppLayout
public AppLayout(com.vaadin.flow.component.Component menuHeader, java.lang.String title)
-
AppLayout
public AppLayout(com.vaadin.flow.component.html.Image logo, com.vaadin.flow.component.Component menuHeader, java.lang.String title)
-
-
Method Detail
-
addToTitleSection
public void addToTitleSection(com.vaadin.flow.component.Component component)
-
setMenuHeader
public void setMenuHeader(com.vaadin.flow.component.Component menuHeader)
Sets the component to be shown before the menu in the drawer.- Parameters:
menuHeader-
-
setMenuItems
public void setMenuItems(com.vaadin.flow.component.Component... someMenuitems)
-
clearMenuItems
public void clearMenuItems()
-
setToolbarIconButtons
public void setToolbarIconButtons(com.vaadin.flow.component.Component... components)
-
addToolbarIconButtons
public void addToolbarIconButtons(com.vaadin.flow.component.Component... components)
-
addToolbarIconButtonAsFirst
public void addToolbarIconButtonAsFirst(com.vaadin.flow.component.Component component)
-
clearToolbarIconButtons
public void clearToolbarIconButtons()
-
setMenuVisible
public void setMenuVisible(boolean visible)
-
isMenuVisible
public boolean isMenuVisible()
-
setCaption
public void setCaption(java.lang.String caption)
Sets the toolbar title- Parameters:
caption-
-
setFixed
public void setFixed(boolean fixed)
Sets the fixed attribute so it mantains the header fixed at the top so it never moves away.- Parameters:
fixed-
-
setReveals
public void setReveals(boolean reveals)
Sets the reveals attribute so it slides back the header when scrolling back up.- Parameters:
reveals-
-
setSwipeOpen
public void setSwipeOpen(boolean swipeOpen)
Sets the swipeOpen attribute so it creates an area at the edge of the screen to swipe open the app-drawer- Parameters:
swipeOpen-
-
setDrawerPersistent
public void setDrawerPersistent(boolean drawerPersistent)
Sets the persistent attribute so it will make the drawer to be always opened in a non-modal way- Parameters:
drawerPersistent-
-
setDrawerBelowHeader
public void setDrawerBelowHeader(boolean drawerBelowHeader)
Sets the drawerBelowHeader attribute so the drawer will be show below the header of the applayout- Parameters:
drawerBelowHeader-
-
setDrawerRightAlignment
public void setDrawerRightAlignment(boolean drawerRightAlignment)
Sets the drawerBelowHeader attribute so the drawer will be show below the header of the applayout- Parameters:
drawerBelowHeader-
-
-