Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MoveEvent.as and ValidationResultEvent.as Added (#149)
* MoveEvent.as Copied FlexSDK->Royale mx.events.MoveEvent Copied FlexSDK->Royale * Update MXRoyaleClasses.as for MoveEvent Update MXRoyaleClasses.as for MoveEvent * Update MoveEvent.as Update MoveEvent.as * ValidationResultEvent.as FlexSDK->Royale mx.events.ValidationResultEvent FlexSDK->Royale * Update ValidationResultEvent.as Update ValidationResultEvent.as * Update MXRoyaleClasses.as : ValidationResultEvent Update MXRoyaleClasses.as for ValidationResultEvent * MoveEvent Product Version Updated MoveEvent Product Version Updated * ValidationResultEvent Productversion Updated ValidationResultEvent Productversion Updated
- Loading branch information
1 parent
87cf932
commit 43641c2
Showing
3 changed files
with
402 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 161 additions & 0 deletions
161
frameworks/projects/MXRoyale/src/main/royale/mx/events/MoveEvent.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// 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.events | ||
{ | ||
/* import mx.events.Event;*/ | ||
import org.apache.royale.events.Event; | ||
import org.apache.royale.events.IRoyaleEvent; | ||
/** | ||
* Represents event objects that are dispatched when a Flex component moves. | ||
* | ||
* @see mx.core.UIComponent | ||
* | ||
* @langversion 3.0 | ||
* @playerversion Flash 9 | ||
* @playerversion AIR 1.1 | ||
* @productversion Royale 0.9.3 | ||
* @royalesuppresspublicvarwarning | ||
*/ | ||
public class MoveEvent extends Event | ||
{ | ||
/* include "../core/Version.as"; */ | ||
|
||
//-------------------------------------------------------------------------- | ||
// | ||
// Class constants | ||
// | ||
//-------------------------------------------------------------------------- | ||
|
||
/** | ||
* The <code>MoveEvent.MOVE</code> constant defines the value of the | ||
* <code>type</code> property of the event object for a <code>move</code> event. | ||
* | ||
* <p>The properties of the event object have the following values:</p> | ||
* <table class="innertable"> | ||
* <tr><th>Property</th><th>Value</th></tr> | ||
* <tr><td><code>bubbles</code></td><td>false</td></tr> | ||
* <tr><td><code>cancelable</code></td><td>false</td></tr> | ||
* <tr><td><code>currentTarget</code></td><td>The Object that defines the | ||
* event listener that handles the event. For example, if you use | ||
* <code>myButton.addEventListener()</code> to register an event listener, | ||
* myButton is the value of the <code>currentTarget</code>. </td></tr> | ||
* <tr><td><code>oldX</code></td><td>The previous x coordinate of the object, in pixels.</td></tr> | ||
* <tr><td><code>oldY</code></td><td>The previous y coordinate of the object, in pixels.</td></tr> | ||
* <tr><td><code>target</code></td><td>The Object that dispatched the event; | ||
* it is not always the Object listening for the event. | ||
* Use the <code>currentTarget</code> property to always access the | ||
* Object listening for the event.</td></tr> | ||
* </table> | ||
* | ||
* @eventType move | ||
* | ||
* @langversion 3.0 | ||
* @playerversion Flash 9 | ||
* @playerversion AIR 1.1 | ||
* @productversion Royale 0.9.3 | ||
*/ | ||
public static const MOVE:String = "move"; | ||
|
||
//-------------------------------------------------------------------------- | ||
// | ||
// Constructor | ||
// | ||
//-------------------------------------------------------------------------- | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param type The event type; indicates the action that caused the event. | ||
* | ||
* @param bubbles Specifies whether the event can bubble | ||
* up the display list hierarchy. | ||
* | ||
* @param cancelable Specifies whether the behavior | ||
* associated with the event can be prevented. | ||
* | ||
* @param oldX The previous x coordinate of the object, in pixels. | ||
* | ||
* @param oldY The previous y coordinate of the object, in pixels. | ||
* | ||
* @langversion 3.0 | ||
* @playerversion Flash 9 | ||
* @playerversion AIR 1.1 | ||
* @productversion Royale 0.9.3 | ||
*/ | ||
public function MoveEvent(type:String, bubbles:Boolean = false, | ||
cancelable:Boolean = false, | ||
oldX:Number = NaN, oldY:Number = NaN) | ||
{ | ||
super(type, bubbles, cancelable); | ||
|
||
this.oldX = oldX; | ||
this.oldY = oldY; | ||
} | ||
|
||
//-------------------------------------------------------------------------- | ||
// | ||
// Properties | ||
// | ||
//-------------------------------------------------------------------------- | ||
|
||
//---------------------------------- | ||
// oldX | ||
//---------------------------------- | ||
|
||
/** | ||
* The previous <code>x</code> coordinate of the object, in pixels. | ||
* | ||
* @langversion 3.0 | ||
* @playerversion Flash 9 | ||
* @playerversion AIR 1.1 | ||
* @productversion Royale 0.9.3 | ||
*/ | ||
public var oldX:Number; | ||
|
||
//---------------------------------- | ||
// oldY | ||
//---------------------------------- | ||
|
||
/** | ||
* The previous <code>y</code> coordinate of the object, in pixels. | ||
* | ||
* @langversion 3.0 | ||
* @playerversion Flash 9 | ||
* @playerversion AIR 1.1 | ||
* @productversion Royale 0.9.3 | ||
*/ | ||
public var oldY:Number; | ||
|
||
//-------------------------------------------------------------------------- | ||
// | ||
// Overridden methods: Event | ||
// | ||
//-------------------------------------------------------------------------- | ||
|
||
/** | ||
* @private | ||
*/ | ||
override public function cloneEvent():IRoyaleEvent | ||
{ | ||
return new MoveEvent(type, bubbles, cancelable, oldX, oldY); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.