Clear Up
SharpKit Reference

Component Class

Namespace: Ext

Constructors

Name Description
Component()
Component(ComponentConfig)
Component(object) Creates new Component. @param {Object} config The standard configuration object.

Methods

Name Description
addCls(JsString, JsString, JsString) Adds a CSS class (or classes) to this Component's rendered element @param {String} cls The CSS class to add @param {String} prefix Optional prefix to add to each class @param {String} suffix Optional suffix to add to each class
alignTo(object, object, object)
applyBaseCls(object)
applyBottom(object)
applyCentered(object)
applyDisabled(object)
applyDocked(object)
applyDraggable(object)
applyHidden(object)
applyLeft(object)
applyRight(object)
applyTop(object)
applyTpl(object) @private
destroy() Destroys this Component. If it is currently added to a Container it will first be removed from that Container. All Ext.Element references are also deleted and the Component is de-registered from Ext.ComponentManager
disable() Disables this Component
doAnchorXY(object, object, object, object)
doSetBottom(object)
doSetDisabled(object)
doSetHeight(object)
doSetHidden(object)
doSetLeft(object)
doSetRight(object)
doSetTop(object)
doSetWidth(object)
enable() Enables this Component
filterPositionValue(object)
getDraggable()
getDraggableBehavior()
getEl() Retrieves the top level element representing this component. @return {Ext.dom.Element}
getElementConfig()
getInnerHtmlElement()
getItemId()
getSize() Returns the height and width of the Component @return {Object} The current height and width of the Component
getTemplate()
getXTypes()

Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the {@link Ext.Component} header.

If using your own subclasses, be aware that a Component must register its own xtype to participate in determination of inherited xtypes.

Example usage:

  
var t = new Ext.field.Text();
alert(t.getXTypes());  // alerts 'component/field/textfield'
            
@return {String} The xtype hierarchy string
hide() Hides this Component
isCentered()
isDisabled() Returns true if this Component is currently disabled @return {Boolean} True if currently disabled
isDocked()
isFloating()
isHidden() Returns true if this Component is currently hidden @return {Boolean} True if currently hidden
isInnerItem()
isPainted() @private
isRendered() @private
isXType(JsString, bool)

Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended from the xtype (default) or whether it is directly of the xtype specified (shallow = true).

If using your own subclasses, be aware that a Component must register its own xtype to participate in determination of inherited xtypes.

For a list of all available xtypes, see the {@link Ext.Component} header.

Example usage:

  
var t = new Ext.field.Text();
var isText = t.isXType('textfield');        // true
var isBoxSubclass = t.isXType('field');       // true, descended from Ext.field.Field
var isBoxInstance = t.isXType('field', true); // false, not a direct Ext.field.Field instance
            
@param {String} xtype The xtype to check for this Component @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is the default), or true to check whether this Component is directly of the specified xtype. @return {Boolean} True if this component descends from the specified xtype, false otherwise.
mask(object, object, object)
removeCls(JsString, JsString, JsString) Removes the given CSS class(es) from this Component's rendered element @param {String} cls The class(es) to remove @param {String} prefix Optional prefix to prepend before each class @param {String} suffix Optional suffix to append to each class
renderTo(object, object)
replaceCls(object, object, object, object)
resetFloating()
setParent(object)
setRendered(object)
setSize(JsNumber, JsNumber) Sets the size of the Component @param {Number} width The new width for the Component @param {Number} height The new height for the Component
show() Shows this component
showBy(object, object, object) Shows this Component next to another Component or Element @param {Ext.Component/Ext.Element} alignTo The Element or Component to align to
unmask()
up(JsString)
updateBaseCls(object, object)
updateBorder(object)
updateCls(object, object)
updateData(object) @private
updateFloating()
updateHtml(object)
updateLoadingMask(object)
updateMargin(object)
updateMasked(object)
updateMaskText(object)
updatePadding(object)
updateRenderTo(object)
updateStyle(object)
updateStyleHtmlCls(object, object) Updates the {@link #styleHtmlCls} configuration
updateStyleHtmlContent(object)
updateUi(object, object)
updateZIndex(object)

Properties

Name Description
alternateClassName
anchorRe
element
extend
floating @private
innerElement
isComponent @private
loadingMask @private
maskText @private
observableType
Parent
rendered @private
Rendered
Size Returns the height and width of the Component @return {Object} The current height and width of the Component
xtype
XTypes

Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the {@link Ext.Component} header.

If using your own subclasses, be aware that a Component must register its own xtype to participate in determination of inherited xtypes.

Example usage:

  
var t = new Ext.field.Text();
alert(t.getXTypes());  // alerts 'component/field/textfield'
            
@return {String} The xtype hierarchy string
© Copyright 2005-2011 SharpKit. All rights reserved.