public interface FluentAbstractOrderedLayout<THIS extends FluentAbstractLayout<THIS> & FluentLayout.FluentAlignmentHandler<THIS> & FluentLayout.FluentMarginHandler<THIS> & FluentLayout.FluentSpacingHandler<THIS>> extends FluentLayout.FluentAlignmentHandler<THIS>, FluentLayout.FluentMarginHandler<THIS>, FluentLayout.FluentSpacingHandler<THIS>, FluentAbstractLayout<THIS>
AbstractOrderedLayout
AbstractOrderedLayout
FluentLayout.FluentAlignmentHandler<THIS extends FluentLayout.FluentAlignmentHandler<THIS>>, FluentLayout.FluentMarginHandler<THIS extends FluentLayout.FluentMarginHandler<THIS>>, FluentLayout.FluentSpacingHandler<THIS extends FluentLayout.FluentSpacingHandler<THIS>>
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
FluentHasComponents.FluentComponentAttachDetachNotifier<THIS extends FluentHasComponents<THIS>>
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
default THIS |
withComponent(com.vaadin.ui.Component c,
int index)
Adds a component into indexed position in this container.
|
default THIS |
withComponentAsFirst(com.vaadin.ui.Component c)
Adds a component into this container.
|
default THIS |
withExpandRatio(com.vaadin.ui.Component component,
float ratio)
This method is used to control how excess space in layout is distributed
among components.
|
withComponentAlignment, withDefaultComponentAlignment
getComponentAlignment, getDefaultComponentAlignment, setComponentAlignment, setDefaultComponentAlignment
withMargin, withMargin
withSpacing
withCaption, withCaptionAsHtml, withComponentError, withData, withDescription, withDescription, withLocale, withResponsive, withShortcutListener, withStyleName
withAttachListener, withDetachListener
withContextClickListener
addContextClickListener, removeContextClickListener
withComponent, withComponents
addComponent, addComponents, getComponentCount, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponent, replaceComponent
forEach, spliterator
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
withComponentAttachListener, withComponentDetachListener
default THIS withComponent(com.vaadin.ui.Component c, int index)
c
- the component to be added.index
- the index of the component position. The components currently
in and after the position are shifted forwards.AbstractOrderedLayout.addComponent(Component, int)
default THIS withComponentAsFirst(com.vaadin.ui.Component c)
c
- the component to be added.AbstractOrderedLayout.addComponentAsFirst(Component)
default THIS withExpandRatio(com.vaadin.ui.Component component, float ratio)
This method is used to control how excess space in layout is distributed among components. Excess space may exist if layout is sized and contained non relatively sized components don't consume all available space.
Example how to distribute 1:3 (33%) for component1 and 2:3 (67%) for
component2 :
layout.setExpandRatio(component1, 1);
layout.setExpandRatio(component2, 2);
If no ratios have been set, the excess space is distributed evenly among all components.
Note, that width or height (depending on orientation) needs to be defined for this method to have any effect.
component
- the component in this layout which expand ratio is to be setratio
- new expand ratio (greater or equal to 0)IllegalArgumentException
- if the expand ratio is negative or the component is not a
direct child of the layoutSizeable
,
AbstractOrderedLayout.setExpandRatio(Component, float)
Copyright © 2017 Jean-Christophe Fortier. All rights reserved.