Class type Ext_Component.t


class type t = object .. end
Inherits
method floatParent : 'a. 'a Js.t Js.readonly_prop

Only present for floating Components which were inserted as child items of Containers.

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.

Floating Components that are programatically rendered will not have a floatParent property.

See floating and zIndexManager


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

An object property which provides unified information as to which dimensions are scrollable based upon the autoScroll, overflowX and overflowY settings (And for views of trees and grids, the owning panel's scroll setting).

Note that if you set overflow styles using the style config or bodyStyle config, this object does not include that information; it is best to use autoScroll, overflowX and overflowY if you need to access these flags.

This object has the following properties:


method zIndexManager : Ext_ZIndexManager.t Js.t Js.readonly_prop

Only present for floating Components after they have been rendered.

A reference to the ZIndexManager which is managing this Component's z-index.

The ZIndexManager maintains a stack of floating Component z-indices, and also provides a single modal mask which is insert just beneath the topmost visible modal floating Component.

Floating Components may be brought to the front or sent to the back of the z-index stack.

This defaults to the global ZIndexManager for floating Components that are programatically rendered.

For floating Components which are added to a Container, the ZIndexManager is acquired from the first ancestor Container found which is floating. If no floating ancestor is found, the global ZIndexManager is used.

See floating and zIndexParent


method zIndexParent : 'c. 'c Js.t Js.readonly_prop

Only present for floating Components which were inserted as child items of Containers, and which have a floating Container in their containment ancestry.

For floating Components which are child items of a Container, the zIndexParent will be a floating ancestor Container which is responsible for the base z-index value of all its floating descendants. It provides a ZIndexManager which provides z-indexing services for all its descendant floating Components.

Floating Components that are programatically rendered will not have a zIndexParent property.

For example, the dropdown BoundList of a ComboBox which is in a Window will have the Window as its zIndexParent, and will always show above that Window, wherever the Window is placed in the z-index stack.

See floating and zIndexManager


method afterComponentLayout : 'd 'e. Js.number Js.t -> Js.number Js.t -> 'd Js.t -> 'e Js.t -> unit Js.meth

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

Parameters:


method afterHide : 'f 'g. 'f Js.callback Js.optdef -> 'g Js.t Js.optdef -> unit Js.meth

Invoked after the Component has been hidden.

Gets passed the same callback and scope parameters that onHide received.

Parameters:


method afterRender : unit Js.meth

Allows addition of behavior after rendering is complete. At this stage the Component’s Element will have been styled according to the configuration, will have had any configured CSS class names added, and will be in the configured visibility and the configured enable state.


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

Template method called after a Component has been positioned.

Parameters:


method afterShow : 'h 'i 'j.
'h Js.t Js.optdef ->
'i Js.callback Js.optdef -> 'j Js.t Js.optdef -> unit Js.meth

Invoked after the Component is shown (after onShow is called).

Gets passed the same parameters as show.

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 beforeShow : unit Js.meth

Invoked before the Component is shown.


method bubble : 'k 'l 'm.
'k Js.callback ->
'l Js.t Js.optdef ->
'm Js.js_array Js.t Js.optdef ->
(< _isLayoutRoot : bool Js.t Js.prop; addChildEls : unit Js.meth;
addCls : 'p. 'p Js.t -> 'o Js.t Js.meth;
addClsWithUI : 'q 'r. 'q Js.t -> 'r Js.t -> unit Js.meth;
addEvents : 's. 's Js.t -> unit Js.meth;
addListener : 't 'u 'v 'w 'x.
't Js.t ->
'u Js.callback Js.optdef ->
'v Js.t Js.optdef ->
'w Js.t Js.optdef -> 'x Js.t Js.meth;
addManagedListener : 'y 'z 'a1 'b1 'c1 'd1.
'y Js.t ->
'z Js.t ->
'a1 Js.callback Js.optdef ->
'b1 Js.t Js.optdef ->
'c1 Js.t Js.optdef -> 'd1 Js.t Js.meth;
addPropertyToState : 'e1.
'e1 Js.t ->
Js.js_string Js.t ->
Js.js_string Js.t Js.optdef -> bool Js.t Js.meth;
addStateEvents : 'f1. 'f1 Js.t -> unit Js.meth;
addUIClsToElement : Js.js_string Js.t -> unit Js.meth;
afterComponentLayout : 'd 'e.
Js.number Js.t ->
Js.number Js.t ->
'd Js.t -> 'e Js.t -> unit Js.meth;
afterHide : 'f 'g.
'f Js.callback Js.optdef ->
'g Js.t Js.optdef -> unit Js.meth;
afterRender : unit Js.meth;
afterSetPosition : Js.number Js.t -> Js.number Js.t -> unit Js.meth;
afterShow : 'h 'i 'j.
'h Js.t Js.optdef ->
'i Js.callback Js.optdef ->
'j Js.t Js.optdef -> unit Js.meth;
alignTo : 'g1 'h1.
'g1 Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'h1 Js.t Js.optdef -> 'o Js.t Js.meth;
anchorTo : 'i1 'j1 'k1 'l1.
'i1 Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'j1 Js.t Js.optdef ->
'k1 Js.t Js.optdef ->
'l1 Js.callback Js.optdef -> 'o Js.t Js.meth;
animate : 'm1 'n1. 'm1 Js.t -> 'n1 Js.t Js.meth;
applyState : 'o1. 'o1 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; beforeShow : unit Js.meth;
bubble : 'k 'l 'm. 'n;
calculateConstrainedPosition : 'p1.
'p1 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 : 'q1 'r1. 'q1 Js.t -> 'r1 Js.t Js.meth;
callSuper : 's1 't1. 's1 Js.t -> 't1 Js.t Js.meth;
cancelFocus : unit Js.meth; center : 'u1. 'u1 Js.t Js.meth;
clearListeners : unit Js.meth; clearManagedListeners : unit Js.meth;
cloneConfig : 'v1. 'v1 Js.t -> 'o Js.t 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 : 'w1. 'w1 Js.t Js.meth;
doConstrain : 'x1. 'x1 Js.t Js.optdef -> unit Js.meth;
draggable : bool Js.t Js.readonly_prop;
enable : bool Js.t Js.optdef -> unit Js.meth;
enableBubble : 'y1. 'y1 Js.t -> unit Js.meth;
ensureAttachedToBody : bool Js.t Js.optdef -> unit Js.meth;
findParentBy : 'z1 'a2. 'z1 Js.callback -> 'a2 Js.t Js.meth;
findParentByType : 'b2 'c2. 'b2 Js.t -> 'c2 Js.t Js.meth;
findPlugin : Js.js_string Js.t -> Ext_AbstractPlugin.t Js.t Js.meth;
fireEvent : 'd2. Js.js_string Js.t -> 'd2 Js.t -> bool Js.t Js.meth;
fireEventArgs : 'e2.
Js.js_string Js.t ->
'e2 Js.t Js.js_array Js.t -> bool Js.t Js.meth;
floatParent : 'a. 'a Js.t Js.readonly_prop;
focus : 'f2 'g2 'h2.
bool Js.t Js.optdef ->
'f2 Js.t Js.optdef ->
'g2 Js.callback Js.optdef ->
'h2 Js.callback Js.optdef -> 'o Js.t Js.meth;
frameSize : 'i2. 'i2 Js.t Js.readonly_prop;
getActiveAnimation : 'j2. 'j2 Js.t Js.meth;
getAlignToXY : 'k2.
'k2 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 : 'l2.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef ->
'l2 Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getBox : 'm2.
bool Js.t Js.optdef ->
bool Js.t Js.optdef -> 'm2 Js.t Js.meth;
getBubbleTarget : 'n2. 'n2 Js.t Js.meth;
getConstrainVector : 'o2 'p2.
'o2 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 ->
'p2 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 : 'q2. Js.js_string Js.t Js.optdef -> 'q2 Js.t Js.meth;
getInsertPosition : 'r2. 'r2 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 : 's2. 's2 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;
getPosition : bool Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getRegion : Ext_util_Region.t Js.t Js.meth;
getSize : 't2. 't2 Js.t Js.meth;
getSizeModel : 'u2 'v2. 'u2 Js.t -> 'v2 Js.t Js.meth;
getState : 'w2. 'w2 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;
getXType : Js.js_string 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 : 'x2. 'x2 Js.t Js.readonly_prop;
hasUICls : Js.js_string Js.t -> unit Js.meth;
hide : 'y2 'z2 'a3.
'y2 Js.t Js.optdef ->
'z2 Js.callback Js.optdef ->
'a3 Js.t Js.optdef -> 'o Js.t Js.meth;
initComponent : unit Js.meth;
initConfig : 'b3. 'b3 Js.t -> 'o Js.t Js.meth;
initEvents : unit Js.meth; initRenderData : 'c3. 'c3 Js.t Js.meth;
is : Js.js_string Js.t -> bool Js.t Js.meth;
isComponent : bool Js.t Js.prop;
isDescendantOf : 'd3. 'd3 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 : 'e3 'f3 'g3 'h3 'i3 'j3.
'e3 Js.t ->
'f3 Js.t ->
'g3 Js.callback Js.optdef ->
'h3 Js.t Js.optdef -> 'i3 Js.t Js.optdef -> 'j3 Js.t Js.meth;
move : 'k3.
Js.js_string Js.t ->
Js.number Js.t -> 'k3 Js.t Js.optdef -> unit Js.meth;
mun : 'l3 'm3 'n3 'o3.
'l3 Js.t ->
'm3 Js.t ->
'n3 Js.callback Js.optdef -> 'o3 Js.t Js.optdef -> unit Js.meth;
nextNode : Js.js_string Js.t Js.optdef -> 'o Js.t Js.meth;
nextSibling : Js.js_string Js.t Js.optdef -> 'o Js.t Js.meth;
on : 'p3 'q3 'r3 's3 't3.
'p3 Js.t ->
'q3 Js.callback Js.optdef ->
'r3 Js.t Js.optdef -> 's3 Js.t Js.optdef -> 't3 Js.t Js.meth;
onAdded : 'u3. 'u3 Js.t -> Js.number Js.t -> unit Js.meth;
onDestroy : unit Js.meth; onDisable : unit Js.meth;
onEnable : unit Js.meth;
onHide : 'v3 'w3 'x3.
'v3 Js.t Js.optdef ->
'w3 Js.callback Js.optdef ->
'x3 Js.t Js.optdef -> 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 : 'y3 'z3 'a4 'b4.
'y3 Js.t ->
'z3 Js.t -> 'a4 Js.t -> 'b4 Js.t -> unit Js.meth;
onShow : 'c4 'd4 'e4.
'c4 Js.t Js.optdef ->
'd4 Js.callback Js.optdef ->
'e4 Js.t Js.optdef -> unit Js.meth;
onShowComplete : 'f4 'g4.
'f4 Js.callback Js.optdef ->
'g4 Js.t Js.optdef -> unit Js.meth;
ownerCt : 'h4. 'h4 Js.t Js.readonly_prop;
postBlur : Ext_EventObject.t Js.t -> unit Js.meth;
previousNode : Js.js_string Js.t Js.optdef -> 'o Js.t Js.meth;
previousSibling : Js.js_string Js.t Js.optdef -> 'o Js.t Js.meth;
registerFloatingItem : 'i4. 'i4 Js.t -> unit Js.meth;
relayEvents : 'j4 'k4.
'j4 Js.t ->
Js.js_string Js.t Js.js_array Js.t ->
Js.js_string Js.t Js.optdef -> 'k4 Js.t Js.meth;
removeAnchor : 'o Js.t Js.meth;
removeChildEls : 'l4. 'l4 Js.callback -> unit Js.meth;
removeCls : 'm4. 'm4 Js.t -> 'o Js.t Js.meth;
removeClsWithUI : 'n4. 'n4 Js.t -> unit Js.meth;
removeListener : 'o4 'p4.
Js.js_string Js.t ->
'o4 Js.callback -> 'p4 Js.t Js.optdef -> unit Js.meth;
removeManagedListener : 'q4 'r4 's4 't4.
'q4 Js.t ->
'r4 Js.t ->
's4 Js.callback Js.optdef ->
't4 Js.t Js.optdef -> unit Js.meth;
removeUIClsFromElement : Js.js_string Js.t -> unit Js.meth;
render : 'u4 'v4.
'u4 Js.t Js.optdef -> 'v4 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 : 'w4.
Js.js_string Js.t ->
'w4 Js.t ->
Js.js_string Js.t Js.optdef -> bool Js.t Js.meth;
savePropsToState : 'x4 'y4 'z4. 'x4 Js.t -> 'y4 Js.t -> 'z4 Js.t Js.meth;
saveState : unit Js.meth;
scrollBy : 'a5 'b5 'c5. 'a5 Js.t -> 'b5 Js.t -> 'c5 Js.t -> unit Js.meth;
scrollFlags : 'b. 'b Js.t Js.readonly_prop;
self : Ext_Class.t Js.t Js.prop; sequenceFx : 'd5. 'd5 Js.t Js.meth;
setActive : 'e5.
bool Js.t Js.optdef -> 'e5 Js.t Js.optdef -> unit Js.meth;
setAutoScroll : bool Js.t -> 'o Js.t Js.meth;
setBorder : 'f5. 'f5 Js.t -> unit Js.meth;
setBorderRegion : Js.js_string Js.t -> Js.js_string Js.t Js.meth;
setBox : 'g5 'h5. 'g5 Js.t -> 'h5 Js.t Js.optdef -> 'o Js.t Js.meth;
setDisabled : bool Js.t -> unit Js.meth;
setDocked : 'i5. 'i5 Js.t -> bool Js.t Js.optdef -> 'o Js.t Js.meth;
setHeight : Js.number Js.t -> 'o Js.t Js.meth;
setLoading : 'j5 'k5.
'j5 Js.t -> bool Js.t Js.optdef -> 'k5 Js.t Js.meth;
setLocalX : Js.number Js.t -> 'o Js.t Js.meth;
setLocalXY : 'l5.
'l5 Js.t -> Js.number Js.t Js.optdef -> 'o Js.t Js.meth;
setLocalY : Js.number Js.t -> 'o Js.t Js.meth;
setMargin : 'm5. 'm5 Js.t -> unit Js.meth;
setOverflowXY : Js.js_string Js.t ->
Js.js_string Js.t -> 'o Js.t Js.meth;
setPagePosition : 'n5 'o5.
'n5 Js.t ->
Js.number Js.t Js.optdef ->
'o5 Js.t Js.optdef -> 'o Js.t Js.meth;
setPosition : 'p5 'q5.
'p5 Js.t ->
Js.number Js.t Js.optdef ->
'q5 Js.t Js.optdef -> 'o Js.t Js.meth;
setRegion : 'r5.
Ext_util_Region.t Js.t ->
'r5 Js.t Js.optdef -> 'o Js.t Js.meth;
setRegionWeight : Js.number Js.t -> Js.number Js.t Js.meth;
setSize : 's5 't5. 's5 Js.t -> 't5 Js.t -> 'o Js.t Js.meth;
setUI : Js.js_string Js.t -> unit Js.meth;
setVisible : bool Js.t -> 'o Js.t Js.meth;
setWidth : Js.number Js.t -> 'o Js.t Js.meth;
setX : 'u5. Js.number Js.t -> 'u5 Js.t Js.optdef -> 'o Js.t Js.meth;
setXY : 'v5.
Js.number Js.t Js.js_array Js.t ->
'v5 Js.t Js.optdef -> 'o Js.t Js.meth;
setY : 'w5. Js.number Js.t -> 'w5 Js.t Js.optdef -> 'o Js.t Js.meth;
show : 'x5 'y5 'z5.
'x5 Js.t Js.optdef ->
'y5 Js.callback Js.optdef ->
'z5 Js.t Js.optdef -> 'o Js.t Js.meth;
showAt : 'a6 'b6.
'a6 Js.t ->
Js.number Js.t Js.optdef ->
'b6 Js.t Js.optdef -> 'o Js.t Js.meth;
showBy : 'c6.
'c6 Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef -> 'o 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 : 'd6. 'd6 Js.t Js.meth; toBack : 'e6. 'e6 Js.t Js.meth;
toFront : 'f6. bool Js.t Js.optdef -> 'f6 Js.t Js.meth;
translatePoints : 'g6 'h6.
'g6 Js.t ->
Js.number Js.t Js.optdef -> 'h6 Js.t Js.meth;
un : 'i6 'j6.
Js.js_string Js.t ->
'i6 Js.callback -> 'j6 Js.t Js.optdef -> unit Js.meth;
up : 'k6 'l6 'm6.
'k6 Js.t Js.optdef -> 'l6 Js.t Js.optdef -> 'm6 Js.t Js.meth;
update : 'n6 'o6.
'n6 Js.t ->
bool Js.t Js.optdef ->
'o6 Js.callback Js.optdef -> unit Js.meth;
updateBox : 'p6. 'p6 Js.t -> 'o Js.t Js.meth;
updateLayout : 'q6. 'q6 Js.t Js.optdef -> unit Js.meth;
zIndexManager : Ext_ZIndexManager.t Js.t Js.readonly_prop;
zIndexParent : 'c. 'c Js.t Js.readonly_prop; .. >
as 'o)
Js.t Js.meth as 'n

Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of function call will be the scope provided or the current component. The arguments to the function will be the args provided or the current component. If the function returns false at any point, the bubble is stopped.

Parameters:

Returns:


method cancelFocus : unit Js.meth

Cancel any deferred focus on this component


method cloneConfig : 'v1. 'v1 Js.t -> 'o Js.t Js.meth

Clone the current component using the original config values passed into this instance by default.

Parameters:

Returns:


method findParentBy : 'z1 'a2. 'z1 Js.callback -> 'a2 Js.t Js.meth

Find a container above this component at any level by a custom function. If the passed function returns true, the container will be returned.

See also the up method.

Parameters:

Returns:


method findParentByType : 'b2 'c2. 'b2 Js.t -> 'c2 Js.t Js.meth

Find a container above this component at any level by xtype or class

See also the up method.

Parameters:

Returns:


method focus : 'f2 'g2 'h2.
bool Js.t Js.optdef ->
'f2 Js.t Js.optdef ->
'g2 Js.callback Js.optdef -> 'h2 Js.callback Js.optdef -> 'o Js.t Js.meth

Try to focus this component.

Parameters:

Returns:


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

Retrieves the top level element representing this component.


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 getPosition : bool Js.t Js.optdef -> Js.number Js.t Js.js_array Js.t Js.meth

Gets the current XY position of the component's underlying element.

Parameters:

Returns:


method getXType : Js.js_string Js.t Js.meth

Gets the xtype for this component as registered with Ext.ComponentManager. For a list of all available xtypes, see the Ext.Component header. Example usage:

var t = new Ext.form.field.Text();
alert(t.getXType());  // alerts 'textfield'

Returns:


method hide : 'y2 'z2 'a3.
'y2 Js.t Js.optdef ->
'z2 Js.callback Js.optdef -> 'a3 Js.t Js.optdef -> 'o Js.t Js.meth

Hides this Component, setting it to invisible using the configured hideMode.

Parameters:

Returns:


method initComponent : unit Js.meth

The initComponent template method is an important initialization step for a Component. It is intended to be implemented by each subclass of Ext.Component to provide any needed constructor logic. The initComponent method of the class being created is called first, with each initComponent method up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and, if needed, override the constructor logic of the Component at any step in the hierarchy.

The initComponent method must contain a call to callParent in order to ensure that the parent class' initComponent method is also called.

All config options passed to the constructor are applied to this before initComponent is called, so you can simply access them with this.someOption.

The following example demonstrates using a dynamic string for the text of a button at the time of instantiation of the class.

Ext.define('DynamicButtonText', {
    extend: 'Ext.button.Button',

    initComponent: function() {
        this.text = new Date();
        this.renderTo = Ext.getBody();
        this.callParent();
    }
});

Ext.onReady(function() {
    Ext.create('DynamicButtonText');
});

method onAdded : 'u3. 'u3 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 onDestroy : unit Js.meth

Allows addition of behavior to the destroy operation. After calling the superclass's onDestroy, the Component will be destroyed.


method onHide : 'v3 'w3 'x3.
'v3 Js.t Js.optdef ->
'w3 Js.callback Js.optdef -> 'x3 Js.t Js.optdef -> unit Js.meth

Possibly animates down to a target element.

Allows addition of behavior to the hide operation. After calling the superclass’s onHide, the Component will be hidden.

Gets passed the same parameters as hide.

Parameters:


method onShow : 'c4 'd4 'e4.
'c4 Js.t Js.optdef ->
'd4 Js.callback Js.optdef -> 'e4 Js.t Js.optdef -> unit Js.meth

Allows addition of behavior to the show operation. After calling the superclass's onShow, the Component will be visible.

Override in subclasses where more complex behaviour is needed.

Gets passed the same parameters as show.

Parameters:


method onShowComplete : 'f4 'g4. 'f4 Js.callback Js.optdef -> 'g4 Js.t Js.optdef -> unit Js.meth

Invoked after the afterShow method is complete.

Gets passed the same callback and scope parameters that afterShow received.

Parameters:


method scrollBy : 'a5 'b5 'c5. 'a5 Js.t -> 'b5 Js.t -> 'c5 Js.t -> unit Js.meth

Scrolls this Component's target element by the passed delta values, optionally animating.

All of the following are equivalent:

 comp.scrollBy(10, 10, true);
 comp.scrollBy([10, 10], true);
 comp.scrollBy({ x: 10, y: 10 }, true);

Parameters:


method setAutoScroll : bool Js.t -> 'o Js.t Js.meth

Sets the overflow on the content element of the component.

Parameters:

Returns:


method setBorderRegion : Js.js_string Js.t -> Js.js_string Js.t Js.meth

This method changes the region config property for this border region. This is only valid if this component is in a border layout (Ext.layout.container.Border).

Defined in override Ext.layout.container.border.Region.

Parameters:

Returns:


method setLoading : 'j5 'k5. 'j5 Js.t -> bool Js.t Js.optdef -> 'k5 Js.t Js.meth

This method allows you to show or hide a LoadMask on top of this component.

Parameters:

Returns:


method setOverflowXY : Js.js_string Js.t -> Js.js_string Js.t -> 'o Js.t Js.meth

Sets the overflow x/y on the content element of the component. The x/y overflow values can be any valid CSS overflow (e.g., 'auto' or 'scroll'). By default, the value is 'hidden'. Passing null for one of the values will erase the inline style. Passing undefined will preserve the current value.

Parameters:

Returns:


method setPagePosition : 'n5 'o5.
'n5 Js.t ->
Js.number Js.t Js.optdef -> 'o5 Js.t Js.optdef -> 'o Js.t Js.meth

Sets the page XY position of the component. To set the left and top instead, use setPosition. This method fires the move event.

Parameters:

Returns:


method setPosition : 'p5 'q5.
'p5 Js.t ->
Js.number Js.t Js.optdef -> 'q5 Js.t Js.optdef -> 'o Js.t Js.meth

Sets the left and top of the component. To set the page XY position instead, use setPagePosition. This method fires the move event.

Parameters:

Returns:


method setRegionWeight : Js.number Js.t -> Js.number Js.t Js.meth

Sets the weight config property for this component. This is only valid if this component is in a border layout (Ext.layout.container.Border).

Defined in override Ext.layout.container.border.Region.

Parameters:

Returns:


method show : 'x5 'y5 'z5.
'x5 Js.t Js.optdef ->
'y5 Js.callback Js.optdef -> 'z5 Js.t Js.optdef -> 'o Js.t Js.meth

Shows this Component, rendering it first if autoRender or floating are true.

After being shown, a floating Component (such as a Ext.window.Window), is activated it and brought to the front of its z-index stack.

Parameters:

Returns:


method showAt : 'a6 'b6.
'a6 Js.t ->
Js.number Js.t Js.optdef -> 'b6 Js.t Js.optdef -> 'o Js.t Js.meth

Displays component at specific xy position. A floating component (like a menu) is positioned relative to its ownerCt if any. Useful for popping up a context menu:

listeners: {
    itemcontextmenu: function(view, record, item, index, event, options) {
        Ext.create('Ext.menu.Menu', {
            width: 100,
            height: 100,
            margin: '0 0 10 0',
            items: [{
                text: 'regular item 1'
            },{
                text: 'regular item 2'
            },{
                text: 'regular item 3'
            }]
        }).showAt(event.getXY());
    }
}

Parameters:

Returns:


method showBy : 'c6.
'c6 Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef -> 'o Js.t Js.meth

Shows this component by the specified Component or Element. Used when this component is floating.

Parameters:

Returns:


method updateBox : 'p6. 'p6 Js.t -> 'o Js.t Js.meth

Sets the current box measurements of the component's underlying element.

Parameters:

Returns: