blob: cb9f9de0941fc2249e4ea083eaa4e7de3e8beea5 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--- The default skin class for a Spark DefaultComplexItemRenderer class.
@langversion 3.0
@playerversion Flash 10
@playerversion AIR 1.5
@productversion Flex 4
-->
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
<s:states>
<s:State name="normal"/>
<s:State name="hovered"/>
<s:State name="selected"/>
<s:State name="normalAndShowsCaret"/>
<s:State name="hoveredAndShowsCaret"/>
<s:State name="selectedAndShowsCaret"/>
</s:states>
<fx:Script>
<![CDATA[
import mx.core.IVisualElement;
[Bindable("dataChanged")]
override public function set data(value:Object):void
{
super.data = value;
//First lets remove everything from the contentGroup
contentGroup.removeAllElements();
//Then add the new items anew
if (value is Array)
{
for (var i:int = 0; i < value.length; i++)
{
contentGroup.addElement(IVisualElement(value[i]));
}
}
else if (value is IVisualElement)
{
contentGroup.addElement(IVisualElement(value));
}
}
]]>
</fx:Script>
<s:Rect left="0" right="0" top="0" bottom="0">
<s:fill>
<s:SolidColor
color.normal="0x2f2f2f"
color.normalAndShowsCaret="0x2f2f2f"
color.hovered="{0x333333}"
color.hoveredAndShowsCaret="{0x333333}"
color.selected="{0x333333}"
color.selectedAndShowsCaret="{0x333333}"
/>
</s:fill>
</s:Rect>
<s:Group id="contentGroup" verticalCenter="0" left="2" right="2" top="2" bottom="2" />
</s:ItemRenderer>