| Package: | Ext.grid |
| Defined In: | .js |
| Class: | |
| Extends: | Ext.BoxComponent |
An updateable progress bar component. The progress bar supports two different modes: manual and automatic.
In manual mode, you are responsible for showing, updating (via #updateProgress) and clearing the progress bar as needed from your own code. This method is most appropriate when you want to show progress throughout an operation that has predictable points of interest at which you can update the control.
In automatic mode, you simply call #wait and let the progress bar run indefinitely, only clearing it once the operation is complete. You can optionally have the progress bar wait for a specific amount of time and then clear itself. Automatic mode is most appropriate for timed operations or asymchronous operations in which you have no need for indicating intermediate progress.
@cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0) @cfg {String} text The progress bar text (defaults to '') @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress bar's internal text element) @| 配置项 | 定义者 | |
|---|---|---|
| baseCls : String
The base CSS class to apply to the ...
The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
|
ProgressBar | |
| deferHeight : Boolean
True表示为根据外置的组件延时计算高度,false表示允许该组件自行...
True表示为根据外置的组件延时计算高度,false表示允许该组件自行设置高度(缺省为false)。
|
BoxComponent | |
| disabledClass : String
当组件被禁用时作用的CSS样式类(默认为"x-item-disable...
当组件被禁用时作用的CSS样式类(默认为"x-item-disabled")。
|
Component | |
| allowDomMove : Boolean
当渲染进行时能否移动Dom节点上的组件(默认为true)。
当渲染进行时能否移动Dom节点上的组件(默认为true)。
|
Component | |
| autoShow : Boolean
True表示为在渲染的时候先检测一下有否关于隐藏的样式类(如:'x-h...
True表示为在渲染的时候先检测一下有否关于隐藏的样式类(如:'x-hidden'或'x-hide-display'),有就移除隐藏的样式类。 (缺省为false)
|
Component | |
| hideMode : String
这个组件是怎么隐藏的。可支持的值有"visibility" (css中...
这个组件是怎么隐藏的。可支持的值有"visibility" (css中的visibility), "offsets"(负偏移位置)和 "display"(css中的display)-默认为“display”。
|
Component | |
| hideParent : Boolean
True表示为当隐藏/显示组件时对组件的容器亦一同隐藏/显示,fals...
True表示为当隐藏/显示组件时对组件的容器亦一同隐藏/显示,false就只会隐藏/显示组件本身(默认为false)。 例如,可设置一个hide:true的隐藏按钮在window,如果按下就通知其父容器一起隐藏,这样做起来比较快捷省事。
|
Component | |
| 属性 | 定义者 | |
|---|---|---|
|
initialConfig: Object
This Component's initial configurat...
This Component's initial configuration specification. 只读的 组件初始化配置项。只读的
|
Component | |
|
*/: Boolean
True表示为该组件已经渲染好了。只读的。
True表示为该组件已经渲染好了。只读的。
|
Component | |
| 方法 | 定义者 | |
|---|---|---|
updateProgress
(
Float value,
String text
)
: Ext.ProgressBar
Updates the progress bar value, and...
Updates the progress bar value, and optionally its text. If the text argument is not specified,
any existing text value will be unchanged. To blank out existing text, pass ''. Note that even
if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for
determining when the progress is complete and calling {@link #reset} to clear and/or hide the control.
参数项:
|
ProgressBar | |
wait
(
Object config
)
: Ext.ProgressBar
Initiates an auto-updating progress...
Initiates an auto-updating progress bar. A duration can be specified, in which case the progress
bar will automatically reset after a fixed amount of time and optionally call a callback function
if specified. If no duration is passed in, then the progress bar will run indefinitely and must
be manually cleared by calling {@link #reset}. The wait method accepts a config object with
the following properties:
Property Type Description
---------- ------------ ----------------------------------------------------------------------
duration Number The length of time in milliseconds that the progress bar should
run before resetting itself (defaults to undefined, in which case it
will run indefinitely until reset is called)
interval Number The length of time in milliseconds between each progress update
(defaults to 1000 ms)
increment Number The number of progress update segments to display within the progress
bar (defaults to 10). If the bar reaches the end and is still
updating, it will automatically wrap back to the beginning.
fn Function A callback function to execute after the progress bar finishes auto-
updating. The function will be called with no arguments. This function
will be ignored if duration is not specified since in that case the
progress bar can only be stopped programmatically, so any required function
should be called by the same code after it resets the progress bar.
scope Object The scope that is passed to the callback function (only applies when
duration and fn are both passed).
Example usage:
参数项:
|
ProgressBar | |
|
isWaiting
(
)
: Boolean
Returns true if the progress bar is...
Returns true if the progress bar is currently in a {@link #wait} operation
参数项:
|
ProgressBar | |
updateText
(
String text
)
: Ext.ProgressBar
Updates the progress bar text. If ...
Updates the progress bar text. If specified, textEl will be updated, otherwise the progress
bar itself will display the updated text.
参数项:
|
ProgressBar | |
setSize
(
Number/Object width,
Number height
)
: Ext.BoxComponent
设置组件的宽度和高度。
此方法会触发resize事件。
此方法既可...
设置组件的宽度和高度。
此方法会触发resize事件。
此方法既可接受单独的数字类型的参数,也可以传入一个size的对象,如 {width:10, height:20}。
参数项:
|
BoxComponent | |
reset
(
Boolean hide
)
: Ext.ProgressBar
Resets the progress bar value to 0 ...
Resets the progress bar value to 0 and text to empty string. If hide = true, the progress
bar will also be hidden (using the {@link #hideMode} property internally).
参数项:
|
ProgressBar | |
setWidth
(
Number height
)
: Ext.BoxComponent
设置组件的宽度。此方法会触发resize事件。
设置组件的宽度。此方法会触发resize事件。
参数项:
|
BoxComponent | |
setHeight
(
Number height
)
: Ext.BoxComponent
设置组件的高度。此方法会触发resize事件。
设置组件的高度。此方法会触发resize事件。
参数项:
|
BoxComponent | |
|
getSize
(
)
: Object
返回当前组件所属元素的大小。
返回当前组件所属元素的大小。
参数项:
|
BoxComponent | |
getPosition
(
[Boolean local]
)
: Array
对组件所在元素当前的XY位置
对组件所在元素当前的XY位置
参数项:
|
BoxComponent | |
getBox
(
[Boolean local]
)
: Object
返回对组件所在元素的测量矩形大小。
返回对组件所在元素的测量矩形大小。
参数项:
|
BoxComponent | |
updateBox
(
Object box
)
: Ext.BoxComponent
对组件所在元素的测量矩形大小,然后根据此值设置组件的大小。
对组件所在元素的测量矩形大小,然后根据此值设置组件的大小。
参数项:
|
BoxComponent | |
setPosition
(
Number left,
Number top
)
: Ext.BoxComponent
设置组件的left和top值。要设置基于页面的XY位置,可使用{@li...
设置组件的left和top值。要设置基于页面的XY位置,可使用{@link #setPagePosition}。
此方法触发move事件。
参数项:
|
BoxComponent | |
setPagePosition
(
Number x,
Number y
)
: Ext.BoxComponent
设置组件页面上的left和top值。
要设置left、top的位置,...
设置组件页面上的left和top值。
要设置left、top的位置,可使用{@link #setPosition}。
此方法触发move事件。
参数项:
|
BoxComponent | |
|
syncSize
(
)
: Ext.BoxComponent
强制重新计算组件的大小尺寸,这个尺寸是基于所属元素当前的高度和宽度。
强制重新计算组件的大小尺寸,这个尺寸是基于所属元素当前的高度和宽度。
参数项:
|
BoxComponent | |
onResize
(
Number x,
Number y,
Number adjWidth,
Number adjHeight,
Number rawWidth,
Number rawHeight
)
/* // protected
组件大小调节过后调用的函数,这是个空...
/* // protected
组件大小调节过后调用的函数,这是个空函数,可由一个子类来实现,执行一些调节大小过后的自定义逻辑。
参数项:
|
BoxComponent | |
onPosition
(
Number x,
Number y
)
/* // protected
组件移动过后调用的函数,这是个空函数...
/* // protected
组件移动过后调用的函数,这是个空函数,可由一个子类来实现,执行一些移动过后的自定义逻辑。
参数项:
|
BoxComponent | |
|
initComponent
(
)
/* // protected Function to be impl...
/* // protected Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default).
参数项:
|
Component | |
render
(
[Mixed container],
[String/Number position]
)
如果这是延时加载的组件,就要执行这个渲染的方法到其容器的元素。
这...
如果这是延时加载的组件,就要执行这个渲染的方法到其容器的元素。
这个组件插入到容器的之前位置,可以是元素的ID或是DOM节点的索引(缺省是插入到容器的尾部)
参数项:
|
Component | |
applyToMarkup
(
String/HTMLElement el
)
把这个组件应用到当前有效的markup。执行该函数后,无须调用rend...
把这个组件应用到当前有效的markup。执行该函数后,无须调用render()
参数项:
|
Component | |
addClass
(
string cls
)
加入CSS样式类到组件所在的元素。
加入CSS样式类到组件所在的元素。
参数项:
|
Component | |
removeClass
(
string cls
)
移除CSS样式类到组件所属的元素。
移除CSS样式类到组件所属的元素。
参数项:
|
Component | |
|
destroy
(
)
清除任何的事件的句柄,在DOM中移除组件的元素,从容器{@link E...
清除任何的事件的句柄,在DOM中移除组件的元素,从容器{@link Ext.Container}中移除本身(如果适合的话)和在{@link Ext.ComponentMgr}注销 销毁的方法一般由框架自动执行,通常不需要直接执行。
参数项:
|
Component | |
|
getEl
(
)
: Ext.Element
返回所属的{@link Ext.Element}.
返回所属的{@link Ext.Element}.
参数项:
|
Component | |
|
getId
(
)
: String
返回该组件的id
返回该组件的id
参数项:
|
Component | |
|
getItemId
(
)
: String
返回该组件的item id。
返回该组件的item id。
参数项:
|
Component | |
focus
(
[Boolean selectText],
[Boolean/Number delay]
)
: Ext.Component
试着将焦点放到此项。
试着将焦点放到此项。
参数项:
|
Component | |
|
disable
(
)
: Ext.Component
禁止该组件。
禁止该组件。
参数项:
|
Component | |
|
enable
(
)
: Ext.Component
启用该组件。
启用该组件。
参数项:
|
Component | |
setDisabled
(
Boolean disabled
)
方便的函数用来控制组件禁用/可用。
方便的函数用来控制组件禁用/可用。
参数项:
|
Component | |
|
show
(
)
: Ext.Component
显示该组件。
显示该组件。
参数项:
|
Component | |
|
hide
(
)
: Ext.Component
隐藏该组件。
隐藏该组件。
参数项:
|
Component | |
setVisible
(
Boolean visible
)
: Ext.Component
方便的函数用来控制组件显示/隐藏。
方便的函数用来控制组件显示/隐藏。
参数项:
|
Component | |
|
isVisible
(
)
该组件可见时返回true。
该组件可见时返回true。
参数项:
|
Component | |
cloneConfig
(
*/
)
: Ext.Component
根据原始传入到该实例的配置项值,克隆一份组件。
根据原始传入到该实例的配置项值,克隆一份组件。
参数项:
|
Component | |
|
getXType
(
)
: String
获取{@link Ext.ComponentMgr}在已登记组件的xt...
获取{@link Ext.ComponentMgr}在已登记组件的xtypes。 全部可用的xtypes列表,可参考{@link Ext.Component}开头,用法举例:
参数项:
|
Component | |
isXType
(
String xtype,
[Boolean shallow]
)
测试这个组件是否属于某个指定的xtype。 这个方法既可测试该组件是否...
测试这个组件是否属于某个指定的xtype。 这个方法既可测试该组件是否为某个xtype的子类,或直接是这个xtype的实例(shallow = true) 全部可用的xtypes列表,可参考{@link Ext.Component}开头,用法举例:
true就表示为测试该组件是否这个xtype本身的实例
参数项:
|
Component | |
|
getXTypes
(
)
: String
返回以斜杠分割的字符串,表示组件的xtype层次。 全部可用的xtyp...
返回以斜杠分割的字符串,表示组件的xtype层次。 全部可用的xtypes列表,可参考{@link Ext.Component}开头,用法举例:
参数项:
|
Component | |
fireEvent
(
String eventName,
)
: Boolean
触发指定的事件,并将参数传入(至少要有事件名称)。
触发指定的事件,并将参数传入(至少要有事件名称)。
参数项:
|
Observable | |
addListener
(
String eventName,
Function handler,
[Object scope],
[Object options]
)
为该组件加入事件句柄(event handler)
为该组件加入事件句柄(event handler)
句柄函数执行时所在的作用域。句柄函数“this”的上下文。 触发事件后开始执行句柄的延时时间(invocation:the act of making a particular function start),单位:毫秒 true代表为下次事件触发加入一个要处理的句柄,然后再移除本身。 不同配搭方式的选项 一次调用加入上多个句柄(handlers) 或者是以简写的方式书写,前提是只允许同一个的作用域对象传入到所有的句柄中:
参数项:
|
Observable | |
removeListener
(
String eventName,
Function handler,
Object scope
)
移除侦听器
移除侦听器
参数项:
|
Observable | |
|
purgeListeners
(
)
从这个对象身上移除所有的侦听器
从这个对象身上移除所有的侦听器
参数项:
|
Observable | |
addEvents
(
Object object
)
定义观察者的事件。
定义观察者的事件。
参数项:
|
Observable | |
hasListener
(
String eventName
)
: Boolean
查询该对象是否有指定事件的侦听器
查询该对象是否有指定事件的侦听器
参数项:
|
Observable | |
|
suspendEvents
(
)
暂停触发所有的事件(参阅{@link #resumeEvents})
暂停触发所有的事件(参阅{@link #resumeEvents})
参数项:
|
Observable | |
|
resumeEvents
(
)
重新触发事件(参阅{@link #suspendEvents})
重新触发事件(参阅{@link #suspendEvents})
参数项:
|
Observable | |
Ext.util.Observable.prototype.on
(
String eventName,
[Object scope],
Function handler,
[Object options]
)
为该元素添加事件句柄(event handler),addListen...
为该元素添加事件句柄(event handler),addListener的简写方式 @param {String} eventName 侦听事件的类型 @param {Object} scope (可选的) 执行句柄的作用域 @param {Function} handler 事件涉及的方法 @param {Object} options (可选的) @method
参数项:
|
Observable | |
Ext.util.Observable.prototype.un
(
String eventName,
Function handler,
[Object scope]
)
移除侦听器 @param {String} eventName ...
移除侦听器 @param {String} eventName 侦听事件的类型 @param {Function} handler 事件涉及的方法 @param {Object} scope (可选的)句柄的作用域 @method
参数项:
|
Observable | |
Ext.util.Observable.capture
(
Observable o,
Function fn,
[Object scope]
)
. 开始捕捉特定的观察者。 在事件触发之前,所有的事件会...
. 开始捕捉特定的观察者。 在事件触发之前,所有的事件会以"事件名称+标准签名"的形式传入到函数(传入的参数是function类型)。 如果传入的函数执行后返回false,则接下的事件将不会触发。 @param {Observable} o 要捕捉的观察者 @param {Function} fn 要调用的函数 @param {Object} scope (可选的)函数作用域 @static
参数项:
|
Observable | |
Ext.util.Observable.releaseCapture
(
Observable o
)
从Observable身上移除所有已加入的捕捉captu...
从Observable身上移除所有已加入的捕捉captures @param {Observable} o 要释放的观察者 @static
参数项:
|
Observable | |