Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / grid / RowNumberer.js
index 7912428..77ed862 100644 (file)
@@ -1,37 +1,52 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
- * @class Ext.grid.RowNumberer
- * @extends Ext.grid.column.Column
  * This is a utility class that can be passed into a {@link Ext.grid.column.Column} as a column config that provides
  * an automatic row numbering column.
- * <br>Usage:<br><pre><code>
-columns: [
-    Ext.create('Ext.grid.RowNumberer'),
-    {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},
   {text: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
   {text: "Change", width: 120, sortable: true, dataIndex: 'change'},
   {text: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
-    {text: "Last Updated", width: 120, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
-]
- *</code></pre>
- * @constructor
- * @param {Object} config The configuration options
+ * 
+ * Usage:
+ *
+ *     columns: [
*         {xtype: 'rownumberer'},
*         {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},
*         {text: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
+ *         {text: "Change", width: 120, sortable: true, dataIndex: 'change'},
+ *         {text: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
+ *         {text: "Last Updated", width: 120, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
+ *     ]
+ *
  */
 Ext.define('Ext.grid.RowNumberer', {
     extend: 'Ext.grid.column.Column',
     alias: 'widget.rownumberer',
+
     /**
-     * @cfg {String} text Any valid text or HTML fragment to display in the header cell for the row
-     * number column (defaults to '&#160').
+     * @cfg {String} text
+     * Any valid text or HTML fragment to display in the header cell for the row number column.
      */
     text: "&#160",
 
     /**
-     * @cfg {Number} width The default width in pixels of the row number column (defaults to 23).
+     * @cfg {Number} width
+     * The default width in pixels of the row number column.
      */
     width: 23,
 
     /**
-     * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false).
+     * @cfg {Boolean} sortable
+     * True if the row number column is sortable.
      * @hide
      */
     sortable: false,
@@ -46,7 +61,7 @@ Ext.define('Ext.grid.RowNumberer', {
     },
 
     // private
-    fixed: true,
+    resizable: false,
     hideable: false,
     menuDisabled: true,
     dataIndex: '',
@@ -63,3 +78,4 @@ Ext.define('Ext.grid.RowNumberer', {
         return store.indexOfTotal(record) + 1;
     }
 });
+