flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [01/50] git commit: [flex-asjs] [refs/heads/develop] - declarative invalidation of layout
Date Thu, 25 Sep 2014 16:03:43 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 24d052e97 -> 0fba10b8c


declarative invalidation of layout


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

Branch: refs/heads/develop
Commit: 31142854c5b4318cf4734d406579f60618b264e5
Parents: c0847cf
Author: Alex Harui <aharui@apache.org>
Authored: Mon Sep 15 13:35:15 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Sep 23 14:49:39 2014 -0700

----------------------------------------------------------------------
 .../html/beads/layouts/LayoutChangeNotifier.as  | 84 ++++++++++++++++++++
 1 file changed, 84 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31142854/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
new file mode 100644
index 0000000..9a33910
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/LayoutChangeNotifier.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads.layouts
+{	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  The LayoutChangeNotifier notifies layouts when a property
+     *  it is watching changes.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class LayoutChangeNotifier implements IBead
+	{
+		/**
+		 *  constructor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function LayoutChangeNotifier()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+			
+        private var _value:* = undefined;
+        
+		/**
+		 *  The number of tiles to fit horizontally into the layout.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set watchedProperty(value:Object):void
+		{
+			if (_value !== value)
+            {
+                _value = value;
+                IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));
+            }
+		}
+		
+	}
+}


Mime
View raw message