Package io.jmix.ui.component.impl
Class PopupViewImpl
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,PopupView
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
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.PopupView
PopupView.PopupPosition, PopupView.PopupVisibilityEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected Component
protected com.vaadin.shared.Registration
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
attachToFrame
(Component childComponent) protected JmixPopupView
protected void
detachFromFrame
(Component childComponent) int
int
protected void
boolean
boolean
boolean
void
setCaption
(String caption) Sets the component's caption.void
setCaptionAsHtml
(boolean value) Sets whether the caption is rendered as HTML.void
void
setHideOnMouseOut
(boolean value) Sets possibility to close popup window on cursor out.void
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.protected void
void
setMinimizedValue
(String minimizedValue) Sets value for the label of component.void
setPopupContent
(Component popupContent) Sets inner content for the popup window.void
setPopupPosition
(int top, int left) Sets the popup position.void
setPopupPosition
(PopupView.PopupPosition position) Sets the popup position.void
setPopupPositionLeft
(int left) Sets the left popup position.void
setPopupPositionTop
(int top) Sets the top popup position.void
setPopupVisible
(boolean value) Sets visibility for the popup window.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, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, 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, getStyleName, 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
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
popupContent
-
minimizedValue
-
popupVisibilityListenerRegistration
protected com.vaadin.shared.Registration popupVisibilityListenerRegistration
-
-
Constructor Details
-
PopupViewImpl
public PopupViewImpl()
-
-
Method Details
-
createComponent
-
addPopupVisibilityListener
- Specified by:
addPopupVisibilityListener
in interfacePopupView
-
internalRemovePopupVisibilityListener
protected void internalRemovePopupVisibilityListener(Consumer<PopupView.PopupVisibilityEvent> listener) -
setPopupContent
Description copied from interface:PopupView
Sets inner content for the popup window.- Specified by:
setPopupContent
in interfacePopupView
- Parameters:
popupContent
- popup component.
-
attachToFrame
-
detachFromFrame
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractComponent<JmixPopupView>
-
getPopupContent
- Specified by:
getPopupContent
in interfacePopupView
- Returns:
- popup content component.
-
setPopupVisible
public void setPopupVisible(boolean value) Description copied from interface:PopupView
Sets visibility for the popup window.- Specified by:
setPopupVisible
in interfacePopupView
- Parameters:
value
- popup visibility.
-
setHideOnMouseOut
public void setHideOnMouseOut(boolean value) Description copied from interface:PopupView
Sets possibility to close popup window on cursor out.- Specified by:
setHideOnMouseOut
in interfacePopupView
- Parameters:
value
- popup hide option.
-
isHideOnMouseOut
public boolean isHideOnMouseOut()- Specified by:
isHideOnMouseOut
in interfacePopupView
- Returns:
- true if popup window closes on cursor out.
-
isPopupVisible
public boolean isPopupVisible()- Specified by:
isPopupVisible
in interfacePopupView
- Returns:
- true if popup is visible.
-
setMinimizedValue
Description copied from interface:PopupView
Sets value for the label of component. Value of the label can contain HTML.- Specified by:
setMinimizedValue
in interfacePopupView
- Parameters:
minimizedValue
- label text.
-
getMinimizedValue
- Specified by:
getMinimizedValue
in interfacePopupView
- Returns:
- value of the label of component.
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean value) Description copied from interface:HasHtmlCaption
Sets whether the caption is rendered as HTML.- Specified by:
setCaptionAsHtml
in interfaceHasHtmlCaption
- Specified by:
setCaptionAsHtml
in interfacePopupView
- Overrides:
setCaptionAsHtml
in classAbstractComponent<JmixPopupView>
- Parameters:
value
-true
if the caption is rendered as HTML,false
if rendered as plain text- See Also:
-
isCaptionAsHtml
public boolean isCaptionAsHtml()- Specified by:
isCaptionAsHtml
in interfaceHasHtmlCaption
- Specified by:
isCaptionAsHtml
in interfacePopupView
- Overrides:
isCaptionAsHtml
in classAbstractComponent<JmixPopupView>
- Returns:
true
if the caption is rendered as HTML,false
if rendered as plain text
-
setPopupPosition
public void setPopupPosition(int top, int left) Description copied from interface:PopupView
Sets the popup position.- Specified by:
setPopupPosition
in interfacePopupView
- Parameters:
top
- the top popup position in pixelsleft
- the left popup position in pixels
-
setPopupPositionTop
public void setPopupPositionTop(int top) Description copied from interface:PopupView
Sets the top popup position.- Specified by:
setPopupPositionTop
in interfacePopupView
- Parameters:
top
- the top popup position in pixels
-
getPopupPositionTop
public int getPopupPositionTop()- Specified by:
getPopupPositionTop
in interfacePopupView
- Returns:
- top popup position if position is set via
PopupView.setPopupPosition(int, int)
-
setPopupPositionLeft
public void setPopupPositionLeft(int left) Description copied from interface:PopupView
Sets the left popup position.- Specified by:
setPopupPositionLeft
in interfacePopupView
- Parameters:
left
- the left popup position in pixels
-
getPopupPositionLeft
public int getPopupPositionLeft()- Specified by:
getPopupPositionLeft
in interfacePopupView
- Returns:
- left popup position if position is set via
PopupView.setPopupPosition(int, int)
-
setPopupPosition
Description copied from interface:PopupView
Sets the popup position.- Specified by:
setPopupPosition
in interfacePopupView
- Parameters:
position
- the popup position
-
getPopupPosition
Description copied from interface:PopupView
- Specified by:
getPopupPosition
in interfacePopupView
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Overrides:
setCaption
in classAbstractComponent<JmixPopupView>
- Parameters:
caption
- the new component's caption
-
setIcon
Description copied from interface:Component.HasIcon
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
setIcon
in interfaceComponent.HasIcon
- Overrides:
setIcon
in classAbstractComponent<JmixPopupView>
-
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<JmixPopupView>
- Parameters:
name
- one or more style names separated by space.
-
setIconStyle
protected void setIconStyle()
-