flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Adding missing object property functions and cleaned up interface inheritance issues.
Date Thu, 16 Jul 2015 18:50:53 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop d0fa0c8c8 -> 448a571e3


Adding missing object property functions and cleaned up interface inheritance issues.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/448a571e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/448a571e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/448a571e

Branch: refs/heads/develop
Commit: 448a571e37e6e0c78553f6a818f3e9c2835f7655
Parents: d0fa0c8
Author: Peter Ent <pent@apache.org>
Authored: Thu Jul 16 14:50:49 2015 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Thu Jul 16 14:50:49 2015 -0400

----------------------------------------------------------------------
 .../HTML/js/src/org/apache/flex/html/List.js         | 11 +++++++++++
 .../ListSingleSelectionMouseController.js            |  5 ++++-
 .../flex/html/supportClasses/DataItemRenderer.js     | 15 ++++++++-------
 .../flex/html/supportClasses/UIItemRendererBase.js   |  5 +++--
 4 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/448a571e/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
index 436c78f..49b844f 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/List.js
@@ -64,6 +64,17 @@ Object.defineProperties(org.apache.flex.html.List.prototype, {
         }
     },
     /** @export */
+    selectedItem: {
+        /** @this {org.apache.flex.html.List} */
+        get: function() {
+            return this.model.selectedItem;
+        },
+        /** @this {org.apache.flex.html.List} */
+        set: function(value) {
+            this.model.selectedItem = value;
+        }
+    },
+    /** @export */
     labelField: {
         /** @this {org.apache.flex.html.List} */
         get: function() {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/448a571e/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
index 951d2c0..849096c 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/controllers/ListSingleSelectionMouseController.js
@@ -15,8 +15,10 @@
 goog.provide('org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController');
 
 goog.require('org.apache.flex.core.IBeadController');
+goog.require('org.apache.flex.core.ISelectableItemRenderer');
 goog.require('org.apache.flex.html.beads.ListView');
 goog.require('org.apache.flex.html.beads.models.ArraySelectionModel');
+goog.require('org.apache.flex.utils.Language');
 
 
 
@@ -67,7 +69,8 @@ Object.defineProperties(org.apache.flex.html.beads.controllers.ListSingleSelecti
 org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController.prototype.selectedHandler
=
         function(event) {
 
-  var index = event.target.index;
+  var renderer = org.apache.flex.utils.Language.as(event.target, org.apache.flex.core.ISelectableItemRenderer);
+  var index = renderer.index;
   this.model.selectedIndex = index;
 
   var newEvent = new org.apache.flex.events.Event('change');

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/448a571e/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
index 4f3d353..2a90778 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/DataItemRenderer.js
@@ -82,13 +82,6 @@ Object.defineProperties(org.apache.flex.html.supportClasses.DataItemRenderer.pro
         }
     },
     /** @export */
-    index: {
-        /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */
-        set: function(value) {
-            this.index_ = value;
-        }
-    },
-    /** @export */
     dataField: {
         /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */
         set: function(value) {
@@ -110,6 +103,10 @@ Object.defineProperties(org.apache.flex.html.supportClasses.DataItemRenderer.pro
             } else {
                 this.backgroundView.style.backgroundColor = null;
             }
+        },
+        /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */
+        get: function(value) {
+            return this.selected_;
         }
     },
     /** @export */
@@ -127,6 +124,10 @@ Object.defineProperties(org.apache.flex.html.supportClasses.DataItemRenderer.pro
                 this.backgroundView.style.backgroundColor = null;
               }
             }
+        },
+        /** @this {org.apache.flex.html.supportClasses.DataItemRenderer} */
+        get: function() {
+            return this.hovered_;
         }
     }
 });

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/448a571e/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js
b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js
index ab53d63..0fe4293 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/supportClasses/UIItemRendererBase.js
@@ -16,6 +16,7 @@ goog.provide('org.apache.flex.html.supportClasses.UIItemRendererBase');
 
 goog.require('org.apache.flex.core.IItemRenderer');
 goog.require('org.apache.flex.core.IItemRendererFactory');
+goog.require('org.apache.flex.core.ISelectableItemRenderer');
 goog.require('org.apache.flex.core.UIBase');
 goog.require('org.apache.flex.events.Event');
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
@@ -25,7 +26,7 @@ goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
- * @implements {org.apache.flex.core.IItemRenderer}
+ * @implements {org.apache.flex.core.ISelectableItemRenderer}
  */
 org.apache.flex.html.supportClasses.UIItemRendererBase =
 function() {
@@ -44,7 +45,7 @@ goog.inherits(
 org.apache.flex.html.supportClasses.UIItemRendererBase.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'UIItemRendererBase',
                 qName: 'org.apache.flex.html.supportClasses.UIItemRendererBase' }],
-      interfaces: [org.apache.flex.core.IItemRenderer, org.apache.flex.core.IItemRendererFactory]};
+      interfaces: [org.apache.flex.core.ISelectableItemRenderer, org.apache.flex.core.IItemRendererFactory]};
 
 
 /**


Mime
View raw message