@StyleSheet(value="vaadin://addons/sidebar/sidebar.css") public class AccordionSideBar extends AbstractSideBar<Accordion>
This is a side bar component that can be used as a main menu in applications. The side bar is an Accordion
that looks like this:
|-------------| | Section | |-------------| | Item | | Item | | Item | | | |-------------| | Section | |-------------| | Section | |-------------|
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.
The side bar comes with a simple theme. In most cases, you probably want to change the styles to make the look and feel of the side bar more compatible with your application.
Please see the VAADIN/addons/sidebar/sidebar.css file in the resources directory.
| Modifier and Type | Class and Description |
|---|---|
class |
AccordionSideBar.DefaultItemComponentFactory
Default implementation of
AbstractSideBar.ItemComponentFactory that creates
NativeButtons. |
class |
AccordionSideBar.DefaultSectionComponentFactory
Default implementation of
AbstractSideBar.SectionComponentFactory that creates
a Panel with a VerticalLayout that contains the items. |
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.Unit| Modifier and Type | Field and Description |
|---|---|
static String |
SELECTED_STYLE |
static String |
SIDE_BAR_SECTION_ITEM_STYLE |
static String |
SIDE_BAR_SECTION_STYLE |
static String |
SIDE_BAR_STYLE |
DESIGN_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 |
|---|
AccordionSideBar(SideBarUtils sideBarUtils)
You should not need to create instances of this component directly.
|
| Modifier and Type | Method and Description |
|---|---|
protected Accordion |
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<Accordion> |
createDefaultSectionComponentFactory()
Creates the default
AbstractSideBar.SectionComponentFactory to use. |
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 static final String SIDE_BAR_STYLE
public static final String SIDE_BAR_SECTION_ITEM_STYLE
public static final String SIDE_BAR_SECTION_STYLE
public static final String SELECTED_STYLE
public AccordionSideBar(SideBarUtils sideBarUtils)
protected Accordion createCompositionRoot()
AbstractSideBarnull.createCompositionRoot in class AbstractSideBar<Accordion>protected AbstractSideBar.SectionComponentFactory<Accordion> createDefaultSectionComponentFactory()
AbstractSideBarAbstractSideBar.SectionComponentFactory to use.
This method must never return null.createDefaultSectionComponentFactory in class AbstractSideBar<Accordion>protected AbstractSideBar.ItemComponentFactory createDefaultItemComponentFactory()
AbstractSideBarAbstractSideBar.ItemComponentFactory to use.
This method must never return null.createDefaultItemComponentFactory in class AbstractSideBar<Accordion>Copyright © 2017. All rights reserved.