1 <!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-Img'>/**
2 </span> * @class Ext.Img
3 * @extends Ext.Component
5 * Simple helper class for easily creating image components. This simply renders an image tag to the DOM
6 * with the configured src.
8 * {@img Ext.Img/Ext.Img.png Ext.Img component}
12 * var changingImage = Ext.create('Ext.Img', {
13 * src: 'http://www.sencha.com/img/20110215-feat-html5.png',
14 * renderTo: Ext.getBody()
17 * // change the src of the image programmatically
18 * changingImage.setSrc('http://www.sencha.com/img/20110215-feat-perf.png');
20 Ext.define('Ext.Img', {
21 extend: 'Ext.Component',
22 alias: ['widget.image', 'widget.imagecomponent'],
23 <span id='Ext-Img-cfg-src'> /** @cfg {String} src The image src */
26 getElConfig: function() {
33 <span id='Ext-Img-method-setSrc'> /**
34 </span> * Updates the {@link #src} of the image
36 setSrc: function(src) {
45 </pre></pre></body></html>