You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2013/04/15 21:53:55 UTC

git commit: [flex-asjs] - Preliminary jQuery work. RadioButton is work in progress, but CheckBox now works.

Updated Branches:
  refs/heads/develop c5ed8458b -> 2925c3284


Preliminary jQuery work. RadioButton is work in progress, but CheckBox now works.


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

Branch: refs/heads/develop
Commit: 2925c32841403731ef4dc235b2cbbbcf645e7634
Parents: c5ed845
Author: Peter Ent <pe...@apache.org>
Authored: Mon Apr 15 15:53:41 2013 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Apr 15 15:53:41 2013 -0400

----------------------------------------------------------------------
 frameworks/as/compile-config.xml                   |    5 +
 frameworks/as/defaults.css                         |   21 ++
 frameworks/as/jquery-manifest.xml                  |   29 +++
 .../as/src/org/apache/flex/jquery/Application.as   |   43 +++++
 .../apache/flex/jquery/staticControls/CheckBox.as  |   26 +++
 .../flex/jquery/staticControls/RadioButton.as      |   26 +++
 .../flex/jquery/staticControls/TextButton.as       |   32 ++++
 .../src/org/apache/flex/jquery/Application.js      |  144 +++++++++++++++
 .../apache/flex/jquery/staticControls/CheckBox.js  |   94 ++++++++++
 .../flex/jquery/staticControls/RadioButton.js      |  104 +++++++++++
 .../flex/jquery/staticControls/TextButton.js       |   62 ++++++
 11 files changed, 586 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/compile-config.xml b/frameworks/as/compile-config.xml
index 4ae469e..4bc76b2 100644
--- a/frameworks/as/compile-config.xml
+++ b/frameworks/as/compile-config.xml
@@ -38,6 +38,10 @@
                 <uri>library://ns.apache.org/flexjs/html5</uri>
                 <manifest>html5-manifest.xml</manifest>
             </namespace>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/jquery</uri>
+                <manifest>jquery-manifest.xml</manifest>
+            </namespace>
         </namespaces>
         
         <source-path>
@@ -59,6 +63,7 @@
     <include-namespaces>
         <uri>library://ns.apache.org/flexjs/basic</uri>
         <uri>library://ns.apache.org/flexjs/html5</uri>
+        <uri>library://ns.apache.org/flexjs/jquery</uri>
     </include-namespaces>  
         
     <target-player>${playerglobal.version}</target-player>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/defaults.css b/frameworks/as/defaults.css
index 9d0189e..260d560 100644
--- a/frameworks/as/defaults.css
+++ b/frameworks/as/defaults.css
@@ -19,6 +19,7 @@
 
 @namespace "library://ns.apache.org/flexjs/basic";
 @namespace h5 "library://ns.apache.org/flexjs/html5";
+@namespace jq "library://ns.apache.org/flexjs/jquery";
 
 /* Global style declaration */
 global
@@ -114,3 +115,23 @@ h5|ComboBox
     IComboBoxModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ComboBoxModel");
     IPopUp: ClassReference("org.apache.flex.html.staticControls.supportClasses.DropDownListList");
 }
+
+/* jQuery */
+
+jq|TextButton
+{
+	ITextButtonBead: ClassReference("org.apache.flex.html.staticControls.beads.TextButtonBead");
+}
+
+
+jq|CheckBox
+{
+    IToggleButtonModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ToggleButtonModel");
+    ICheckBoxBead:  ClassReference("org.apache.flex.html.staticControls.beads.CheckBoxBead");			
+}
+
+jq|RadioButton
+{
+    IToggleButtonModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ValueToggleButtonModel");
+    IRadioButtonBead:  ClassReference("org.apache.flex.html.staticControls.beads.RadioButtonBead");			
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/jquery-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/jquery-manifest.xml b/frameworks/as/jquery-manifest.xml
new file mode 100644
index 0000000..cdb9dd5
--- /dev/null
+++ b/frameworks/as/jquery-manifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+
+
+<componentPackage>
+
+    <component id="Application" class="org.apache.flex.jquery.Application"/>
+    <component id="TextButton" class="org.apache.flex.jquery.staticControls.TextButton"/>
+    <component id="CheckBox" class="org.apache.flex.jquery.staticControls.CheckBox"/>
+    <component id="RadioButton" class="org.apache.flex.jquery.staticControls.RadioButton"/>
+
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/src/org/apache/flex/jquery/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/jquery/Application.as b/frameworks/as/src/org/apache/flex/jquery/Application.as
new file mode 100644
index 0000000..5801d07
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/jquery/Application.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.jquery
+{
+    import flash.display.Sprite;
+    import flash.display.StageAlign;
+    import flash.display.StageScaleMode;
+    import flash.events.IOErrorEvent;
+    
+    import org.apache.flex.core.Application;
+    import org.apache.flex.core.IFlexInfo;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.utils.MXMLDataInterpreter;
+    
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
+    /**
+     *  Dispatched at startup.
+     */
+    [Event(name="initialize", type="org.apache.flex.events.Event")]
+    
+    public class Application extends org.apache.flex.core.Application implements IFlexInfo
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/src/org/apache/flex/jquery/staticControls/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/jquery/staticControls/CheckBox.as b/frameworks/as/src/org/apache/flex/jquery/staticControls/CheckBox.as
new file mode 100644
index 0000000..a2f3a01
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/jquery/staticControls/CheckBox.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.jquery.staticControls
+{
+	import org.apache.flex.html.staticControls.CheckBox;
+	
+	public class CheckBox extends org.apache.flex.html.staticControls.CheckBox 
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/src/org/apache/flex/jquery/staticControls/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/jquery/staticControls/RadioButton.as b/frameworks/as/src/org/apache/flex/jquery/staticControls/RadioButton.as
new file mode 100644
index 0000000..a94739a
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/jquery/staticControls/RadioButton.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.jquery.staticControls
+{
+	import org.apache.flex.html.staticControls.RadioButton;
+	
+	public class RadioButton extends org.apache.flex.html.staticControls.RadioButton
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/as/src/org/apache/flex/jquery/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/jquery/staticControls/TextButton.as b/frameworks/as/src/org/apache/flex/jquery/staticControls/TextButton.as
new file mode 100644
index 0000000..c2632f3
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/jquery/staticControls/TextButton.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.jquery.staticControls
+{
+	import flash.display.DisplayObject;
+	
+	import org.apache.flex.html.staticControls.TextButton;
+	
+	public class TextButton extends org.apache.flex.html.staticControls.TextButton
+	{
+		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+		{
+			super(upState, overState, downState, hitTestState);
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
new file mode 100644
index 0000000..8576c9e
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
@@ -0,0 +1,144 @@
+/**
+ * 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.
+ */
+
+// ------------------------------------------------------------------
+// jQuery
+// ------------------------------------------------------------------
+
+// Bring in the jQuery sources. You can use the minified versions for
+// better performance.
+ var mainjs = document.createElement('script');
+mainjs.src = 'http://code.jquery.com/jquery-1.9.1.js';
+document.head.appendChild(mainjs);
+
+ var uijs = document.createElement('script');
+uijs.src = 'http://code.jquery.com/ui/1.10.2/jquery-ui.js';
+document.head.appendChild(uijs); 
+
+// create a stylesheet link to the corresponding jquery theme file.
+var head  = document.getElementsByTagName('head')[0];
+var link  = document.createElement('link');
+link.id   = 'jquerycss';
+link.rel  = 'stylesheet';
+link.type = 'text/css';
+link.href = 'http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css';
+link.media = 'all';
+head.appendChild(link);
+
+// ------------------------------------------------------------------
+// end jQuery
+// ------------------------------------------------------------------
+ 
+goog.provide('org.apache.flex.jquery.Application');
+
+goog.require('org.apache.flex.core.HTMLElementWrapper');
+
+goog.require('org.apache.flex.core.SimpleValuesImpl');
+goog.require('org.apache.flex.core.ValuesManager');
+goog.require('org.apache.flex.core.ViewBase');
+goog.require('org.apache.flex.utils.MXMLDataInterpreter');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.HTMLElementWrapper}
+ */
+org.apache.flex.jquery.Application = function() {
+    org.apache.flex.core.HTMLElementWrapper.call(this);
+
+    /**
+     * @private
+     * @type {Array.<Object>}
+     */
+    this.queuedListeners_;
+
+};
+goog.inherits(org.apache.flex.jquery.Application,
+    org.apache.flex.core.HTMLElementWrapper);
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.jquery.Application.prototype.controller = null;
+
+/**
+ * @expose
+ * @type {org.apache.flex.core.ViewBase}
+ */
+org.apache.flex.jquery.Application.prototype.initialView = null;
+
+/**
+ * @expose
+ * @type {org.apache.flex.events.EventDispatcher}
+ */
+org.apache.flex.jquery.Application.prototype.model = null;
+
+/**
+ * @expose
+ * @type {org.apache.flex.core.SimpleValuesImpl}
+ */
+org.apache.flex.jquery.Application.prototype.valuesImpl = null;
+
+/**
+ * @this {org.apache.flex.jquery.Application}
+ * @param {string} t The event type.
+ * @param {function(?): ?} fn The event handler.
+ */
+org.apache.flex.jquery.Application.prototype.addEventListener = function(t, fn) {
+    if (!this.element) {
+        if (!this.queuedListeners_) {
+            this.queuedListeners_ = [];
+        }
+
+        this.queuedListeners_.push({ type: t, handler: fn });
+
+        return;
+    }
+
+    goog.base(this, 'addEventListener', t, fn);
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.Application}
+ */
+org.apache.flex.jquery.Application.prototype.start = function() {
+    var evt, i, n, q;
+
+    this.element = document.getElementsByTagName('body')[0];
+
+    if (this.queuedListeners_) {
+        n = this.queuedListeners_.length;
+        for (i = 0; i < n; i++) {
+            q = this.queuedListeners_[i];
+
+            this.addEventListener(q.type, q.handler);
+        }
+    }
+
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+            this.get_MXMLProperties());
+
+    org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
+
+    evt = this.createEvent('initialize');
+    this.dispatchEvent(evt);
+
+    this.initialView.addToParent(this.element);
+    this.initialView.initUI(this.model);
+
+    evt = this.createEvent('viewChanged');
+    this.dispatchEvent(evt);
+};
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
new file mode 100644
index 0000000..2a979c0
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
@@ -0,0 +1,94 @@
+/**
+ * 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.jquery.staticControls.CheckBox');
+
+goog.require('org.apache.flex.core.UIBase');
+
+var cbCount = 0;
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.jquery.staticControls.CheckBox = function() {
+    org.apache.flex.core.UIBase.call(this);
+  
+};
+goog.inherits(
+    org.apache.flex.jquery.staticControls.CheckBox, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.jquery.staticControls.CheckBox}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.jquery.staticControls.CheckBox.prototype.addToParent = 
+    function(p) {
+    
+    var d = document.createElement('div');
+    var cb = document.createElement('input');
+    cb.type = 'checkbox';
+    cb.id = 'checkbox1';
+    
+    var lb = document.createElement('label');
+    lb.htmlFor = 'checkbox1';
+    
+    d.appendChild(cb);
+    d.appendChild(lb);
+    
+    this.element = d;
+    p.appendChild(this.element);
+    
+    $(cb).button();
+
+    this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.CheckBox}
+ * @return {string} The text getter.
+ */
+org.apache.flex.jquery.staticControls.CheckBox.prototype.get_text = function() {
+    return this.element.childNodes.item(1).value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.CheckBox}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.jquery.staticControls.CheckBox.prototype.set_text = function(value) {
+    this.element.childNodes.item(1).appendChild(document.createTextNode(value));;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.CheckBox}
+ * @return {bool} The selected getter.
+ */
+org.apache.flex.jquery.staticControls.CheckBox.prototype.get_selected = function() {
+    return this.element.childNodes.item(0).checked;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.CheckBox}
+ * @param {bool} value The selected setter.
+ */
+org.apache.flex.jquery.staticControls.CheckBox.prototype.set_selected = function(value) {
+    this.element.childNodes.item(0).checked = value;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
new file mode 100644
index 0000000..b1eeef6
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
@@ -0,0 +1,104 @@
+/**
+ * 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.jquery.staticControls.RadioButton');
+
+goog.require('org.apache.flex.core.UIBase');
+
+var rbCount = 0;
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.jquery.staticControls.RadioButton = function() {
+    org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+    org.apache.flex.jquery.staticControls.RadioButton, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.addToParent = 
+    function(p) {
+	this.element = document.createElement('label');
+	
+	var rb = document.createElement('input');
+	rb.type = 'radio';
+	$(rb).button();
+	this.element.appendChild(rb);
+	this.element.appendChild(document.createTextNode("radio button"));
+
+    p.appendChild(this.element);
+
+    this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @return {string} The groupName getter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_groupName = function() {
+    return this.element.childNodes.item(0).name;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @param {string} value The groupName setter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_groupName = function(value) {
+    this.element.childNodes.item(0).name = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @return {string} The text getter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_text = function() {
+    return this.element.childNodes.item(1).nodeValue;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_text = function(value) {
+    this.element.childNodes.item(1).nodeValue = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @return {bool} The selected getter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_selected = function() {
+    return this.element.childNodes.item(0).checked;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.RadioButton}
+ * @param {bool} value The selected setter.
+ */
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_selected = function(value) {
+    this.element.childNodes.item(0).checked = value;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2925c328/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
new file mode 100644
index 0000000..4cb2059
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
@@ -0,0 +1,62 @@
+/**
+ * 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.jquery.staticControls.TextButton');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.jquery.staticControls.TextButton = function() {
+    org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+    org.apache.flex.jquery.staticControls.TextButton, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.jquery.staticControls.TextButton}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.jquery.staticControls.TextButton.prototype.addToParent =
+    function(p) {
+    this.element = document.createElement('button');
+    this.element.setAttribute('type', 'button');
+	$(this.element).button();
+    p.appendChild(this.element);
+
+    this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.TextButton}
+ * @return {string} The text getter.
+ */
+org.apache.flex.jquery.staticControls.TextButton.prototype.get_text = function() {
+    return this.element.innerHTML;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.jquery.staticControls.TextButton}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.jquery.staticControls.TextButton.prototype.set_text =
+    function(value) {
+    this.element.innerHTML = value;
+};