You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/09/26 07:00:56 UTC

[royale-asjs] branch develop updated: Forgot to add this

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5edd7df  Forgot to add this
     new 9d5f340  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
5edd7df is described below

commit 5edd7df44765b59d328c3f21d1179aa8c5ff2ae1
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Sat Sep 26 07:39:19 2020 +0100

    Forgot to add this
---
 .../royale/spark/components/IItemRendererOwner.as  | 82 ++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/IItemRendererOwner.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/IItemRendererOwner.as
new file mode 100644
index 0000000..7ee0d62
--- /dev/null
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/IItemRendererOwner.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components
+{
+
+import mx.core.IVisualElement;
+
+/**
+ *  The IItemRendererOwner interface defines the basic set of APIs
+ *  that a class must implement to  support items renderers. 
+ *  A class  that implements the IItemRendererOwner interface 
+ *  is called the host component of the item renderer.
+ *  
+ *  <p>The class defining the item renderer must implement the 
+ *  IItemRenderer interface.</p> 
+ *  
+ *  @see spark.components.IItemRenderer
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ *  
+ */
+public interface IItemRendererOwner
+{
+
+    /**
+     *  Returns the String for display in an item renderer.
+     *  The String is written to the <code>labelText</code>
+     *  property of the item renderer.
+     *
+     *  @param item The data item to display.
+     *
+     *  @return The String for display in an item renderer.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function itemToLabel(item:Object):String;
+    
+    /**
+     *  Updates the renderer for reuse. 
+     *  This method first prepares the item
+     *  renderer for reuse by cleaning out any stale properties
+     *  as well as updating it with new properties.
+     * 
+     *  <p>The last thing this method should do is set the <code>data</code> property 
+     *  of the item renderer.</p>    
+     *
+     *  @param renderer The item renderer.
+     *  @param itemIndex The index of the data in the data provider.
+     *  @param data The data object this item renderer is representing.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void;  
+
+}   
+}