3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 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.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
17 * @extends Ext.Component
19 * Simple helper class for easily creating image components. This simply renders an image tag to the DOM
20 * with the configured src.
22 * {@img Ext.Img/Ext.Img.png Ext.Img component}
26 * var changingImage = Ext.create('Ext.Img', {
27 * src: 'http://www.sencha.com/img/20110215-feat-html5.png',
28 * renderTo: Ext.getBody()
31 * // change the src of the image programmatically
32 * changingImage.setSrc('http://www.sencha.com/img/20110215-feat-perf.png');
34 Ext.define('Ext.Img', {
35 extend: 'Ext.Component',
36 alias: ['widget.image', 'widget.imagecomponent'],
37 /** @cfg {String} src The image src */
40 getElConfig: function() {
47 // null out this function, we can't set any html inside the image
48 initRenderTpl: Ext.emptyFn,
51 * Updates the {@link #src} of the image
53 setSrc: function(src) {