<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Through My Lenses &#187; itemRenderer</title>
	<atom:link href="http://www.ericstoike.com/wp/tag/itemrenderer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericstoike.com/wp</link>
	<description>A look into the world as I see it...</description>
	<lastBuildDate>Mon, 16 Jan 2012 19:05:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<copyright>Copyright &#xA9; Through My Lenses 2011 </copyright>
	<managingEditor>eric@gvfootball.com (Through My Lenses)</managingEditor>
	<webMaster>eric@gvfootball.com (Through My Lenses)</webMaster>
	<image>
		<url>http://www.ericstoike.com/wp/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>Through My Lenses</title>
		<link>http://www.ericstoike.com/wp</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>A look into the world as I see it...</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &#38; Culture" />
	<itunes:author>Through My Lenses</itunes:author>
	<itunes:owner>
		<itunes:name>Through My Lenses</itunes:name>
		<itunes:email>eric@gvfootball.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.ericstoike.com/wp/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>#360Flex Notes &#8211; &#8220;Custom ItemRenders&#8221; &#8211; Ryan Frishberg and Joan Lafferty</title>
		<link>http://www.ericstoike.com/wp/2009/05/18/360flex-notes-custom-itemrenders-ryan-frishberg-and-joan-lafferty/</link>
		<comments>http://www.ericstoike.com/wp/2009/05/18/360flex-notes-custom-itemrenders-ryan-frishberg-and-joan-lafferty/#comments</comments>
		<pubDate>Mon, 18 May 2009 21:19:54 +0000</pubDate>
		<dc:creator>cowboyEric</dc:creator>
				<category><![CDATA[360flex]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[itemRenderer]]></category>
		<category><![CDATA[note]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[session]]></category>

		<guid isPermaLink="false">http://www.ericstoike.com/wp/?p=710</guid>
		<description><![CDATA[Other Resources: Alex&#8217;s Blog &#8211; http://blogs.adobe.com/aharui Peter Ent&#8217;s Blog &#8211; http://weblogs.macromedia.com/pent Spark Containers &#8211; http://blogs.adobe.com/flexdoc/pdf/sparkContainersAndRenderers.pdf What is an itemRenderer? a list renders data usually in a label property on list classes typed to take an IFactory Types of ItemRenderers 2 main types: custom and drop-in item rendereres 3 ways to create them: Custom MXML Class [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Other Resources:</strong><br />
Alex&#8217;s Blog &#8211; <a href="http://blogs.adobe.com/aharui">http://blogs.adobe.com/aharui</a><br />
Peter Ent&#8217;s Blog &#8211; <a href="http://weblogs.macromedia.com/pent">http://weblogs.macromedia.com/pent</a><br />
Spark Containers &#8211; <a href="http://blogs.adobe.com/flexdoc/pdf/sparkContainersAndRenderers.pdf">http://blogs.adobe.com/flexdoc/pdf/sparkContainersAndRenderers.pdf</a></p>
<p><strong>What is an itemRenderer?<br />
a</strong> list renders data usually in a label<br />
property on list classes typed to take an IFactory</p>
<p><strong>Types of ItemRenderers<br />
</strong>2 main types: custom and drop-in item rendereres<br />
3 ways to create them:<br />
Custom MXML Class<br />
Separate Actionscript 3 file<br />
Inline with mx:Component tag</p>
<p><strong>Custom IR</strong><br />
Most basic is just a label with two pieces of data</p>
<p><strong>Drop-in IR</strong><br />
Some flex framework components implement this.<br />
implement IDropInListItemRenderer<br />
doesn&#8217;t give you the data property but gives you listData<br />
doesn&#8217;t care what the data is. just display it.</p>
<p><strong>Reusable Renderers</strong><br />
do not associate it with a column<br />
to use listData, your IR must implement IDropInListItemRenderer<br />
some such as checkbox, button, numericsteper, text, and datefield already do this<br />
you have to define the getters/setters for listData in the custom IR</p>
<p><strong>Sizing an IR</strong><br />
always the width of the container<br />
height is the rowHeight unless variableRowHeight = true</p>
<p><strong>Virtualization of ItemRenderers/Renderer Recycling</strong><br />
if value&gt;10 then turn color = red. make sure to say &#8220;else color = default&#8221; as well otherwise you will have scrolling problems.<br />
renderers are only created for the cells that are shown on screen then re-used when those are scrolled off the screen and others are shown.</p>
<p><strong>Renderers as Editors</strong><br />
there isn&#8217;t any connection to data by default.<br />
set list component to editable<br />
set rendererIsEditor=true<br />
set editorDataField property if your renderer is not &#8220;text&#8221;</p>
<p>Example: Slider as Renderer and Editor<br />
slider does not implement IDataRenderer<br />
set editable=true, itemRenderer=MySlider, rendererIsEditor=true, editorDataField=value<br />
further code on their blog</p>
<p><strong>Building for Performance</strong><br />
we are smart about creating them but if you have a 20&#215;20 grid then there are 400 on the screen.</p>
<p>layout&#8217;s are expensive an unnessary for IR.</p>
<ul>
<li>instead base your renderers on UIComponent and layout stuff yourself.</li>
</ul>
<p>developing your IR&#8217;s in MXML can be more expensive. you won&#8217;t need data binding (sets up lots of listeners).</p>
<ul>
<li>instead use ActionScript &#8211; you know when data is changing</li>
</ul>
<p>example shown changing from HBox to UIComponent increased performance by around 33% with a decent amount of data and 5 children.<br />
alway use UIComponent if you know how its going to look</p>
<p><strong>Flex 4 IR&#8217;s</strong><br />
DataGroup is the basic, skinless component used to render data on screen<br />
SkinnableDataContainer is skinnable version of DataGroup<br />
list extends SkinnableDataContainer and adds selection, keyboard handling, and a few other things<br />
itemRendererFunctions make it easy to deal with heterogeneous data items<br />
data containers support both data items and visual elements<br />
no more IDropInListItemRenderer &#8211; those props are pushed down to item renderer directly now<br />
IR are in charge of all aspects of it&#8217;s visuals, which means it must draw highlighting for hover selection<br />
support for differently sized IR is much improved &#8211; new typicalItem prop</p>
<p>Ryan&#8217;s Blog &#8211; <a href="http://frishy.blogspot.com">http://frishy.blogspot.com</a></p>
<p>Joan&#8217;s Blog &#8211; <a href="http://butterfliesandbugs.wordpress.com">http://butterfliesandbugs.wordpress.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericstoike.com/wp/2009/05/18/360flex-notes-custom-itemrenders-ryan-frishberg-and-joan-lafferty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.202 seconds -->

