3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
10 * @class Ext.ux.form.SpinnerField
11 * @extends Ext.form.NumberField
12 * Creates a field utilizing Ext.ux.Spinner
15 Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
18 autoSize: Ext.emptyFn,
20 adjustSize: Ext.BoxComponent.prototype.adjustSize,
22 constructor: function(config) {
23 var spinnerConfig = Ext.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');
25 var spl = this.spinner = new Ext.ux.Spinner(spinnerConfig);
27 var plugins = config.plugins
28 ? (Ext.isArray(config.plugins)
29 ? config.plugins.push(spl)
30 : [config.plugins, spl])
33 Ext.ux.form.SpinnerField.superclass.constructor.call(this, Ext.apply(config, {plugins: plugins}));
37 getResizeEl: function(){
42 getPositionEl: function(){
47 alignErrorIcon: function(){
49 this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
53 validateBlur: function(){
58 Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
61 Ext.form.SpinnerField = Ext.ux.form.SpinnerField;