<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The Ghost in the shell &#8211; Transparency</title>
	<atom:link href="http://www.vogella.de/blog/2010/03/16/transparent-shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/</link>
	<description>Tips around Eclipse and Android programming</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:32:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1525</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Wed, 17 Mar 2010 13:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1525</guid>
		<description>@Tonny: Thanks.</description>
		<content:encoded><![CDATA[<p>@Tonny: Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tonny Madsen</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1522</link>
		<dc:creator>Tonny Madsen</dc:creator>
		<pubDate>Wed, 17 Mar 2010 08:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1522</guid>
		<description>Your loop are going to take all system resources, so you might want to use this instead

	/**
	 * Sleeps for the specified number of msec.
	 * 
	 * @param msec the length
	 */
	public static void sleep(int msec) {
		cont = false;
		display.timerExec(msec, new Runnable() {
			@Override
			public void run() {
				cont = true;
			}
		});
		while (!cont) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}</description>
		<content:encoded><![CDATA[<p>Your loop are going to take all system resources, so you might want to use this instead</p>
<p>	/**<br />
	 * Sleeps for the specified number of msec.<br />
	 *<br />
	 * @param msec the length<br />
	 */<br />
	public static void sleep(int msec) {<br />
		cont = false;<br />
		display.timerExec(msec, new Runnable() {<br />
			@Override<br />
			public void run() {<br />
				cont = true;<br />
			}<br />
		});<br />
		while (!cont) {<br />
			if (!display.readAndDispatch()) {<br />
				display.sleep();<br />
			}<br />
		}<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1519</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1519</guid>
		<description>@Michal @Nicolas @Remy thanks for the advice, I added a small check for non-alpha systems.

@Philipp @Gilles Now that I have alpha fading I ONLY start the application to see it fade away. ;-)</description>
		<content:encoded><![CDATA[<p>@Michal @Nicolas @Remy thanks for the advice, I added a small check for non-alpha systems.</p>
<p>@Philipp @Gilles Now that I have alpha fading I ONLY start the application to see it fade away. <img src='http://www.vogella.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Vogel</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1518</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1518</guid>
		<description>@Aurelien Thanks, I fixed this and use now PlatformUI</description>
		<content:encoded><![CDATA[<p>@Aurelien Thanks, I fixed this and use now PlatformUI</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas Richeton</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1517</link>
		<dc:creator>Nicolas Richeton</dc:creator>
		<pubDate>Tue, 16 Mar 2010 13:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1517</guid>
		<description>Hi Lars,

You could also use the Nebula animation package and do :

@Override
public void postWindowOpen() {
   super.postWindowOpen();
   AlphaEffect.fadeOnClose( getWindowConfigurer().getWindow().getShell(), 500, new ExpoOut(), new AnimationRunner() );
}

The animation package takes care of catching the close event and do the animation.

Note that in your example, you are locking the the UI thread thus locking any other animation or UI update during the fade out.

You should use Display.timerExec() to schedule updates or another thread with Thread.sleep()

The animation package is currently included in the Nebula Gallery widget. Javadoc and downloads are on the Nebula site.</description>
		<content:encoded><![CDATA[<p>Hi Lars,</p>
<p>You could also use the Nebula animation package and do :</p>
<p>@Override<br />
public void postWindowOpen() {<br />
   super.postWindowOpen();<br />
   AlphaEffect.fadeOnClose( getWindowConfigurer().getWindow().getShell(), 500, new ExpoOut(), new AnimationRunner() );<br />
}</p>
<p>The animation package takes care of catching the close event and do the animation.</p>
<p>Note that in your example, you are locking the the UI thread thus locking any other animation or UI update during the fade out.</p>
<p>You should use Display.timerExec() to schedule updates or another thread with Thread.sleep()</p>
<p>The animation package is currently included in the Nebula Gallery widget. Javadoc and downloads are on the Nebula site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Remy Chi Jian Suen</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1516</link>
		<dc:creator>Remy Chi Jian Suen</dc:creator>
		<pubDate>Tue, 16 Mar 2010 13:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1516</guid>
		<description>It is possible to get into an infinite loop with that code on Linux if your window manager and X server isn&#039;t setup for transparent windows (mine isn&#039;t). In that case, the getAlpha() method will always return 255.

Looking at the win32 SWT source code, it also seems that if your Windows version isn&#039;t 5.1 or higher (at least XP I guess?), then it&#039;ll simply return 255.</description>
		<content:encoded><![CDATA[<p>It is possible to get into an infinite loop with that code on Linux if your window manager and X server isn&#8217;t setup for transparent windows (mine isn&#8217;t). In that case, the getAlpha() method will always return 255.</p>
<p>Looking at the win32 SWT source code, it also seems that if your Windows version isn&#8217;t 5.1 or higher (at least XP I guess?), then it&#8217;ll simply return 255.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilles</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1515</link>
		<dc:creator>Gilles</dc:creator>
		<pubDate>Tue, 16 Mar 2010 11:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1515</guid>
		<description>@Philipp: Absolutely correct. 

The effect might be cool for new windows which need some initiallization; the alpha value could indicate the level of completeness.

Thanks for that, Lars. Works nice.</description>
		<content:encoded><![CDATA[<p>@Philipp: Absolutely correct. </p>
<p>The effect might be cool for new windows which need some initiallization; the alpha value could indicate the level of completeness.</p>
<p>Thanks for that, Lars. Works nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philipp Kursawe</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1514</link>
		<dc:creator>Philipp Kursawe</dc:creator>
		<pubDate>Tue, 16 Mar 2010 11:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1514</guid>
		<description>Nice one. Although when I close an app I want it to disappear right away :)</description>
		<content:encoded><![CDATA[<p>Nice one. Although when I close an app I want it to disappear right away <img src='http://www.vogella.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aurelien Pupier</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1511</link>
		<dc:creator>Aurelien Pupier</dc:creator>
		<pubDate>Tue, 16 Mar 2010 08:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1511</guid>
		<description>So cool! :)

but why are you using UIPlugin.getDefaul() instead of PlatformUI. UIPlugin is internal.</description>
		<content:encoded><![CDATA[<p>So cool! <img src='http://www.vogella.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>but why are you using UIPlugin.getDefaul() instead of PlatformUI. UIPlugin is internal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Tkacz</title>
		<link>http://www.vogella.de/blog/2010/03/16/transparent-shell/comment-page-1/#comment-1510</link>
		<dc:creator>Michal Tkacz</dc:creator>
		<pubDate>Tue, 16 Mar 2010 08:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.vogella.de/blog/?p=2155#comment-1510</guid>
		<description>Be aware that the code above starts an infinite loop on systems that don&#039;t support alpha functionality as the getAlpha() method continues to return 255 in that case.</description>
		<content:encoded><![CDATA[<p>Be aware that the code above starts an infinite loop on systems that don&#8217;t support alpha functionality as the getAlpha() method continues to return 255 in that case.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

