Package com.vaadin.classic.v8.ui
Class HorizontalLayout
java.lang.Object
com.vaadin.flow.component.Component
- All Implemented Interfaces:
LayoutEvents.LayoutClickNotifier,ClientConnector,Sizeable,ComponentContainer,HasComponents,HasComponents.ComponentAttachDetachNotifier,Layout.AlignmentHandler,Layout.MarginHandler,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.shared.HasTooltip,Serializable,Iterable<com.vaadin.flow.component.Component>
@Tag("div")
@CssImport("./ordered-layout.css") @CssImport("./margin.css")
public class HorizontalLayout
extends AbstractOrderedLayout
Legacy version of HorizontalLayout that resembles Vaadin 7/8's
HorizontalLayout API as closely as possible in order to facilitate migration
to newer versions of Vaadin.
HorizontalLayout is a component container, which shows the
subcomponents in the order of their addition (horizontally).
- Author:
- Vaadin Ltd.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.classic.v8.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.DetachEvent, ClientConnector.DetachListenerNested classes/interfaces inherited from interface com.vaadin.classic.v8.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener -
Field Summary
Fields inherited from interface com.vaadin.classic.v8.server.Sizeable
SIZE_UNDEFINED -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty HorizontalLayout.HorizontalLayout(com.vaadin.flow.component.Component... children) Constructs a HorizontalLayout with the given components. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponentsAndExpand(com.vaadin.flow.component.Component... components) Adds the given components to this layout and sets them as expanded.Methods inherited from class com.vaadin.classic.v8.ui.AbstractOrderedLayout
add, addComponent, addComponent, addComponentAsFirst, addComponentAtIndex, addLayoutClickListener, beforeClientResponse, doSetHeight, doSetWidth, getChildren, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getDefaultComponentAlignment, getExpandRatio, getMargin, isSpacing, remove, removeComponent, replaceComponent, setComponentAlignment, setDefaultComponentAlignment, setExpandRatio, setMargin, setMargin, setSlotClasses, setSpacingMethods inherited from class com.vaadin.classic.v8.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, iterator, moveComponentsFrom, removeAll, removeAllComponents, setHeight, setWidthMethods inherited from class com.vaadin.classic.v8.ui.AbstractComponent
addClassName, addClassNames, addInternalStyles, addListener, addShortcutListener, addStyleName, addStyleNames, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getClassName, getClassNames, getComponentError, getCustomAttributes, getCustomStyles, getData, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getInternalStyles, getLabel, getLocale, getPrimaryStyleName, getState, getState, getStyle, getStyleName, getTooltip, getWidth, getWidthUnits, hasClassName, isCaptionAsHtml, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, notifyParentAboutStyleChanges, onEnabledStateChanged, removeClassName, removeClassNames, removeInternalStyles, removeStyleName, removeStyleNames, setCaption, setCaptionAsHtml, setClassName, setClassName, setComponentError, setData, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setLabel, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setTooltipText, setVisible, setWidth, setWidthFull, setWidthUndefinedMethods inherited from class com.vaadin.classic.v8.server.AbstractClientConnector
addExtension, addLegacyAttachListener, addLegacyDetachListener, addListener, addListener, addMethodInvocationToQueue, attach, createState, detach, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getSession, handleConnectorRequest, hasListeners, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, onAttach, onDetach, registerRpc, registerRpc, removeExtension, setErrorHandler, setResource, updateDiffstateMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, removeMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
HorizontalLayout
public HorizontalLayout()Constructs an empty HorizontalLayout. -
HorizontalLayout
public HorizontalLayout(com.vaadin.flow.component.Component... children) Constructs a HorizontalLayout with the given components. The components are added in the given order.- Parameters:
children- The components to add.- See Also:
-
-
Method Details
-
addComponentsAndExpand
public void addComponentsAndExpand(com.vaadin.flow.component.Component... components) Adds the given components to this layout and sets them as expanded. The width of this layout is set to 100% if it is currently undefined.The components are added in the provided order to the end of this layout. Any components that are already children of this layout will be moved to new positions.
- Overrides:
addComponentsAndExpandin classAbstractOrderedLayout- Parameters:
components- the components to set, notnull
-