Class type Ext_AbstractComponent.t


class type t = object .. end
Inherits
method _isLayoutRoot : bool Js.t Js.prop

Setting this property to true causes the isLayoutRoot method to return true and stop the search for the top-most component for a layout.

Defaults to: false

method contentPaddingProperty : Js.js_string Js.t Js.prop

The name of the padding property that is used by the layout to manage padding. See managePadding

Defaults to: 'padding'

method draggable : bool Js.t Js.readonly_prop

Indicates whether or not the component can be dragged.

Defaults to: false

method frameSize : 'a. 'a Js.t Js.readonly_prop

Indicates the width of any framing elements which were added within the encapsulating element to provide graphical, rounded borders. See the frame config. This property is null if the component is not framed.

This is an object containing the frame width in pixels for all four sides of the Component containing the following properties:


method isComponent : bool Js.t Js.prop

true in this class to identify an object as an instantiated Component, or subclass thereof.

Defaults to: true

method maskOnDisable : bool Js.t Js.prop

This is an internal flag that you use when creating custom components. By default this is set to true which means that every component gets a mask when it's disabled. Components like FieldContainer, FieldSet, Field, Button, Tab override this property to false since they want to implement custom disable logic.

Defaults to: true

method ownerCt : 'b. 'b Js.t Js.readonly_prop

This Component's owner Container (is set automatically when this Component is added to a Container).

Important. This is not a universal upwards navigation pointer. It indicates the Container which owns and manages this Component if any. There are other similar relationships such as the button which activates a menu, or the menu item which activated a submenu, or the column header which activated the column menu.

These differences are abstracted away by the up method.

Note: to access items within the Container see itemId.


method rendered : bool Js.t Js.readonly_prop

Indicates whether or not the component has been rendered.

Defaults to: false

method addCls : 'c.
'c Js.t ->
(< _isLayoutRoot : bool Js.t Js.prop; addChildEls : unit Js.meth;
addCls : 'c. 'd;
addClsWithUI : 'f 'g. 'f Js.t -> 'g Js.t -> unit Js.meth;
addEvents : 'h. 'h Js.t -> unit Js.meth;
addListener : 'i 'j 'k 'l 'm.
'i Js.t ->
'j Js.callback Js.optdef ->
'k Js.t Js.optdef ->
'l Js.t Js.optdef -> 'm Js.t Js.meth;
addManagedListener : 'n 'o 'p 'q 'r 's.
'n Js.t ->
'o Js.t ->
'p Js.callback Js.optdef ->
'q Js.t Js.optdef ->
'r Js.t Js.optdef -> 's Js.t Js.meth;
addPropertyToState : 't.
't Js.t ->
Js.js_string Js.t ->
Js.js_string Js.t Js.optdef -> bool Js.t Js.meth;
addStateEvents : 'u. 'u Js.t -> unit Js.meth;
addUIClsToElement : Js.js_string Js.t -> unit Js.meth;
afterComponentLayout : 'v 'w.
Js.number Js.t ->
Js.number Js.t ->
'v Js.t -> 'w Js.t -> unit Js.meth;
afterRender : unit Js.meth;
afterSetPosition : Js.number Js.t -> Js.number Js.t -> unit Js.meth;
alignTo : 'x 'y.
'x Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'y Js.t Js.optdef -> 'e Js.t Js.meth;
anchorTo : 'z 'a1 'b1 'c1.
'z Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'a1 Js.t Js.optdef ->
'b1 Js.t Js.optdef ->
'c1 Js.callback Js.optdef -> 'e Js.t Js.meth;
animate : 'd1 'e1. 'd1 Js.t -> 'e1 Js.t Js.meth;
applyState : 'f1. 'f1 Js.t -> unit Js.meth;
beforeBlur : Ext_EventObject.t Js.t -> unit Js.meth;
beforeComponentLayout : Js.number Js.t -> Js.number Js.t -> unit Js.meth;
beforeDestroy : unit Js.meth;
beforeFocus : Ext_EventObject.t Js.t -> unit Js.meth;
beforeLayout : unit Js.meth;
calculateConstrainedPosition : 'g1.
'g1 Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t
Js.optdef ->
bool Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t
Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
callParent : 'h1 'i1. 'h1 Js.t -> 'i1 Js.t Js.meth;
callSuper : 'j1 'k1. 'j1 Js.t -> 'k1 Js.t Js.meth;
clearListeners : unit Js.meth; clearManagedListeners : unit Js.meth;
contentPaddingProperty : Js.js_string Js.t Js.prop;
destroy : unit Js.meth; disable : bool Js.t Js.optdef -> unit Js.meth;
doAutoRender : unit Js.meth; doComponentLayout : 'l1. 'l1 Js.t Js.meth;
draggable : bool Js.t Js.readonly_prop;
enable : bool Js.t Js.optdef -> unit Js.meth;
enableBubble : 'm1. 'm1 Js.t -> unit Js.meth;
ensureAttachedToBody : bool Js.t Js.optdef -> unit Js.meth;
findPlugin : Js.js_string Js.t -> Ext_AbstractPlugin.t Js.t Js.meth;
fireEvent : 'n1. Js.js_string Js.t -> 'n1 Js.t -> bool Js.t Js.meth;
fireEventArgs : 'o1.
Js.js_string Js.t ->
'o1 Js.t Js.js_array Js.t -> bool Js.t Js.meth;
frameSize : 'a. 'a Js.t Js.readonly_prop;
getActiveAnimation : 'p1. 'p1 Js.t Js.meth;
getAlignToXY : 'q1.
'q1 Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getAnchorXY : 'r1.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef ->
'r1 Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getBox : 's1.
bool Js.t Js.optdef ->
bool Js.t Js.optdef -> 's1 Js.t Js.meth;
getBubbleTarget : 't1. 't1 Js.t Js.meth;
getConstrainVector : 'u1 'v1.
'u1 Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'v1 Js.t Js.meth;
getEl : Ext_dom_Element.t Js.t Js.meth;
getHeight : Js.number Js.t Js.meth; getId : Js.js_string Js.t Js.meth;
getInitialConfig : 'w1. Js.js_string Js.t Js.optdef -> 'w1 Js.t Js.meth;
getInsertPosition : 'x1. 'x1 Js.t -> Dom_html.element Js.t Js.meth;
getItemId : Js.js_string Js.t Js.meth;
getLoader : Ext_ComponentLoader.t Js.t Js.meth;
getLocalX : Js.number Js.t Js.meth;
getLocalXY : Js.number Js.t Js.js_array Js.t Js.meth;
getLocalY : Js.number Js.t Js.meth;
getOffsetsTo : 'y1. 'y1 Js.t -> Js.number Js.t Js.js_array Js.t Js.meth;
getPlugin : Js.js_string Js.t -> Ext_AbstractPlugin.t Js.t Js.meth;
getRegion : Ext_util_Region.t Js.t Js.meth;
getSize : 'z1. 'z1 Js.t Js.meth;
getSizeModel : 'a2 'b2. 'a2 Js.t -> 'b2 Js.t Js.meth;
getState : 'c2. 'c2 Js.t Js.meth;
getViewRegion : Ext_util_Region.t Js.t Js.meth;
getWidth : Js.number Js.t Js.meth; getX : Js.number Js.t Js.meth;
getXTypes : Js.js_string Js.t Js.meth;
getXY : Js.number Js.t Js.js_array Js.t Js.meth;
getY : Js.number Js.t Js.meth;
hasCls : Js.js_string Js.t -> bool Js.t Js.meth;
hasListener : Js.js_string Js.t -> bool Js.t Js.meth;
hasListeners : 'd2. 'd2 Js.t Js.readonly_prop;
hasUICls : Js.js_string Js.t -> unit Js.meth;
initConfig : 'e2. 'e2 Js.t -> 'e Js.t Js.meth;
initEvents : unit Js.meth; initRenderData : 'f2. 'f2 Js.t Js.meth;
is : Js.js_string Js.t -> bool Js.t Js.meth;
isComponent : bool Js.t Js.prop;
isDescendantOf : 'g2. 'g2 Js.t -> bool Js.t Js.meth;
isDisabled : bool Js.t Js.meth; isDraggable : bool Js.t Js.meth;
isDroppable : bool Js.t Js.meth; isFloating : bool Js.t Js.meth;
isHidden : bool Js.t Js.meth; isLayoutRoot : unit Js.meth;
isLayoutSuspended : bool Js.t Js.meth; isObservable : bool Js.t Js.prop;
isVisible : bool Js.t Js.optdef -> bool Js.t Js.meth;
isXType : Js.js_string Js.t -> bool Js.t Js.optdef -> bool Js.t Js.meth;
maskOnDisable : bool Js.t Js.prop;
mon : 'h2 'i2 'j2 'k2 'l2 'm2.
'h2 Js.t ->
'i2 Js.t ->
'j2 Js.callback Js.optdef ->
'k2 Js.t Js.optdef -> 'l2 Js.t Js.optdef -> 'm2 Js.t Js.meth;
move : 'n2.
Js.js_string Js.t ->
Js.number Js.t -> 'n2 Js.t Js.optdef -> unit Js.meth;
mun : 'o2 'p2 'q2 'r2.
'o2 Js.t ->
'p2 Js.t ->
'q2 Js.callback Js.optdef -> 'r2 Js.t Js.optdef -> unit Js.meth;
nextNode : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth;
nextSibling : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth;
on : 's2 't2 'u2 'v2 'w2.
's2 Js.t ->
't2 Js.callback Js.optdef ->
'u2 Js.t Js.optdef -> 'v2 Js.t Js.optdef -> 'w2 Js.t Js.meth;
onAdded : 'x2. 'x2 Js.t -> Js.number Js.t -> unit Js.meth;
onDisable : unit Js.meth; onEnable : unit Js.meth;
onPosition : Js.number Js.t -> Js.number Js.t -> unit Js.meth;
onRemoved : bool Js.t -> unit Js.meth;
onRender : Ext_dom_Element.t Js.t -> Js.number Js.t -> unit Js.meth;
onResize : 'y2 'z2 'a3 'b3.
'y2 Js.t ->
'z2 Js.t -> 'a3 Js.t -> 'b3 Js.t -> unit Js.meth;
ownerCt : 'b. 'b Js.t Js.readonly_prop;
postBlur : Ext_EventObject.t Js.t -> unit Js.meth;
previousNode : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth;
previousSibling : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth;
registerFloatingItem : 'c3. 'c3 Js.t -> unit Js.meth;
relayEvents : 'd3 'e3.
'd3 Js.t ->
Js.js_string Js.t Js.js_array Js.t ->
Js.js_string Js.t Js.optdef -> 'e3 Js.t Js.meth;
removeAnchor : 'e Js.t Js.meth;
removeChildEls : 'f3. 'f3 Js.callback -> unit Js.meth;
removeCls : 'g3. 'g3 Js.t -> 'e Js.t Js.meth;
removeClsWithUI : 'h3. 'h3 Js.t -> unit Js.meth;
removeListener : 'i3 'j3.
Js.js_string Js.t ->
'i3 Js.callback -> 'j3 Js.t Js.optdef -> unit Js.meth;
removeManagedListener : 'k3 'l3 'm3 'n3.
'k3 Js.t ->
'l3 Js.t ->
'm3 Js.callback Js.optdef ->
'n3 Js.t Js.optdef -> unit Js.meth;
removeUIClsFromElement : Js.js_string Js.t -> unit Js.meth;
render : 'o3 'p3.
'o3 Js.t Js.optdef -> 'p3 Js.t Js.optdef -> unit Js.meth;
rendered : bool Js.t Js.readonly_prop;
resumeEvent : Js.js_string Js.t -> unit Js.meth;
resumeEvents : unit Js.meth;
savePropToState : 'q3.
Js.js_string Js.t ->
'q3 Js.t ->
Js.js_string Js.t Js.optdef -> bool Js.t Js.meth;
savePropsToState : 'r3 's3 't3. 'r3 Js.t -> 's3 Js.t -> 't3 Js.t Js.meth;
saveState : unit Js.meth; self : Ext_Class.t Js.t Js.prop;
sequenceFx : 'u3. 'u3 Js.t Js.meth;
setBorder : 'v3. 'v3 Js.t -> unit Js.meth;
setBox : 'w3 'x3. 'w3 Js.t -> 'x3 Js.t Js.optdef -> 'e Js.t Js.meth;
setDisabled : bool Js.t -> unit Js.meth;
setDocked : 'y3. 'y3 Js.t -> bool Js.t Js.optdef -> 'e Js.t Js.meth;
setHeight : Js.number Js.t -> 'e Js.t Js.meth;
setLocalX : Js.number Js.t -> 'e Js.t Js.meth;
setLocalXY : 'z3.
'z3 Js.t -> Js.number Js.t Js.optdef -> 'e Js.t Js.meth;
setLocalY : Js.number Js.t -> 'e Js.t Js.meth;
setMargin : 'a4. 'a4 Js.t -> unit Js.meth;
setRegion : 'b4.
Ext_util_Region.t Js.t ->
'b4 Js.t Js.optdef -> 'e Js.t Js.meth;
setSize : 'c4 'd4. 'c4 Js.t -> 'd4 Js.t -> 'e Js.t Js.meth;
setUI : Js.js_string Js.t -> unit Js.meth;
setVisible : bool Js.t -> 'e Js.t Js.meth;
setWidth : Js.number Js.t -> 'e Js.t Js.meth;
setX : 'e4. Js.number Js.t -> 'e4 Js.t Js.optdef -> 'e Js.t Js.meth;
setXY : 'f4.
Js.number Js.t Js.js_array Js.t ->
'f4 Js.t Js.optdef -> 'e Js.t Js.meth;
setY : 'g4. Js.number Js.t -> 'g4 Js.t Js.optdef -> 'e Js.t Js.meth;
statics : Ext_Class.t Js.t Js.meth;
stopAnimation : Ext_dom_Element.t Js.t Js.meth;
suspendEvent : Js.js_string Js.t -> unit Js.meth;
suspendEvents : bool Js.t -> unit Js.meth;
syncFx : 'h4. 'h4 Js.t Js.meth;
translatePoints : 'i4 'j4.
'i4 Js.t ->
Js.number Js.t Js.optdef -> 'j4 Js.t Js.meth;
un : 'k4 'l4.
Js.js_string Js.t ->
'k4 Js.callback -> 'l4 Js.t Js.optdef -> unit Js.meth;
up : 'm4 'n4 'o4.
'm4 Js.t Js.optdef -> 'n4 Js.t Js.optdef -> 'o4 Js.t Js.meth;
update : 'p4 'q4.
'p4 Js.t ->
bool Js.t Js.optdef ->
'q4 Js.callback Js.optdef -> unit Js.meth;
updateLayout : 'r4. 'r4 Js.t Js.optdef -> unit Js.meth; .. >
as 'e)
Js.t Js.meth as 'd

Adds a CSS class to the top level element representing this component.

Parameters:

Returns:


method addClsWithUI : 'f 'g. 'f Js.t -> 'g Js.t -> unit Js.meth

Adds a cls to the uiCls array, which will also call addUIClsToElement and adds to all elements of this component.

Parameters:


method addListener : 'i 'j 'k 'l 'm.
'i Js.t ->
'j Js.callback Js.optdef ->
'k Js.t Js.optdef -> 'l Js.t Js.optdef -> 'm Js.t Js.meth

Appends an event handler to this object. For example:

myGridPanel.on("mouseover", this.onMouseOver, this);

The method also allows for a single argument to be passed which is a config object containing properties which specify multiple events. For example:

myGridPanel.on({
    cellClick: this.onCellClick,
    mouseover: this.onMouseOver,
    mouseout: this.onMouseOut,
    scope: this // Important. Ensure "this" is correct during handler execution
});

One can also specify options for each event handler separately:

myGridPanel.on({
    cellClick: {fn: this.onCellClick, scope: this, single: true},
    mouseover: {fn: panel.onMouseOver, scope: panel}
});

Names of methods in a specified scope may also be used. Note that scope MUST be specified to use this option:

myGridPanel.on({
    cellClick: {fn: 'onCellClick', scope: this, single: true},
    mouseover: {fn: 'onMouseOver', scope: panel}
});

Parameters:

Returns:


method addPropertyToState : 't.
't Js.t ->
Js.js_string Js.t -> Js.js_string Js.t Js.optdef -> bool Js.t Js.meth

Save a property to the given state object if it is not its default or configured value.

Parameters:

Returns:


method addUIClsToElement : Js.js_string Js.t -> unit Js.meth

Method which adds a specified UI + uiCls to the components element. Can be overridden to remove the UI from more than just the components element.

Parameters:


method afterComponentLayout : 'v 'w. Js.number Js.t -> Js.number Js.t -> 'v Js.t -> 'w Js.t -> unit Js.meth

Called by the layout system after the Component has been laid out.

Parameters:


method afterSetPosition : Js.number Js.t -> Js.number Js.t -> unit Js.meth

Template method called after a Component has been positioned.

Parameters:


method animate : 'd1 'e1. 'd1 Js.t -> 'e1 Js.t Js.meth

Performs custom animation on this object.

This method is applicable to both the Component class and the Sprite class. It performs animated transitions of certain properties of this object over a specified timeline.

Animating a Component

When animating a Component, the following properties may be specified in from, to, and keyframe objects:

For example, to animate a Window to a new size, ensuring that its internal layout and any shadow is correct:

myWindow = Ext.create('Ext.window.Window', {
    title: 'Test Component animation',
    width: 500,
    height: 300,
    layout: {
        type: 'hbox',
        align: 'stretch'
    },
    items: [{
        title: 'Left: 33%',
        margins: '5 0 5 5',
        flex: 1
    }, {
        title: 'Left: 66%',
        margins: '5 5 5 5',
        flex: 2
    }]
});
myWindow.show();
myWindow.header.el.on('click', function() {
    myWindow.animate({
        to: {
            width: (myWindow.getWidth() == 500) ? 700 : 500,
            height: (myWindow.getHeight() == 300) ? 400 : 300
        }
    });
});

For performance reasons, by default, the internal layout is only updated when the Window reaches its final "to" size. If dynamic updating of the Window's child Components is required, then configure the animation with dynamic: true and the two child items will maintain their proportions during the animation.

Parameters:

Returns:


method beforeBlur : Ext_EventObject.t Js.t -> unit Js.meth

Template method to do any pre-blur processing.

Parameters:


method beforeComponentLayout : Js.number Js.t -> Js.number Js.t -> unit Js.meth

Occurs before componentLayout is run. Returning false from this method will prevent the componentLayout from being executed.

Parameters:


method beforeDestroy : unit Js.meth

Invoked before the Component is destroyed.


method beforeFocus : Ext_EventObject.t Js.t -> unit Js.meth

Template method to do any pre-focus processing.

Parameters:


method beforeLayout : unit Js.meth

Occurs before componentLayout is run. In previous releases, this method could return false to prevent its layout but that is not supported in Ext JS 4.1 or higher. This method is simply a notification of the impending layout to give the component a chance to adjust the DOM. Ideally, DOM reads should be avoided at this time to reduce expensive document reflows.


method destroy : unit Js.meth

Destroys the Component.


method disable : bool Js.t Js.optdef -> unit Js.meth

Disable the component.

Parameters:


method doComponentLayout : 'l1. 'l1 Js.t Js.meth

This method needs to be called whenever you change something on this component that requires the Component's layout to be recalculated.

Returns:


method enable : bool Js.t Js.optdef -> unit Js.meth

Enable the component

Parameters:


method findPlugin : Js.js_string Js.t -> Ext_AbstractPlugin.t Js.t Js.meth

Retrieves plugin from this component's collection by its ptype.

Parameters:

Returns:


method getBubbleTarget : 't1. 't1 Js.t Js.meth

Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy.

Returns:


method getEl : Ext_dom_Element.t Js.t Js.meth

Retrieves the top level element representing this component.


method getHeight : Js.number Js.t Js.meth

Gets the current height of the component's underlying element.


method getId : Js.js_string Js.t Js.meth

Retrieves the id of this component. Will auto-generate an id if one has not already been set.


method getItemId : Js.js_string Js.t Js.meth

Returns the value of itemId assigned to this component, or when that is not set, returns the value of id.


method getLoader : Ext_ComponentLoader.t Js.t Js.meth

Gets the Ext.ComponentLoader for this Component.

Returns:


method getLocalX : Js.number Js.t Js.meth

Overridden in Ext.rtl.AbstractComponent.

Returns the x coordinate of this element reletive to its offsetParent.

Returns:


method getLocalXY : Js.number Js.t Js.js_array Js.t Js.meth

Overridden in Ext.rtl.AbstractComponent.

Returns the x and y coordinates of this element relative to its offsetParent.

Returns:


method getLocalY : Js.number Js.t Js.meth

Returns the y coordinate of this element reletive to its offsetParent.

Returns:


method getPlugin : Js.js_string Js.t -> Ext_AbstractPlugin.t Js.t Js.meth

Retrieves a plugin from this component's collection by its pluginId.

Parameters:

Returns:


method getSize : 'z1. 'z1 Js.t Js.meth

Gets the current size of the component's underlying element.

Returns:


method getSizeModel : 'a2 'b2. 'a2 Js.t -> 'b2 Js.t Js.meth

Returns an object that describes how this component's width and height are managed. All of these objects are shared and should not be modified.

Parameters:

Returns:


method getState : 'c2. 'c2 Js.t Js.meth

The supplied default state gathering method for the AbstractComponent class.

This method returns dimension settings such as flex, anchor, width and height along with collapsed state.

Subclasses which implement more complex state should call the superclass's implementation, and apply their state to the result if this basic state is to be saved.

Note that Component state will only be saved if the Component has a stateId and there as a StateProvider configured for the document.


method getWidth : Js.number Js.t Js.meth

Gets the current width of the component's underlying element.


method getX : Js.number Js.t Js.meth

Gets the current X position of the DOM element based on page coordinates.

Returns:


method getXTypes : Js.js_string Js.t Js.meth

Returns this Component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the 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.form.field.Text();
alert(t.getXTypes());  // alerts 'component/field/textfield'

Returns:


method getXY : Js.number Js.t Js.js_array Js.t Js.meth

Gets the current position of the DOM element based on page coordinates.

Returns:


method getY : Js.number Js.t Js.meth

Gets the current Y position of the DOM element based on page coordinates.

Returns:


method hasCls : Js.js_string Js.t -> bool Js.t Js.meth

Checks if the specified CSS class exists on this element's DOM node.

Parameters:

Returns:


method hasUICls : Js.js_string Js.t -> unit Js.meth

Checks if there is currently a specified uiCls.

Parameters:


method initEvents : unit Js.meth

Initialize any events on this component


method is : Js.js_string Js.t -> bool Js.t Js.meth

Tests whether this Component matches the selector string.

Parameters:

Returns:


method isDescendantOf : 'g2. 'g2 Js.t -> bool Js.t Js.meth

Determines whether this component is the descendant of a particular container.

Parameters:

Returns:


method isDisabled : bool Js.t Js.meth

Method to determine whether this Component is currently disabled.

Returns:


method isDraggable : bool Js.t Js.meth

Method to determine whether this Component is draggable.

Returns:


method isDroppable : bool Js.t Js.meth

Method to determine whether this Component is droppable.

Returns:


method isFloating : bool Js.t Js.meth

Method to determine whether this Component is floating.

Returns:


method isHidden : bool Js.t Js.meth

Method to determine whether this Component is currently set to hidden.

Returns:


method isLayoutRoot : unit Js.meth

Determines whether this Component is the root of a layout. This returns true if this component can run its layout without assistance from or impact on its owner. If this component cannot run its layout given these restrictions, false is returned and its owner will be considered as the next candidate for the layout root.

Setting the _isLayoutRoot property to true causes this method to always return true. This may be useful when updating a layout of a Container which shrink wraps content, and you know that it will not change size, and so can safely be the topmost participant in the layout run.


method isLayoutSuspended : bool Js.t Js.meth

Returns true if layout is suspended for this component. This can come from direct suspension of this component's layout activity (Ext.Container.suspendLayout) or if one of this component's containers is suspended.

Returns:


method isVisible : bool Js.t Js.optdef -> bool Js.t Js.meth

Returns true if this component is visible.

Parameters:

Returns:


method isXType : Js.js_string Js.t -> bool Js.t Js.optdef -> bool Js.t Js.meth

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 Ext.Component header.

Example usage:

var t = new Ext.form.field.Text();
var isText = t.isXType('textfield');        // true
var isBoxSubclass = t.isXType('field');       // true, descended from Ext.form.field.Base
var isBoxInstance = t.isXType('field', true); // false, not a direct Ext.form.field.Base instance

Parameters:

Returns:


method nextNode : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth

Returns the next node in the Component tree in tree traversal order.

Note that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the tree to attempt to find a match. Contrast with nextSibling.

Parameters:

Returns:


method nextSibling : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth

Returns the next sibling of this Component.

Optionally selects the next sibling which matches the passed ComponentQuery selector.

May also be referred to as next()

Note that this is limited to siblings, and if no siblings of the item match, null is returned. Contrast with nextNode

Parameters:

Returns:


method onAdded : 'x2. 'x2 Js.t -> Js.number Js.t -> unit Js.meth

Method to manage awareness of when components are added to their respective Container, firing an added event. References are established at add time rather than at render time.

Allows addition of behavior when a Component is added to a Container. At this stage, the Component is in the parent Container's collection of child items. After calling the superclass's onAdded, the ownerCt reference will be present, and if configured with a ref, the refOwner will be set.

Parameters:


method onDisable : unit Js.meth

Allows addition of behavior to the disable operation. After calling the superclass's onDisable, the Component will be disabled.


method onEnable : unit Js.meth

Allows addition of behavior to the enable operation. After calling the superclass's onEnable, the Component will be enabled.


method onPosition : Js.number Js.t -> Js.number Js.t -> unit Js.meth

Called after the component is moved, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a move occurs.

Parameters:


method onRemoved : bool Js.t -> unit Js.meth

Method to manage awareness of when components are removed from their respective Container, firing a removed event. References are properly cleaned up after removing a component from its owning container.

Allows addition of behavior when a Component is removed from its parent Container. At this stage, the Component has been removed from its parent Container's collection of child items, but has not been destroyed (It will be destroyed if the parent Container's autoDestroy is true, or if the remove call was passed a truthy second parameter). After calling the superclass's onRemoved, the ownerCt and the refOwner will not be present.

Parameters:


method onResize : 'y2 'z2 'a3 'b3. 'y2 Js.t -> 'z2 Js.t -> 'a3 Js.t -> 'b3 Js.t -> unit Js.meth

Allows addition of behavior to the resize operation.

Called when Ext.resizer.Resizer#drag event is fired.

Parameters:


method postBlur : Ext_EventObject.t Js.t -> unit Js.meth

Template method to do any post-blur processing.

Parameters:


method previousNode : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth

Returns the previous node in the Component tree in tree traversal order.

Note that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the tree in reverse order to attempt to find a match. Contrast with previousSibling.

Parameters:

Returns:


method previousSibling : Js.js_string Js.t Js.optdef -> 'e Js.t Js.meth

Returns the previous sibling of this Component.

Optionally selects the previous sibling which matches the passed ComponentQuery selector.

May also be referred to as prev()

Note that this is limited to siblings, and if no siblings of the item match, null is returned. Contrast with previousNode

Parameters:

Returns:


method registerFloatingItem : 'c3. 'c3 Js.t -> unit Js.meth

Called by Component#doAutoRender

Register a Container configured floating: true with this Component's ZIndexManager.

Components added in this way will not participate in any layout, but will be rendered upon first show in the way that Windows are.

Parameters:


method removeCls : 'g3. 'g3 Js.t -> 'e Js.t Js.meth

Removes a CSS class from the top level element representing this component.

Parameters:

Returns:


method removeClsWithUI : 'h3. 'h3 Js.t -> unit Js.meth

Removes a cls to the uiCls array, which will also call removeUIClsFromElement and removes it from all elements of this component.

Parameters:


method removeUIClsFromElement : Js.js_string Js.t -> unit Js.meth

Method which removes a specified UI + uiCls from the components element. The cls which is added to the element will be: this.baseCls + '-' + ui.

Parameters:


method setBorder : 'v3. 'v3 Js.t -> unit Js.meth
method setDisabled : bool Js.t -> unit Js.meth

Enable or disable the component.

Parameters:


method setDocked : 'y3. 'y3 Js.t -> bool Js.t Js.optdef -> 'e Js.t Js.meth

Sets the dock position of this component in its parent panel. Note that this only has effect if this item is part of the dockedItems collection of a parent that has a DockLayout (note that any Panel has a DockLayout by default)

Parameters:

Returns:


method setHeight : Js.number Js.t -> 'e Js.t Js.meth

Sets the height of the component. This method fires the resize event.

Parameters:

Returns:


method setLocalX : Js.number Js.t -> 'e Js.t Js.meth

Overridden in Ext.rtl.AbstractComponent.

Sets the local x coordinate of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalX, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setLocalXY : 'z3. 'z3 Js.t -> Js.number Js.t Js.optdef -> 'e Js.t Js.meth

Overridden in Ext.rtl.AbstractComponent.

Sets the local x and y coordinates of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalXY, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setLocalY : Js.number Js.t -> 'e Js.t Js.meth

Sets the local y coordinate of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalY, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setMargin : 'a4. 'a4 Js.t -> unit Js.meth

Sets the margin on the target element.

Parameters:


method setSize : 'c4 'd4. 'c4 Js.t -> 'd4 Js.t -> 'e Js.t Js.meth

Sets the width and height of this Component. This method fires the resize event. This method can accept either width and height as separate arguments, or you can pass a size object like {width:10, height:20}.

Parameters:

Returns:


method setUI : Js.js_string Js.t -> unit Js.meth

Sets the UI for the component. This will remove any existing UIs on the component. It will also loop through any uiCls set on the component and rename them so they include the new UI.

Parameters:


method setVisible : bool Js.t -> 'e Js.t Js.meth

Convenience function to hide or show this component by Boolean.

Parameters:

Returns:


method setWidth : Js.number Js.t -> 'e Js.t Js.meth

Sets the width of the component. This method fires the resize event.

Parameters:

Returns:


method setX : 'e4. Js.number Js.t -> 'e4 Js.t Js.optdef -> 'e Js.t Js.meth

Sets the X position of the DOM element based on page coordinates.

Parameters:

Returns:


method setXY : 'f4. Js.number Js.t Js.js_array Js.t -> 'f4 Js.t Js.optdef -> 'e Js.t Js.meth

Sets the position of the DOM element in page coordinates.

Parameters:

Returns:


method setY : 'g4. Js.number Js.t -> 'g4 Js.t Js.optdef -> 'e Js.t Js.meth

Sets the Y position of the DOM element based on page coordinates.

Parameters:

Returns:


method up : 'm4 'n4 'o4. 'm4 Js.t Js.optdef -> 'n4 Js.t Js.optdef -> 'o4 Js.t Js.meth

Navigates up the ownership hierarchy searching for an ancestor Container which matches any passed simple selector or component.

Important. There is not a universal upwards navigation pointer. There are several upwards relationships such as the button which activates a menu, or the menu item which activated a submenu, or the column header which activated the column menu.

These differences are abstracted away by this method.

Example:

var owningTabPanel = grid.up('tabpanel');

Parameters:

Returns:


method update : 'p4 'q4.
'p4 Js.t ->
bool Js.t Js.optdef -> 'q4 Js.callback Js.optdef -> unit Js.meth

Update the content area of a component.

Parameters:


method updateLayout : 'r4. 'r4 Js.t Js.optdef -> unit Js.meth

Updates this component's layout. If this update affects this components ownerCt, that component's updateLayout method will be called to perform the layout instead. Otherwise, just this component (and its child items) will layout.

Parameters: