public class Menu
extends com.vaadin.ui.CssLayout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandlercom.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener| Constructor and Description |
|---|
Menu(com.vaadin.navigator.Navigator navigator,
LogoutHandler logoutHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(Class<? extends com.vaadin.navigator.View> viewClass,
String name,
String caption,
com.vaadin.server.Resource icon)
Register a view in the navigation menu and in the
Navigator based
on a view class. |
void |
addView(com.vaadin.navigator.View view,
String name,
String caption,
com.vaadin.server.Resource icon)
Register a pre-created view instance in the navigation menu and in the
Navigator. |
void |
setActiveView(String viewName)
Highlights a view navigation button as the currently active view in the
menu.
|
void |
setViewEnabled(String viewName,
boolean enabled) |
void |
setViewVisible(String viewName,
boolean visible) |
void |
showLogout(boolean visible) |
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, beforeClientResponse, getComponent, getComponentCount, getComponentIndex, getCss, getState, getState, iterator, readDesign, removeComponent, removeLayoutClickListener, replaceComponent, writeDesignaddComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidthaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, 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, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, 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, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddComponents, getComponentIterator, moveComponentsFrom, removeAllComponentsaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratorpublic Menu(com.vaadin.navigator.Navigator navigator,
LogoutHandler logoutHandler)
public void addView(com.vaadin.navigator.View view,
String name,
String caption,
com.vaadin.server.Resource icon)
Navigator.view - view instance to registername - view namecaption - view caption in the menuicon - view icon in the menuNavigator.addView(String, View)public void addView(Class<? extends com.vaadin.navigator.View> viewClass, String name, String caption, com.vaadin.server.Resource icon)
Navigator based
on a view class.viewClass - class of the views to createname - view namecaption - view caption in the menuicon - view icon in the menuNavigator.addView(String, Class)public void showLogout(boolean visible)
public void setActiveView(String viewName)
viewName - the name of the view to show as activepublic void setViewEnabled(String viewName, boolean enabled)
public void setViewVisible(String viewName, boolean visible)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.