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] - Js P class
Date Sun, 15 Jan 2017 22:44:40 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 2c59149d2 -> f0504f9dc


Js P class


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

Branch: refs/heads/develop
Commit: f0504f9dc7cc7aeda0f373ca51f741c60c398234
Parents: 2c59149
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sun Jan 15 23:44:36 2017 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Jan 15 23:44:36 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/P.as     | 100 +++++++++++++++++++
 .../flex/org/apache/flex/mdl/DialogActions.as   |  76 ++++++++++++++
 2 files changed, 176 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f0504f9d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as
new file mode 100644
index 0000000..9cadcc7
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.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 P class represents an HTML <p> element
+     *  
+	 *  
+     *  @toplevel
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class P extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function P()
+		{
+			super();
+		}
+		
+        private var _text:String = "";
+
+        /**
+         *  The text of the p
+         *  
+         *  @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('p') as WrappedHTMLElement;
+
+            positioner = element;
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f0504f9d/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DialogActions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DialogActions.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DialogActions.as
new file mode 100644
index 0000000..b114550
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DialogActions.as
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.mdl
+{
+	import org.apache.flex.core.IChild;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The DialogActions class
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class DialogActions extends ContainerBase
+	{
+		/**
+		 *  constructor.
+         *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function DialogActions()
+		{
+			super();
+
+			className = ""; //set to empty string avoid 'undefined' output when no class selector
is assigned by user;
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			typeNames = "mdl-dialog__actions";
+            
+            element = document.createElement('div') as WrappedHTMLElement;
+
+			positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            element.flexjs_wrapper = this;
+
+            return element;
+        }
+	}
+}


Mime
View raw message