public class ScrollBoxLayoutImpl extends AbstractComponent<JmixScrollBoxLayout> implements ScrollBoxLayout
ScrollBoxLayout.ScrollBarPolicy
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasOrientation.Orientation
HasContextHelp.ContextHelpIconClickEvent
LayoutClickNotifier.LayoutClickEvent
Modifier and Type | Field and Description |
---|---|
protected com.vaadin.shared.Registration |
layoutClickRegistration |
protected HasOrientation.Orientation |
orientation |
protected java.util.List<Component> |
ownComponents |
protected ScrollBoxLayout.ScrollBarPolicy |
scrollBarPolicy |
protected static java.lang.String |
SCROLLBOX_CONTENT_STYLENAME |
protected static java.lang.String |
SCROLLBOX_STYLENAME |
protected java.util.Map<ShortcutAction,com.vaadin.event.ShortcutListener> |
shortcuts |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
ScrollBoxLayoutImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component childComponent)
Adds a component to this container.
|
void |
add(Component childComponent,
int index) |
io.jmix.core.common.event.Subscription |
addLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
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 |
createComponent() |
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) |
Component |
getComponent(int index)
Returns the component at the given position.
|
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
protected com.vaadin.ui.AbstractOrderedLayout |
getContent() |
float |
getContentHeight() |
SizeUnit |
getContentHeightSizeUnit() |
java.lang.String |
getContentMaxHeight() |
java.lang.String |
getContentMaxWidth() |
java.lang.String |
getContentMinHeight() |
java.lang.String |
getContentMinWidth() |
float |
getContentWidth() |
SizeUnit |
getContentWidthSizeUnit() |
MarginInfo |
getMargin() |
HasOrientation.Orientation |
getOrientation() |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
ScrollBoxLayout.ScrollBarPolicy |
getScrollBarPolicy() |
int |
getScrollLeft()
Gets scroll left offset.
|
int |
getScrollTop()
Gets scroll top offset.
|
boolean |
getSpacing() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
int |
indexOf(Component component) |
protected void |
initComponent(JmixScrollBoxLayout component) |
protected void |
internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener) |
boolean |
isRequiredIndicatorVisible()
Returns whether a required indicator should be shown.
|
void |
remove(Component childComponent)
Removes a component from this container.
|
void |
removeAll()
Removes all components from this container.
|
void |
removeShortcutAction(ShortcutAction action) |
void |
setContentHeight(java.lang.String height)
Sets content height.
|
void |
setContentMaxHeight(java.lang.String maxHeight)
Sets maximum CSS height for content.
|
void |
setContentMaxWidth(java.lang.String maxWidth)
Sets maximum CSS width for content.
|
void |
setContentMinHeight(java.lang.String minHeight)
Sets minimum CSS height for content.
|
void |
setContentMinWidth(java.lang.String minWidth)
Sets minimum CSS width for content.
|
void |
setContentWidth(java.lang.String width)
Sets content width.
|
void |
setFrame(Frame frame) |
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(java.lang.String styleName)
Sets one or more style names of the component, replacing any
previous styles.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentNN
add, remove
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
focusFirstComponent, getComponentNN
getFrame
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected static final java.lang.String SCROLLBOX_CONTENT_STYLENAME
protected static final java.lang.String SCROLLBOX_STYLENAME
protected java.util.List<Component> ownComponents
protected com.vaadin.shared.Registration layoutClickRegistration
protected HasOrientation.Orientation orientation
protected ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy
protected java.util.Map<ShortcutAction,com.vaadin.event.ShortcutListener> shortcuts
protected JmixScrollBoxLayout createComponent()
protected void initComponent(JmixScrollBoxLayout component)
protected com.vaadin.ui.AbstractOrderedLayout getContent()
public void add(Component childComponent)
ComponentContainer
add
in interface ComponentContainer
childComponent
- a component to addpublic void add(Component childComponent, int index)
add
in interface OrderedContainer
public int indexOf(Component component)
indexOf
in interface OrderedContainer
@Nullable public Component getComponent(int index)
OrderedContainer
getComponent
in interface OrderedContainer
index
- component indexpublic void setStyleName(@Nullable java.lang.String styleName)
Component
setStyleName
in interface Component
setStyleName
in class AbstractComponent<JmixScrollBoxLayout>
styleName
- one or more style names separated by space.public java.lang.String getStyleName()
Component
getStyleName
in interface Component
getStyleName
in class AbstractComponent<JmixScrollBoxLayout>
public void remove(Component childComponent)
ComponentContainer
remove
in interface ComponentContainer
childComponent
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<JmixScrollBoxLayout>
@Nullable public Component getOwnComponent(java.lang.String id)
HasComponents
getOwnComponent
in interface HasComponents
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
public java.util.Collection<Component> getOwnComponents()
HasComponents
getOwnComponents
in interface HasComponents
public java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponents
getOwnComponentsStream
in interface HasComponents
public java.util.Collection<Component> getComponents()
HasComponents
getComponents
in interface HasComponents
public HasOrientation.Orientation getOrientation()
getOrientation
in interface HasOrientation
public void setOrientation(HasOrientation.Orientation orientation)
setOrientation
in interface HasOrientation
public ScrollBoxLayout.ScrollBarPolicy getScrollBarPolicy()
getScrollBarPolicy
in interface ScrollBoxLayout
public void setScrollBarPolicy(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy)
setScrollBarPolicy
in interface ScrollBoxLayout
public void setContentWidth(@Nullable java.lang.String width)
ScrollBoxLayout
setContentWidth
in interface ScrollBoxLayout
width
- widthpublic float getContentWidth()
getContentWidth
in interface ScrollBoxLayout
public SizeUnit getContentWidthSizeUnit()
getContentWidthSizeUnit
in interface ScrollBoxLayout
public void setContentHeight(@Nullable java.lang.String height)
ScrollBoxLayout
setContentHeight
in interface ScrollBoxLayout
height
- heightpublic float getContentHeight()
getContentHeight
in interface ScrollBoxLayout
public SizeUnit getContentHeightSizeUnit()
getContentHeightSizeUnit
in interface ScrollBoxLayout
public void setContentMinWidth(java.lang.String minWidth)
ScrollBoxLayout
setContentMinWidth
in interface ScrollBoxLayout
minWidth
- minimum width@Nullable public java.lang.String getContentMinWidth()
getContentMinWidth
in interface ScrollBoxLayout
public void setContentMaxWidth(java.lang.String maxWidth)
ScrollBoxLayout
setContentMaxWidth
in interface ScrollBoxLayout
maxWidth
- maximum width@Nullable public java.lang.String getContentMaxWidth()
getContentMaxWidth
in interface ScrollBoxLayout
public void setContentMinHeight(java.lang.String minHeight)
ScrollBoxLayout
setContentMinHeight
in interface ScrollBoxLayout
minHeight
- minimum height@Nullable public java.lang.String getContentMinHeight()
getContentMinHeight
in interface ScrollBoxLayout
public void setContentMaxHeight(java.lang.String maxHeight)
ScrollBoxLayout
setContentMaxHeight
in interface ScrollBoxLayout
maxHeight
- maximum height@Nullable public java.lang.String getContentMaxHeight()
getContentMaxHeight
in interface ScrollBoxLayout
public io.jmix.core.common.event.Subscription addLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
LayoutClickNotifier
addLayoutClickListener
in interface LayoutClickNotifier
listener
- a listener to addprotected void internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
@Nullable protected com.vaadin.ui.Component findChildComponent(com.vaadin.ui.Component vComponent)
@Nullable protected Component findExistingComponent(@Nullable com.vaadin.ui.Component vComponent)
protected void applyScrollBarsPolicy(ScrollBoxLayout.ScrollBarPolicy scrollBarPolicy)
public void setMargin(MarginInfo marginInfo)
public MarginInfo getMargin()
public void setSpacing(boolean enabled)
setSpacing
in interface HasSpacing
public boolean getSpacing()
getSpacing
in interface HasSpacing
public boolean isRequiredIndicatorVisible()
HasRequiredIndicator
isRequiredIndicatorVisible
in interface HasRequiredIndicator
true
if a required indicator should be shown, false
otherwisepublic void setRequiredIndicatorVisible(boolean visible)
HasRequiredIndicator
setRequiredIndicatorVisible
in interface HasRequiredIndicator
visible
- true
if a required indicator should be shown, false
otherwisepublic void addShortcutAction(ShortcutAction action)
addShortcutAction
in interface ShortcutNotifier
public void removeShortcutAction(ShortcutAction action)
removeShortcutAction
in interface ShortcutNotifier
public int getScrollLeft()
ScrollBoxLayout
Scrolling offset is the number of pixels this scrollable has been scrolled right.
getScrollLeft
in interface ScrollBoxLayout
public void setScrollLeft(int scrollLeft)
ScrollBoxLayout
Scrolling offset is the number of pixels this scrollable has been scrolled right.
setScrollLeft
in interface ScrollBoxLayout
scrollLeft
- the xOffsetpublic int getScrollTop()
ScrollBoxLayout
Scrolling offset is the number of pixels this scrollable has been scrolled down.
getScrollTop
in interface ScrollBoxLayout
public void setScrollTop(int scrollTop)
ScrollBoxLayout
Scrolling offset is the number of pixels this scrollable has been scrolled down.
setScrollTop
in interface ScrollBoxLayout
scrollTop
- the yOffsetpublic void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<JmixScrollBoxLayout>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<JmixScrollBoxLayout>