X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/BoxLayout.html diff --git a/docs/source/BoxLayout.html b/docs/source/BoxLayout.html index e6c24b1d..b9142d04 100644 --- a/docs/source/BoxLayout.html +++ b/docs/source/BoxLayout.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.layout.BoxLayout * @extends Ext.layout.ContainerLayout *

Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.

@@ -43,8 +49,20 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { defaultMargins : {left:0,top:0,right:0,bottom:0},
/** * @cfg {String} padding - * Defaults to '0'. Sets the padding to be applied to all child items managed by this - * container's layout. + *

Sets the padding to be applied to all child items managed by this layout.

+ *

This property must be specified as a string containing + * space-separated, numeric padding values. The order of the sides associated + * with each value matches the way CSS processes padding values:

+ *
    + *
  • If there is only one value, it applies to all sides.
  • + *
  • If there are two values, the top and bottom borders are set to the + * first value and the right and left are set to the second.
  • + *
  • If there are three values, the top is set to the first value, the left + * and right are set to the second, and the bottom is set to the third.
  • + *
  • If there are four values, they apply to the top, right, bottom, and + * left, respectively.
  • + *
+ *

Defaults to: "0"

*/ padding : '0', // documented in subclasses @@ -56,6 +74,13 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { extraCls : 'x-box-item', ctCls : 'x-box-layout-ct', innerCls : 'x-box-inner', + + constructor : function(config){ + Ext.layout.BoxLayout.superclass.constructor.call(this, config); + if(Ext.isString(this.defaultMargins)){ + this.defaultMargins = this.parseMargins(this.defaultMargins); + } + }, // private isValidParent : function(c, target){ @@ -79,7 +104,7 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { // private renderItem : function(c){ - if(typeof c.margins == 'string'){ + if(Ext.isString(c.margins)){ c.margins = this.parseMargins(c.margins); }else if(!c.margins){ c.margins = this.defaultMargins; @@ -110,7 +135,9 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
/** * @class Ext.layout.VBoxLayout * @extends Ext.layout.BoxLayout - * A layout that arranges items vertically + *

A layout that arranges items vertically down a Container. This layout optionally divides available vertical + * space between child items containing a numeric flex configuration.

+ * This layout may also be used to set the widths of child items by configuring it with the {@link #align} option. */ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
/** @@ -158,8 +185,8 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { var cs = this.getItems(ct), cm, ch, margin, size = this.getTargetSize(target), - w = size.width - target.getPadding('lr') - this.scrollOffset, - h = size.height - target.getPadding('tb'), + w = size.width - target.getPadding('lr'), + h = size.height - target.getPadding('tb') - this.scrollOffset, l = this.padding.left, t = this.padding.top, isStart = this.pack == 'start', isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1, @@ -265,7 +292,9 @@ Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout;
/** * @class Ext.layout.HBoxLayout * @extends Ext.layout.BoxLayout - * A layout that arranges items horizontally + *

A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal + * space between child items containing a numeric flex configuration.

+ * This layout may also be used to set the heights of child items by configuring it with the {@link #align} option. */ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
/** @@ -416,6 +445,6 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, { }); Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout; -
- +
+ \ No newline at end of file