This is an automated email from the ASF dual-hosted git repository.
alinakazi 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 e8476f5 alternatingItemColors Style and IconFunction,dataTipField
properties added in List base,indentation style in mx tree added
e8476f5 is described below
commit e8476f5e3b3b24791812725241bdd79a024fa26c
Author: alinakazi <[email protected]>
AuthorDate: Tue Jan 5 14:51:16 2021 +0500
alternatingItemColors Style and IconFunction,dataTipField properties added
in List base,indentation style in mx tree added
---
.../MXRoyale/src/main/royale/mx/controls/Tree.as | 2 +-
.../mx/controls/listClasses/AdvancedListBase.as | 4 +-
.../royale/mx/controls/listClasses/ListBase.as | 128 ++++++++++++++++++++-
3 files changed, 130 insertions(+), 4 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
index 4d9e353..60b994b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Tree.as
@@ -231,7 +231,7 @@ import org.apache.royale.events.Event;
* @playerversion AIR 1.1
* @productversion Royale 0.9.3
*/
-//[Style(name="indentation", type="Number", inherit="no")]
+[Style(name="indentation", type="Number", inherit="no")]
/**
* Length of an open or close transition, in milliseconds.
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
index 297582d..2b0ca5a 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
@@ -1964,7 +1964,7 @@ public class AdvancedListBase extends ListBase implements
IFocusManagerComponent
* @playerversion AIR 1.1
* @productversion Royale 0.9.4
*/
- public function get dataTipField():String
+ override public function get dataTipField():String
{
return _dataTipField;
}
@@ -1972,7 +1972,7 @@ public class AdvancedListBase extends ListBase implements
IFocusManagerComponent
/**
* @private
*/
- public function set dataTipField(value:String):void
+ override public function set dataTipField(value:String):void
{
_dataTipField = value;
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
index 15b8aac..401e753 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
@@ -84,6 +84,38 @@ use namespace mx_internal;
*/
[Event(name="itemDoubleClick", type="mx.events.ListEvent")]
+//--------------------------------------
+// Styles
+//--------------------------------------
+
+
+/**
+ * The colors to use for the backgrounds of the items in the list.
+ * The value is an array of one or more colors.
+ * The backgrounds of the list items alternate among the colors in the array.
+ *
+ * <p>For DataGrid controls, all items in a row have the same background
color,
+ * and each row's background color is determined from the array of colors.</p>
+ *
+ * <p>For the TileList control, which uses a single list to populate a
+ * two-dimensional display, the style can result in a checkerboard appearance,
+ * stripes, or other patterns based on the number of columns and rows and
+ * the number of colors specified. TileList cycles through the colors,
placing
+ * the individual item background colors according to the
+ * layout direction. If you have an even number of colors and an even number
of
+ * columns for a TileList layed out horizontally, you will get striping. If
+ * the number of columns is an odd number, you will get a checkerboard
pattern.
+ * </p>
+ *
+ * @default undefined
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Royale 0.0
+ */
+[Style(name="alternatingItemColors", type="Array", arrayType="uint",
format="Color", inherit="yes")]
+
/**
*
* @langversion 3.0
@@ -603,7 +635,55 @@ use namespace mx_internal;
// dispatchEvent(new Event("variableRowHeightChanged"));
}
+ //----------------------------------
+ // iconFunction
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for iconFunction property.
+ */
+ private var _iconFunction:Function;
+
+ [Bindable("iconFunctionChanged")]
+ [Inspectable(category="Data")]
+
+ /**
+ * A user-supplied function to run on each item to determine its icon.
+ * By default the list does not try to display icons with the text
+ * in the rows. However, by specifying an icon function, you can specify
+ * a Class for a graphic that will be created and displayed as an icon
+ * in the row. This property is ignored by DataGrid.
+ *
+ * <p>The iconFunction takes a single argument which is the item
+ * in the data provider and returns a Class, as the following example
shows:</p>
+ *
+ * <pre>iconFunction(item:Object):Class</pre>
+ *
+ * @default null
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Royale 0.9.8
+ */
+ public function get iconFunction():Function
+ {
+ return _iconFunction;
+ }
+ /**
+ * @private
+ */
+ public function set iconFunction(value:Function):void
+ {
+ _iconFunction = value;
+
+ itemsSizeChanged = true;
+ invalidateDisplayList();
+
+ dispatchEvent(new Event("iconFunctionChanged"));
+ }
//----------------------------------
// allowMultipleSelection
//----------------------------------
@@ -1486,7 +1566,53 @@ use namespace mx_internal;
return " ";
}
-
+ //----------------------------------
+ // dataTipField
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for the dataTipField property.
+ */
+ private var _dataTipField:String = "label";
+
+ [Bindable("dataTipFieldChanged")]
+ [Inspectable(category="Data", defaultValue="label")]
+
+ /**
+ * Name of the field in the data provider items to display as the
+ * data tip. By default, the list looks for a property named
+ * <code>label</code> on each item and displays it.
+ * However, if the data objects do not contain a <code>label</code>
+ * property, you can set the <code>dataTipField</code> property to
+ * use a different property in the data object. An example would be
+ * "FullName" when viewing a
+ * set of people's names retrieved from a database.
+ *
+ * @default null
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Royale 0.9.8
+ */
+ public function get dataTipField():String
+ {
+ return _dataTipField;
+ }
+
+ /**
+ * @private
+ */
+ public function set dataTipField(value:String):void
+ {
+ _dataTipField = value;
+
+ itemsSizeChanged = true;
+ invalidateDisplayList();
+
+ dispatchEvent(new Event("dataTipFieldChanged"));
+ }
//----------------------------------
// dataTipFunction
//----------------------------------