Class BoxLayoutContainer.BoxLayoutData
- java.lang.Object
-
- com.sencha.gxt.widget.core.client.container.MarginData
-
- com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData
-
- All Implemented Interfaces:
HasUiAttributes,HasMargins,LayoutData
- Enclosing class:
- BoxLayoutContainer
public static class BoxLayoutContainer.BoxLayoutData extends MarginData implements LayoutData
Specifies box layout parameters which control the minimum and maximum size, as well as the "flex" value.
-
-
Constructor Summary
Constructors Constructor Description BoxLayoutData()Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).BoxLayoutData(Margins margins)Creates a box layout data with the specified margins.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetFlex()Returns the flex value which is a weight used by the layout for sizing calculations.intgetMaxSize()Returns the maximum size to which widgets will be constrained (defaults to unlimited).intgetMinSize()Returns the minimum size to which widgets will be constrained (defaults to 0)voidsetFlex(double flex)Sets the weighted flex value.voidsetMaxSize(int maxSize)Sets the maximum size to which widgets will be constrained.voidsetMinSize(int minSize)Sets the minimum size to which widgets will be constrained.-
Methods inherited from class com.sencha.gxt.widget.core.client.container.MarginData
getMargins, setMargins, toString
-
-
-
-
Constructor Detail
-
BoxLayoutData
public BoxLayoutData()
Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).
-
BoxLayoutData
public BoxLayoutData(Margins margins)
Creates a box layout data with the specified margins.- Parameters:
margins- the margins for the box layout data
-
-
Method Detail
-
getFlex
public double getFlex()
Returns the flex value which is a weight used by the layout for sizing calculations.- Returns:
- the flex
-
getMaxSize
public int getMaxSize()
Returns the maximum size to which widgets will be constrained (defaults to unlimited).- Returns:
- the maximum allowable size when resizing widgets
-
getMinSize
public int getMinSize()
Returns the minimum size to which widgets will be constrained (defaults to 0)- Returns:
- the minimum allowable size when resizing widgets
-
setFlex
public void setFlex(double flex)
Sets the weighted flex value. Each child item with a flex value will be flexed horizontally according to each item's relative flex value compared to the sum of all items with a flex value specified. Values of 0 (default) will cause the child to not be 'flexed' with the initial width not being changed.- Parameters:
flex- the flex value
-
setMaxSize
public void setMaxSize(int maxSize)
Sets the maximum size to which widgets will be constrained.- Parameters:
maxSize- the maximum allowable size when resizing widgets
-
setMinSize
public void setMinSize(int minSize)
Sets the minimum size to which widgets will be constrained.- Parameters:
minSize- the minimum allowable size when resizing widgets
-
-