Package io.jmix.ui.component.impl
Class ScrollBoxLayoutImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixScrollBoxLayout>
io.jmix.ui.component.impl.ScrollBoxLayoutImpl
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,ComponentContainer
,HasComponents
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasMargin
,HasOrientation
,HasRequiredIndicator
,HasSpacing
,LayoutClickNotifier
,OrderedContainer
,ScrollBoxLayout
,ShortcutNotifier
public class ScrollBoxLayoutImpl
extends AbstractComponent<JmixScrollBoxLayout>
implements ScrollBoxLayout
-
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.HasOrientation
HasOrientation.Orientation
Nested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.ScrollBoxLayout
ScrollBoxLayout.ScrollBarPolicy
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.shared.Registration
protected HasOrientation.Orientation
protected ScrollBoxLayout.ScrollBarPolicy
protected static final String
protected static final String
protected Map<ShortcutAction,
com.vaadin.event.ShortcutListener> 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.ScrollBoxLayout
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a component to this container.void
Adds a listener that is fired when user clicks inside the layout at any place.void
addShortcutAction
(ShortcutAction action) protected void
applyScrollBarsPolicy
(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy) void
attached()
Notifies all listeners that component has been attached.protected JmixScrollBoxLayout
void
detached()
Notifies all listeners that component has been detached.protected com.vaadin.ui.Component
findChildComponent
(com.vaadin.ui.Component vComponent) protected Component
findExistingComponent
(com.vaadin.ui.Component vComponent) getComponent
(int index) Returns the component at the given position.getComponent
(String id) Gets a component belonging to the whole components tree below this container.Gets all components belonging to the whole components tree below this container.protected com.vaadin.ui.AbstractOrderedLayout
float
float
Gets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.int
Gets scroll left offset.int
Gets scroll top offset.boolean
Styles implementation is client-type-specific.int
protected void
initComponent
(JmixScrollBoxLayout component) protected void
boolean
Returns whether a required indicator should be shown.void
Removes a component from this container.void
Removes all components from this container.void
removeShortcutAction
(ShortcutAction action) void
setContentHeight
(String height) Sets content height.void
setContentMaxHeight
(String maxHeight) Sets maximum CSS height for content.void
setContentMaxWidth
(String maxWidth) Sets maximum CSS width for content.void
setContentMinHeight
(String minHeight) Sets minimum CSS height for content.void
setContentMinWidth
(String minWidth) Sets minimum CSS width for content.void
setContentWidth
(String width) Sets content width.void
void
setMargin
(MarginInfo marginInfo) void
setOrientation
(HasOrientation.Orientation orientation) void
setRequiredIndicatorVisible
(boolean visible) Sets whether a required indicator should be shown.void
setScrollBarPolicy
(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy) void
setScrollLeft
(int scrollLeft) Sets scroll left offset.void
setScrollTop
(int scrollTop) Sets scroll top offset.void
setSpacing
(boolean enabled) void
setStyleName
(String styleName) 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, 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, 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
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
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, remove
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNN
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.OrderedContainer
getComponentNN
-
Field Details
-
SCROLLBOX_CONTENT_STYLENAME
- See Also:
-
SCROLLBOX_STYLENAME
- See Also:
-
ownComponents
-
layoutClickRegistration
protected com.vaadin.shared.Registration layoutClickRegistration -
orientation
-
scrollBarPolicy
-
shortcuts
-
-
Constructor Details
-
ScrollBoxLayoutImpl
public ScrollBoxLayoutImpl()
-
-
Method Details
-
createComponent
-
initComponent
-
getContent
protected com.vaadin.ui.AbstractOrderedLayout getContent() -
add
Description copied from interface:ComponentContainer
Adds a component to this container.- Specified by:
add
in interfaceComponentContainer
- Parameters:
childComponent
- a component to add
-
add
- Specified by:
add
in interfaceOrderedContainer
-
indexOf
- Specified by:
indexOf
in interfaceOrderedContainer
-
getComponent
Description copied from interface:OrderedContainer
Returns the component at the given position.- Specified by:
getComponent
in interfaceOrderedContainer
- Parameters:
index
- component index- Returns:
- the component at the given index or null.
-
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<JmixScrollBoxLayout>
- Parameters:
styleName
- 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<JmixScrollBoxLayout>
- Returns:
- current style name.
-
remove
Description copied from interface:ComponentContainer
Removes a component from this container.- Specified by:
remove
in interfaceComponentContainer
- Parameters:
childComponent
- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainer
Removes all components from this container.- Specified by:
removeAll
in interfaceComponentContainer
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractComponent<JmixScrollBoxLayout>
-
getOwnComponent
Description copied from interface:HasComponents
Gets component directly owned by this container.- Specified by:
getOwnComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponents
Gets a component belonging to the whole components tree below this container.- Specified by:
getComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponents
Gets all components directly owned by this container.- Specified by:
getOwnComponents
in interfaceHasComponents
- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponents
Gets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStream
in interfaceHasComponents
- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponents
Gets all components belonging to the whole components tree below this container.- Specified by:
getComponents
in interfaceHasComponents
- Returns:
- all components belonging to the whole components tree below this container
-
getOrientation
- Specified by:
getOrientation
in interfaceHasOrientation
-
setOrientation
- Specified by:
setOrientation
in interfaceHasOrientation
-
getScrollBarPolicy
- Specified by:
getScrollBarPolicy
in interfaceScrollBoxLayout
-
setScrollBarPolicy
- Specified by:
setScrollBarPolicy
in interfaceScrollBoxLayout
-
setContentWidth
Description copied from interface:ScrollBoxLayout
Sets content width.- Specified by:
setContentWidth
in interfaceScrollBoxLayout
- Parameters:
width
- width
-
getContentWidth
public float getContentWidth()- Specified by:
getContentWidth
in interfaceScrollBoxLayout
- Returns:
- content width value
-
getContentWidthSizeUnit
- Specified by:
getContentWidthSizeUnit
in interfaceScrollBoxLayout
- Returns:
- content width size unit
-
setContentHeight
Description copied from interface:ScrollBoxLayout
Sets content height.- Specified by:
setContentHeight
in interfaceScrollBoxLayout
- Parameters:
height
- height
-
getContentHeight
public float getContentHeight()- Specified by:
getContentHeight
in interfaceScrollBoxLayout
- Returns:
- content height value
-
getContentHeightSizeUnit
- Specified by:
getContentHeightSizeUnit
in interfaceScrollBoxLayout
- Returns:
- content height size unit
-
setContentMinWidth
Description copied from interface:ScrollBoxLayout
Sets minimum CSS width for content. Examples: "640px", "auto".- Specified by:
setContentMinWidth
in interfaceScrollBoxLayout
- Parameters:
minWidth
- minimum width
-
getContentMinWidth
- Specified by:
getContentMinWidth
in interfaceScrollBoxLayout
- Returns:
- minimal content width
-
setContentMaxWidth
Description copied from interface:ScrollBoxLayout
Sets maximum CSS width for content. Examples: "640px", "100%".- Specified by:
setContentMaxWidth
in interfaceScrollBoxLayout
- Parameters:
maxWidth
- maximum width
-
getContentMaxWidth
- Specified by:
getContentMaxWidth
in interfaceScrollBoxLayout
- Returns:
- maximum content width
-
setContentMinHeight
Description copied from interface:ScrollBoxLayout
Sets minimum CSS height for content. Examples: "640px", "auto".- Specified by:
setContentMinHeight
in interfaceScrollBoxLayout
- Parameters:
minHeight
- minimum height
-
getContentMinHeight
- Specified by:
getContentMinHeight
in interfaceScrollBoxLayout
- Returns:
- minimum content width
-
setContentMaxHeight
Description copied from interface:ScrollBoxLayout
Sets maximum CSS height for content. Examples: "640px", "100%".- Specified by:
setContentMaxHeight
in interfaceScrollBoxLayout
- Parameters:
maxHeight
- maximum height
-
getContentMaxHeight
- Specified by:
getContentMaxHeight
in interfaceScrollBoxLayout
- Returns:
- maximum content width
-
addLayoutClickListener
Description copied from interface:LayoutClickNotifier
Adds a listener that is fired when user clicks inside the layout at any place.- Specified by:
addLayoutClickListener
in interfaceLayoutClickNotifier
- Parameters:
listener
- a listener to add
-
internalRemoveLayoutClickListener
protected void internalRemoveLayoutClickListener(Consumer<LayoutClickNotifier.LayoutClickEvent> listener) -
findChildComponent
@Nullable protected com.vaadin.ui.Component findChildComponent(com.vaadin.ui.Component vComponent) -
findExistingComponent
-
applyScrollBarsPolicy
-
setMargin
-
getMargin
-
setSpacing
public void setSpacing(boolean enabled) - Specified by:
setSpacing
in interfaceHasSpacing
-
getSpacing
public boolean getSpacing()- Specified by:
getSpacing
in interfaceHasSpacing
-
isRequiredIndicatorVisible
public boolean isRequiredIndicatorVisible()Description copied from interface:HasRequiredIndicator
Returns whether a required indicator should be shown.- Specified by:
isRequiredIndicatorVisible
in interfaceHasRequiredIndicator
- Returns:
true
if a required indicator should be shown,false
otherwise
-
setRequiredIndicatorVisible
public void setRequiredIndicatorVisible(boolean visible) Description copied from interface:HasRequiredIndicator
Sets whether a required indicator should be shown.- Specified by:
setRequiredIndicatorVisible
in interfaceHasRequiredIndicator
- Parameters:
visible
-true
if a required indicator should be shown,false
otherwise
-
addShortcutAction
- Specified by:
addShortcutAction
in interfaceShortcutNotifier
-
removeShortcutAction
- Specified by:
removeShortcutAction
in interfaceShortcutNotifier
-
getScrollLeft
public int getScrollLeft()Description copied from interface:ScrollBoxLayout
Gets scroll left offset.Scrolling offset is the number of pixels this scrollable has been scrolled right.
- Specified by:
getScrollLeft
in interfaceScrollBoxLayout
- Returns:
- horizontal scrolling position in pixels
-
setScrollLeft
public void setScrollLeft(int scrollLeft) Description copied from interface:ScrollBoxLayout
Sets scroll left offset.Scrolling offset is the number of pixels this scrollable has been scrolled right.
- Specified by:
setScrollLeft
in interfaceScrollBoxLayout
- Parameters:
scrollLeft
- the xOffset
-
getScrollTop
public int getScrollTop()Description copied from interface:ScrollBoxLayout
Gets scroll top offset.Scrolling offset is the number of pixels this scrollable has been scrolled down.
- Specified by:
getScrollTop
in interfaceScrollBoxLayout
- Returns:
- vertical scrolling position in pixels
-
setScrollTop
public void setScrollTop(int scrollTop) Description copied from interface:ScrollBoxLayout
Sets scroll top offset.Scrolling offset is the number of pixels this scrollable has been scrolled down.
- Specified by:
setScrollTop
in interfaceScrollBoxLayout
- Parameters:
scrollTop
- the yOffset
-
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractComponent<JmixScrollBoxLayout>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractComponent<JmixScrollBoxLayout>
-