Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / form / field / Display.js
index 669edf4..32d02cd 100644 (file)
@@ -1,43 +1,50 @@
+/*
+
+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.form.field.Display
- * @extends Ext.form.field.Base
- * <p>A display-only text field which is not validated and not submitted. This is useful for when you want
- * to display a value from a form's {@link Ext.form.Basic#load loaded data} but do not want to allow the
- * user to edit or submit that value. The value can be optionally {@link #htmlEncode HTML encoded} if it contains
- * HTML markup that you do not want to be rendered.</p>
- * <p>If you have more complex content, or need to include components within the displayed content, also
- * consider using a {@link Ext.form.FieldContainer} instead.</p>
- * {@img Ext.form.Display/Ext.form.Display.png Ext.form.Display component}
- * <p>Example:</p>
- * <pre><code>
-    Ext.create('Ext.form.Panel', {
-        width: 175,
-        height: 120,
-        bodyPadding: 10,
-        title: 'Final Score',
-        items: [{
-            xtype: 'displayfield',
-            fieldLabel: 'Home',
-            name: 'home_score',
-            value: '10'
-        }, {
-            xtype: 'displayfield',
-            fieldLabel: 'Visitor',
-            name: 'visitor_score',
-            value: '11'
-        }],
-        buttons: [{
-            text: 'Update',
-        }],
-        renderTo: Ext.getBody()
-    });
-</code></pre>
-
- * @constructor
- * Creates a new DisplayField.
- * @param {Object} config Configuration options
+ * A display-only text field which is not validated and not submitted. This is useful for when you want to display a
+ * value from a form's {@link Ext.form.Basic#load loaded data} but do not want to allow the user to edit or submit that
+ * value. The value can be optionally {@link #htmlEncode HTML encoded} if it contains HTML markup that you do not want
+ * to be rendered.
+ *
+ * If you have more complex content, or need to include components within the displayed content, also consider using a
+ * {@link Ext.form.FieldContainer} instead.
  *
- * @xtype displayfield
+ * Example:
+ *
+ *     @example
+ *     Ext.create('Ext.form.Panel', {
+ *         renderTo: Ext.getBody(),
+ *         width: 175,
+ *         height: 120,
+ *         bodyPadding: 10,
+ *         title: 'Final Score',
+ *         items: [{
+ *             xtype: 'displayfield',
+ *             fieldLabel: 'Home',
+ *             name: 'home_score',
+ *             value: '10'
+ *         }, {
+ *             xtype: 'displayfield',
+ *             fieldLabel: 'Visitor',
+ *             name: 'visitor_score',
+ *             value: '11'
+ *         }],
+ *         buttons: [{
+ *             text: 'Update',
+ *         }]
+ *     });
  */
 Ext.define('Ext.form.field.Display', {
     extend:'Ext.form.field.Base',
@@ -53,14 +60,15 @@ Ext.define('Ext.form.field.Display', {
     ],
 
     /**
-     * @cfg {String} fieldCls The default CSS class for the field (defaults to <tt>"x-form-display-field"</tt>)
+     * @cfg {String} [fieldCls="x-form-display-field"]
+     * The default CSS class for the field.
      */
     fieldCls: Ext.baseCSSPrefix + 'form-display-field',
 
     /**
-     * @cfg {Boolean} htmlEncode <tt>false</tt> to skip HTML-encoding the text when rendering it (defaults to
-     * <tt>false</tt>). This might be useful if you want to include tags in the field's innerHTML rather than
-     * rendering them as string literals per the default logic.
+     * @cfg {Boolean} htmlEncode
+     * false to skip HTML-encoding the text when rendering it. This might be useful if you want to
+     * include tags in the field's innerHTML rather than rendering them as string literals per the default logic.
      */
     htmlEncode: false,
 
@@ -122,3 +130,4 @@ Ext.define('Ext.form.field.Display', {
      * @hide
      */
 });
+