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] - Refining JavaScript sources for DataGrid and related component pieces, including additional interfaces or making DataGrid code work with interfaces.
Date Mon, 02 Dec 2013 16:57:40 GMT
Updated Branches:
  refs/heads/develop b4ddb7677 -> 5238a9725


Refining JavaScript sources for DataGrid and related component pieces, including additional
interfaces or making DataGrid code work with interfaces.


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

Branch: refs/heads/develop
Commit: 5238a9725342e16e44bf441d1bf49fce0accee2c
Parents: b4ddb76
Author: Peter Ent <pent@apache.org>
Authored: Mon Dec 2 11:57:53 2013 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Mon Dec 2 11:57:53 2013 -0500

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css    |  2 +-
 .../supportClasses/StringItemRenderer.as        |  6 +++
 .../src/org/apache/flex/core/IDataGridModel.js  | 12 ++----
 .../src/org/apache/flex/core/ValuesManager.js   | 22 ++++++++++-
 .../org/apache/flex/events/EventDispatcher.js   |  5 ++-
 .../staticControls/beads/DataGridColumnView.js  |  4 +-
 .../flex/html/staticControls/beads/IListView.js | 39 ++++++++++++++++++++
 .../flex/html/staticControls/beads/ListView.js  |  5 ++-
 .../beads/models/DataGridModel.js               |  5 ++-
 .../supportClasses/NonVirtualDataGroup.js       |  9 +++++
 .../supportClasses/StringItemRenderer.js        | 26 +++++++++++++
 11 files changed, 119 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index d6a01cb..76a1288 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -89,7 +89,7 @@ List
     IBeadLayout: ClassReference("org.apache.flex.html.staticControls.beads.layouts.NonVirtualVerticalScrollingLayout");
     IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.staticControls.beads.DataItemRendererFactoryForArrayData");
     IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
-    IItemRenderer: ClassReference("org.apache.flex.html.staticControls.supportClasses.DataItemRenderer");
+    IItemRenderer: ClassReference("org.apache.flex.html.staticControls.supportClasses.StringItemRenderer");
 }
 
 SimpleList

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.as
index 1cef4c4..f6da1d6 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.as
@@ -64,6 +64,12 @@ package org.apache.flex.html.staticControls.supportClasses
 			textField.text = value;
 		}
 		
+		override public function set data(value:Object):void
+		{
+			super.data = value;
+			textField.text = String(value);
+		}
+		
 		override public function updateRenderer():void
 		{
 			super.updateRenderer();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/core/IDataGridModel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IDataGridModel.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IDataGridModel.js
index 34449e5..21a8a0b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/IDataGridModel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/IDataGridModel.js
@@ -19,17 +19,13 @@
 
 goog.provide('org.apache.flex.core.IDataGridModel');
 
-goog.require('org.apache.flex.core.IBead');
-goog.require('org.apache.flex.core.IBeadModel');
-goog.require('org.apache.flex.events.IEventDispatcher');
+goog.require('org.apache.flex.core.ISelectionModel');
 
 
 
 /**
  * @interface
- * @extends {org.apache.flex.core.IBead}
- * @extends {org.apache.flex.core.IBeadModel}
- * @extends {org.apache.flex.events.IEventDispatcher}
+ * @extends {org.apache.flex.core.ISelectionModel}
  */
 org.apache.flex.core.IDataGridModel = function() {
 };
@@ -42,6 +38,4 @@ org.apache.flex.core.IDataGridModel = function() {
 org.apache.flex.core.IDataGridModel.prototype.FLEXJS_CLASS_INFO =
 { names: [{ name: 'IDataGridModel',
                 qName: 'org.apache.flex.core.IDataGridModel' }],
-      interfaces: [org.apache.flex.core.IBead,
-                   org.apache.flex.core.IBeadModel,
-                   org.apache.flex.events.IEventDispatcher] };
\ No newline at end of file
+      interfaces: [org.apache.flex.core.ISelectionModel] };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
index 40cc8d2..a70dd4a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
@@ -35,6 +35,26 @@ org.apache.flex.core.ValuesManager.prototype.FLEXJS_CLASS_INFO =
 
 /**
  * @expose
- * @type {org.apache.flex.core.ValuesManager}
+ * @return {org.apache.flex.core.ValuesManager}
  */
 org.apache.flex.core.ValuesManager.prototype.valuesImpl = null;
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ValuesManager}
+ * @return {object} The value.
+ */
+org.apache.flex.core.ValuesManager.get_valuesImpl = function() {
+  return this.valuesImpl;
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ValuesManager}
+ * @param {object} value being set.
+ */
+org.apache.flex.core.ValuesManager.set_valuesImpl = function(value) {
+  this.valuesImpl = value;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
index a471475..7154167 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
@@ -15,12 +15,14 @@
 goog.provide('org.apache.flex.events.EventDispatcher');
 
 goog.require('goog.events.EventTarget');
+goog.require('org.apache.flex.events.IEventDispatcher');
 
 
 
 /**
  * @constructor
  * @extends {goog.events.EventTarget}
+ * @implements {org.apache.flex.events.IEventDispatcher}
  */
 org.apache.flex.events.EventDispatcher = function() {
   goog.base(this);
@@ -36,7 +38,8 @@ goog.inherits(org.apache.flex.events.EventDispatcher,
  */
 org.apache.flex.events.EventDispatcher.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'EventDispatcher',
-                qName: 'org.apache.flex.events.EventDispatcher'}] };
+                qName: 'org.apache.flex.events.EventDispatcher'}],
+      interfaces: [org.apache.flex.events.IEventDispatcher] };
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js
index ab42707..fe589d2 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/DataGridColumnView.js
@@ -39,7 +39,9 @@ goog.inherits(
 org.apache.flex.html.staticControls.beads.DataGridColumnView.
     prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'DataGridColumnView',
-                qName: 'org.apache.flex.html.staticControls.beads.DataGridColumnView' }]
};
+                qName: 'org.apache.flex.html.staticControls.beads.DataGridColumnView' }],
+      interfaces: [org.apache.flex.html.staticControls.beads.IListView,
+                   org.apache.flex.core.IBeadView]};
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/IListView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/IListView.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/IListView.js
new file mode 100644
index 0000000..7717ade
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/IListView.js
@@ -0,0 +1,39 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.staticControls.beads.IListView');
+
+goog.require('org.apache.flex.html.staticControls.supportClasses.Border');
+goog.require('org.apache.flex.html.staticControls.supportClasses.ScrollBar');
+
+
+
+/**
+ * @interface
+ * @extends {org.apache.flex.core.IBeadView}
+ */
+org.apache.flex.html.staticControls.beads.IListView = function() {
+};
+org.apache.flex.html.staticControls.beads.IListView.prototype.border;
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.staticControls.beads.IListView.prototype.FLEXJS_CLASS_INFO =
+{ names: [{ name: 'IListView',
+            qName: 'org.apache.flex.html.staticControls.beads.IListView'}],
+  interfaces: [org.apache.flex.core.IBeadView] };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/ListView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/ListView.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/ListView.js
index 1f5a71c..677a888 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/ListView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/ListView.js
@@ -18,6 +18,7 @@ goog.require('org.apache.flex.core.IBeadLayout');
 goog.require('org.apache.flex.core.IBeadView');
 goog.require('org.apache.flex.core.IItemRendererParent');
 goog.require('org.apache.flex.core.ValuesManager');
+goog.require('org.apache.flex.html.staticControls.beads.IListView');
 goog.require('org.apache.flex.html.staticControls.beads.TextItemRendererFactoryForArrayData');
 goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel');
 goog.require('org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup');
@@ -26,7 +27,7 @@ goog.require('org.apache.flex.html.staticControls.supportClasses.NonVirtualDataG
 
 /**
  * @constructor
- * @implements {org.apache.flex.core.IBeadView}
+ * @implements {org.apache.flex.html.staticControls.beads.IListView}
  */
 org.apache.flex.html.staticControls.beads.ListView = function() {
   this.lastSelectedIndex = -1;
@@ -44,7 +45,7 @@ org.apache.flex.html.staticControls.beads.ListView.prototype.
     FLEXJS_CLASS_INFO =
     { names: [{ name: 'ListView',
                 qName: 'org.apache.flex.html.staticControls.beads.ListView' }],
-      interfaces: [org.apache.flex.core.IBeadView] };
+      interfaces: [org.apache.flex.html.staticControls.beads.IListView] };
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridModel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridModel.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridModel.js
index 8484be6..9d70367 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridModel.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/beads/models/DataGridModel.js
@@ -14,6 +14,7 @@
 
 goog.provide('org.apache.flex.html.staticControls.beads.models.DataGridModel');
 
+goog.require('org.apache.flex.core.IDataGridModel');
 goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionModel');
 
 
@@ -21,6 +22,7 @@ goog.require('org.apache.flex.html.staticControls.beads.models.ArraySelectionMod
 /**
  * @constructor
  * @extends {org.apache.flex.html.staticControls.beads.models.ArraySelectionModel}
+ * @implements {org.apache.flex.core.IDataGridModel}
  */
 org.apache.flex.html.staticControls.beads.models.DataGridModel =
     function() {
@@ -42,7 +44,8 @@ goog.inherits(
  */
 org.apache.flex.html.staticControls.beads.models.DataGridModel.prototype.FLEXJS_CLASS_INFO
=
     { names: [{ name: 'DataGridModel',
-                qName: 'org.apache.flex.html.staticControls.beads.models.DataGridModel' }]
};
+                qName: 'org.apache.flex.html.staticControls.beads.models.DataGridModel' }],
+      interfaces: [org.apache.flex.core.IDataGridModel] };
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/NonVirtualDataGroup.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/NonVirtualDataGroup.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/NonVirtualDataGroup.js
index 969cb7e..45fa447 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/NonVirtualDataGroup.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/NonVirtualDataGroup.js
@@ -81,6 +81,15 @@ org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup.
 
 /**
  * @expose
+ */
+org.apache.flex.html.staticControls.supportClasses.NonVirtualDataGroup.
+    prototype.removeAllElements = function() {
+    // to do
+};
+
+
+/**
+ * @expose
  * @param {Object} index The index for the itemRenderer.
  * @return {Object} The itemRenderer that matches the index.
  */

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5238a972/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.js
index 8a5af4f..0833a00 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/supportClasses/StringItemRenderer.js
@@ -155,6 +155,32 @@ org.apache.flex.html.staticControls.supportClasses.StringItemRenderer.
 
 /**
  * @expose
+ * @param {Object} value The text to display.
+ */
+org.apache.flex.html.staticControls.supportClasses.StringItemRenderer.
+    prototype.set_data = function(value) {
+
+  if (value.toString) {
+    this.element.innerHTML = value.toString();
+  } else {
+    this.element.innerHTML = String(value);
+  }
+};
+
+
+/**
+ * @expose
+ * @return {Object} The text being displayed.
+ */
+org.apache.flex.html.staticControls.supportClasses.StringItemRenderer.
+    prototype.get_data = function() {
+
+  return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
  * @param {boolean} value The selection state.
  */
 org.apache.flex.html.staticControls.supportClasses.StringItemRenderer.


Mime
View raw message