flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [16/21] git commit: [flex-asjs] [refs/heads/tlf] - switch to using defaultPrevented
Date Mon, 08 May 2017 18:59:28 GMT
switch to using defaultPrevented


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

Branch: refs/heads/tlf
Commit: fd2304dbcfc6fbd56ac6f08418eb9f60acaa9119
Parents: 58bfcf8
Author: Alex Harui <aharui@apache.org>
Authored: Sun May 7 19:05:27 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Mon May 8 11:59:03 2017 -0700

----------------------------------------------------------------------
 .../textLayout/container/ContainerController.as | 22 ++++++++++----------
 .../apache/flex/textLayout/edit/EditManager.as  | 18 ++++++++--------
 .../flex/textLayout/edit/SelectionManager.as    |  6 +++---
 .../events/FlowElementMouseEventManager.as      |  4 ++--
 4 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd2304db/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
index bb223b7..74593c6 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
@@ -2103,7 +2103,7 @@ package org.apache.flex.textLayout.container
 		
 		public function mouseOverHandler(event:MouseEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.mouseOverHandler(event);
 		}
 		
@@ -2126,7 +2126,7 @@ package org.apache.flex.textLayout.container
 		 */				
 		public function mouseOutHandler(event:MouseEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.mouseOutHandler(event);
 		}
 		
@@ -2142,7 +2142,7 @@ package org.apache.flex.textLayout.container
 		 */
 		public function mouseWheelHandler(event:MouseEvent):void
 		{
-			if (event.isDefaultPrevented())
+			if (event.defaultPrevented)
 				return;
 			
 			// Do the scroll and call preventDefault only if the there is enough text to scroll. Otherwise
@@ -2177,7 +2177,7 @@ package org.apache.flex.textLayout.container
 		
 		public function mouseDownHandler(event:MouseEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 			{
 				interactionManager.mouseDownHandler(event);
 				// grab the focus - alternative is to listen to keyevents on the Application
@@ -2222,7 +2222,7 @@ package org.apache.flex.textLayout.container
 		 */
 		public function mouseUpHandler(event:MouseEvent):void
 		{
-			if (interactionManager && event && !event.isDefaultPrevented())
+			if (interactionManager && event && !event.defaultPrevented)
 			{
 				interactionManager.mouseUpHandler(event);
 			}
@@ -2340,7 +2340,7 @@ package org.apache.flex.textLayout.container
 		
 		public function mouseMoveHandler(event:MouseEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 			{
 //TODO fix this
 				// only autoscroll if we haven't hit something on the stage related to this particular
TextFlow
@@ -2369,7 +2369,7 @@ package org.apache.flex.textLayout.container
 		 */
 		public function mouseDoubleClickHandler(event:MouseEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 			{
 				interactionManager.mouseDoubleClickHandler(event);
 				// grab the focus - alternative is to listen to keyevents on the Application
@@ -2571,7 +2571,7 @@ package org.apache.flex.textLayout.container
 		 */
 		public function keyDownHandler(event:KeyboardEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.keyDownHandler(event);
 		}
 		
@@ -2589,7 +2589,7 @@ package org.apache.flex.textLayout.container
 		
 		public function keyUpHandler(event:KeyboardEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.keyUpHandler(event);
 		}
 		
@@ -2622,7 +2622,7 @@ package org.apache.flex.textLayout.container
 		
 		public function textInputHandler(event:TextEvent):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.textInputHandler(event);
 		}
 		
@@ -2710,7 +2710,7 @@ package org.apache.flex.textLayout.container
 		
 		public function editHandler(event:Event):void
 		{
-			if (interactionManager && !event.isDefaultPrevented())
+			if (interactionManager && !event.defaultPrevented)
 				interactionManager.editHandler(event);
 //TODO deal with context menus			
 			// re-enable context menu so following keyboard shortcuts will work

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd2304db/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
index 2831b32..0ba8e55 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
@@ -237,7 +237,7 @@ package org.apache.flex.textLayout.edit
 		/** @private */
 		override public function editHandler(event:Event):void
 		{
-			if (event.isDefaultPrevented())
+			if (event.defaultPrevented)
 				return;
 
 			super.editHandler(event);
@@ -274,7 +274,7 @@ package org.apache.flex.textLayout.edit
 			var listItem:IListItemElement;
 			var operationState:SelectionState;
 			
-			if (!hasSelection() || event.isDefaultPrevented())
+			if (!hasSelection() || event.defaultPrevented)
 				return;
 			
 			if (redrawListener)		// pending redraw; handle this before anything else so TextLines
on screen will be up to date
@@ -490,7 +490,7 @@ package org.apache.flex.textLayout.edit
 		/** @private */
 		public override function keyUpHandler(event:KeyboardEvent):void
 		{
-			if (!hasSelection() || event.isDefaultPrevented())
+			if (!hasSelection() || event.defaultPrevented)
 				return;
 				
 			super.keyUpHandler(event);
@@ -737,7 +737,7 @@ package org.apache.flex.textLayout.edit
 			{
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_BEGIN,false,true,op,captureLevel-1,null);
 				textFlow.dispatchEvent(opEvent);
-				if (opEvent.isDefaultPrevented())
+				if (opEvent.defaultPrevented)
 					return null;
 				// user may replace the operation - TODO: WHAT IF SWITCH TO UNDO/REDO????
 				op = opEvent.operation;
@@ -786,7 +786,7 @@ package org.apache.flex.textLayout.edit
 			{
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_END,false,true,op,captureLevel-1,opError);
 				textFlow.dispatchEvent(opEvent);
-				opError = opEvent.isDefaultPrevented() ? null : opEvent.error;
+				opError = opEvent.defaultPrevented ? null : opEvent.error;
 			}
 
 			if (opError)
@@ -949,7 +949,7 @@ package org.apache.flex.textLayout.edit
 				var undoPsuedoOp:UndoOperation = new UndoOperation(operation);
 				var opEvent:FlowOperationEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_BEGIN,false,true,undoPsuedoOp,0,null);
 				textFlow.dispatchEvent(opEvent);
-				if (opEvent.isDefaultPrevented())
+				if (opEvent.defaultPrevented)
 				{
 					//operation cancelled by user. Push the operation back onto the undo stack
 					undoManager.pushUndo(operation);
@@ -991,7 +991,7 @@ package org.apache.flex.textLayout.edit
 			{
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_END,false,true,undoPsuedoOp,0,opError);
 				textFlow.dispatchEvent(opEvent);
-				opError = opEvent.isDefaultPrevented() ? null : opEvent.error;
+				opError = opEvent.defaultPrevented ? null : opEvent.error;
 			}
 
 			if (opError)
@@ -1043,7 +1043,7 @@ package org.apache.flex.textLayout.edit
 				var redoPsuedoOp:RedoOperation = new RedoOperation(op);
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_BEGIN,false,true,redoPsuedoOp,0,null);
 				textFlow.dispatchEvent(opEvent);
-				if (opEvent.isDefaultPrevented() && _undoManager)
+				if (opEvent.defaultPrevented && _undoManager)
 				{
 					//user cancelled the event. Push the operation back onto the redo stack
 					_undoManager.pushRedo(op);
@@ -1085,7 +1085,7 @@ package org.apache.flex.textLayout.edit
 			{
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_END,false,true,redoPsuedoOp,0,opError);
 				textFlow.dispatchEvent(opEvent);
-				opError = opEvent.isDefaultPrevented() ? null : opEvent.error;
+				opError = opEvent.defaultPrevented ? null : opEvent.error;
 			}
 			if (opError)
 				throw (opError);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd2304db/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionManager.as
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionManager.as
index de9a73c..919f12c 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionManager.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/SelectionManager.as
@@ -2359,7 +2359,7 @@ package org.apache.flex.textLayout.edit
 		{
 			var opEvent:FlowOperationEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_BEGIN,
false, true, op, 0, null);
 			textFlow.dispatchEvent(opEvent);
-			if (!opEvent.isDefaultPrevented())
+			if (!opEvent.defaultPrevented)
 			{
 				op = opEvent.operation;
 
@@ -2378,7 +2378,7 @@ package org.apache.flex.textLayout.edit
 				// operation completed - send event whether it succeeded or not.
 				opEvent = new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_END, false, true,
op, 0, opError);
 				textFlow.dispatchEvent(opEvent);
-				opError = opEvent.isDefaultPrevented() ? null : opEvent.error;
+				opError = opEvent.defaultPrevented ? null : opEvent.error;
 				if (opError)
 					throw (opError);
 				textFlow.dispatchEvent(new FlowOperationEvent(FlowOperationEvent.FLOW_OPERATION_COMPLETE,
false, false, op, 0, null));
@@ -2631,7 +2631,7 @@ package org.apache.flex.textLayout.edit
 		 */
 		public function keyDownHandler(event:KeyboardEvent):void
 		{
-			if (!hasSelection() || event.isDefaultPrevented())
+			if (!hasSelection() || event.defaultPrevented)
 				return;
 
 			// if (event.charCode == 0)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd2304db/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/events/FlowElementMouseEventManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/events/FlowElementMouseEventManager.as
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/events/FlowElementMouseEventManager.as
index 0a993ee..ffa16e5 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/events/FlowElementMouseEventManager.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/events/FlowElementMouseEventManager.as
@@ -622,13 +622,13 @@ package org.apache.flex.textLayout.events
 			if (locallyListening)
 			{
 				_currentElement.getEventMirror().dispatchEvent(event);
-				if (event.isDefaultPrevented())
+				if (event.defaultPrevented)
 					return true;
 			}
 			if (textFlowListening)
 			{
 				textFlow.dispatchEvent(event);
-				if (event.isDefaultPrevented())
+				if (event.defaultPrevented)
 					return true;
 			}
 			return false;


Mime
View raw message