com.sencha.gxt.widget.core.client.container
Class BoxLayoutContainer.BoxLayoutData

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.container.MarginData
      extended by 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
BoxLayoutContainer.BoxLayoutData()
          Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).
BoxLayoutContainer.BoxLayoutData(Margins margins)
          Creates a box layout data with the specified margins.
 
Method Summary
 double getFlex()
          Returns the flex value which is a weight used by the layout for sizing calculations.
 int getMaxSize()
          Returns the maximum size to which widgets will be constrained (defaults to unlimited).
 int getMinSize()
          Returns the minimum size to which widgets will be constrained (defaults to 0)
 void setFlex(double flex)
          Sets the weighted flex value.
 void setMaxSize(int maxSize)
          Sets the maximum size to which widgets will be constrained.
 void setMinSize(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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxLayoutContainer.BoxLayoutData

public BoxLayoutContainer.BoxLayoutData()
Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).


BoxLayoutContainer.BoxLayoutData

public BoxLayoutContainer.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


Copyright © 2012. All Rights Reserved.