flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Added SingleLineBorderWithChangeListenerBead so changes in border style can be executed at runtime.
Date Thu, 16 Feb 2017 16:35:36 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 839d5dc6b -> 3f8b06fc9


Added SingleLineBorderWithChangeListenerBead so changes in border style can be executed at
runtime.


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

Branch: refs/heads/develop
Commit: 3f8b06fc97e65af0fa8bfba8020f699987c83775
Parents: 839d5dc
Author: Peter Ent <pent@apache.org>
Authored: Thu Feb 16 11:35:34 2017 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Thu Feb 16 11:35:34 2017 -0500

----------------------------------------------------------------------
 .../org/apache/flex/core/BindableCSSStyles.as   |  2 +
 .../projects/HTML/src/main/flex/HTMLClasses.as  |  1 +
 .../flex/html/beads/SingleLineBorderBead.as     |  2 +-
 .../SingleLineBorderWithChangeListenerBead.as   | 73 ++++++++++++++++++++
 4 files changed, 77 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
index ab808c0..1bcd87a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
@@ -71,6 +71,7 @@ package org.apache.flex.core
             "backgroundAlpha": 1,
             "backgroundColor": 1,
             "backgroundImage": 1,
+			"border": 1,
             "borderColor": 1,
             "borderStyle": 1,
             "borderRadius": 1,
@@ -100,6 +101,7 @@ package org.apache.flex.core
         public var backgroundAlpha:*;
         public var backgroundColor:*;
         public var backgroundImage:*;
+		public var border:*;
         public var borderColor:*;
         public var borderStyle:*;
         public var borderRadius:*;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index 68f94c6..f92ab08 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -78,6 +78,7 @@ internal class HTMLClasses
 		import org.apache.flex.html.beads.SliderTrackView; SliderTrackView;
 		import org.apache.flex.html.beads.SimpleAlertView; SimpleAlertView;
     	import org.apache.flex.html.beads.SingleLineBorderBead; SingleLineBorderBead;
+		import org.apache.flex.html.beads.SingleLineBorderWithChangeListenerBead; SingleLineBorderWithChangeListenerBead;
 	}
 	import org.apache.flex.html.beads.SpinnerView; SpinnerView;
 	COMPILE::SWF

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
index 3663b56..af31e24 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderBead.as
@@ -72,7 +72,7 @@ package org.apache.flex.html.beads
             changeHandler(null);
 		}
 		        
-		private function changeHandler(event:Event):void
+		protected function changeHandler(event:Event):void
 		{
             var host:UIBase = UIBase(_strand);
             var g:Graphics = (host.$displayObject as Object).graphics as Graphics;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f8b06fc/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
new file mode 100644
index 0000000..12dad18
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/SingleLineBorderWithChangeListenerBead.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.events.StyleChangeEvent;
+
+    /**
+     *  The SingleLineBorderWithChangeListenerBead adds the ability to react to
+	 *  changes in border style at runtime.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class SingleLineBorderWithChangeListenerBead extends SingleLineBorderBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function SingleLineBorderWithChangeListenerBead()
+		{
+			super();
+		}
+		
+		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
+         */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			IEventDispatcher(value).addEventListener(StyleChangeEvent.STYLE_CHANGE, handleStyleChange);
+		}
+		
+		/**
+		 * @private
+		 */
+		private function handleStyleChange(event:StyleChangeEvent):void
+		{
+			changeHandler(null);
+		}
+	}
+}


Mime
View raw message