public class SideBar extends Accordion
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.
If you want to customize the components that are added to the accordion, implement SideBar.SectionComponentFactory and/or SideBar.ItemComponentFactory.
| Modifier and Type | Class and Description |
|---|---|
class |
SideBar.DefaultItemComponentFactory
Default implementation of
SideBar.ItemComponentFactory that creates
NativeButtons. |
class |
SideBar.DefaultSectionComponentFactory
Default implementation of
SideBar.SectionComponentFactory that creates
a Panel with a VerticalLayout that contains the items. |
static interface |
SideBar.ItemComponentFactory
Interface defining a factory for creating components that correspond to items in a side bar section.
|
static interface |
SideBar.SectionComponentFactory
Interface defining a factory for creating components that correspond to sections in a side bar.
|
TabSheet.CloseHandler, TabSheet.SelectedTabChangeEvent, TabSheet.SelectedTabChangeListener, TabSheet.Tab, TabSheet.TabsheetServerRpcImpl, TabSheet.TabSheetTabImplHasComponents.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 |
|---|
SideBar(SideBarUtils sideBarUtils,
SideBar.SectionComponentFactory sectionComponentFactory,
SideBar.ItemComponentFactory itemComponentFactory)
You should not need to create instances of this component directly.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach() |
void |
detach() |
addBlurListener, addComponent, addFocusListener, addListener, addListener, addListener, addSelectedTabChangeListener, addTab, addTab, addTab, addTab, addTab, areTabsHidden, fireSelectedTabChange, focus, getComponentCount, getCustomAttributes, getSelectedTab, getState, getTab, getTab, getTabIndex, getTabPosition, hideTabs, isRendered, isTabCaptionsAsHtml, iterator, moveComponentsFrom, readDesign, removeBlurListener, removeComponent, removeFocusListener, removeListener, removeListener, removeListener, removeSelectedTabChangeListener, removeTab, replaceComponent, selectedTabIndexAfterTabRemove, setCloseHandler, setSelectedTab, setSelectedTab, setSelectedTab, setTabCaptionsAsHtml, setTabIndex, setTabPosition, writeDesignaddComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidthaddListener, addShortcutListener, addStyleName, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthUndefinedaddAttachListener, 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, setResourceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisibleaddAttachListener, 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 SideBar(SideBarUtils sideBarUtils, SideBar.SectionComponentFactory sectionComponentFactory, SideBar.ItemComponentFactory itemComponentFactory)
public void attach()
attach in interface ClientConnectorattach in interface Componentattach in class AbstractComponentpublic void detach()
detach in interface ClientConnectordetach in class AbstractComponentCopyright © 2015. All rights reserved.