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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasOrientation
HasOrientation.OrientationNested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.ScrollBoxLayout
ScrollBoxLayout.ScrollBarPolicy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.shared.Registrationprotected HasOrientation.Orientationprotected ScrollBoxLayout.ScrollBarPolicyprotected static final Stringprotected static final Stringprotected 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, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.ScrollBoxLayout
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a component to this container.voidAdds a listener that is fired when user clicks inside the layout at any place.voidaddShortcutAction(ShortcutAction action) protected voidapplyScrollBarsPolicy(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy) voidattached()Notifies all listeners that component has been attached.protected JmixScrollBoxLayoutvoiddetached()Notifies all listeners that component has been detached.protected com.vaadin.ui.ComponentfindChildComponent(com.vaadin.ui.Component vComponent) protected ComponentfindExistingComponent(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.AbstractOrderedLayoutfloatfloatGets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.intGets scroll left offset.intGets scroll top offset.booleanStyles implementation is client-type-specific.intprotected voidinitComponent(JmixScrollBoxLayout component) protected voidbooleanReturns whether a required indicator should be shown.voidRemoves a component from this container.voidRemoves all components from this container.voidremoveShortcutAction(ShortcutAction action) voidsetContentHeight(String height) Sets content height.voidsetContentMaxHeight(String maxHeight) Sets maximum CSS height for content.voidsetContentMaxWidth(String maxWidth) Sets maximum CSS width for content.voidsetContentMinHeight(String minHeight) Sets minimum CSS height for content.voidsetContentMinWidth(String minWidth) Sets minimum CSS width for content.voidsetContentWidth(String width) Sets content width.voidvoidsetMargin(MarginInfo marginInfo) voidsetOrientation(HasOrientation.Orientation orientation) voidsetRequiredIndicatorVisible(boolean visible) Sets whether a required indicator should be shown.voidsetScrollBarPolicy(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy) voidsetScrollLeft(int scrollLeft) Sets scroll left offset.voidsetScrollTop(int scrollTop) Sets scroll top offset.voidsetSpacing(boolean enabled) voidsetStyleName(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, 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
getFrameMethods 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, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, removeMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNNMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods 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:ComponentContainerAdds a component to this container.- Specified by:
addin interfaceComponentContainer- Parameters:
childComponent- a component to add
-
add
- Specified by:
addin interfaceOrderedContainer
-
indexOf
- Specified by:
indexOfin interfaceOrderedContainer
-
getComponent
Description copied from interface:OrderedContainerReturns the component at the given position.- Specified by:
getComponentin interfaceOrderedContainer- Parameters:
index- component index- Returns:
- the component at the given index or null.
-
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<JmixScrollBoxLayout>- Parameters:
styleName- 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<JmixScrollBoxLayout>- Returns:
- current style name.
-
remove
Description copied from interface:ComponentContainerRemoves a component from this container.- Specified by:
removein interfaceComponentContainer- Parameters:
childComponent- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainerRemoves all components from this container.- Specified by:
removeAllin interfaceComponentContainer
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<JmixScrollBoxLayout>
-
getOwnComponent
Description copied from interface:HasComponentsGets component directly owned by this container.- Specified by:
getOwnComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponentsGets a component belonging to the whole components tree below this container.- Specified by:
getComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponentsGets all components directly owned by this container.- Specified by:
getOwnComponentsin interfaceHasComponents- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponentsGets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStreamin interfaceHasComponents- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponentsGets all components belonging to the whole components tree below this container.- Specified by:
getComponentsin interfaceHasComponents- Returns:
- all components belonging to the whole components tree below this container
-
getOrientation
- Specified by:
getOrientationin interfaceHasOrientation
-
setOrientation
- Specified by:
setOrientationin interfaceHasOrientation
-
getScrollBarPolicy
- Specified by:
getScrollBarPolicyin interfaceScrollBoxLayout
-
setScrollBarPolicy
- Specified by:
setScrollBarPolicyin interfaceScrollBoxLayout
-
setContentWidth
Description copied from interface:ScrollBoxLayoutSets content width.- Specified by:
setContentWidthin interfaceScrollBoxLayout- Parameters:
width- width
-
getContentWidth
public float getContentWidth()- Specified by:
getContentWidthin interfaceScrollBoxLayout- Returns:
- content width value
-
getContentWidthSizeUnit
- Specified by:
getContentWidthSizeUnitin interfaceScrollBoxLayout- Returns:
- content width size unit
-
setContentHeight
Description copied from interface:ScrollBoxLayoutSets content height.- Specified by:
setContentHeightin interfaceScrollBoxLayout- Parameters:
height- height
-
getContentHeight
public float getContentHeight()- Specified by:
getContentHeightin interfaceScrollBoxLayout- Returns:
- content height value
-
getContentHeightSizeUnit
- Specified by:
getContentHeightSizeUnitin interfaceScrollBoxLayout- Returns:
- content height size unit
-
setContentMinWidth
Description copied from interface:ScrollBoxLayoutSets minimum CSS width for content. Examples: "640px", "auto".- Specified by:
setContentMinWidthin interfaceScrollBoxLayout- Parameters:
minWidth- minimum width
-
getContentMinWidth
- Specified by:
getContentMinWidthin interfaceScrollBoxLayout- Returns:
- minimal content width
-
setContentMaxWidth
Description copied from interface:ScrollBoxLayoutSets maximum CSS width for content. Examples: "640px", "100%".- Specified by:
setContentMaxWidthin interfaceScrollBoxLayout- Parameters:
maxWidth- maximum width
-
getContentMaxWidth
- Specified by:
getContentMaxWidthin interfaceScrollBoxLayout- Returns:
- maximum content width
-
setContentMinHeight
Description copied from interface:ScrollBoxLayoutSets minimum CSS height for content. Examples: "640px", "auto".- Specified by:
setContentMinHeightin interfaceScrollBoxLayout- Parameters:
minHeight- minimum height
-
getContentMinHeight
- Specified by:
getContentMinHeightin interfaceScrollBoxLayout- Returns:
- minimum content width
-
setContentMaxHeight
Description copied from interface:ScrollBoxLayoutSets maximum CSS height for content. Examples: "640px", "100%".- Specified by:
setContentMaxHeightin interfaceScrollBoxLayout- Parameters:
maxHeight- maximum height
-
getContentMaxHeight
- Specified by:
getContentMaxHeightin interfaceScrollBoxLayout- Returns:
- maximum content width
-
addLayoutClickListener
Description copied from interface:LayoutClickNotifierAdds a listener that is fired when user clicks inside the layout at any place.- Specified by:
addLayoutClickListenerin 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:
setSpacingin interfaceHasSpacing
-
getSpacing
public boolean getSpacing()- Specified by:
getSpacingin interfaceHasSpacing
-
isRequiredIndicatorVisible
public boolean isRequiredIndicatorVisible()Description copied from interface:HasRequiredIndicatorReturns whether a required indicator should be shown.- Specified by:
isRequiredIndicatorVisiblein interfaceHasRequiredIndicator- Returns:
trueif a required indicator should be shown,falseotherwise
-
setRequiredIndicatorVisible
public void setRequiredIndicatorVisible(boolean visible) Description copied from interface:HasRequiredIndicatorSets whether a required indicator should be shown.- Specified by:
setRequiredIndicatorVisiblein interfaceHasRequiredIndicator- Parameters:
visible-trueif a required indicator should be shown,falseotherwise
-
addShortcutAction
- Specified by:
addShortcutActionin interfaceShortcutNotifier
-
removeShortcutAction
- Specified by:
removeShortcutActionin interfaceShortcutNotifier
-
getScrollLeft
public int getScrollLeft()Description copied from interface:ScrollBoxLayoutGets scroll left offset.Scrolling offset is the number of pixels this scrollable has been scrolled right.
- Specified by:
getScrollLeftin interfaceScrollBoxLayout- Returns:
- horizontal scrolling position in pixels
-
setScrollLeft
public void setScrollLeft(int scrollLeft) Description copied from interface:ScrollBoxLayoutSets scroll left offset.Scrolling offset is the number of pixels this scrollable has been scrolled right.
- Specified by:
setScrollLeftin interfaceScrollBoxLayout- Parameters:
scrollLeft- the xOffset
-
getScrollTop
public int getScrollTop()Description copied from interface:ScrollBoxLayoutGets scroll top offset.Scrolling offset is the number of pixels this scrollable has been scrolled down.
- Specified by:
getScrollTopin interfaceScrollBoxLayout- Returns:
- vertical scrolling position in pixels
-
setScrollTop
public void setScrollTop(int scrollTop) Description copied from interface:ScrollBoxLayoutSets scroll top offset.Scrolling offset is the number of pixels this scrollable has been scrolled down.
- Specified by:
setScrollTopin interfaceScrollBoxLayout- Parameters:
scrollTop- the yOffset
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<JmixScrollBoxLayout>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<JmixScrollBoxLayout>
-