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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.mainwindow.UserActionsButton
UserActionsButton.LoginHandlerContext, UserActionsButton.LogoutHandlerContext
-
Field Summary
Modifier and TypeFieldDescriptionprotected AccessManager
protected IconResolver
protected Icons
protected Consumer<UserActionsButton.LoginHandlerContext>
protected Consumer<UserActionsButton.LogoutHandlerContext>
protected Messages
static final String
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.mainwindow.UserActionsButton
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected com.vaadin.server.Resource
getIconResource
(Icons.Icon icon) Styles implementation is client-type-specific.protected void
initComponent
(AppUI ui) protected void
initLoginButton
(boolean authenticated) protected void
initUserMenuButton
(boolean authenticated) protected void
login()
protected void
logout()
protected void
void
setAccessManager
(AccessManager accessManager) void
setIconResolver
(IconResolver iconResolver) void
void
setLoginHandler
(Consumer<UserActionsButton.LoginHandlerContext> loginHandler) Sets the givenConsumer
as custom login action handler.void
setLogoutHandler
(Consumer<UserActionsButton.LogoutHandlerContext> logoutHandler) Sets the givenConsumer
as custom logout action handler.void
setMessages
(Messages messages) void
setStyleName
(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, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods 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:UserActionsButton
Sets the givenConsumer
as custom login action handler.- Specified by:
setLoginHandler
in interfaceUserActionsButton
-
setLogoutHandler
public void setLogoutHandler(@Nullable Consumer<UserActionsButton.LogoutHandlerContext> logoutHandler) Description copied from interface:UserActionsButton
Sets the givenConsumer
as custom logout action handler.- Specified by:
setLogoutHandler
in 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:Component
Sets 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:
setStyleName
in interfaceComponent
- Overrides:
setStyleName
in classAbstractComponent<JmixMenuBar>
- Parameters:
name
- one or more style names separated by space.
-
getStyleName
Description copied from interface:Component
Styles implementation is client-type-specific.- Specified by:
getStyleName
in interfaceComponent
- Overrides:
getStyleName
in classAbstractComponent<JmixMenuBar>
- Returns:
- current style name.
-