Class UserActionsButtonImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixMenuBar>
io.jmix.ui.component.mainwindow.impl.UserActionsButtonImpl
- All Implemented Interfaces:
AttachNotifier,Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,UserActionsButton
public class UserActionsButtonImpl
extends AbstractComponent<JmixMenuBar>
implements UserActionsButton
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.mainwindow.UserActionsButton
UserActionsButton.LoginHandlerContext, UserActionsButton.LogoutHandlerContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected IconResolverprotected Iconsprotected Consumer<UserActionsButton.LoginHandlerContext>protected Consumer<UserActionsButton.LogoutHandlerContext>protected Messagesstatic final StringFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.mainwindow.UserActionsButton
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected com.vaadin.server.ResourcegetIconResource(Icons.Icon icon) Styles implementation is client-type-specific.protected voidinitComponent(AppUI ui) protected voidinitLoginButton(boolean authenticated) protected voidinitUserMenuButton(boolean authenticated) protected voidlogin()protected voidlogout()protected voidvoidsetAccessManager(AccessManager accessManager) voidsetIconResolver(IconResolver iconResolver) voidvoidsetLoginHandler(Consumer<UserActionsButton.LoginHandlerContext> loginHandler) Sets the givenConsumeras custom login action handler.voidsetLogoutHandler(Consumer<UserActionsButton.LogoutHandlerContext> logoutHandler) Sets the givenConsumeras custom logout action handler.voidsetMessages(Messages messages) voidsetStyleName(String name) Sets one or more style names of the component, replacing any previous styles.Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
-
Field Details
-
USERACTIONS_BUTTON_STYLENAME
- See Also:
-
iconResolver
-
icons
-
messages
-
accessManager
-
loginHandler
-
logoutHandler
-
-
Constructor Details
-
UserActionsButtonImpl
public UserActionsButtonImpl()
-
-
Method Details
-
setIconResolver
-
setIcons
-
setMessages
-
setAccessManager
-
setLoginHandler
Description copied from interface:UserActionsButtonSets the givenConsumeras custom login action handler.- Specified by:
setLoginHandlerin interfaceUserActionsButton
-
setLogoutHandler
public void setLogoutHandler(@Nullable Consumer<UserActionsButton.LogoutHandlerContext> logoutHandler) Description copied from interface:UserActionsButtonSets the givenConsumeras custom logout action handler.- Specified by:
setLogoutHandlerin interfaceUserActionsButton
-
initComponent
-
initLoginButton
protected void initLoginButton(boolean authenticated) -
initUserMenuButton
protected void initUserMenuButton(boolean authenticated) -
getIconResource
-
login
protected void login() -
logout
protected void logout() -
defaultLogin
protected void defaultLogin() -
defaultLogout
protected void defaultLogout() -
openSettings
protected void openSettings() -
setStyleName
Description copied from interface:ComponentSets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleNamein interfaceComponent- Overrides:
setStyleNamein classAbstractComponent<JmixMenuBar>- Parameters:
name- one or more style names separated by space.
-
getStyleName
Description copied from interface:ComponentStyles implementation is client-type-specific.- Specified by:
getStyleNamein interfaceComponent- Overrides:
getStyleNamein classAbstractComponent<JmixMenuBar>- Returns:
- current style name.
-