Ext.data.JsonP.Ext_layout_ContextItem({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{"private":true},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base"],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"property","name":"state","id":"property-state"},{"meta":{"readonly":true},"owner":"Ext.layout.ContextItem","tagname":"property","name":"wrapsComponent","id":"property-wrapsComponent"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"addBlock","id":"method-addBlock"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"addCls","id":"method-addCls"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"addTrigger","id":"method-addTrigger"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"block","id":"method-block"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"clearBlocks","id":"method-clearBlocks"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"clearMarginCache","id":"method-clearMarginCache"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"domBlock","id":"method-domBlock"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"fireTriggers","id":"method-fireTriggers"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"flush","id":"method-flush"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"flushAnimations","id":"method-flushAnimations"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getBorderInfo","id":"method-getBorderInfo"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getClassList","id":"method-getClassList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getDomProp","id":"method-getDomProp"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getEl","id":"method-getEl"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getFrameInfo","id":"method-getFrameInfo"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getMarginInfo","id":"method-getMarginInfo"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getPaddingInfo","id":"method-getPaddingInfo"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getProp","id":"method-getProp"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getStyle","id":"method-getStyle"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"getStyles","id":"method-getStyles"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"hasDomProp","id":"method-hasDomProp"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"hasProp","id":"method-hasProp"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"init","id":"method-init"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"initAnimation","id":"method-initAnimation"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"initContinue","id":"method-initContinue"},{"meta":{"private":true},"owner":"Ext.layout.ContextItem","tagname":"method","name":"initDone","id":"method-initDone"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"invalidate","id":"method-invalidate"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"recoverProp","id":"method-recoverProp"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"removeCls","id":"method-removeCls"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setAttribute","id":"method-setAttribute"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setContentHeight","id":"method-setContentHeight"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setContentSize","id":"method-setContentSize"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setContentWidth","id":"method-setContentWidth"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setHeight","id":"method-setHeight"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setProp","id":"method-setProp"},{"meta":{},"owner":"Ext.layout.ContextItem","tagname":"method","name":"setWidth","id":"method-setWidth"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":"Ext.Base","private":true,"html":"
Hierarchy
Ext.BaseExt.layout.ContextItemRequires
Files
NOTE This is a private utility class for internal use by the framework. Don't rely on its existence.
This class manages state information for a component or element during a layout.
\n\nA \"block\" is a required value that is preventing further calculation. When a layout has\nencountered a situation where it cannot possibly calculate results, it can associate\nitself with the context item and missing property so that it will not be rescheduled\nuntil that property is set.
\n\nBlocks are a one-shot registration. Once the property changes, the block is removed.
\n\nBe careful with blocks. If any further calculations can be made, a block is not the\nright choice.
\n\nWhenever any call to getProp, getDomProp, hasProp or\nhasDomProp is made, the current layout is automatically registered as being\ndependent on that property in the appropriate state. Any changes to the property will\ntrigger the layout and it will be queued in the Ext.layout.Context.
\n\nTriggers, once added, remain for the entire layout. Any changes to the property will\nreschedule all unfinished layouts in their trigger set.
\nGet the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self
is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison
Ext.define('My.Cat', {\n statics: {\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n alert(this.self.speciesName); // dependent on 'this'\n },\n\n clone: function() {\n return new this.self();\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\n
\nState variables that are cleared when invalidated. Only applies to component items.
\nDefaults to: null
True if this item wraps a Component (rather than an Element).
\nDefaults to: false
Adds a block.
\nThe name of the block list ('blocks' or 'domBlocks').
\nThe layout that is blocked.
\nThe property name that blocked the layout (e.g., 'width').
\nQueue the addition of a class name (or array of class names) to this ContextItem's target when next flushed.
\nRegisters a layout in the block list for the given property. Once the property is\nset in the Ext.layout.Context, the layout is unblocked.
\nThe property name that blocked the layout (e.g., 'width').
\nCall the original method that was previously overridden with override
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n
\n This method has been deprecated
\nas of 4.1. Use callParent instead.
\n\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callOverridden(arguments)
Returns the result of calling the overridden method
\nCall the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).
\n\n Ext.define('My.Base', {\n constructor: function (x) {\n this.x = x;\n },\n\n statics: {\n method: function (x) {\n return x;\n }\n }\n });\n\n Ext.define('My.Derived', {\n extend: 'My.Base',\n\n constructor: function () {\n this.callParent([21]);\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // alerts 21\n
\n\nThis can be used with an override as follows:
\n\n Ext.define('My.DerivedOverride', {\n override: 'My.Derived',\n\n constructor: function (x) {\n this.callParent([x*2]); // calls original My.Derived constructor\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // now alerts 42\n
\n\nThis also works with static methods.
\n\n Ext.define('My.Derived2', {\n extend: 'My.Base',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Base.method\n }\n }\n });\n\n alert(My.Base.method(10); // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\nLastly, it also works with overridden static methods.
\n\n Ext.define('My.Derived2Override', {\n override: 'My.Derived2',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Derived2.method\n }\n }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callParent(arguments)
Returns the result of calling the parent method
\nRemoves any blocks on a property in the specified set. Any layouts that were blocked\nby this property and are not still blocked (by other properties) will be rescheduled.
\nclears the margin cache so that marginInfo get re-read from the dom on the next call to getMarginInfo()\nThis is needed in some special cases where the margins have changed since the last layout, making the cached\nvalues invalid. For example collapsed window headers have different margin than expanded ones.
\nRegisters a layout in the DOM block list for the given property. Once the property\nflushed to the DOM by the Ext.layout.Context, the layout is unblocked.
\nThe property name that blocked the layout (e.g., 'width').
\nFlushes any updates in the dirty collection to the DOM. This is only called if there\nare dirty entries because this object is only added to the flushQueue of the\nExt.layout.Context when entries become dirty.
\nGets the border information for the element as an object with left, top, right and\nbottom properties holding border size in pixels. This object is only read from the\nDOM on first request and is cached.
\nReturns a ClassList-like object to buffer access to this item's element's classes.
\nGets a property of this object if it is correct in the DOM. Also tracks the current\nlayout as dependent on this property so that DOM writes of it will trigger the\nlayout to be recalculated.
\nThe property name (e.g., 'width').
\nThe property value or undefined if not yet set or is dirty.
\nGets the \"frame\" information for the element as an object with left, top, right and\nbottom properties holding border+framing size in pixels. This object is calculated\non first request and is cached.
\nGets the margin information for the element as an object with left, top, right and\nbottom properties holding margin size in pixels. This object is only read from the\nDOM on first request and is cached.
\nGets the padding information for the element as an object with left, top, right and\nbottom properties holding padding size in pixels. This object is only read from the\nDOM on first request and is cached.
\nGets a property of this object. Also tracks the current layout as dependent on this\nproperty so that changes to it will trigger the layout to be recalculated.
\nThe property name that blocked the layout (e.g., 'width').
\nThe property value or undefined if not yet set.
\nReturns a style for this item. Each style is read from the DOM only once on first\nrequest and is then cached. If the value is an integer, it is parsed automatically\n(so '5px' is not returned, but rather 5).
\nThe CSS style name.
\nThe value of the DOM style (parsed as necessary).
\nReturns styles for this item. Each style is read from the DOM only once on first\nrequest and is then cached. If the value is an integer, it is parsed automatically\n(so '5px' is not returned, but rather 5).
\nThe CSS style names.
\nThe alternate names for the returned styles. If given,\nthese names must correspond one-for-one to the styleNames
.
The values of the DOM styles (parsed as necessary).
\nReturns true if the given property is correct in the DOM. This is equivalent to\ncalling getDomProp and not getting an undefined result. In particular,\nthis call registers the current layout to be triggered by flushes of this property.
\nThe property name (e.g., 'width').
\nReturns true if the given property has been set. This is equivalent to calling\ngetProp and not getting an undefined result. In particular, this call\nregisters the current layout to be triggered by changes to this property.
\nThe property name (e.g., 'width').
\nClears all properties on this object except (perhaps) those not calculated by this\ncomponent. This is more complex than it would seem because a layout can decide to\ninvalidate its results and run the component's layouts again, but since some of the\nvalues may be calculated by the container, care must be taken to preserve those\nvalues.
\nTrue if all properties are to be invalidated, false to keep\nthose calculated by the ownerCt.
\nA value to pass as the first argument to initContinue.
\nInitialize configuration for this class. a typical example:
\n\nExt.define('My.awesome.Class', {\n // The default config\n config: {\n name: 'Awesome',\n isAwesome: true\n },\n\n constructor: function(config) {\n this.initConfig(config);\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\nthis
\nInvalidates the component associated with this item. The layouts for this component\nand all of its contained items will be re-run after first clearing any computed\nvalues.
\n\nIf state needs to be carried forward beyond the invalidation, the options
parameter\ncan be used.
An object describing how to handle the invalidation.
\nA function to call after the context data is cleared\nand before the Ext.layout.Layout.beginLayoutCycle methods are called.
\nThis ContextItem.
\nThe options object passed to invalidate.
\nA function to call after the context data is cleared\nand after the Ext.layout.Layout.beginLayoutCycle methods are called.
\nThis ContextItem.
\nThe options object passed to invalidate.
\nThe scope to use when calling the callback functions.
\nRecovers a property value from the last computation and restores its value and\ndirty state.
\nQueue the removal of a class name (or array of class names) from this ContextItem's target when next flushed.
\nSets the contentHeight property. If the component uses raw content, then only the\nmeasured height is acceptable.
\n\nCalculated values can sometimes be NaN or undefined, which generally mean the\ncalculation is not done. To indicate that such as value was passed, 0 is returned.\nOtherwise, 1 is returned.
\n\nIf the caller is not measuring (i.e., they are calculating) and the component has raw\ncontent, 1 is returned indicating that the caller is done.
\nSets the contentWidth and contentHeight properties. If the component uses raw content,\nthen only the measured values are acceptable.
\n\nCalculated values can sometimes be NaN or undefined, which generally means that the\ncalculation is not done. To indicate that either passed value was such a value, false\nreturned. Otherwise, true is returned.
\n\nIf the caller is not measuring (i.e., they are calculating) and the component has raw\ncontent, true is returned indicating that the caller is done.
\nSets the contentWidth property. If the component uses raw content, then only the\nmeasured width is acceptable.
\n\nCalculated values can sometimes be NaN or undefined, which generally means that the\ncalculation is not done. To indicate that such as value was passed, 0 is returned.\nOtherwise, 1 is returned.
\n\nIf the caller is not measuring (i.e., they are calculating) and the component has raw\ncontent, 1 is returned indicating that the caller is done.
\nSets the height and constrains the height to min/maxHeight range.
\nThe height.
\nSpecifies if the value is currently in the DOM. A\nvalue of false
indicates that the value is already in the DOM.
Defaults to: true
The actual height after constraining.
\nSets a property value. This will unblock and/or trigger dependent layouts if the\nproperty value is being changed. Values of NaN and undefined are not accepted by\nthis method.
\nThe property name (e.g., 'width').
\nThe new value of the property.
\nOptionally specifies if the value is currently in the DOM\n (default is true
which indicates the value is not in the DOM and must be flushed\n at some point).
1 if this call specified the property value, 0 if not.
\nSets the height and constrains the width to min/maxWidth range.
\nThe width.
\nSpecifies if the value is currently in the DOM. A\nvalue of false
indicates that the value is already in the DOM.
Defaults to: true
The actual width after constraining.
\nGet the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics()
is scope-independent and it always returns the class from which it was called, regardless of what\nthis
points to during run-time
Ext.define('My.Cat', {\n statics: {\n totalCreated: 0,\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n var statics = this.statics();\n\n alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to\n // equivalent to: My.Cat.speciesName\n\n alert(this.self.speciesName); // dependent on 'this'\n\n statics.totalCreated++;\n },\n\n clone: function() {\n var cloned = new this.self; // dependent on 'this'\n\n cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName\n\n return cloned;\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n },\n\n constructor: function() {\n this.callParent();\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\nalert(clone.groupName); // alerts 'Cat'\n\nalert(My.Cat.totalCreated); // alerts 3\n
\nAdd methods / properties to the prototype of this class.
\n\nExt.define('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.addMembers({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\nAdd / override static properties of this class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics({\n someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'\n method1: function() { ... }, // My.cool.Class.method1 = function() { ... };\n method2: function() { ... } // My.cool.Class.method2 = function() { ... };\n});\n
\nthis
\nBorrow another class' members to the prototype of this class.
\n\nExt.define('Bank', {\n money: '$$$',\n printMoney: function() {\n alert('$$$$$$$');\n }\n});\n\nExt.define('Thief', {\n ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\nThe class to borrow members from
\nThe names of the members to borrow
\nthis
\nCreate a new instance of this Class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n
\n\nAll parameters are passed to the constructor of the class.
\nthe created instance.
\nCreate aliases for existing prototype methods. Example:
\n\nExt.define('My.cool.Class', {\n method1: function() { ... },\n method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n method3: 'method1',\n method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\nThe new method name, or an object to set multiple aliases. See\nflexSetter
\nThe original method name
\nGet the current class' name in string format.
\n\nExt.define('My.cool.Class', {\n constructor: function() {\n alert(this.self.getName()); // alerts 'My.cool.Class'\n }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\nclassName
\nAdds members to class.
\nThis method has been deprecated since 4.1
\nUse addMembers instead.
\n\nOverride members of this class. Overridden methods can be invoked via\ncallParent.
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n
\n\nAs of 4.1, direct use of this method is deprecated. Use Ext.define\ninstead:
\n\nExt.define('My.CatOverride', {\n override: 'My.Cat',\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\n }\n});\n
\n\nThe above accomplishes the same result but can be managed by the Ext.Loader\nwhich can properly order the override and its target class and the build process\ncan determine whether the override is needed based on the required state of the\ntarget class (My.Cat).
\nThis method has been deprecated since 4.1.0
\nUse Ext.define instead
\n\nThe properties to add to this class. This should be\nspecified as an object literal containing one or more properties.
\nthis class
\n