You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/04/10 20:37:07 UTC

[GitHub] aharui closed pull request #157: mx.core.EventPriority and mx.core.IFactory

aharui closed pull request #157: mx.core.EventPriority  and mx.core.IFactory
URL: https://github.com/apache/royale-asjs/pull/157
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index cfda2948f..010e0f7c2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -37,6 +37,8 @@ internal class MXRoyaleClasses
 	import mx.containers.ControlBar; ControlBar;
 	import mx.controls.ToolTip; ToolTip;
 	import mx.controls.beads.ToolTipBead; ToolTipBead;
+	import mx.core.EventPriority; EventPriority;
+	import mx.core.IFactory; IFactory;
 	import mx.collections.CursorBookmark; CursorBookmark;
 	import mx.collections.ICollectionView; ICollectionView;
 	import mx.collections.IViewCursor; IViewCursor;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/EventPriority.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/EventPriority.as
new file mode 100644
index 000000000..775b38bd9
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/EventPriority.as
@@ -0,0 +1,119 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.core
+{
+
+/**
+ *  The EventPriority class defines constant values
+ *  for the <code>priority</code> argument of the
+ *  <code>addEventListener()</code> method of EventDispatcher.
+ *
+ *  <p>The higher the number, the higher the priority of the event listener.
+ *  All listeners with priority <code>N</code> will be processed
+ *  before listeners of priority <code>N - 1</code>.
+ *  If two or more listeners share the same priority,
+ *  they are processed in the order in which they were added.</p>
+ *
+ *  <p>Priorities can be positive, 0, or negative.
+ *  The default priority is 0.</p>
+ *
+ *  <p>You should not write code that depends on the numeric values
+ *  of these constants.
+ *  They are subject to change in future versions of Flex.</p>
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public final class EventPriority
+{
+/* 	include "../core/Version.as";
+ */
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  The CursorManager has handlers for mouse events
+	 *  which must be executed before other mouse event handlers,
+	 *  so they have a high priority.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const CURSOR_MANAGEMENT:int = 200;
+	
+	/**
+	 *  Autogenerated event handlers that evaluate data-binding expressions
+	 *  need to be executed before any others, so they have a higher priority
+	 *  than the default.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const BINDING:int = 100;
+
+	/**
+	 *  Event handlers on component instances are executed with the default
+	 *  priority, <code>0</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const DEFAULT:int = 0;
+
+	/**
+	 *  Some components listen to events that they dispatch on themselves
+	 *  and let other listeners call the <code>preventDefault()</code>
+	 *  method to tell the component not to perform a default action.
+	 *  Those components must listen with a lower priority than the default
+	 *  priority, so that the other handlers are executed first and have
+	 *  a chance to call <code>preventDefault()</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const DEFAULT_HANDLER:int = -50;
+
+	/**
+	 *  Autogenerated event handlers that trigger effects are executed
+	 *  after other event handlers on component instances, so they have
+	 *  a lower priority than the default.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public static const EFFECT:int = -100;
+}
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IFactory.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IFactory.as
new file mode 100644
index 000000000..98d8fefd3
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IFactory.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.core
+{
+
+/**
+ *  The IFactory interface defines the interface that factory classes
+ *  such as ClassFactory must implement.
+ *  An object of type IFactory is a "factory object" which Flex uses
+ *  to generate multiple instances of another class, each with identical
+ *  properties.
+ *
+ *  <p>For example, a DataGridColumn has an <code>itemRenderer</code> of type
+ *  IFactory; it calls <code>itemRenderer.newInstance()</code> to create
+ *  the cells for a particular column of the DataGrid.</p>
+ *
+ *  @see mx.core.ClassFactory
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public interface IFactory
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Creates an instance of some class (determined by the class that
+	 *  implements IFactory).
+	 *
+	 *  @return The newly created instance.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	function newInstance():*;
+}
+
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services