com.vaadin.ui
Interface Layout.MarginHandler

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractOrderedLayout, FormLayout, GridLayout, HorizontalLayout, VerticalLayout
Enclosing interface:
Layout

public static interface Layout.MarginHandler
extends java.io.Serializable

This type of layout supports automatic addition of margins (space around its components).


Method Summary
 com.vaadin.shared.ui.MarginInfo getMargin()
           
 void setMargin(boolean enabled)
          Enable layout margins.
 void setMargin(com.vaadin.shared.ui.MarginInfo marginInfo)
          Enable margins for this layout.
 

Method Detail

setMargin

void setMargin(boolean enabled)
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.

Parameters:
enabled - true if margins should be enabled on all sides, false to disable all margins

setMargin

void setMargin(com.vaadin.shared.ui.MarginInfo marginInfo)
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.

Parameters:
marginInfo - MarginInfo object containing the new margins.

getMargin

com.vaadin.shared.ui.MarginInfo getMargin()
Returns:
MarginInfo containing the currently enabled margins.


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