<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>wicketeer</title>
	<atom:link href="http://wicketeer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wicketeer.wordpress.com</link>
	<description>all for wicket, wicket for all</description>
	<lastBuildDate>Mon, 24 Mar 2008 23:53:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='wicketeer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>wicketeer</title>
		<link>http://wicketeer.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://wicketeer.wordpress.com/osd.xml" title="wicketeer" />
	<atom:link rel='hub' href='http://wicketeer.wordpress.com/?pushpress=hub'/>
		<item>
		<title>wicket-animator</title>
		<link>http://wicketeer.wordpress.com/2007/06/25/wicket-animator/</link>
		<comments>http://wicketeer.wordpress.com/2007/06/25/wicket-animator/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 21:04:00 +0000</pubDate>
		<dc:creator>wicketeer</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://wicketeer.wordpress.com/2007/06/25/wicket-animator/</guid>
		<description><![CDATA[inspired by this post on wicket-diary, i decided to take this in my own hands and see how far i&#8217;ll get. so this is the announcement of the first release of wicket-animator. but let me show you, how you can use the animator to turn the color of a label (it&#8217;s actually a div) from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wicketeer.wordpress.com&amp;blog=1269540&amp;post=3&amp;subd=wicketeer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>inspired by <a href="http://martijndashorst.com/blog/2007/04/16/javascript-animation-libraries-compared/" target="_blank">this post</a> on wicket-diary, i decided to take this in my own hands and see how far i&#8217;ll get.</p>
<p>so this is the announcement of the first release of <b>wicket-animator</b>. but let me show you, how you can use the animator to turn the color of a label (it&#8217;s actually a div) from red to blue on the first click, and back to red on the second click, and again to blue on another click, &#8230;</p>
<p>MyPage.html:</p>
<pre>... &lt;div wicket:id="label"&gt;my label&lt;/div&gt; ...</pre>
<p>MyPage.java</p>
<pre>... // somewhere in the constructor
Label label = new Label("label");
Animator animator = new Animator().addCssStyleSubject(new MarkupIdModel(label),
	 "red", "blue");
animator.attachTo(label, "onclick", Action.toggle());
...</pre>
<p>A few steps have to be taken so successfully create an animation.</p>
<ol>
<li>create a new Animator object.</li>
<li>add StyleSubjects to the animator.<br />
there are 5 different kinds of StyleSubjects. the one used here (CssStyleSubject) changes the target (here &#8216;label&#8217;, wrapped in a MarkupIdModel which simply extracts the MarkupId, hence the name&#8230;) from css-class &#8216;red&#8217; to css-class &#8216;blue&#8217;.<br />
you can add as many StyleSubjects as you want.</li>
<li>the animator needs to be attached to a specific event (here &#8216;onclick&#8217;) on a component (this actually generates an AttributeAppender-behavior). there are different kinds of actions you can choose from (toggle, play, reverse, seekFromTo, seekTo). the one used here (toggle) just plays (on the first click) and reverses (on the second click) the animation.</li>
<li>since the animator is not dependent on the targets, it can be added to any number of components. so you could also trigger the animation with a click on a button. just attach the animator to the button.</li>
<li>additional settings like kind-of-transition, duration and interval of the animation can also be set.</li>
</ol>
<p>fwiw, i encourage you to visit the <a href="http://berniecode.com/writing/animator.html" target="_blank">original page</a> of the javascript animator class to understand how it works. after that, it shouldn&#8217;t be that difficult to comprehend the java version of it ;)</p>
<p><strike><b>grab it from <i><a href="http://wicketeer.files.wordpress.com/2007/06/wicket-animator-130-snapshotjar.pdf" title="wicket-animator">here</a></i></b> (please rename to .jar, grrrr wordpress)</strike></p>
<p>get the latest and freshest source at the <a href="https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-animator/" target="_blank">wicketstuff-svn-repository</a></p>
<p>i&#8217;d also be more than happy to get some feedback, since i&#8217;m quite a wicket newbie and this would be my first larger wicket-contribution.<br />
so feel free to comment on it. i will also try to convince someone over at <a href="http://www.wicketstuff.org" target="_blank">wicketstuff.org</a> to put it in the repository&#8230;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/wicketeer.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/wicketeer.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/wicketeer.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/wicketeer.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/wicketeer.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=wicketeer.wordpress.com&amp;blog=1269540&amp;post=3&amp;subd=wicketeer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://wicketeer.wordpress.com/2007/06/25/wicket-animator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68f835ae82b21318b85fad3eb88afa82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
