<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>nifty-gui</title>
	<link>http://nifty-gui.lessvoid.com</link>
	<description>a nifty gui for your java opengl/lwjgl application</description>
	<pubDate>Sun, 10 Aug 2008 09:07:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Connect a xml screen with a ScreenController class in java</title>
		<link>http://nifty-gui.lessvoid.com/archives/20</link>
		<comments>http://nifty-gui.lessvoid.com/archives/20#comments</comments>
		<pubDate>Sun, 10 Aug 2008 09:07:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/20</guid>
		<description><![CDATA[Nifty GUI uses XML to store the layout of your GUI. To connect such a XML description with some class in Java there is the ScreenController Interface you need to provide:

/**
 * ScreenController Interface all screen controllers should support.
 * @author void
 */
public interface ScreenController &#123;
  /**
   * Bind this ScreenController to a screen. This happens
  [...]]]></description>
			<content:encoded><![CDATA[<p>Nifty GUI uses XML to store the layout of your GUI. To connect such a XML description with some class in Java there is the ScreenController Interface you need to provide:</p>

<div class="wp_syntax"><div class="code"><pre class="java5"><span style="color: #808080; font-style: italic;">/**
 * ScreenController Interface all screen controllers should support.
 * @author void
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> ScreenController <span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">/**
   * Bind this ScreenController to a screen. This happens
   * when the Screen got the onStartScreen() method.
   * @param nifty nifty
   * @param screen screen
   */</span>
  <span style="color: #993333;">void</span> bind<span style="color: #66cc66;">&#40;</span>Nifty nifty, Screen screen<span style="color: #66cc66;">&#41;</span>;
&nbsp;
  <span style="color: #808080; font-style: italic;">/**
   * called when all start effects are ended and the screen
   * is ready for interactive manipulation.
   */</span>
  <span style="color: #993333;">void</span> onStartScreen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
  <span style="color: #808080; font-style: italic;">/**
   * called when the onEndScreen effects ended and this screen is done.
   */</span>
  <span style="color: #993333;">void</span> onEndScreen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>To let Nifty know what ScreenController class you want to use for a Nifty Screen there is the &#8220;controller&#8221; attribute on the <screen> xml tag:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;nifty<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;screen</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;start&quot;</span> <span style="color: #000066;">controller</span>=<span style="color: #ff0000;">&quot;com.mypackage.HelloWorldStartScreen&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  ...
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/screen<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/nifty<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>To resolve the concrete ScreenController instance Nifty can use two different ways:</p>
<ol>
<li>Nifty creates a new instance of the given ScreenController class and registers this instance with the Screen</li>
<li>You can give Nifty a ScreenController instance that matches the class given in the controller attribute. Nifty will first look for an existing instance and creates a new class only when it can&#8217;t find one.</li>
</ol>
<p>To register ScreenController instances with Nifty there are additional parameters on the &#8220;fromXml()&#8221; method of the Nifty class. This way you can even add multiple different instances for use in multiple Nifty screens.</p>

<div class="wp_syntax"><div class="code"><pre class="java5">  <span style="color: #808080; font-style: italic;">/**
   * load xml.
   * @param filename file to load
   * @param controllers controllers to use
   */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> fromXml<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #aaaadd; font-weight: bold;">String</span> filename, <span style="color: #000000; font-weight: bold;">final</span> ScreenController ... <span style="color: #006600;">controllers</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
...</pre></div></div>

<p><strong>Note: </strong>You still need the controller attribute in the xml so that Nifty can connect the screen with your ScreenController instance.</p>
<p><strong>Note: </strong>In case you use anonymous inner classes like in this example here:</p>

<div class="wp_syntax"><div class="code"><pre class="java5"><span style="color: #000000; font-weight: bold;">class</span> MyStuff <span style="color: #66cc66;">&#123;</span>
...
<span style="color: #006600;">nifty</span>.<span style="color: #006600;">fromXml</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;menu.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> ScreenController<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> bind<span style="color: #66cc66;">&#40;</span>Nifty nifty, Screen screen<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
...</pre></div></div>

<p>the classname then turns to &#8220;MyStuff$1&#8243;.</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/20/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nifty Slick Integration in Nifty Version 0.0.4</title>
		<link>http://nifty-gui.lessvoid.com/archives/19</link>
		<comments>http://nifty-gui.lessvoid.com/archives/19#comments</comments>
		<pubDate>Sun, 03 Aug 2008 19:16:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[bubble]]></category>

		<category><![CDATA[Slick]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/19</guid>
		<description><![CDATA[Slick 2D is a great library for game development. With the upcoming release of Nifty GUI 0.0.4 there will be an even easier way to integrate your Nifty GUI into your Slick application.
The current Nifty GUI Version 0.0.3 can already be used with Slick but it might become a little tricky to save/restore OpenGL state [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://slick.cokeandcode.com/" title="Slick 2D">Slick 2D</a> is a great library for game development. With the upcoming release of Nifty GUI 0.0.4 there will be an even easier way to integrate your Nifty GUI into your Slick application.</p>
<p>The current Nifty GUI Version 0.0.3 can already be used with Slick but it might become a little tricky to save/restore OpenGL state when switching between Slick and Nifty rendering. The basic approach would be to call niftys render() method after you&#8217;ve rendered all of your Slick graphics. This &#8220;manual&#8221; rendering is the usual way for Nifty integration and is shown in the <a href="http://nifty-gui.sourceforge.net/nifty/getting-started/hello-world.html" title="Nifty Hello World">Hello World example</a> on the <a href="http://nifty-gui.sourceforge.net/nifty/index.html" title="Nifty Project Website">Nifty Project Website</a>.</p>
<p>With the Release of Nifty Version 0.0.4 there will be a Slick GameState implementation available for easy of use. If you&#8217;re new to Slick GameStates there&#8217;s an <a href="http://slick.cokeandcode.com/wiki/doku.php?id=state_based_games" title="Slick GameState wiki">article in the Slick wiki</a> about the basic principles. With Nifty 0.0.4 you get a NiftyGameState class that extends the Slick BasicGameState. So you can simply use an instance of this new class (or a subclass) and voila you have the ability to add a Nifty GUI to your Slick app in no time <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="java5"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> initStatesList<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> GameContainer container<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #66cc66;">&#123;</span>
  NiftyGameState state = <span style="color: #000000; font-weight: bold;">new</span> NiftyGameState<span style="color: #66cc66;">&#40;</span>MENU_ID<span style="color: #66cc66;">&#41;</span>;
  state.<span style="color: #006600;">fromXml</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;mainmenu.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> ScreenController<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> bind<span style="color: #66cc66;">&#40;</span>Nifty nifty, Screen screen<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> onEndScreen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> onStartScreen<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
  addState<span style="color: #66cc66;">&#40;</span>state<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Nifty! <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/19/feed</wfw:commentRss>
		</item>
		<item>
		<title>Current Demo for Nifty 0.0.3 Release</title>
		<link>http://nifty-gui.lessvoid.com/archives/18</link>
		<comments>http://nifty-gui.lessvoid.com/archives/18#comments</comments>
		<pubDate>Sun, 29 Jun 2008 08:56:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[demo]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/18</guid>
		<description><![CDATA[Current Demo for Nifty 0.0.3 Release (Java Webstart)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://nifty-gui.sourceforge.net/webstart/nifty-examples-0.0.3.jnlp">Current Demo for Nifty 0.0.3 Release</a> (Java Webstart)</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/18/feed</wfw:commentRss>
		</item>
		<item>
		<title>Some Style Progress&#8230;</title>
		<link>http://nifty-gui.lessvoid.com/archives/17</link>
		<comments>http://nifty-gui.lessvoid.com/archives/17#comments</comments>
		<pubDate>Thu, 29 May 2008 21:48:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/17</guid>
		<description><![CDATA[Old Nifty XML - pretty ugly

&#60;menu id=&#34;mainMenu&#34; font=&#34;menu.fnt&#34; childlayout=&#34;vertical&#34; align=&#34;center&#34; valign=&#34;center&#34; height=&#34;50%&#34;&#62;
  &#60;effect&#62;
    &#60;onstartscreen name=&#34;hide&#34; length=&#34;500&#34; inherit=&#34;true&#34; startdelay=&#34;1000&#34;/&#62;
    &#60;onstartscreen name=&#34;fade&#34; startcolor=&#34;#fff0&#34; endcolor=&#34;#ffff&#34; length=&#34;1000&#34; startdelay=&#34;500&#34; inherit=&#34;true&#34;/&#62;
    &#60;onendscreen name=&#34;fade&#34; startcolor=&#34;#ffff&#34; endcolor=&#34;#fff0&#34; length=&#34;500&#34; inherit=&#34;true&#34;/&#62;
  &#60;/effect&#62;
  &#60;menuitem id=&#34;helloWorld&#34; text=&#34;Hello World&#34; align=&#34;center&#34;&#62;
    &#60;interact onclick=&#34;helloWorld()&#34;/&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Old Nifty XML - pretty ugly</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menu</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span> <span style="color: #000066;">font</span>=<span style="color: #ff0000;">&quot;menu.fnt&quot;</span> <span style="color: #000066;">childlayout</span>=<span style="color: #ff0000;">&quot;vertical&quot;</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">valign</span>=<span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;50%&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onstartscreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hide&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">startdelay</span>=<span style="color: #ff0000;">&quot;1000&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onstartscreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;fade&quot;</span> <span style="color: #000066;">startcolor</span>=<span style="color: #ff0000;">&quot;#fff0&quot;</span> <span style="color: #000066;">endcolor</span>=<span style="color: #ff0000;">&quot;#ffff&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;1000&quot;</span> <span style="color: #000066;">startdelay</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onendscreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;fade&quot;</span> <span style="color: #000066;">startcolor</span>=<span style="color: #ff0000;">&quot;#ffff&quot;</span> <span style="color: #000066;">endcolor</span>=<span style="color: #ff0000;">&quot;#fff0&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;helloWorld&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Hello World&quot;</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;helloWorld()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hover</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">falloffconstraint</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onhover</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hint&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">targetelement</span>=<span style="color: #ff0000;">&quot;hintElement&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Run the Hello World Example&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onfocus</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pulsate&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">period</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">startcolor</span>=<span style="color: #ff0000;">&quot;#3c000000&quot;</span> <span style="color: #000066;">endcolor</span>=<span style="color: #ff0000;">&quot;#ff7c00ff&quot;</span> <span style="color: #000066;">timetype</span>=<span style="color: #ff0000;">&quot;infinite&quot;</span> <span style="color: #000066;">cycle</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;textfield&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Textfield Example&quot;</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;textField()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hover</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">falloffconstraint</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onhover</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hint&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">targetelement</span>=<span style="color: #ff0000;">&quot;hintElement&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Run the Textfield Example&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onfocus</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pulsate&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">period</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">startcolor</span>=<span style="color: #ff0000;">&quot;#3c000000&quot;</span> <span style="color: #000066;">endcolor</span>=<span style="color: #ff0000;">&quot;#ff7c00ff&quot;</span> <span style="color: #000066;">timetype</span>=<span style="color: #ff0000;">&quot;infinite&quot;</span> <span style="color: #000066;">cycle</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;exit&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Exit&quot;</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;exit()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hover</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">falloffconstraint</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onhover</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hint&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">targetelement</span>=<span style="color: #ff0000;">&quot;hintElement&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Leave the Examples&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onfocus</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pulsate&quot;</span> <span style="color: #000066;">hoverwidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">period</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">startcolor</span>=<span style="color: #ff0000;">&quot;#3c000000&quot;</span> <span style="color: #000066;">endcolor</span>=<span style="color: #ff0000;">&quot;#ff7c00ff&quot;</span> <span style="color: #000066;">timetype</span>=<span style="color: #ff0000;">&quot;infinite&quot;</span> <span style="color: #000066;">cycle</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menu<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p><strong>Nifty XML with Style - a lot better <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menu</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainMenu&quot;</span> <span style="color: #000066;">font</span>=<span style="color: #ff0000;">&quot;menu.fnt&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;helloWorld&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Hello World&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;helloWorld()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;textfield&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Textfield Example&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;textField()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;menuitem</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;exit&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Exit&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interact</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;exit()&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menuitem<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/menu<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p><strong>Nifty XML Style Definition</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- main menu style --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;style</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;attributes</span> <span style="color: #000066;">childLayout</span>=<span style="color: #ff0000;">&quot;vertical&quot;</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">valign</span>=<span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;50%&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onStartScreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hide&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">startDelay</span>=<span style="color: #ff0000;">&quot;1000&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onStartScreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;fade&quot;</span> <span style="color: #000066;">startColor</span>=<span style="color: #ff0000;">&quot;#fff0&quot;</span> <span style="color: #000066;">endColor</span>=<span style="color: #ff0000;">&quot;#ffff&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;1000&quot;</span> <span style="color: #000066;">startDelay</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onEndScreen</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;fade&quot;</span> <span style="color: #000066;">startColor</span>=<span style="color: #ff0000;">&quot;#ffff&quot;</span> <span style="color: #000066;">endColor</span>=<span style="color: #ff0000;">&quot;#fff0&quot;</span> <span style="color: #000066;">length</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">inherit</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/style<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- menu item style --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;style</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;menu-item&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;attributes</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">&quot;center&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;hover</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">falloffConstraint</span>=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;onFocus</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pulsate&quot;</span> <span style="color: #000066;">hoverWidth</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200%&quot;</span> <span style="color: #000066;">period</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">startColor</span>=<span style="color: #ff0000;">&quot;#3c000000&quot;</span> <span style="color: #000066;">endColor</span>=<span style="color: #ff0000;">&quot;#ff7c00ff&quot;</span> <span style="color: #000066;">timeType</span>=<span style="color: #ff0000;">&quot;infinite&quot;</span> <span style="color: #000066;">cycle</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/effect<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/style<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p> <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/17/feed</wfw:commentRss>
		</item>
		<item>
		<title>Getting DRY with style - the nifty kinda way :)</title>
		<link>http://nifty-gui.lessvoid.com/archives/16</link>
		<comments>http://nifty-gui.lessvoid.com/archives/16#comments</comments>
		<pubDate>Sat, 24 May 2008 09:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/16</guid>
		<description><![CDATA[Well, no, not &#8220;dry&#8221; &#8230; but &#8220;DRY - (D)on&#8217;t (R)epeat (Y)ourself&#8221; =)
Suppose for some reason you need a lot of red colored panels in your nifty screen. At the moment you&#8217;ll need to do something like this:

&#60;panel id=&#34;first&#34; backgroundcolor=&#34;#f00f&#34;&#62; ... &#60;/panel&#62;
&#60;panel id=&#34;second&#34; backgroundcolor=&#34;#f00f&#34;&#62; ... &#60;/panel&#62;
&#60;panel id=&#34;third&#34; backgroundcolor=&#34;#f00f&#34;&#62; ... &#60;/panel&#62;
...
&#60;panel id=&#34;fortytwo&#34; backgroundcolor=&#34;#f00f&#34;&#62; ... &#60;/panel&#62;

So far so [...]]]></description>
			<content:encoded><![CDATA[<p>Well, no, not &#8220;dry&#8221; &#8230; but &#8220;DRY - (D)on&#8217;t (R)epeat (Y)ourself&#8221; =)</p>
<p>Suppose for some reason you need a lot of red colored panels in your nifty screen. At the moment you&#8217;ll need to do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;first&quot;</span> <span style="color: #000066;">backgroundcolor</span>=<span style="color: #ff0000;">&quot;#f00f&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span> ... <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;second&quot;</span> <span style="color: #000066;">backgroundcolor</span>=<span style="color: #ff0000;">&quot;#f00f&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span> ... <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;third&quot;</span> <span style="color: #000066;">backgroundcolor</span>=<span style="color: #ff0000;">&quot;#f00f&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span> ... <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span>
...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;fortytwo&quot;</span> <span style="color: #000066;">backgroundcolor</span>=<span style="color: #ff0000;">&quot;#f00f&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span> ... <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>So far so good, but what if you change your mind and want green panels instead? Ugly - no, not the color <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> - but you&#8217;ll now have to change all this <code>backgroundColor</code> definitions. Quite ugly.</p>
<p><strong>Introducing Nifty Styles</strong><br />
So what we really want, is to specify the color of the panels only one time and use it multiple times.<br />
So with Nifty 0.0.3 you&#8217;ll be able to use style definitions to get DRY =)</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;style</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;my-panel-style&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;attributes</span> <span style="color: #000066;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#f00f&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/attributes<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/style<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;first&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;my-panel-style&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span> ...<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>This way you can define common attributes once and use them multiple times! This principle will be extended to attributes, effects, fonts and so on. This is not only nifty but will naturally lead to UI-skins! Imagine you have all your style definitions in one big &#8220;style.xml&#8221;. So you could define colors, fonts, effects, etc. once in this file. Changing this single file or including another style.xml whould change your whole UI!</p>
<p>Nifty indeed <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And still work in Progress too =)</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/16/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nifty 0.0.2 Released</title>
		<link>http://nifty-gui.lessvoid.com/archives/15</link>
		<comments>http://nifty-gui.lessvoid.com/archives/15#comments</comments>
		<pubDate>Sun, 04 May 2008 19:11:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[bubble]]></category>

		<category><![CDATA[demo]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/15</guid>
		<description><![CDATA[Removing XmlBeans and Commons-Logging reduced the nifty with all dependencies jar from 			 			4,4 MB to 1,6 MB  
Check it out here
Nifty Project Page at Sourceforge
or get the release here
Nifty Release Download
Have fun =)
]]></description>
			<content:encoded><![CDATA[<p>Removing XmlBeans and Commons-Logging reduced the nifty with all dependencies jar from 			 			4,4 MB to 1,6 MB <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Check it out here</p>
<p><a href="http://sourceforge.net/projects/nifty-gui/" title="nifty project page at sourceforge" target="_blank">Nifty Project Page at Sourceforge</a></p>
<p>or get the release here</p>
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=223898" title="Nifty download" target="_blank">Nifty Release Download</a></p>
<p>Have fun =)</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/15/feed</wfw:commentRss>
		</item>
		<item>
		<title>Removing XmlBeans&#8230;</title>
		<link>http://nifty-gui.lessvoid.com/archives/14</link>
		<comments>http://nifty-gui.lessvoid.com/archives/14#comments</comments>
		<pubDate>Sun, 20 Apr 2008 21:36:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[bubble]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/14</guid>
		<description><![CDATA[Actually I like XmlBeans a lot. Define a XML-Schema (XSD) for your XML-File, throw XmlBeans at it and  let it generate some Java classes. Voila. XML-Binding. Validate against the XML-Schema, easily access your XML-File from within Java, etc&#8230; XML? Java? Done!
There&#8217;s even a Maven Plugin for it, so one can generate the classes on [...]]]></description>
			<content:encoded><![CDATA[<p>Actually I like XmlBeans a lot. Define a XML-Schema (XSD) for your XML-File, throw XmlBeans at it and  let it generate some Java classes. Voila. XML-Binding. Validate against the XML-Schema, easily access your XML-File from within Java, etc&#8230; XML? Java? Done!</p>
<p>There&#8217;s even a Maven Plugin for it, so one can generate the classes on the fly within your build process. Great Stuff!</p>
<p>So why would some half insane person want to removed it?</p>
<p>Well, one drawback is the size of the lib. Because XmlBeans is your Swiss army knife of XML-Java-Binding it is rather large being around 2,6 MB in size. Altough this is not that bad in DSL-century you can still notice it when running a Java Applet or Java Webstart.</p>
<p>Another and somewhat profoundly drawback is, that in a Java Webstart it seems to parse Xml-Files very very slow. I&#8217;m not sure what exactly causes this slowdown but from what I grasp this might be a classLoader issue or something. When run localy everything works fine but from within a Webstart Version it runs painfully slow. I&#8217;ve tried to pinpoint what causes these issues but had not much luck in doing so.</p>
<p>Now I&#8217;ve settled to get rid of XmlBeans and replace it with some simpler form of xml parsing. What I&#8217;m currently using is <a href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/">XPP3</a>. Hopefully this will remove the issues. The lib is very small (25 KB) and very fast. The only drawback so far is that I lose the Schema-Validation. I&#8217;ll keep the XML-Schema for development and documentation purposes but the actual Loader inside Nifty won&#8217;t check against the Schema anymore. Which is a bit sad but something I can&#8217;t do anything about at this very moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/14/feed</wfw:commentRss>
		</item>
		<item>
		<title>sourceforge.net project and nifty 0.0.1 available :)</title>
		<link>http://nifty-gui.lessvoid.com/archives/13</link>
		<comments>http://nifty-gui.lessvoid.com/archives/13#comments</comments>
		<pubDate>Sun, 13 Apr 2008 18:28:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[bubble]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/13</guid>
		<description><![CDATA[Nifty sourceforge.net project available
Nifty Website availableÂ 
Have fun  
void
]]></description>
			<content:encoded><![CDATA[<p><a href="http://sourceforge.net/projects/nifty-gui/" title="Nifty sourceforge.net">Nifty sourceforge.net project available</a></p>
<p><a href="http://nifty-gui.sourceforge.net/nifty/" title="Nifty Website">Nifty Website availableÂ </a></p>
<p>Have fun <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>void</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/13/feed</wfw:commentRss>
		</item>
		<item>
		<title>sourceforge.net project on the way&#8230;</title>
		<link>http://nifty-gui.lessvoid.com/archives/12</link>
		<comments>http://nifty-gui.lessvoid.com/archives/12#comments</comments>
		<pubDate>Sat, 12 Apr 2008 11:50:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[bubble]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/12</guid>
		<description><![CDATA[I&#8217;m currently preparing the first alpha release of Nifty and moving the source over to sourceforge.net. This means you get access to the source as well as a first release of Nifty to play with.
There&#8217;s a new nifty-example.jar on the way too  
Stay tuned &#8230; more news soon!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently preparing the first alpha release of Nifty and moving the source over to sourceforge.net. This means you get access to the source as well as a first release of Nifty to play with.</p>
<p>There&#8217;s a new nifty-example.jar on the way too <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Stay tuned &#8230; more news soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/12/feed</wfw:commentRss>
		</item>
		<item>
		<title>Introducing Nifty Controls</title>
		<link>http://nifty-gui.lessvoid.com/archives/11</link>
		<comments>http://nifty-gui.lessvoid.com/archives/11#comments</comments>
		<pubDate>Sun, 17 Feb 2008 14:25:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[demo]]></category>

		<guid isPermaLink="false">http://nifty-gui.lessvoid.com/archives/11</guid>
		<description><![CDATA[At the moment there are not many actual controls in Nifty. Besides from clicking on elements, f.i. an Image, there was so far not a lot of interaction possible.
Well, it&#8217;s about time to change this with Nifty Controls  
To allow as much freedom as possible I&#8217;ve decided against predefining  new control types that [...]]]></description>
			<content:encoded><![CDATA[<p>At the moment there are not many actual controls in Nifty. Besides from clicking on elements, f.i. an Image, there was so far not a lot of interaction possible.</p>
<p>Well, it&#8217;s about time to change this with Nifty Controls <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To allow as much freedom as possible I&#8217;ve decided against predefining <code><scrollbar></scrollbar></code> new control types that let you only change color or customize some images. Instead the idea is, that you use the already existing elements (Text, Image, Panel) and combine them to create the control you like.</p>
<p>You can create your own control with the &lt;controlDefinition&gt; Tag:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;controldefinition</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;coolControl&quot;</span> <span style="color: #000066;">controller</span>=<span style="color: #ff0000;">&quot;my.package.SimpleSlider&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;panel</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #000066;">backgroundcolor</span>=<span style="color: #ff0000;">&quot;#f0ff&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;img</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;scrollposition&quot;</span> <span style="color: #000066;">filename</span>=<span style="color: #ff0000;">&quot;ball.tga&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/panel<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/controldefinition<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>With this xml t<code></code>ag you can define a control like it is illustrated in figure 1.</p>
<p><a href="http://nifty-gui.lessvoid.com/images/blog-controldefinition.png" title="http://nifty-gui.lessvoid.com/images/blog-controldefinition.png"></a></p>
<p style="text-align: center"><a href="http://nifty-gui.lessvoid.com/images/blog-controldefinition.png" title="http://nifty-gui.lessvoid.com/images/blog-controldefinition.png"><img src="http://nifty-gui.lessvoid.com/images/blog-controldefinition-small.png" alt="blog-controldefinition.png" border="0" hspace="10" vspace="10" /></a></p>
<p>A controldefinition actually defines a couple of things:</p>
<ol>
<li>The name of the new control with the <code>name</code> attribute.</li>
<li>The control logic class with the <code>controller</code> attribute.</li>
<li>The actual look of the control with a combination of panel, image and text elements. You can even add effects. So if you want a hover effect you can simply add it to the control definition <img src='http://nifty-gui.lessvoid.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>With the mandatory attribute &#8220;name&#8221; you give your new control a name so that you can refer to it later. There&#8217;s another new tag to use your newly created control, the <code>control</code> tag:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;control</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;coolControl&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/control<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>So you define the look and feel as well as the control logic once and then use it everywhere you need it like figure 2 shows.</p>
<p><a href="http://nifty-gui.lessvoid.com/images/blog-control.png" title="blog-control.png"></a></p>
<p style="text-align: center" align="left"><a href="http://nifty-gui.lessvoid.com/images/blog-control.png" title="blog-control.png"><img src="http://nifty-gui.lessvoid.com/images/blog-control-small.png" alt="blog-control.png" border="0" hspace="10" vspace="10" /></a></p>
<p>That&#8217;s all for now. This just covers the basic idea. More on controls later.</p>
<p>Have Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://nifty-gui.lessvoid.com/archives/11/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
