flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [3/5] git commit: [flex-asjs] [refs/heads/develop] - These changes for the interface implementation are needed to make the 'DataGridExample' example work.
Date Wed, 06 Nov 2013 09:05:28 GMT
These changes for the interface implementation are needed to make the 'DataGridExample' example
work.

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 87aad029b52c546c36053b27caff0200699bb616
Parents: eb1c389
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Wed Nov 6 07:23:35 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Wed Nov 6 07:23:35 2013 +0100

----------------------------------------------------------------------
 .../src/org/apache/flex/core/IItemRenderer.js   |  9 +--
 .../DataItemRendererFactoryForColumnData.js     | 61 ++++++++++++--------
 2 files changed, 38 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/87aad029/frameworks/js/FlexJS/src/org/apache/flex/core/IItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IItemRenderer.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IItemRenderer.js
index d39e5a2..cde196d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/IItemRenderer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/IItemRenderer.js
@@ -14,15 +14,10 @@
 
 goog.provide('org.apache.flex.core.IItemRenderer');
 
-goog.require('org.apache.flex.events.EventDispatcher');
+
 
 /**
- * @constructor
- * @extends {org.apache.flex.events.EventDispatcher}
+ * @interface
  */
 org.apache.flex.core.IItemRenderer = function() {
-  goog.base(this);
 };
-goog.inherits(
-              org.apache.flex.core.IItemRenderer,
-              org.apache.flex.events.EventDispatcher);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/87aad029/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js
index 38d634a..9407cff 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataItemRendererFactoryForColumnData.js
@@ -14,26 +14,27 @@
 
 goog.provide('org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData');
 
-goog.require('org.apache.flex.events.EventDispatcher');
 goog.require('org.apache.flex.core.IItemRenderer');
+goog.require('org.apache.flex.core.ValuesManager');
+goog.require('org.apache.flex.events.EventDispatcher');
+goog.require('org.apache.flex.html.staticControls.beads.DataGridColumnView');
 goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel');
 goog.require('org.apache.flex.html.staticControls.supportClasses.ButtonBarButtonItemRenderer');
-goog.require('org.apache.flex.html.staticControls.beads.DataGridColumnView');
-goog.require('org.apache.flex.core.ValuesManager');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.core.IItemRenderer}
+ * @extends {org.apache.flex.events.EventDispatcher}
+ * @implements {org.apache.flex.core.IItemRenderer}
  */
 org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData =
-function() {
+    function() {
   goog.base(this);
 };
 goog.inherits(
-  org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData,
-  org.apache.flex.core.IItemRenderer,
-  org.apache.flex.events.EventDispatcher);
-
+    org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData,
+    org.apache.flex.events.EventDispatcher);
 
 
 /**
@@ -43,28 +44,31 @@ goog.inherits(
  * @param {object} value The component strand.
  */
 org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData.
-prototype.set_strand = function(value) {
+    prototype.set_strand = function(value) {
+  var Irf;
+
   this.strand_ = value;
 
   this.model = value.getBeadByType(
-          org.apache.flex.html.staticControls.beads.models.ArraySelectionModel);
-          
+      org.apache.flex.html.staticControls.beads.models.ArraySelectionModel);
+
   this.listView = value.getBeadByType(
-          org.apache.flex.html.staticControls.beads.DataGridColumnView);
+      org.apache.flex.html.staticControls.beads.DataGridColumnView);
   this.dataGroup = this.listView.get_dataGroup();
 
   this.model.addEventListener('dataProviderChanged',
       goog.bind(this.dataProviderChangedHandler, this));
 
   if (!this.itemRendererFactory_) {
-    var irf = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this.strand_, 'iItemRendererClassFactory');
-    this.itemRendererFactory_ = new irf;
+    Irf = org.apache.flex.core.ValuesManager.valuesImpl.getValue(this.strand_, 'iItemRendererClassFactory');
+    this.itemRendererFactory_ = new Irf();
     this.strand_.addBead(this.itemRendererFactory_);
   }
 
   this.dataProviderChangedHandler(null);
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.beads.
@@ -72,10 +76,11 @@ prototype.set_strand = function(value) {
  * @return {object} The factory class to use for creating item renderers.
  */
 org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData.
-prototype.get_itemRendererFactory = function() {
+    prototype.get_itemRendererFactory = function() {
   return this.itemRendererFactory_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.beads.
@@ -83,7 +88,7 @@ prototype.get_itemRendererFactory = function() {
  * @param {object} value The factory class to use for creating item renderers.
  */
 org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData.
-prototype.set_itemRendererFactory = function(value) {
+    prototype.set_itemRendererFactory = function(value) {
   this.itemRendererFactory_ = value;
 };
 
@@ -95,25 +100,31 @@ prototype.set_itemRendererFactory = function(value) {
  * @param {object} event The event that triggered the dataProvider change.
  */
 org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData.
-prototype.dataProviderChangedHandler = function(event) {
-  var dp, i, n, opt;
-
+    prototype.dataProviderChangedHandler = function(event) {
+  var dp, fieldName, i, n, newEvent, opt, view;
 
   dp = this.model.get_dataProvider();
   n = dp.length;
 
   // todo: this.dataGroup.removeAllElements();
 
-  var view = this.listView;
+  view = this.listView;
   for (i = 0; i < n; i++) {
-    var fieldName = view.get_labelField();
-    
+    fieldName = view.get_labelField();
+
     // todo: grab an itemRenderer from a factory for this column
-    var opt = new org.apache.flex.html.staticControls.supportClasses.StringItemRenderer();
+    opt = new org.apache.flex.html.staticControls.supportClasses.StringItemRenderer();
     this.dataGroup.addElement(opt);
     opt.set_text(dp[i][fieldName]);
   }
 
-  var newEvent = new org.apache.flex.events.Event('itemsCreated');
+  newEvent = new org.apache.flex.events.Event('itemsCreated');
   this.strand_.dispatchEvent(newEvent);
 };
+
+
+/**
+ * @const
+ */
+org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForColumnData
+  .prototype.AFJS_INTERFACES = [org.apache.flex.core.IItemRenderer];


Mime
View raw message