<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-5211228043243414701.post1928533004959293137..comments</id><updated>2011-05-23T15:46:48.362+02:00</updated><category term='Personal'/><category term='AOP'/><category term='Web dev'/><category term='J2ME'/><category term='Visual Studio'/><category term='GWT'/><category term='Microsoft'/><category term='MVC'/><category term='Antipatterns'/><category term='HowTo'/><category term='.Net'/><category term='ASP.net MVC'/><category term='Apple'/><category term='Exploring JavaScript'/><category term='C++'/><category term='Software Design'/><category term='Projects'/><category term='Mac'/><category term='iOS'/><category term='Spring'/><category term='Clean Code'/><category term='Windows OS'/><category term='Android'/><category term='Unit Testing'/><category term='Design Patterns'/><category term='jQuery'/><category term='Smelly Code'/><category term='refactoring'/><category term='jFace'/><category term='interesting apps'/><category term='Software testing'/><category term='martial arts'/><category term='Software Architecture'/><category term='Java'/><category term='OSX'/><category term='Best Practices'/><category term='Google'/><category term='Open Source'/><category term='Blogging'/><category term='C#'/><category term='VBA'/><category term='RCP'/><category term='iPhone'/><category term='WCF'/><category term='Linux'/><category term='mobile dev'/><category term='Eclipse'/><category term='functional programming'/><category term='lessions learned'/><category term='annotated'/><category term='webclips'/><category term='Agile Development'/><category term='JavaScript'/><category term='Tech vids'/><category term='ASP.net'/><category term='Entity Framework'/><category term='Silverlight'/><title type='text'>Comments on Juri's TechBlog: GWT Button with image AND text</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.js-development.com/feeds/1928533004959293137/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html'/><author><name>Juri Strumpflohner</name><uri>https://profiles.google.com/104904743888756261987</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Q7MhUS4Qmsc/AAAAAAAAAAI/AAAAAAAAC5k/QAy7ju1ZGXY/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-1924690098858833458</id><published>2011-02-16T23:30:56.403+01:00</published><updated>2011-02-16T23:30:56.403+01:00</updated><title type='text'>Hi Juri
First, good work. 

I found that you can a...</title><content type='html'>Hi Juri&lt;br /&gt;First, good work. &lt;br /&gt;&lt;br /&gt;I found that you can also use setHTML method of Button class to do the trick. &lt;br /&gt;&lt;br /&gt;sorry, the blog does not allow me to add span tag. So. have to use SPAN&lt;br /&gt;For example, &lt;br /&gt;     addStockButton.setHTML(&amp;quot;SPAN class=\&amp;quot;gwt-PushButton-add\&amp;quot;\&amp;gt;Add_Icon SPAN&amp;quot;);&lt;br /&gt;&lt;br /&gt;You can control the class to show the icon. For example: &lt;br /&gt;.gwt-PushButton-add {&lt;br /&gt;&lt;br /&gt; background:url(image/add.png) no-repeat 0px 0px;&lt;br /&gt; text-indent:30px;&lt;br /&gt; display:block;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If you like to hide this trick, you can still create a custom class to wrap this trick and expose the text/class to users&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Jun</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/1924690098858833458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/1924690098858833458'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1297895456403#c1924690098858833458' title=''/><author><name>majun8cn</name><uri>http://www.blogger.com/profile/13377850849847786212</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1748950097'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-7316271398990595176</id><published>2011-01-17T14:38:23.833+01:00</published><updated>2011-01-17T14:38:23.833+01:00</updated><title type='text'>Thanks, Used your code but in my case the image en...</title><content type='html'>Thanks, Used your code but in my case the image ends up behind the text in stead of in front of it!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/7316271398990595176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/7316271398990595176'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1295271503833#c7316271398990595176' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1255256928'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-335856385480463271</id><published>2010-12-08T19:32:52.738+01:00</published><updated>2010-12-08T19:32:52.738+01:00</updated><title type='text'>Thanks so much for sharing this.
It&amp;#39;s works fi...</title><content type='html'>Thanks so much for sharing this.&lt;br /&gt;It&amp;#39;s works fine!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/335856385480463271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/335856385480463271'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1291833172738#c335856385480463271' title=''/><author><name>Plutarco Gonzalez Aguilar</name><uri>http://www.blogger.com/profile/04651365851209628915</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-13623413'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-856021483822022837</id><published>2010-09-02T17:03:49.129+02:00</published><updated>2010-09-02T17:03:49.129+02:00</updated><title type='text'>Just for curiosity: what did you clean? (and of co...</title><content type='html'>Just for curiosity: what did you clean? (and of course there was lots of space to clean up in my sample; it was more a proof of concept :) )</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/856021483822022837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/856021483822022837'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1283439829129#c856021483822022837' title=''/><author><name>Juri Strumpflohner</name><uri>http://www.blogger.com/profile/00030320835964434266</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_tF6XjsUy87k/TH5W8r62EOI/AAAAAAAACwc/et782GESlVg/S220/Matrix1_cut.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-677632238'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-7350147243286213865</id><published>2010-09-02T16:55:27.293+02:00</published><updated>2010-09-02T16:55:27.293+02:00</updated><title type='text'>Good job, using your class after little cleanup.</title><content type='html'>Good job, using your class after little cleanup.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/7350147243286213865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/7350147243286213865'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1283439327293#c7350147243286213865' title=''/><author><name>skrat</name><uri>http://www.blogger.com/profile/15487467627010327242</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-188404056'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-669595640303208111</id><published>2010-06-08T18:34:57.447+02:00</published><updated>2010-06-08T18:34:57.447+02:00</updated><title type='text'>Thanks so much for this posting!  I&amp;#39;m developi...</title><content type='html'>Thanks so much for this posting!  I&amp;#39;m developing my first GWT app and coming from a Flex background so I&amp;#39;m used to a very firm ui / code distinction and having a lot of trouble with UiBinder not natively supporting a lot of attributes.  Your code worked great and your other examples have also been very useful for me - thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/669595640303208111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/669595640303208111'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1276014897447#c669595640303208111' title=''/><author><name>b.ringaling</name><uri>http://www.blogger.com/profile/15993919397182256712</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1151014593'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-6444625761137273566</id><published>2010-03-23T08:07:37.510+01:00</published><updated>2010-03-23T08:07:37.510+01:00</updated><title type='text'>Hei,
thx for your infos. I certainly will use the ...</title><content type='html'>Hei,&lt;br /&gt;thx for your infos. I certainly will use the approach of using &amp;quot;img.getElement().getStyle().setVerticalAlignment(VerticalAlign.MIDDLE)&amp;quot;, didn&amp;#39;t know about that as well as your suggestion regarding the AbstractImagePrototype.&lt;br /&gt;&lt;br /&gt;As I also mentioned in the post, this is just a sample implementation which makes it really easy to create a button with image + text. And sure, one should always prefer CSS classes over direct styles :)&lt;br /&gt;&lt;br /&gt;thx</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/6444625761137273566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/6444625761137273566'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1269328057510#c6444625761137273566' title=''/><author><name>Juri Strumpflohner</name><uri>http://www.blogger.com/profile/00030320835964434266</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://lh4.ggpht.com/_tF6XjsUy87k/S1sSmlqex_I/AAAAAAAACgA/48u7ImZdap8/xavatar.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-677632238'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-171744308519676159</id><published>2010-03-22T14:44:02.832+01:00</published><updated>2010-03-22T14:44:02.832+01:00</updated><title type='text'>Well, first, both Button and Hyperlink are HasHTML...</title><content type='html'>Well, first, both Button and Hyperlink are HasHTML, so you can really use whatever HTML snippet you want, including one with an image and some text.&lt;br /&gt;&lt;br /&gt;As for your code (which makes it easier to use and makes your whole app more consistent as to how your image is displayed), I&amp;#39;d rather use img.getElement().getStyle().setVerticalAlignment(VerticalAlign.MIDDLE)than your setAttribute(&amp;quot;style&amp;quot;) technique (well, actually, I&amp;#39;d even rather use a CSS class); and the DOM class will soon be deprecated in favor of the Node and Element&amp;#39;s own methods. Finally, you don&amp;#39;t have to instantiate an Image widget, you can just use AbstractImagePrototype.create(imageResource).createElement() which is a bit lghter-weight.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/171744308519676159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/1928533004959293137/comments/default/171744308519676159'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html?showComment=1269265442832#c171744308519676159' title=''/><author><name>Thomas Broyer</name><uri>http://www.blogger.com/profile/08913751914931017350</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2010/03/gwt-button-with-image-and-text.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-1928533004959293137' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/1928533004959293137' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-249075852'/></entry></feed>
