Package com.vaadin.ui
Class AbstractLayout
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractComponentContainer
-
- com.vaadin.ui.AbstractLayout
-
- All Implemented Interfaces:
ContextClickEvent.ContextClickNotifier
,MethodEventSource
,ClientConnector
,Sizeable
,Connector
,Component
,ComponentContainer
,HasComponents
,HasComponents.ComponentAttachDetachNotifier
,Layout
,Serializable
,Iterable<Component>
- Direct Known Subclasses:
AbsoluteLayout
,AbstractOrderedLayout
,CssLayout
,CustomLayout
,GridLayout
public abstract class AbstractLayout extends AbstractComponentContainer implements Layout
An abstract class that defines default implementation for theLayout
interface.- Since:
- 5.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
Layout.AlignmentHandler, Layout.MarginHandler, Layout.SpacingHandler
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor Description AbstractLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractLayoutState
getState()
Returns the shared state bean with information to be sent from the server to the client.protected MarginInfo
readMargin(org.jsoup.nodes.Element design, MarginInfo defMargin, DesignContext context)
Reads margin attributes from a design into a MarginInfo object.protected void
writeMargin(org.jsoup.nodes.Element design, MarginInfo margin, MarginInfo defMargin, DesignContext context)
Writes margin attributes from a MarginInfo object to a design.-
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponent, addComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponent, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined, writeDesign
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponent, addComponents, addListener, addListener, getComponentCount, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponent, removeListener, removeListener, replaceComponent
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.ui.HasComponents
iterator
-
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
-
-
-
-
Method Detail
-
getState
protected AbstractLayoutState getState()
Description copied from class:AbstractComponent
Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().- Overrides:
getState
in classAbstractComponent
- Returns:
- updated component shared state
-
readMargin
protected MarginInfo readMargin(org.jsoup.nodes.Element design, MarginInfo defMargin, DesignContext context)
Reads margin attributes from a design into a MarginInfo object. This helper method should be called from thereadDesign
method of layouts that implementLayout.MarginHandler
.- Parameters:
design
- the design from which to readdefMargin
- the default margin state for edges that are not set in the designcontext
- the DesignContext instance used for parsing the design- Returns:
- the margin info
- Since:
- 7.5
-
writeMargin
protected void writeMargin(org.jsoup.nodes.Element design, MarginInfo margin, MarginInfo defMargin, DesignContext context)
Writes margin attributes from a MarginInfo object to a design. This helper method should be called from thewriteDesign
method of layouts that implementLayout.MarginHandler
.- Parameters:
design
- the design to write tomargin
- the margin state to writedefMargin
- the default margin state to compare againstcontext
- the DesignContext instance used for parsing the design- Since:
- 7.5
-
-