Package: | Ext.ux |
Defined In: | StatusBar.js |
Class: | StatusBar |
Extends: | Object |
Basic status bar component that can be used as the bottom toolbar of any Ext.Panel. In addition to supporting the standard Ext.Toolbar interface for adding buttons, menus and other items, the StatusBar provides a greedy status element that can be aligned to either side and has convenient methods for setting the status text and icon. You can also indicate that something is processing using the showBusy method.
new Ext.Panel({
title: 'StatusBar',
// etc.
bbar: new Ext.ux.StatusBar({
id: 'my-status',
// defaults to use when the status is cleared:
defaultText: 'Default status text',
defaultIconCls: 'default-icon',
// values to set initially:
text: 'Ready',
iconCls: 'ready-icon',
// any standard Toolbar items:
items: [{
text: 'A Button'
}, '-', 'Plain Text']
})
});
// Update the status bar later in code:
var sb = Ext.getCmp('my-status');
sb.setStatus({
text: 'OK',
iconCls: 'ok-icon',
clear: true // auto-clear after a set interval
});
// Set the status bar to show that something is processing:
sb.showBusy();
// processing....
sb.clearStatus(); // once completeed
Config Options | Defined By | |
---|---|---|
autoClear : Number The number of milliseconds to wait after setting the status via
setStatus before automatically clearing the status
te... The number of milliseconds to wait after setting the status via
setStatus before automatically clearing the status
text and icon (defaults to 5000). Note that this only applies
when passing the clear argument to setStatus
since that is the only way to defer clearing the status. This can
be overridden by specifying a different wait value in
setStatus . Calls to clearStatus
always clear the status bar immediately and ignore this value. | StatusBar | |
autoClear : Number The number of milliseconds to wait after setting the status via
setStatus before automatically clearing the status
te... The number of milliseconds to wait after setting the status via
setStatus before automatically clearing the status
text and icon (defaults to 5000). Note that this only applies
when passing the clear argument to setStatus
since that is the only way to defer clearing the status. This can
be overridden by specifying a different wait value in
setStatus . Calls to clearStatus
always clear the status bar immediately and ignore this value. | StatusBar | |
busyIconCls : String | StatusBar | |
busyIconCls : String | StatusBar | |
busyText : String | StatusBar | |
busyText : String | StatusBar | |
cls : String The base class applied to the containing element for this component on render (defaults to 'x-statusbar') | StatusBar | |
cls : String The base class applied to the containing element for this component on render (defaults to 'x-statusbar') | StatusBar | |
defaultIconCls : String The default iconCls value (see the iconCls docs for additional details about customizing the icon).
This will be used... The default iconCls value (see the iconCls docs for additional details about customizing the icon).
This will be used anytime the status bar is cleared with the useDefaults:true option (defaults to ''). | StatusBar | |
defaultIconCls : String The default iconCls value (see the iconCls docs for additional details about customizing the icon).
This will be used... The default iconCls value (see the iconCls docs for additional details about customizing the icon).
This will be used anytime the status bar is cleared with the useDefaults:true option (defaults to ''). | StatusBar | |
defaultText : String The default text value. This will be used anytime the status bar is cleared with the
useDefaults:true option (defaul... The default text value. This will be used anytime the status bar is cleared with the
useDefaults:true option (defaults to ''). | StatusBar | |
defaultText : String The default text value. This will be used anytime the status bar is cleared with the
useDefaults:true option (defaul... The default text value. This will be used anytime the status bar is cleared with the
useDefaults:true option (defaults to ''). | StatusBar | |
emptyText : String The text string to use if no text has been set. Defaults to
' '). If there are no other items in the toolbar u... The text string to use if no text has been set. Defaults to
' '). If there are no other items in the toolbar using
an empty string ('') for this value would end up in the toolbar
height collapsing since the empty string will not maintain the toolbar
height. Use '' if the toolbar should collapse in height
vertically when no text is specified and there are no other items in
the toolbar. | StatusBar | |
emptyText : String The text string to use if no text has been set. Defaults to
' '). If there are no other items in the toolbar u... The text string to use if no text has been set. Defaults to
' '). If there are no other items in the toolbar using
an empty string ('') for this value would end up in the toolbar
height collapsing since the empty string will not maintain the toolbar
height. Use '' if the toolbar should collapse in height
vertically when no text is specified and there are no other items in
the toolbar. | StatusBar | |
iconCls : String A CSS class that will be initially set as the status bar icon and is
expected to provide a background image (defaults... A CSS class that will be initially set as the status bar icon and is
expected to provide a background image (defaults to '').
Example usage:
| StatusBar | |
iconCls : String A CSS class that will be initially set as the status bar icon and is
expected to provide a background image (defaults... A CSS class that will be initially set as the status bar icon and is
expected to provide a background image (defaults to '').
Example usage:
| StatusBar | |
statusAlign : String The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered,
it creates ... The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered,
it creates an internal div containing the status text and icon. Any additional Toolbar items added in the
StatusBar's items config, or added via add or any of the supported add* methods, will be
rendered, in added order, to the opposite side. The status element is greedy, so it will automatically
expand to take up all sapce left over by any other items. Example usage:
| StatusBar | |
statusAlign : String The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered,
it creates ... The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered,
it creates an internal div containing the status text and icon. Any additional Toolbar items added in the
StatusBar's items config, or added via add or any of the supported add* methods, will be
rendered, in added order, to the opposite side. The status element is greedy, so it will automatically
expand to take up all sapce left over by any other items. Example usage:
| StatusBar | |
text : String A string that will be initially set as the status message. This string
will be set as innerHTML (html tags are accep... A string that will be initially set as the status message. This string
will be set as innerHTML (html tags are accepted) for the toolbar item.
If not specified, the value set for defaultText
will be used. | StatusBar | |
text : String A string that will be initially set as the status message. This string
will be set as innerHTML (html tags are accep... A string that will be initially set as the status message. This string
will be set as innerHTML (html tags are accepted) for the toolbar item.
If not specified, the value set for defaultText
will be used. | StatusBar |
Method | Defined By | |
---|---|---|
StatusBar( Object/Array config )
Creates a new StatusBar Creates a new StatusBar Parameters:
| StatusBar | |
clearStatus( [Object config ] )
:
Ext.ux.StatusBarClears the status text and iconCls. Also supports clearing via an optional fade out animation. Clears the status text and iconCls. Also supports clearing via an optional fade out animation. Parameters:
| StatusBar | |
getText()
:
String Returns the current status text. Returns the current status text. Parameters:
| StatusBar | |
setIcon( [String iconCls ] )
:
Ext.ux.StatusBarConvenience method for setting the status icon directly. For more flexible options see setStatus.
See iconCls for co... Convenience method for setting the status icon directly. For more flexible options see setStatus.
See iconCls for complete details about customizing the icon. Parameters:
| StatusBar | |
setStatus( Object/String config )
:
Ext.ux.StatusBarSets the status text and/or iconCls. Also supports automatically clearing the
status that was set after a specified i... Sets the status text and/or iconCls. Also supports automatically clearing the
status that was set after a specified interval. Parameters:
| StatusBar | |
setText( [String text ] )
:
Ext.ux.StatusBarConvenience method for setting the status text directly. For more flexible options see setStatus. Convenience method for setting the status text directly. For more flexible options see setStatus. Parameters:
| StatusBar | |
showBusy( [Object/String config ] )
:
Ext.ux.StatusBarConvenience method for setting the status text and icon to special values that are pre-configured to indicate
a "busy... Convenience method for setting the status text and icon to special values that are pre-configured to indicate
a "busy" state, usually for loading or processing activities. Parameters:
| StatusBar |