com.vaadin.ui
Class AbstractLayout

java.lang.Object
  extended by com.vaadin.terminal.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractComponentContainer
              extended by com.vaadin.ui.AbstractLayout
All Implemented Interfaces:
MethodEventSource, Connector, ClientConnector, RpcTarget, Sizeable, Component, ComponentContainer, HasComponents, Layout, Layout.MarginHandler, Serializable, Iterable<Component>
Direct Known Subclasses:
AbsoluteLayout, AbstractOrderedLayout, CssLayout, CustomLayout, GridLayout

public abstract class AbstractLayout
extends AbstractComponentContainer
implements Layout, Layout.MarginHandler

An abstract class that defines default implementation for the Layout interface.

Since:
5.0
Version:
7.0.0.alpha3
Author:
Vaadin Ltd.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
Layout.AlignmentHandler, Layout.MarginHandler, Layout.MarginInfo, Layout.SpacingHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.Sizeable
Sizeable.Unit
 
Field Summary
protected  Layout.MarginInfo margins
           
 
Fields inherited from interface com.vaadin.terminal.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
AbstractLayout()
           
 
Method Summary
 Layout.MarginInfo getMargin()
           
 AbstractLayoutState getState()
          Returns the shared state bean with information to be sent from the server to the client.
 void setMargin(boolean enabled)
          Enable layout margins.
 void setMargin(boolean topEnabled, boolean rightEnabled, boolean bottomEnabled, boolean leftEnabled)
          Enable specific layout margins.
 void setMargin(Layout.MarginInfo marginInfo)
          Enable margins for this layout.
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponent, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, isComponentVisible, iterator, moveComponentsFrom, removeAllComponents, removeComponent, removeListener, removeListener, setHeight, setVisible, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getActionManager, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getRoot, getStyle, getStyleName, getWidth, getWidthUnits, handleError, hasListeners, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeListener, removeListener, removeListener, removeListener, removeShortcutListener, removeStyleName, requestRepaint, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setWidth, updateState
 
Methods inherited from class com.vaadin.terminal.AbstractClientConnector
addExtension, addMethodInvocationToQueue, createState, getAllChildrenIterable, getConnectorId, getExtensions, getRpcManager, getRpcProxy, getStateType, registerRpc, registerRpc, removeExtension, requestRepaintAll, retrievePendingRpcCalls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponent, addListener, addListener, getComponentCount, moveComponentsFrom, removeAllComponents, removeComponent, removeListener, removeListener, replaceComponent
 
Methods inherited from interface com.vaadin.ui.HasComponents
getComponentIterator, isComponentVisible
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getApplication, getCaption, getDebugId, getIcon, getLocale, getParent, getRoot, getStyleName, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setDebugId, setEnabled, setIcon, setReadOnly, setStyleName, setVisible, updateState
 
Methods inherited from interface com.vaadin.terminal.gwt.server.ClientConnector
detach, getExtensions, getStateType, isConnectorEnabled, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent
 
Methods inherited from interface com.vaadin.terminal.gwt.client.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.terminal.gwt.server.RpcTarget
getRpcManager
 
Methods inherited from interface com.vaadin.terminal.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

margins

protected Layout.MarginInfo margins
Constructor Detail

AbstractLayout

public AbstractLayout()
Method Detail

getState

public 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().

Specified by:
getState in interface Connector
Specified by:
getState in interface Component
Overrides:
getState in class AbstractComponent
Returns:
updated component shared state

setMargin

public void setMargin(boolean enabled)
Description copied from interface: Layout
Enable layout margins. Affects all four sides of the layout. This will tell the client-side implementation to leave extra space around the layout. The client-side implementation decides the actual amount, and it can vary between themes.

Specified by:
setMargin in interface Layout

getMargin

public Layout.MarginInfo getMargin()
Specified by:
getMargin in interface Layout.MarginHandler
Returns:
MarginInfo containing the currently enabled margins.

setMargin

public void setMargin(Layout.MarginInfo marginInfo)
Description copied from interface: Layout.MarginHandler
Enable margins for this layout.

NOTE: This will only affect the space around the components in the layout, not space between the components in the layout. Use #setSpacing(boolean) to add space between the components in the layout.

See the reference manual for more information about CSS rules for defining the size of the margin.

Specified by:
setMargin in interface Layout.MarginHandler
Parameters:
marginInfo - MarginInfo object containing the new margins.

setMargin

public void setMargin(boolean topEnabled,
                      boolean rightEnabled,
                      boolean bottomEnabled,
                      boolean leftEnabled)
Description copied from interface: Layout
Enable specific layout margins. This will tell the client-side implementation to leave extra space around the layout in specified edges, clockwise from top (top, right, bottom, left). The client-side implementation decides the actual amount, and it can vary between themes.

Specified by:
setMargin in interface Layout


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.