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/01 19:28:57 UTC
[1/2] git commit: First set of HTML 5 components.
Updated Branches:
refs/heads/develop 4a0a7e3fe -> 196dd4b1c
First set of HTML 5 components.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/67564708
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/67564708
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/67564708
Branch: refs/heads/develop
Commit: 67564708e63bb39a00062b93e907fbbcc0d8784e
Parents: 564debe
Author: Peter Ent <pe...@apache.org>
Authored: Mon Apr 1 13:26:40 2013 -0400
Committer: Peter Ent <th...@gmail.com>
Committed: Mon Apr 1 13:26:40 2013 -0400
----------------------------------------------------------------------
frameworks/as/compile-config.xml | 5 +
frameworks/as/defaults.css | 19 ++++
frameworks/as/flex-config.xml | 10 ++-
frameworks/as/html5-manifest.xml | 31 ++++++
.../org/apache/flex/html5/staticControls/Button.as | 26 +++++
.../apache/flex/html5/staticControls/CheckBox.as | 26 +++++
.../apache/flex/html5/staticControls/ComboBox.as | 28 +++++
.../flex/html5/staticControls/DropDownList.as | 28 +++++
.../org/apache/flex/html5/staticControls/Label.as | 33 ++++++
.../org/apache/flex/html5/staticControls/List.as | 35 ++++++
.../flex/html5/staticControls/RadioButton.as | 26 +++++
.../apache/flex/html5/staticControls/TextArea.as | 26 +++++
.../apache/flex/html5/staticControls/TextButton.as | 32 ++++++
.../apache/flex/html5/staticControls/TextInput.as | 25 +++++
.../apache/flex/html5/staticControls/CheckBox.js | 85 +++++++++++++++
.../org/apache/flex/html5/staticControls/Label.js | 57 ++++++++++
.../apache/flex/html5/staticControls/TextArea.js | 60 ++++++++++
.../apache/flex/html5/staticControls/TextButton.js | 62 +++++++++++
.../apache/flex/html5/staticControls/TextInput.js | 61 +++++++++++
19 files changed, 674 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/compile-config.xml b/frameworks/as/compile-config.xml
index 307f25a..4ae469e 100644
--- a/frameworks/as/compile-config.xml
+++ b/frameworks/as/compile-config.xml
@@ -34,6 +34,10 @@
<uri>library://ns.apache.org/flexjs/basic</uri>
<manifest>basic-manifest.xml</manifest>
</namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+ <manifest>html5-manifest.xml</manifest>
+ </namespace>
</namespaces>
<source-path>
@@ -54,6 +58,7 @@
<include-namespaces>
<uri>library://ns.apache.org/flexjs/basic</uri>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
</include-namespaces>
<target-player>${playerglobal.version}</target-player>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/defaults.css b/frameworks/as/defaults.css
index 4abbeff..e592eed 100644
--- a/frameworks/as/defaults.css
+++ b/frameworks/as/defaults.css
@@ -18,6 +18,7 @@
*/
@namespace "library://ns.apache.org/flexjs/basic";
+@namespace h5 "library://ns.apache.org/flexjs/html5";
/* Global style declaration */
global
@@ -71,3 +72,21 @@ TextInput
{
ITextInputBead: ClassReference("org.apache.flex.html.staticControls.beads.TextInputWithBorderBead");
}
+
+/* HTML5 */
+
+h5|TextButton
+{
+ ITextButtonBead: ClassReference("org.apache.flex.html.staticControls.beads.TextButtonBead");
+}
+
+h5|TextInput
+{
+ ITextInputBead: ClassReference("org.apache.flex.html.staticControls.beads.TextInputWithBorderBead");
+}
+
+h5|CheckBox
+{
+ IToggleButtonModel: ClassReference("org.apache.flex.html.staticControls.beads.models.ToggleButtonModel");
+ ICheckBoxBead: ClassReference("org.apache.flex.html.staticControls.beads.CheckBoxBead");
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/flex-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/flex-config.xml b/frameworks/as/flex-config.xml
index 928e4c7..c0135ed 100644
--- a/frameworks/as/flex-config.xml
+++ b/frameworks/as/flex-config.xml
@@ -88,8 +88,16 @@
<!-- elements. -->
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
+
<manifest>basic-manifest.xml</manifest>
- </namespace>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+
+ <manifest>html5-manifest.xml</manifest>
+
+ </namespace>
</namespaces>
<!-- Enable post-link SWF optimization. -->
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/html5-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/html5-manifest.xml b/frameworks/as/html5-manifest.xml
new file mode 100644
index 0000000..f15b632
--- /dev/null
+++ b/frameworks/as/html5-manifest.xml
@@ -0,0 +1,31 @@
+<?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="Label" class="org.apache.flex.html5.staticControls.Label"/>
+ <component id="TextButton" class="org.apache.flex.html5.staticControls.TextButton"/>
+ <component id="TextInput" class="org.apache.flex.html5.staticControls.TextInput"/>
+ <component id="TextArea" class="org.apache.flex.html5.staticControls.TextArea"/>
+ <component id="CheckBox" class="org.apache.flex.html5.staticControls.CheckBox"/>
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/Button.as b/frameworks/as/src/org/apache/flex/html5/staticControls/Button.as
new file mode 100644
index 0000000..4b7731d
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/Button.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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.Button;
+
+ public class Button extends org.apache.flex.html.staticControls.Button
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/CheckBox.as b/frameworks/as/src/org/apache/flex/html5/staticControls/CheckBox.as
new file mode 100644
index 0000000..ec92d72
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/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.html5.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/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/ComboBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/ComboBox.as b/frameworks/as/src/org/apache/flex/html5/staticControls/ComboBox.as
new file mode 100644
index 0000000..48aeeac
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/ComboBox.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.ComboBox;
+
+ [Event("change", org.apache.flex.events.Event)]
+
+ public class ComboBox extends org.apache.flex.html.staticControls.ComboBox
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/DropDownList.as b/frameworks/as/src/org/apache/flex/html5/staticControls/DropDownList.as
new file mode 100644
index 0000000..0c2fbb5
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/DropDownList.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.DropDownList;
+
+ [Event("change", org.apache.flex.events.Event)]
+
+ public class DropDownList extends org.apache.flex.html.staticControls.DropDownList
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/Label.as b/frameworks/as/src/org/apache/flex/html5/staticControls/Label.as
new file mode 100644
index 0000000..8a8ad99
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/Label.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.Label;
+
+ /**
+ * Label probably should extend TextField directly,
+ * but the player's APIs for TextLine do not allow
+ * direct instantiation, and we might want to allow
+ * Labels to be declared and have their actual
+ * view be swapped out.
+ */
+ public class Label extends org.apache.flex.html.staticControls.Label
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/List.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/List.as b/frameworks/as/src/org/apache/flex/html5/staticControls/List.as
new file mode 100644
index 0000000..93c3133
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/List.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.List;
+
+ [Event("change", org.apache.flex.events.Event)]
+
+ /**
+ * Label probably should extend TextField directly,
+ * but the player's APIs for TextLine do not allow
+ * direct instantiation, and we might want to allow
+ * Labels to be declared and have their actual
+ * view be swapped out.
+ */
+ public class List extends org.apache.flex.html.staticControls.List
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/RadioButton.as b/frameworks/as/src/org/apache/flex/html5/staticControls/RadioButton.as
new file mode 100644
index 0000000..78f117b
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/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.html5.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/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/TextArea.as b/frameworks/as/src/org/apache/flex/html5/staticControls/TextArea.as
new file mode 100644
index 0000000..a2c4f0b
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/TextArea.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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.TextArea;
+
+ public class TextArea extends org.apache.flex.html.staticControls.TextArea
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/TextButton.as b/frameworks/as/src/org/apache/flex/html5/staticControls/TextButton.as
new file mode 100644
index 0000000..6c87ea4
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/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.html5.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/67564708/frameworks/as/src/org/apache/flex/html5/staticControls/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html5/staticControls/TextInput.as b/frameworks/as/src/org/apache/flex/html5/staticControls/TextInput.as
new file mode 100644
index 0000000..adb723f
--- /dev/null
+++ b/frameworks/as/src/org/apache/flex/html5/staticControls/TextInput.as
@@ -0,0 +1,25 @@
+//
+// 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.html5.staticControls
+{
+ import org.apache.flex.html.staticControls.TextInput;
+
+ public class TextInput extends org.apache.flex.html.staticControls.TextInput
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
new file mode 100644
index 0000000..aebd0ca
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
@@ -0,0 +1,85 @@
+/**
+ * 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.html5.staticControls.CheckBox');
+
+goog.require('org.apache.flex.core.UIBase');
+
+var cbCount = 0;
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html5.staticControls.CheckBox = function() {
+ org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+ org.apache.flex.html5.staticControls.CheckBox, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html5.staticControls.CheckBox}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html5.staticControls.CheckBox.prototype.addToParent =
+ function(p) {
+ this.element = document.createElement('label');
+
+ var cb = document.createElement('input');
+ cb.type = 'checkbox';
+ this.element.appendChild(cb);
+ this.element.appendChild(document.createTextNode("check box"));
+
+ p.appendChild(this.element);
+
+ this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.CheckBox}
+ * @return {string} The text getter.
+ */
+org.apache.flex.html5.staticControls.CheckBox.prototype.get_text = function() {
+ return this.element.childNodes.item(1).nodeValue;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.CheckBox}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html5.staticControls.CheckBox.prototype.set_text = function(value) {
+ this.element.childNodes.item(1).nodeValue = value;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.CheckBox}
+ * @return {bool} The selected getter.
+ */
+org.apache.flex.html5.staticControls.CheckBox.prototype.get_selected = function() {
+ return this.element.childNodes.item(0).checked;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.CheckBox}
+ * @param {bool} value The selected setter.
+ */
+org.apache.flex.html5.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/67564708/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
new file mode 100644
index 0000000..05a2657
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
@@ -0,0 +1,57 @@
+/**
+ * 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.html5.staticControls.Label');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html5.staticControls.Label = function() {
+ org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+ org.apache.flex.html5.staticControls.Label, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html5.staticControls.Label}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html5.staticControls.Label.prototype.addToParent = function(p) {
+ goog.base(this, 'addToParent', p);
+
+ this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.Label}
+ * @return {string} The text getter.
+ */
+org.apache.flex.html5.staticControls.Label.prototype.get_text = function() {
+ return this.element.innerHTML;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.Label}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html5.staticControls.Label.prototype.set_text = function(value) {
+ this.element.innerHTML = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
new file mode 100644
index 0000000..399474a
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
@@ -0,0 +1,60 @@
+/**
+ * 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.html5.staticControls.TextArea');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html5.staticControls.TextArea = function() {
+ org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+ org.apache.flex.html5.staticControls.TextArea, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html5.staticControls.TextArea}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html5.staticControls.TextArea.prototype.addToParent =
+ function(p) {
+ this.element = document.createElement('textarea');
+
+ p.appendChild(this.element);
+
+ this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextArea}
+ * @return {string} The text getter.
+ */
+org.apache.flex.html5.staticControls.TextArea.prototype.get_text = function() {
+ return this.element.value
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextArea}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html5.staticControls.TextArea.prototype.set_text = function(value) {
+ this.element.value = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
new file mode 100644
index 0000000..f39d5b0
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/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.html5.staticControls.TextButton');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html5.staticControls.TextButton = function() {
+ org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+ org.apache.flex.html5.staticControls.TextButton, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html5.staticControls.TextButton}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html5.staticControls.TextButton.prototype.addToParent =
+ function(p) {
+ this.element = document.createElement('button');
+ this.element.setAttribute('type', 'button');
+
+ p.appendChild(this.element);
+
+ this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextButton}
+ * @return {string} The text getter.
+ */
+org.apache.flex.html5.staticControls.TextButton.prototype.get_text = function() {
+ return this.element.innerHTML;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextButton}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html5.staticControls.TextButton.prototype.set_text =
+ function(value) {
+ this.element.innerHTML = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/67564708/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
new file mode 100644
index 0000000..675ae67
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
@@ -0,0 +1,61 @@
+/**
+ * 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.html5.staticControls.TextInput');
+
+goog.require('org.apache.flex.core.UIBase');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html5.staticControls.TextInput = function() {
+ org.apache.flex.core.UIBase.call(this);
+};
+goog.inherits(
+ org.apache.flex.html5.staticControls.TextInput, org.apache.flex.core.UIBase
+);
+
+/**
+ * @override
+ * @this {org.apache.flex.html5.staticControls.TextInput}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.html5.staticControls.TextInput.prototype.addToParent =
+ function(p) {
+ this.element = document.createElement('input');
+ this.element.setAttribute('type', 'input');
+
+ p.appendChild(this.element);
+
+ this.positioner = this.element;
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextInput}
+ * @return {string} The text getter.
+ */
+org.apache.flex.html5.staticControls.TextInput.prototype.get_text = function() {
+ return this.element.value
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.html5.staticControls.TextInput}
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html5.staticControls.TextInput.prototype.set_text = function(value) {
+ this.element.value = value;
+};
[2/2] git commit: Merge branch 'html5' into develop
Posted by pe...@apache.org.
Merge branch 'html5' into develop
* html5:
First set of HTML 5 components.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/196dd4b1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/196dd4b1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/196dd4b1
Branch: refs/heads/develop
Commit: 196dd4b1c25fd0918ccce571a040035614bd0fee
Parents: 4a0a7e3 6756470
Author: Peter Ent <th...@gmail.com>
Authored: Mon Apr 1 13:28:33 2013 -0400
Committer: Peter Ent <th...@gmail.com>
Committed: Mon Apr 1 13:28:33 2013 -0400
----------------------------------------------------------------------
frameworks/as/compile-config.xml | 5 +
frameworks/as/defaults.css | 19 ++++
frameworks/as/flex-config.xml | 10 ++-
frameworks/as/html5-manifest.xml | 31 ++++++
.../org/apache/flex/html5/staticControls/Button.as | 26 +++++
.../apache/flex/html5/staticControls/CheckBox.as | 26 +++++
.../apache/flex/html5/staticControls/ComboBox.as | 28 +++++
.../flex/html5/staticControls/DropDownList.as | 28 +++++
.../org/apache/flex/html5/staticControls/Label.as | 33 ++++++
.../org/apache/flex/html5/staticControls/List.as | 35 ++++++
.../flex/html5/staticControls/RadioButton.as | 26 +++++
.../apache/flex/html5/staticControls/TextArea.as | 26 +++++
.../apache/flex/html5/staticControls/TextButton.as | 32 ++++++
.../apache/flex/html5/staticControls/TextInput.as | 25 +++++
.../apache/flex/html5/staticControls/CheckBox.js | 85 +++++++++++++++
.../org/apache/flex/html5/staticControls/Label.js | 57 ++++++++++
.../apache/flex/html5/staticControls/TextArea.js | 60 ++++++++++
.../apache/flex/html5/staticControls/TextButton.js | 62 +++++++++++
.../apache/flex/html5/staticControls/TextInput.js | 61 +++++++++++
19 files changed, 674 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/196dd4b1/frameworks/as/flex-config.xml
----------------------------------------------------------------------