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] - Initial MDL Table comps (not wired yet)
Date Sat, 03 Dec 2016 00:56:52 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 7103fd0cb -> 36a7f7d76


Initial MDL Table comps (not wired yet)


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

Branch: refs/heads/develop
Commit: 36a7f7d76483278595eccdcbb9e08ce2d71a426e
Parents: 7103fd0
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sat Dec 3 01:56:48 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sat Dec 3 01:56:48 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/TBody.as  |  98 ++++++++++++++
 .../src/main/flex/org/apache/flex/mdl/THead.as  |  98 ++++++++++++++
 .../src/main/flex/org/apache/flex/mdl/Table.as  | 129 +++++++++++++++++++
 3 files changed, 325 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36a7f7d7/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
new file mode 100644
index 0000000..cfc6928
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TBody.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The THead class is a Container component capable of parenting
+	 *  TH Table Header Cells
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class THead extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function THead()
+		{
+			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 = "";
+
+            element = document.createElement('thead') as WrappedHTMLElement;
+            element.className = typeNames;
+            
+			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;
+        }
+
+		protected var _ascending:Boolean;
+        /**
+		 *  A boolean flag to activate "mdl-data-table__header--sorted-ascending" effect selector.
+		 *  Applies all/individual selectable behavior (checkboxes)
+		 *  Optional; goes on table element
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get ascending():Boolean
+        {
+            return _ascending;
+        }
+        public function set selectable(value:Boolean):void
+        {
+			_ascending = value;
+
+			className += (_ascending ? " mdl-data-table__header--sorted-ascending" : "mdl-data-table__header--sorted-descending");
 
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36a7f7d7/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/THead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/THead.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/THead.as
new file mode 100644
index 0000000..cfc6928
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/THead.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The THead class is a Container component capable of parenting
+	 *  TH Table Header Cells
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class THead extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function THead()
+		{
+			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 = "";
+
+            element = document.createElement('thead') as WrappedHTMLElement;
+            element.className = typeNames;
+            
+			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;
+        }
+
+		protected var _ascending:Boolean;
+        /**
+		 *  A boolean flag to activate "mdl-data-table__header--sorted-ascending" effect selector.
+		 *  Applies all/individual selectable behavior (checkboxes)
+		 *  Optional; goes on table element
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get ascending():Boolean
+        {
+            return _ascending;
+        }
+        public function set selectable(value:Boolean):void
+        {
+			_ascending = value;
+
+			className += (_ascending ? " mdl-data-table__header--sorted-ascending" : "mdl-data-table__header--sorted-descending");
 
+        }
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36a7f7d7/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
new file mode 100644
index 0000000..55e8865
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The Table class is a Container component capable of parenting other
+	 *  four components (CardTitle, CardMedia, CardSupportingText and CardActions. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Table extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Table()
+		{
+			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-data-table mdl-js-data-table";
+
+            element = document.createElement('table') as WrappedHTMLElement;
+            element.className = typeNames;
+            
+			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;
+        }
+		
+		protected var _shadow:Number = 0;
+        /**
+		 *  A boolean flag to activate "mdl-shadow--Xdp" effect selector.
+		 *  Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get shadow():Number
+        {
+            return _shadow;
+        }
+        public function set shadow(value:Number):void
+        {
+			if(value == 0 || value == 2 || value == 3 || value == 4 || value == 6 || value == 8 ||
value == 16)
+			{
+				_shadow = value;
+
+				className += (_shadow != 0 ? " mdl-shadow--" + _shadow + "dp" : "");
+			}  
+        }
+
+		protected var _selectable:Boolean;
+        /**
+		 *  A boolean flag to activate "mdl-data-table--selectable" effect selector.
+		 *  Applies all/individual selectable behavior (checkboxes)
+		 *  Optional; goes on table element
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get selectable():Boolean
+        {
+            return _selectable;
+        }
+        public function set selectable(value:Boolean):void
+        {
+			_selectable = value;
+
+			className += (_selectable ? " mdl-data-table--selectable" : "");  
+        }
+	}
+}


Mime
View raw message