public class ValoSideBar extends AbstractSideBar<CssLayout>
This is a side bar component that has been especially designed to be used with the Valo theme.
It is based on CssLayouts and the MENU_ -styles.
The sections and items are declared using the SideBarSection and SideBarItem annotations, respectively.
To use this side bar, simply enable it in your application configuration using the EnableSideBar annotation,
and inject it into your UI. Also remember to use the Valo theme.
setHeader(com.vaadin.ui.Layout),
setLogo(com.vaadin.ui.Component),
setLargeIcons(boolean),
Serialized Form| Modifier and Type | Class and Description |
|---|---|
class |
ValoSideBar.DefaultItemComponentFactory
Default implementation of
ValoSideBar.ItemComponentFactory that creates
Buttons. |
class |
ValoSideBar.DefaultSectionComponentFactory
Default implementation of
ValoSideBar.SectionComponentFactory that adds the section header
and items directly to the composition root. |
AbstractSideBar.ItemComponentFactory, AbstractSideBar.ItemFilter, AbstractSideBar.SectionComponentFactory<CR extends ComponentContainer>HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListenerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
ValoSideBar(SideBarUtils sideBarUtils)
You should not need to create instances of this component directly.
|
| Modifier and Type | Method and Description |
|---|---|
protected CssLayout |
createCompositionRoot()
Creates the component that actually contain the side bar sections and items.
|
protected AbstractSideBar.ItemComponentFactory |
createDefaultItemComponentFactory()
Creates the default
AbstractSideBar.ItemComponentFactory to use. |
protected AbstractSideBar.SectionComponentFactory<CssLayout> |
createDefaultSectionComponentFactory()
Creates the default
AbstractSideBar.SectionComponentFactory to use. |
Layout |
getHeader()
Returns the header layout, or
null if none has been set. |
Component |
getLogo()
Returns the logo, or
null if none has been set. |
boolean |
isLargeIcons()
Returns whether the side bar is using large icons or not.
|
void |
setHeader(Layout headerLayout)
Adds a header to the top of the side bar, below the logo.
|
void |
setLargeIcons(boolean largeIcons)
Specifies whether the side bar should use large icons or not.
|
void |
setLogo(Component logo)
Adds a logo to the very top of the side bar, above the header.
|
attach, detach, getCompositionRoot, getItemComponentFactory, getItemFilter, getSectionComponentFactory, setItemComponentFactory, setItemFilter, setSectionComponentFactorygetComponentCount, getState, getState, iterator, setCompositionRootaddContextClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined, writeDesignaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesignaddAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratorpublic ValoSideBar(SideBarUtils sideBarUtils)
protected CssLayout createCompositionRoot()
AbstractSideBarnull.createCompositionRoot in class AbstractSideBar<CssLayout>public boolean isLargeIcons()
ValoTheme.MENU_PART_LARGE_ICONSpublic void setLargeIcons(boolean largeIcons)
ValoTheme.MENU_PART_LARGE_ICONSpublic void setHeader(Layout headerLayout)
ValoTheme.MENU_TITLE style
will automatically be added to the layout.headerLayout - the layout containing the header, or null to remove.public Layout getHeader()
null if none has been set.setHeader(com.vaadin.ui.Layout)public void setLogo(Component logo)
ValoTheme.MENU_LOGO ands its size to undefined.public Component getLogo()
null if none has been set.setLogo(com.vaadin.ui.Component)protected AbstractSideBar.SectionComponentFactory<CssLayout> createDefaultSectionComponentFactory()
AbstractSideBarAbstractSideBar.SectionComponentFactory to use.
This method must never return null.createDefaultSectionComponentFactory in class AbstractSideBar<CssLayout>protected AbstractSideBar.ItemComponentFactory createDefaultItemComponentFactory()
AbstractSideBarAbstractSideBar.ItemComponentFactory to use.
This method must never return null.createDefaultItemComponentFactory in class AbstractSideBar<CssLayout>Copyright © 2017. All rights reserved.