flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Th element
Date Sat, 14 Jan 2017 23:31:56 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop ac1bf7a68 -> d547fd49c


Th element


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

Branch: refs/heads/develop
Commit: d547fd49cca67856cc0c233339a0efea971253f8
Parents: ac1bf7a
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sun Jan 15 00:31:52 2017 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Jan 15 00:31:52 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/Th.as    | 100 +++++++++++++++++++
 .../HTML/src/main/resources/basic-manifest.xml  |   2 +
 2 files changed, 102 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d547fd49/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as
new file mode 100644
index 0000000..1a40439
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.html
+{
+	import org.apache.flex.core.ContainerBase;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+	/**
+	 *  The Th class represents an HTML <th> element
+     *  
+	 *  
+     *  @toplevel
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Th extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Th()
+		{
+			super();
+		}
+		
+        private var _text:String = "";
+
+        /**
+         *  The text of the th
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get text():String
+		{
+            return _text;
+		}
+		public function set text(value:String):void
+		{
+            _text = value;
+
+			COMPILE::JS
+			{
+                if(textNode == null)
+                {
+                    textNode = document.createTextNode('') as Text;
+                    element.appendChild(textNode);
+                }
+                
+                textNode.nodeValue = value;	
+			}
+		}
+		
+        COMPILE::JS
+        protected var textNode:Text;
+
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			element = document.createElement('th') as WrappedHTMLElement;
+
+            positioner = element;
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d547fd49/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index 157547e..1efa498 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -154,7 +154,9 @@
     <component id="I" class="org.apache.flex.html.I" />
     <component id="Ul" class="org.apache.flex.html.Ul" />
     <component id="Li" class="org.apache.flex.html.Li" />
+    
     <component id="Td" class="org.apache.flex.html.Td" />
+    <component id="Th" class="org.apache.flex.html.Th" />
 
     <component id="InnerHTML" class="org.apache.flex.html.beads.InnerHTML" />
     <component id="TextNode" class="org.apache.flex.html.TextNode" />


Mime
View raw message