From commits-return-5521-archive-asf-public=cust-asf.ponee.io@royale.apache.org Thu Sep 6 19:45:26 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id ED1A6180789 for ; Thu, 6 Sep 2018 19:45:22 +0200 (CEST) Received: (qmail 51157 invoked by uid 500); 6 Sep 2018 17:45:22 -0000 Mailing-List: contact commits-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list commits@royale.apache.org Received: (qmail 51148 invoked by uid 99); 6 Sep 2018 17:45:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2018 17:45:21 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 1EDAB85361; Thu, 6 Sep 2018 17:45:21 +0000 (UTC) Date: Thu, 06 Sep 2018 17:45:22 +0000 To: "commits@royale.apache.org" Subject: [royale-asjs] 02/03: get components used by Alina's app to compile in TDF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: aharui@apache.org In-Reply-To: <153625592049.32177.17722340390472127184@gitbox.apache.org> References: <153625592049.32177.17722340390472127184@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: royale-asjs X-Git-Refname: refs/heads/feature/MXRoyale X-Git-Reftype: branch X-Git-Rev: fda1d25281f17f0e1f6eb1ec9735ba13215fbda8 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180906174521.1EDAB85361@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch feature/MXRoyale in repository https://gitbox.apache.org/repos/asf/royale-asjs.git commit fda1d25281f17f0e1f6eb1ec9735ba13215fbda8 Author: Alex Harui AuthorDate: Thu Sep 6 10:24:58 2018 -0700 get components used by Alina's app to compile in TDF --- examples/mxroyale/tourdeflexmodules/build.xml | 58 +++- .../mxroyale/tourdeflexmodules/src/explorer.xml | 52 ++- .../src/mx/containers/FormExample.mxml | 6 +- .../src/mx/controls/ButtonExample.mxml | 4 +- .../src/mx/controls/SimpleAlert.mxml | 10 +- .../src/mx/controls/SimpleList.mxml | 13 + .../src/mx/effects/SequenceEffectExample.mxml | 2 +- .../src/mx/effects/SimpleEffectExample.mxml | 2 +- .../src/mx/effects/SimpleTweenEffectExample.mxml | 6 +- .../src/mx/effects/WipeDownExample.mxml | 2 +- .../src/mx/effects/WipeLeftExample.mxml | 2 +- .../src/mx/effects/WipeRightExample.mxml | 2 +- .../src/mx/effects/WipeUpExample.mxml | 2 +- .../src/mx/states/TransitionExample.mxml | 6 + .../main/royale/org/apache/royale/effects/Tween.as | 19 ++ .../src/main/resources/mx-royale-manifest.xml | 6 + .../MXRoyale/src/main/royale/MXRoyaleClasses.as | 3 +- .../royale/mx/charts/chartClasses/ChartBase.as | 48 --- .../royale/mx/collections/ListCollectionView.as | 2 +- .../MXRoyale/src/main/royale/mx/containers/Box.as | 23 -- .../src/main/royale/mx/containers/Panel.as | 46 +++ .../MXRoyale/src/main/royale/mx/controls/Button.as | 12 - .../src/main/royale/mx/controls/ColorPicker.as | 41 ++- .../src/main/royale/mx/controls/ComboBox.as | 96 +----- .../src/main/royale/mx/controls/DateChooser.as | 53 +++- .../src/main/royale/mx/controls/DateField.as | 18 +- .../MXRoyale/src/main/royale/mx/controls/Label.as | 4 +- .../main/royale/mx/controls/RadioButtonGroup.as | 2 +- .../src/main/royale/mx/controls/TextInput.as | 33 -- .../MXRoyale/src/main/royale/mx/core/Container.as | 295 ++++++++++++----- .../src/main/royale/mx/core/ScrollControlBase.as | 72 ++--- .../src/main/royale/mx/core/UIComponent.as | 348 ++++++++++++++------- .../MXRoyale/src/main/royale/mx/effects/Pause.as | 64 ++++ .../src/main/royale/mx/effects/WipeDown.as | 96 ++++++ .../src/main/royale/mx/effects/WipeLeft.as | 96 ++++++ .../src/main/royale/mx/effects/WipeRight.as | 96 ++++++ .../MXRoyale/src/main/royale/mx/effects/WipeUp.as | 96 ++++++ .../src/main/royale/mx/effects/easing/Bounce.as | 134 ++++++++ .../src/main/royale/mx/states/Transition.as | 264 ++++++++++++++++ .../main/royale/mx/validators/EmailValidator.as | 2 +- .../main/royale/mx/validators/NumberValidator.as | 46 +++ .../royale/mx/validators/RegExpValidationResult.as | 147 +++++++++ .../main/royale/mx/validators/RegExpValidator.as | 10 +- .../main/royale/mx/validators/StringValidator.as | 32 +- .../main/royale/mx/validators/ValidationResult.as | 147 +++++++++ .../src/main/royale/mx/validators/Validator.as | 4 +- 46 files changed, 2024 insertions(+), 498 deletions(-) diff --git a/examples/mxroyale/tourdeflexmodules/build.xml b/examples/mxroyale/tourdeflexmodules/build.xml index ed4e57a..49b08bb 100644 --- a/examples/mxroyale/tourdeflexmodules/build.xml +++ b/examples/mxroyale/tourdeflexmodules/build.xml @@ -131,6 +131,7 @@ + + @@ -163,23 +167,31 @@ + + + + @@ -188,25 +200,34 @@ + + + + + + + + + + + + + + + + @@ -273,8 +315,10 @@ + @@ -316,6 +360,7 @@ + + @@ -435,7 +481,9 @@ + @@ -477,6 +525,10 @@ + + + + diff --git a/examples/mxroyale/tourdeflexmodules/src/explorer.xml b/examples/mxroyale/tourdeflexmodules/src/explorer.xml index 3fcd6ed..03ef158 100755 --- a/examples/mxroyale/tourdeflexmodules/src/explorer.xml +++ b/examples/mxroyale/tourdeflexmodules/src/explorer.xml @@ -25,27 +25,39 @@ + + + + + + @@ -57,11 +69,15 @@ + + - @@ -97,9 +111,11 @@ + + + + + + + + + + @@ -161,6 +195,7 @@ + + @@ -285,12 +323,14 @@ + @@ -317,7 +357,9 @@ + @@ -358,9 +400,11 @@ + @@ -408,6 +454,7 @@ + diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/containers/FormExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/containers/FormExample.mxml index c7f3e07..5cbc884 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/containers/FormExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/containers/FormExample.mxml @@ -22,6 +22,7 @@ height="100%" width="100%"> + + + - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml index 1b97304..2e66589 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml @@ -24,7 +24,7 @@ diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleList.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleList.mxml index 7ee21e8..a6ec4ee 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleList.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleList.mxml @@ -25,11 +25,23 @@ + - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml index 57c8c14..57f1c8a 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleEffectExample.mxml @@ -55,7 +55,7 @@ text="Use the Button controls to control the Resize effect."/> + source="assets/ApacheFlexLogo.png"/> diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml index 1d2e950..ea81875 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/SimpleTweenEffectExample.mxml @@ -24,10 +24,10 @@ + source="assets/ApacheFlexLogo.png"/> diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml index bb0d690..39cddbe 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeDownExample.mxml @@ -38,7 +38,7 @@ visible="{cb1.selected}" hideEffect="{wipeOut}" showEffect="{wipeIn}"/> - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml index b4cb698..e85183b 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeLeftExample.mxml @@ -38,7 +38,7 @@ visible="{cb1.selected}" hideEffect="{wipeOut}" showEffect="{wipeIn}"/> - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml index d65208e..9c8d4f5 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeRightExample.mxml @@ -38,7 +38,7 @@ visible="{cb1.selected}" hideEffect="{wipeOut}" showEffect="{wipeIn}"/> - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml index 592d2f1..8cbbb17 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/WipeUpExample.mxml @@ -38,7 +38,7 @@ visible="{cb1.selected}" hideEffect="{wipeOut}" showEffect="{wipeIn}"/> - diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/states/TransitionExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/states/TransitionExample.mxml index 0a94aa4..db66588 100755 --- a/examples/mxroyale/tourdeflexmodules/src/mx/states/TransitionExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/mx/states/TransitionExample.mxml @@ -30,6 +30,7 @@ + + + + diff --git a/frameworks/projects/Effects/src/main/royale/org/apache/royale/effects/Tween.as b/frameworks/projects/Effects/src/main/royale/org/apache/royale/effects/Tween.as index d2cdb74..d573ebe 100644 --- a/frameworks/projects/Effects/src/main/royale/org/apache/royale/effects/Tween.as +++ b/frameworks/projects/Effects/src/main/royale/org/apache/royale/effects/Tween.as @@ -26,6 +26,11 @@ import org.apache.royale.events.ValueEvent; import org.apache.royale.events.Event; import org.apache.royale.events.EventDispatcher; +[Event(name="tweenEnd", type="org.apache.royale.events.ValueEvent")] +[Event(name="tweenStart", type="org.apache.royale.events.ValueEvent")] +[Event(name="tweenUpdate", type="org.apache.royale.events.ValueEvent")] +[Event(name="effectEnd", type="org.apache.royale.events.Event")] + /** * Tween is the underlying animation class for the effects in Royale. * @@ -581,6 +586,20 @@ public class Tween extends Effect } /** + * Stops the tween, ending it without dispatching an event or calling + * the Tween's endFunction or onTweenEnd(). + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 1.0.0 + */ + public function end():void + { + seek(duration); + } + + /** * Advances the tween effect to the specified position. * * @param playheadTime The position, in milliseconds, between 0 diff --git a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml index 0358b09..93bfde5 100644 --- a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml +++ b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml @@ -64,6 +64,7 @@ + @@ -151,5 +152,10 @@ + + + + + diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as index 81e28b4..40c3861 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as +++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as @@ -95,7 +95,8 @@ internal class MXRoyaleClasses import mx.logging.Log; Log; import mx.charts.chartClasses.Series; Series; import mx.charts.chartClasses.GraphicsUtilities; GraphicsUtilities; - import mx.effects.easing.Exponential; Exponential; + import mx.effects.easing.Bounce; Bounce; + import mx.effects.easing.Exponential; Exponential; import mx.effects.effectClasses.TweenEffectInstance; TweenEffectInstance; import mx.effects.TweenEffect; TweenEffect; import mx.rpc.Fault; Fault; diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/ChartBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/ChartBase.as index 6aad835..46d24ca 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/ChartBase.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/charts/chartClasses/ChartBase.as @@ -100,54 +100,6 @@ package mx.charts.chartClasses updateDataTips(); */ } - public function get paddingLeft():Number - { - return 0; - } - - /** - * @private - */ - public function set paddingLeft(value:Number):void - { - } - - public function get paddingRight():Number - { - return 0; - } - - /** - * @private - */ - public function set paddingRight(value:Number):void - { - } - - public function get paddingTop():Number - { - return 0; - } - - /** - * @private - */ - public function set paddingTop(value:Number):void - { - } - - public function get paddingBottom():Number - { - return 0; - } - - /** - * @private - */ - public function set paddingBottom(value:Number):void - { - } - public function get series():Array { return null; diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as index 0452d98..011c4e9 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ListCollectionView.as @@ -1992,7 +1992,7 @@ use namespace mx_internal; */ [Event(name="cursorUpdate", type="mx.events.FlexEvent")] -[ResourceBundle("collections")] +//[ResourceBundle("collections")] /** * @private diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Box.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Box.as index 91c69d0..3a534b7 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Box.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Box.as @@ -210,29 +210,6 @@ public class Box extends Container } - /** - * horizontalAlign (was a style in Flex) - * - * @inheritDoc - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Flex 3 - */ - public function get horizontalAlign():String - { - if (GOOG::DEBUG) - trace("Box:horizontalAlign not implemented"); - return null; - } - public function set horizontalAlign(value:String):void - { - if (GOOG::DEBUG) - trace("Box:horizontalAlign not implemented"); - } - - //-------------------------------------------------------------------------- // // Overridden methods diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as index cb9f0bf..d972990 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Panel.as @@ -67,6 +67,7 @@ use namespace mx_internal; import mx.containers.beads.PanelView; import mx.containers.beads.models.PanelModel; import mx.core.Container; + import org.apache.royale.core.IChild; import org.apache.royale.events.Event; @@ -588,6 +589,51 @@ public class Panel extends Container (model as PanelModel).layout = value; } + //---------------------------------- + // status + //---------------------------------- + + /** + * @private + * Storage for the status property. + */ + private var _status:String = ""; + + /** + * @private + */ + //private var _statusChanged:Boolean = false; + + [Bindable("statusChanged")] + [Inspectable(category="General", defaultValue="")] + + /** + * Text in the status area of the title bar. + * + * @default "" + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get status():String + { + return _status; + } + + /** + * @private + */ + public function set status(value:String):void + { + _status = value; + //_statusChanged = true; + + //invalidateProperties(); + + dispatchEvent(new Event("statusChanged")); + } //---------------------------------- diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as index feb5680..a4d5fd0 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as @@ -266,18 +266,6 @@ public class Button extends UIComponent implements IDataRenderer } // ------------------------------------------------ - // paddingRight - // ------------------------------------------------ - - public function get paddingRight():Number - { - return 0; - } - public function set paddingRight(value:Number):void - { - } - - // ------------------------------------------------ // fontStyle // ------------------------------------------------ diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ColorPicker.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ColorPicker.as index 37dac62..f9cdeba 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ColorPicker.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ColorPicker.as @@ -82,7 +82,7 @@ use namespace mx_internal; * @playerversion AIR 1.1 * @productversion Royale 0.9.3 */ -[Event(name="close", type="mx.events.DropdownEvent")] +[Event(name="close", type="org.apache.royale.events.Event")] /** * Dispatched if the ColorPicker editable @@ -581,6 +581,45 @@ public class ColorPicker extends ComboBase //-------------------------------------------------------------------------- //---------------------------------- + // showTextField + //---------------------------------- + + /** + * @private + * Storage for the showTextField property. + */ + private var _showTextField:Boolean = true; + + [Inspectable(category="General", defaultValue="true")] + + /** + * Specifies whether to show the text box that displays the color + * label or hexadecimal color value. + * + * @default true + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get showTextField():Boolean + { + return _showTextField; + } + + /** + * @private + */ + public function set showTextField(value:Boolean):void + { + _showTextField = value; + + //if (dropdownSwatch) + // dropdownSwatch.showTextField = value; + } + + //---------------------------------- // selectedColor //---------------------------------- diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as index 62a5c72..ff9d35a 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as @@ -115,7 +115,7 @@ use namespace mx_internal; * @playerversion AIR 1.1 * @productversion Flex 3 */ -[Event(name="close", type="mx.events.DropdownEvent")] +[Event(name="close", type="org.apache.royale.events.Event")] /** * Dispatched when the data property changes. @@ -189,7 +189,7 @@ use namespace mx_internal; * @playerversion AIR 1.1 * @productversion Flex 3 */ -[Event(name="open", type="mx.events.DropdownEvent")] +[Event(name="open", type="org.apache.royale.events.Event")] /** * Dispatched when the user scrolls the ComboBox control's drop-down list. @@ -697,98 +697,6 @@ public class ComboBox extends ComboBase return (view as IComboBoxView).popUp; } - /** - * Number of pixels between the container's top border - * and the top of its content area. - * - * @default 0 - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function get paddingTop():Object - { - if (GOOG::DEBUG) - trace("paddingTop not implemented"); - return 0; - } - public function set paddingTop(value:Object):void - { - if (GOOG::DEBUG) - trace("paddingTop not implemented"); - } - - /** - * Number of pixels between the container's bottom border - * and the bottom of its content area. - * - * @default 0 - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function get paddingBottom():Object - { - if (GOOG::DEBUG) - trace("paddingBottom not implemented"); - return 0; - } - public function set paddingBottom(value:Object):void - { - if (GOOG::DEBUG) - trace("paddingBottom not implemented"); - } - - /** - * Number of pixels between the container's left border - * and the left of its content area. - * - * @default 0 - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function get paddingLeft():Object - { - if (GOOG::DEBUG) - trace("paddingLeft not implemented"); - return 0; - } - public function set paddingLeft(value:Object):void - { - if (GOOG::DEBUG) - trace("paddingLeft not implemented"); - } - - /** - * Number of pixels between the container's right border - * and the right of its content area. - * - * @default 0 - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 - */ - public function get paddingRight():Object - { - if (GOOG::DEBUG) - trace("paddingRight not implemented"); - return 0; - } - public function set paddingRight(value:Object):void - { - if (GOOG::DEBUG) - trace("paddingRight not implemented"); - } - //-------------------------------------------------------------------------- // diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateChooser.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateChooser.as index b88f023..b9aa970 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateChooser.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateChooser.as @@ -25,7 +25,7 @@ COMPILE::JS { import mx.core.UIComponent; import mx.core.mx_internal; - import mx.events.CalendarLayoutChangeEvent; +// import mx.events.CalendarLayoutChangeEvent; import org.apache.royale.core.IBeadLayout; import org.apache.royale.core.ILayoutHost; @@ -60,7 +60,7 @@ use namespace mx_internal; * @playerversion AIR 1.1 * @productversion Flex 3 */ -[Event(name="change", type="mx.events.CalendarLayoutChangeEvent")] +[Event(name="change", type="org.apache.royale.events.Event")] /** * Dispatched when the month changes due to user interaction. @@ -983,6 +983,55 @@ public class DateChooser extends UIComponent implements ILayoutParent, ILayoutVi return dates; } + //---------------------------------- + // yearNavigationEnabled + //---------------------------------- + + /** + * @private + * Storage for the yearNavigationEnabled property. + */ + private var _yearNavigationEnabled:Boolean = false; + + /** + * @private + */ + //private var yearNavigationEnabledChanged:Boolean = false; + + [Bindable("yearNavigationEnabledChanged")] + [Inspectable(defaultValue="false")] + + /** + * Enables year navigation. When true + * an up and down button appear to the right + * of the displayed year. You can use these buttons + * to change the current year. + * These button appear to the left of the year in locales where year comes + * before the month in the date format. + * + * @default false + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get yearNavigationEnabled():Boolean + { + return _yearNavigationEnabled; + } + + /** + * @private + */ + public function set yearNavigationEnabled(value:Boolean):void + { + _yearNavigationEnabled = value; + // yearNavigationEnabledChanged = true; + + // invalidateProperties(); + } + //-------------------------------------------------------------------------- // // Overridden event handlers: UIComponent diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as index 46eefc5..ad23193 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DateField.as @@ -1046,7 +1046,7 @@ public class DateField extends ComboBase * @private * Storage for the disabledRanges property. */ - // private var _disabledRanges:Array = []; + private var _disabledRanges:Array = []; /** * @private @@ -1099,22 +1099,22 @@ public class DateField extends ComboBase * @playerversion AIR 1.1 * @productversion Flex 3 */ - /* public function get disabledRanges():Array + public function get disabledRanges():Array { return _disabledRanges; - } */ + } /** * @private */ - /* public function set disabledRanges(value:Array):void + public function set disabledRanges(value:Array):void { - _disabledRanges = scrubTimeValues(value); - disabledRangesChanged = true; - updateDateFiller = true; + _disabledRanges = /*scrubTimeValues(*/value/*)*/; + // disabledRangesChanged = true; + // updateDateFiller = true; - invalidateProperties(); - } */ + // invalidateProperties(); + } //---------------------------------- // displayedMonth diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as index a555092..545d6b6 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as @@ -618,7 +618,7 @@ public class Label extends UIComponent * @playerversion AIR 1.1 * @productversion Flex 3 */ - public function get html():String + public function get htmlText():String { COMPILE::SWF { @@ -633,7 +633,7 @@ public class Label extends UIComponent /** * @private */ - public function set html(value:String):void + public function set htmlText(value:String):void { COMPILE::SWF { diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButtonGroup.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButtonGroup.as index bc9204e..cc8b73f 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButtonGroup.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButtonGroup.as @@ -71,7 +71,7 @@ use namespace mx_internal; * @playerversion AIR 1.1 * @productversion Flex 3 */ -[Event(name="itemClick", type="org.apache.royale.events.ItemClickEvent")] +[Event(name="itemClick", type="mx.events.ItemClickEvent")] /** * The RadioButtonGroup control defines a group of RadioButton controls diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as index 1658116..e15a444 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as @@ -411,39 +411,6 @@ public class TextInput extends UIComponent implements ITextInput // Properties // //-------------------------------------------------------------------------- - - public function get paddingLeft():Number - { - return 0; - } - - public function set paddingLeft(value:Number):void - { - } - public function get paddingRight():Number - { - return 0; - } - - public function set paddingRight(value:Number):void - { - } - public function get paddingTop():Number - { - return 0; - } - - public function set paddingTop(value:Number):void - { - } - public function get paddingBottom():Number - { - return 0; - } - - public function set paddingBottom(value:Number):void - { - } //---------------------------------- // data diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as index cff7c5e..f14f587 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as @@ -19,29 +19,29 @@ package mx.core { - import org.apache.royale.binding.DataBindingBase; import org.apache.royale.binding.ContainerDataBinding; - import org.apache.royale.core.ContainerBaseStrandChildren; - import org.apache.royale.core.IBeadLayout; - import org.apache.royale.core.IBorderPaddingMarginValuesImpl - import org.apache.royale.core.IChild; - import org.apache.royale.core.IContainer; - import org.apache.royale.core.IContentViewHost; - import org.apache.royale.core.ILayoutHost; - import org.apache.royale.core.ILayoutParent; - import org.apache.royale.core.ILayoutView; - import org.apache.royale.core.IMXMLDocument; - import org.apache.royale.core.IParent; - import org.apache.royale.core.IStatesImpl; - import org.apache.royale.core.IContainerBaseStrandChildrenHost; + import org.apache.royale.binding.DataBindingBase; + import org.apache.royale.core.ContainerBaseStrandChildren; + import org.apache.royale.core.IBeadLayout; + import org.apache.royale.core.IBorderPaddingMarginValuesImpl; + import org.apache.royale.core.IChild; + import org.apache.royale.core.IContainer; + import org.apache.royale.core.IContainerBaseStrandChildrenHost; + import org.apache.royale.core.IContentViewHost; + import org.apache.royale.core.ILayoutHost; + import org.apache.royale.core.ILayoutParent; + import org.apache.royale.core.ILayoutView; + import org.apache.royale.core.IMXMLDocument; + import org.apache.royale.core.IParent; + import org.apache.royale.core.IStatesImpl; + import org.apache.royale.core.ValuesManager; import org.apache.royale.core.layout.EdgeData; - import org.apache.royale.core.ValuesManager; - import org.apache.royale.events.Event; - import org.apache.royale.events.ValueChangeEvent; - import org.apache.royale.events.ValueEvent; - import org.apache.royale.states.State; - import org.apache.royale.utils.MXMLDataInterpreter; - import org.apache.royale.utils.loadBeadFromValuesManager; + import org.apache.royale.events.Event; + import org.apache.royale.events.ValueChangeEvent; + import org.apache.royale.events.ValueEvent; + import org.apache.royale.states.State; + import org.apache.royale.utils.MXMLDataInterpreter; + import org.apache.royale.utils.loadBeadFromValuesManager; COMPILE::JS { @@ -80,6 +80,7 @@ import mx.events.ChildExistenceChangedEvent; import mx.events.FlexEvent; import mx.events.IndexChangedEvent; import mx.managers.IFocusManagerContainer; + COMPILE::SWF { import flash.display.DisplayObject; @@ -317,11 +318,11 @@ use namespace mx_internal; public class Container extends UIComponent implements IDataRenderer, IChildList, IContainer, ILayoutParent, ILayoutView, IContentViewHost, - IContainerBaseStrandChildrenHost, IMXMLDocument, IFocusManagerContainer + IContainerBaseStrandChildrenHost, IMXMLDocument, IFocusManagerContainer, //implements IContainer, IDataRenderer, //IListItemRenderer, //IRawChildrenContainer, IChildList, IVisualElementContainer, - //INavigatorContent + INavigatorContent { @@ -391,65 +392,137 @@ public class Container extends UIComponent super(); typeNames = "Container"; } - + + //---------------------------------- + // horizontalScrollPolicy + //---------------------------------- + /** - * Number of pixels between the container's top border - * and the top of its content area. + * @private + * Storage for the horizontalScrollPolicy property. + */ + private var _horizontalScrollPolicy:String = ScrollPolicy.OFF; + + [Bindable("horizontalScrollPolicyChanged")] + [Inspectable(enumeration="off,on,auto", defaultValue="off")] + + /** + * A property that indicates whether the horizontal scroll + * bar is always on, always off, + * or automatically changes based on the parameters passed to the + * setScrollBarProperties() method. + * Allowed values are ScrollPolicy.ON, + * ScrollPolicy.OFF, and ScrollPolicy.AUTO. + * MXML values can be "on", "off", + * and "auto". * - * @default 0 + *

Setting this property to ScrollPolicy.OFF for ListBase + * subclasses does not affect the horizontalScrollPosition + * property; you can still scroll the contents programmatically.

+ * + *

Note that the policy can affect the measured size of the component + * If the policy is ScrollPolicy.AUTO the + * scrollbar is not factored in the measured size. This is done to + * keep the layout from recalculating when the scrollbar appears. If you + * know that you will have enough data for scrollbars you should set + * the policy to ScrollPolicy.ON. If you + * don't know, you may need to set an explicit width or height on + * the component to allow for scrollbars to appear later.

+ * + * @default ScrollPolicy.OFF * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 + * @productversion Flex 3 */ - public function get paddingTop():Object + public function get horizontalScrollPolicy():String { - if (GOOG::DEBUG) - trace("paddingTop not implemented"); - return 0; + return _horizontalScrollPolicy; } - public function set paddingTop(value:Object):void + + /** + * @private + */ + public function set horizontalScrollPolicy(value:String):void { - if (GOOG::DEBUG) - trace("paddingTop not implemented"); + var newPolicy:String = value.toLowerCase(); + + if (_horizontalScrollPolicy != newPolicy) + { + _horizontalScrollPolicy = newPolicy; + // invalidateDisplayList(); + + dispatchEvent(new Event("horizontalScrollPolicyChanged")); + } } + //---------------------------------- + // verticalScrollPolicy + //---------------------------------- + /** - * Number of pixels between the container's bottom border - * and the bottom of its content area. + * @private + * Storage for the verticalScrollPolicy property. + */ + private var _verticalScrollPolicy:String = ScrollPolicy.AUTO; + + [Bindable("verticalScrollPolicyChanged")] + [Inspectable(enumeration="off,on,auto", defaultValue="auto")] + + /** + * A property that indicates whether the vertical scroll bar is always on, always off, + * or automatically changes based on the parameters passed to the + * setScrollBarProperties() method. + * Allowed values are ScrollPolicy.ON, + * ScrollPolicy.OFF, and ScrollPolicy.AUTO. + * MXML values can be "on", "off", + * and "auto". + * + *

Setting this property to ScrollPolicy.OFF for ListBase + * subclasses does not affect the verticalScrollPosition + * property; you can still scroll the contents programmatically.

* - * @default 0 + *

Note that the policy can affect the measured size of the component + * If the policy is ScrollPolicy.AUTO the + * scrollbar is not factored in the measured size. This is done to + * keep the layout from recalculating when the scrollbar appears. If you + * know that you will have enough data for scrollbars you should set + * the policy to ScrollPolicy.ON. If you + * don't know, you may need to set an explicit width or height on + * the component to allow for scrollbars to appear later.

+ * + * @default ScrollPolicy.AUTO * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 + * @productversion Flex 3 */ - - public function get borderVisible():Boolean + public function get verticalScrollPolicy():String { - return true; + return _verticalScrollPolicy; } - public function set borderVisible(value:Boolean):void + + /** + * @private + */ + public function set verticalScrollPolicy(value:String):void { + var newPolicy:String = value.toLowerCase(); + + if (_verticalScrollPolicy != newPolicy) + { + _verticalScrollPolicy = newPolicy; + // invalidateDisplayList(); + + dispatchEvent(new Event("verticalScrollPolicyChanged")); + } } - public function get paddingBottom():Object - { - if (GOOG::DEBUG) - trace("paddingBottom not implemented"); - return 0; - } - public function set paddingBottom(value:Object):void - { - if (GOOG::DEBUG) - trace("paddingBottom not implemented"); - } - - /** - * Number of pixels between the container's left border - * and the left of its content area. + /** + * Number of pixels between the container's bottom border + * and the bottom of its content area. * * @default 0 * @@ -458,64 +531,61 @@ public class Container extends UIComponent * @playerversion AIR 1.1 * @productversion Royale 0.9.3 */ - public function get paddingLeft():Object + + public function get borderVisible():Boolean { - if (GOOG::DEBUG) - trace("paddingLeft not implemented"); - return 0; + return true; } - public function set paddingLeft(value:Object):void + public function set borderVisible(value:Boolean):void { - if (GOOG::DEBUG) - trace("paddingLeft not implemented"); } - /** - * Number of pixels between the container's right border - * and the right of its content area. - * - * @default 0 + /** + * Number of pixels between children in the vertical direction. + * The default value depends on the component class; + * if not overridden for the class, the default value is 6. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Royale 0.9.3 */ - public function get paddingRight():Object + public function get verticalGap():Object { if (GOOG::DEBUG) - trace("paddingRight not implemented"); + trace("verticalGap not implemented"); return 0; } - public function set paddingRight(value:Object):void + public function set verticalGap(value:Object):void { if (GOOG::DEBUG) - trace("paddingRight not implemented"); + trace("verticalGap not implemented"); } - + /** - * Number of pixels between children in the vertical direction. - * The default value depends on the component class; - * if not overridden for the class, the default value is 6. + * horizontalAlign (was a style in Flex) + * + * @inheritDoc * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 - * @productversion Royale 0.9.3 + * @productversion Flex 3 */ - public function get verticalGap():Object + public function get horizontalAlign():String { if (GOOG::DEBUG) - trace("verticalGap not implemented"); - return 0; + trace("Container:horizontalAlign not implemented"); + return null; } - public function set verticalGap(value:Object):void + public function set horizontalAlign(value:String):void { if (GOOG::DEBUG) - trace("verticalGap not implemented"); + trace("Container:horizontalAlign not implemented"); } - - public function get horizontalGap():Object + + + public function get horizontalGap():Object { if (GOOG::DEBUG) trace("horizontalGap not implemented"); @@ -574,6 +644,59 @@ public class Container extends UIComponent trace("backgroundColor not implemented"); } + //---------------------------------- + // icon + //---------------------------------- + + /** + * @private + * Storage for the icon property. + */ + private var _icon:Class = null; + + [Bindable("iconChanged")] + [Inspectable(category="General", defaultValue="", format="EmbeddedFile")] + + /** + * The Class of the icon displayed by some navigator + * containers to represent this Container. + * + *

For example, if this Container is a child of a TabNavigator, + * this icon appears in the corresponding tab. + * If this Container is a child of an Accordion, + * this icon appears in the corresponding header.

+ * + *

To embed the icon in the SWF file, use the @Embed() + * MXML compiler directive:

+ * + *
+     *    icon="@Embed('filepath')"
+     *  
+ * + *

The image can be a JPEG, GIF, PNG, SVG, or SWF file.

+ * + * @default null + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get icon():Class + { + return _icon; + } + + /** + * @private + */ + public function set icon(value:Class):void + { + _icon = value; + + dispatchEvent(new Event("iconChanged")); + } + private var _label:String; /* * @langversion 3.0 diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as index 2dba2ed..4c5901a 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/ScrollControlBase.as @@ -398,10 +398,10 @@ public class ScrollControlBase extends UIComponent * @private * Storage for the horizontalScrollPolicy property. */ -// mx_internal var _horizontalScrollPolicy:String = ScrollPolicy.OFF; + private var _horizontalScrollPolicy:String = ScrollPolicy.OFF; -// [Bindable("horizontalScrollPolicyChanged")] -// [Inspectable(enumeration="off,on,auto", defaultValue="off")] + [Bindable("horizontalScrollPolicyChanged")] + [Inspectable(enumeration="off,on,auto", defaultValue="off")] /** * A property that indicates whether the horizontal scroll @@ -433,26 +433,26 @@ public class ScrollControlBase extends UIComponent * @playerversion AIR 1.1 * @productversion Flex 3 */ -// public function get horizontalScrollPolicy():String -// { -// return _horizontalScrollPolicy; -// } + public function get horizontalScrollPolicy():String + { + return _horizontalScrollPolicy; + } /** * @private */ -// public function set horizontalScrollPolicy(value:String):void -// { -// var newPolicy:String = value.toLowerCase(); -// -// if (_horizontalScrollPolicy != newPolicy) -// { -// _horizontalScrollPolicy = newPolicy; + public function set horizontalScrollPolicy(value:String):void + { + var newPolicy:String = value.toLowerCase(); + + if (_horizontalScrollPolicy != newPolicy) + { + _horizontalScrollPolicy = newPolicy; // invalidateDisplayList(); -// -// dispatchEvent(new Event("horizontalScrollPolicyChanged")); -// } -// } + + dispatchEvent(new Event("horizontalScrollPolicyChanged")); + } + } //---------------------------------- // liveScrolling @@ -733,10 +733,10 @@ public class ScrollControlBase extends UIComponent * @private * Storage for the verticalScrollPolicy property. */ -// mx_internal var _verticalScrollPolicy:String = ScrollPolicy.AUTO; + private var _verticalScrollPolicy:String = ScrollPolicy.AUTO; -// [Bindable("verticalScrollPolicyChanged")] -// [Inspectable(enumeration="off,on,auto", defaultValue="auto")] + [Bindable("verticalScrollPolicyChanged")] + [Inspectable(enumeration="off,on,auto", defaultValue="auto")] /** * A property that indicates whether the vertical scroll bar is always on, always off, @@ -767,26 +767,26 @@ public class ScrollControlBase extends UIComponent * @playerversion AIR 1.1 * @productversion Flex 3 */ -// public function get verticalScrollPolicy():String -// { -// return _verticalScrollPolicy; -// } + public function get verticalScrollPolicy():String + { + return _verticalScrollPolicy; + } /** * @private */ -// public function set verticalScrollPolicy(value:String):void -// { -// var newPolicy:String = value.toLowerCase(); -// -// if (_verticalScrollPolicy != newPolicy) -// { -// _verticalScrollPolicy = newPolicy; + public function set verticalScrollPolicy(value:String):void + { + var newPolicy:String = value.toLowerCase(); + + if (_verticalScrollPolicy != newPolicy) + { + _verticalScrollPolicy = newPolicy; // invalidateDisplayList(); -// -// dispatchEvent(new Event("verticalScrollPolicyChanged")); -// } -// } + + dispatchEvent(new Event("verticalScrollPolicyChanged")); + } + } //-------------------------------------------------------------------------- // diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as index e6231b6..d433cc6 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as @@ -42,8 +42,10 @@ import flash.events.FocusEvent; import flash.events.IEventDispatcher; */ +import mx.charts.chartClasses.IAxis; import mx.controls.beads.ToolTipBead; import mx.display.Graphics; +import mx.events.EffectEvent; import mx.events.FlexEvent; import mx.events.MoveEvent; import mx.events.PropertyChangeEvent; @@ -54,7 +56,6 @@ import mx.managers.IFocusManagerContainer; import mx.managers.ISystemManager; import mx.styles.IStyleManager2; import mx.styles.StyleManager; -import mx.charts.chartClasses.IAxis; import org.apache.royale.core.CallLaterBead; import org.apache.royale.core.IStatesImpl; @@ -63,8 +64,10 @@ import org.apache.royale.core.IUIBase; import org.apache.royale.core.TextLineMetrics; import org.apache.royale.core.UIBase; import org.apache.royale.core.ValuesManager; +import org.apache.royale.effects.IEffect; import org.apache.royale.events.Event; import org.apache.royale.events.KeyboardEvent; +import org.apache.royale.events.MouseEvent; import org.apache.royale.events.ValueChangeEvent; import org.apache.royale.geom.Point; import org.apache.royale.geom.Rectangle; @@ -320,27 +323,6 @@ import org.apache.royale.utils.loadBeadFromValuesManager; /** - * Played when the user rolls the mouse over the component. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Flex 3 - */ -[Effect(name="rollOverEffect", event="rollOver")] - -/** - * Played when the user rolls the mouse so it is no longer over the component. - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Flex 3 - */ -[Effect(name="rollOutEffect", event="rollOut")] - - -/** * The UIComponent class is the base class for all visual components, * both interactive and noninteractive. * @@ -2811,70 +2793,6 @@ COMPILE::JS } - //---------------------------------- - // horizontalScrollPolicy - //---------------------------------- - - /** - * @private - * Storage for the horizontalScrollPolicy property. - */ - private var _horizontalScrollPolicy:String = ScrollPolicy.OFF; - - [Bindable("horizontalScrollPolicyChanged")] - [Inspectable(enumeration="off,on,auto", defaultValue="off")] - - /** - * A property that indicates whether the horizontal scroll - * bar is always on, always off, - * or automatically changes based on the parameters passed to the - * setScrollBarProperties() method. - * Allowed values are ScrollPolicy.ON, - * ScrollPolicy.OFF, and ScrollPolicy.AUTO. - * MXML values can be "on", "off", - * and "auto". - * - *

Setting this property to ScrollPolicy.OFF for ListBase - * subclasses does not affect the horizontalScrollPosition - * property; you can still scroll the contents programmatically.

- * - *

Note that the policy can affect the measured size of the component - * If the policy is ScrollPolicy.AUTO the - * scrollbar is not factored in the measured size. This is done to - * keep the layout from recalculating when the scrollbar appears. If you - * know that you will have enough data for scrollbars you should set - * the policy to ScrollPolicy.ON. If you - * don't know, you may need to set an explicit width or height on - * the component to allow for scrollbars to appear later.

- * - * @default ScrollPolicy.OFF - * - * @langversion 3.0 - * @playerversion Flash 9 - * @playerversion AIR 1.1 - * @productversion Flex 3 - */ - public function get horizontalScrollPolicy():String - { - return _horizontalScrollPolicy; - - } - - /** - * @private - */ - public function set horizontalScrollPolicy(value:String):void - { - var newPolicy:String = value.toLowerCase(); - - if (_horizontalScrollPolicy != newPolicy) - { - _horizontalScrollPolicy = newPolicy; - // invalidateDisplayList(); - - // dispatchEvent(new Event("horizontalScrollPolicyChanged")); - } - } //-------------------------------------------------------------------------- // @@ -3938,14 +3856,11 @@ COMPILE::JS */ public function get left():Object { - if (GOOG::DEBUG) - trace("left not implemented"); - return 0; + return ValuesManager.valuesImpl.getValue(this, "left"); } public function set left(value:Object):void { - if (GOOG::DEBUG) - trace("left not implemented"); + setStyle("left", value); } [Inspectable(category="General")] @@ -3970,14 +3885,11 @@ COMPILE::JS */ public function get right():Object { - if (GOOG::DEBUG) - trace("right not implemented"); - return 0; + return ValuesManager.valuesImpl.getValue(this, "right"); } public function set right(value:Object):void { - if (GOOG::DEBUG) - trace("right not implemented"); + setStyle("right", value); } [Inspectable(category="General")] @@ -4002,14 +3914,11 @@ COMPILE::JS */ public function get top():Object { - if (GOOG::DEBUG) - trace("top not implemented"); - return 0; + return ValuesManager.valuesImpl.getValue(this, "top"); } public function set top(value:Object):void { - if (GOOG::DEBUG) - trace("top not implemented"); + setStyle("top", value); } [Inspectable(category="General")] @@ -4034,16 +3943,102 @@ COMPILE::JS */ public function get bottom():Object { - if (GOOG::DEBUG) - trace("bottom not implemented"); - return 0; + return ValuesManager.valuesImpl.getValue(this, "bottom"); } public function set bottom(value:Object):void { - if (GOOG::DEBUG) - trace("bottom not implemented"); + setStyle("bottom", value); + } + + [Inspectable(category="General")] + + /** + * Number of pixels between the container's left border + * and the left of its content area. + * + * @default 0 + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function get paddingLeft():Object + { + return ValuesManager.valuesImpl.getValue(this, "paddingLeft"); + } + public function set paddingLeft(value:Object):void + { + setStyle("paddingLeft", value); + } + + [Inspectable(category="General")] + + /** + * Number of pixels between the container's right border + * and the right of its content area. + * + * @default 0 + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function get paddingRight():Object + { + return ValuesManager.valuesImpl.getValue(this, "paddingRight"); + } + public function set paddingRight(value:Object):void + { + setStyle("paddingRight", value); + } + + [Inspectable(category="General")] + + /** + * Number of pixels between the container's top border + * and the top of its content area. + * + * @default 0 + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function get paddingTop():Object + { + return ValuesManager.valuesImpl.getValue(this, "paddingTop"); + } + public function set paddingTop(value:Object):void + { + setStyle("paddingTop", value); + } + + [Inspectable(category="General")] + + /** + * Number of pixels between the container's bottom border + * and the bottom of its content area. + * + * @default 0 + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 0.9.3 + */ + public function get paddingBottom():Object + { + return ValuesManager.valuesImpl.getValue(this, "paddingBottom"); + } + public function set paddingBottom(value:Object):void + { + setStyle("paddingBottom", value); } - [Inspectable(category="General")] + + [Inspectable(category="General")] /** *

For components, this layout constraint property is a @@ -4754,9 +4749,148 @@ COMPILE::JS dispatchEvent(PropertyChangeEvent.createUpdateEvent( this, prop, oldValue, value)); } + + private var _rollOverEffect:IEffect; + + /** + * Played when the user rolls the mouse over the component. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get rollOverEffect():Object + { + return _rollOverEffect; + } + public function set rollOverEffect(value:Object):void + { + _rollOverEffect = value as IEffect; + } + + private var _rollOutEffect:IEffect; + + /** + * Played when the user rolls the mouse so it is no longer over the component. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get rollOutEffect():Object + { + return _rollOutEffect; + } + public function set rollOutEffect(value:Object):void + { + _rollOutEffect = value as IEffect; + } + + private var _mouseDownEffect:IEffect; + + /** + * Played when the user presses the mouse button. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get mouseDownEffect():Object + { + return _mouseDownEffect; + } + public function set mouseDownEffect(value:Object):void + { + _mouseDownEffect = value as IEffect; + addEventListener(MouseEvent.MOUSE_DOWN, new EffectEventWatcher(_mouseDownEffect).listener); + } + + private var _mouseUpEffect:IEffect; + + /** + * Played when the user releases the mouse button. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get mouseUpEffect():Object + { + return _mouseUpEffect; + } + public function set mouseUpEffect(value:Object):void + { + _mouseUpEffect = value as IEffect; + addEventListener(MouseEvent.MOUSE_UP, new EffectEventWatcher(_mouseUpEffect).listener); + } + + private var _hideEffect:IEffect; + + /** + * Played when the component becomes invisible. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get hideEffect():Object + { + return _hideEffect; + } + public function set hideEffect(value:Object):void + { + _hideEffect = value as IEffect; + addEventListener("hide", new EffectEventWatcher(_hideEffect).listener); + } + + private var _showEffect:IEffect; + + /** + * Played when the component becomes visible. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get showEffect():Object + { + return _showEffect; + } + public function set showEffect(value:Object):void + { + _showEffect = value as IEffect; + addEventListener("hide", new EffectEventWatcher(_showEffect).listener); + } + +} } +import org.apache.royale.effects.IEffect; +import org.apache.royale.events.Event; +/** + * @private + * An element of the methodQueue array. + */ +class EffectEventWatcher +{ + private var _effect:IEffect; + + public function EffectEventWatcher(effect:IEffect) + { + _effect = effect; + } + + public function listener(event:Event):void + { + _effect.play(); + } } //////////////////////////////////////////////////////////////////////////////// diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Pause.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Pause.as new file mode 100644 index 0000000..92a2ae4 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Pause.as @@ -0,0 +1,64 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects +{ + +import org.apache.royale.effects.Tween; +import org.apache.royale.core.IUIBase; + +/** + * The Pause effect does nothing for a duration. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion Royale 0.0 + */ +public class Pause extends org.apache.royale.effects.Tween +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @param target Object ID or reference to an object that will + * have its x and/or y property animated. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Royale 1.0.0 + */ + public function Pause(target:IUIBase = null) + { + super(); + + + } + + +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeDown.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeDown.as new file mode 100644 index 0000000..dbeaab2 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeDown.as @@ -0,0 +1,96 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects +{ + +import org.apache.royale.core.IUIBase; +import org.apache.royale.effects.Wipe; + +/** + * The WipeDown class defines a wipe down effect. + * The before or after state of the component must be invisible. + * + *

You often use this effect with the showEffect + * and hideEffect triggers. The showEffect + * trigger occurs when a component becomes visible by changing its + * visible property from false to true. + * The hideEffect trigger occurs when the component becomes + * invisible by changing its visible property from + * true to false.

+ * + *

This effect inherits the MaskEffect.show property. + * If you set the value to true, the component appears. + * If you set the value to false, the component disappears. + * The default value is true.

+ * + *

If you specify this effect for a showEffect or + * hideEffect trigger, Flex sets the show property + * for you, either to true if the component becomes invisible, + * or false if the component becomes visible.

+ * + * @mxml + * + *

The <mx:WipeDown> tag + * inherits all of the tag attributes of its superclass, + * and adds the following tag attributes:

+ * + *
+ *  <mx:WipeDown
+ *    id="ID"
+ *  />
+ *  
+ * + * @see mx.effects.effectClasses.WipeDownInstance + * + * @includeExample examples/WipeDownExample.mxml + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class WipeDown extends Wipe +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @param target The Object to animate with this effect. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function WipeDown(target:Object = null) + { + super(target as IUIBase); + + direction = "down"; + } +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeLeft.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeLeft.as new file mode 100644 index 0000000..e050206 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeLeft.as @@ -0,0 +1,96 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects +{ + +import org.apache.royale.core.IUIBase; +import org.apache.royale.effects.Wipe; + +/** + * The WipeLeft class defines a wipe left effect. + * The before or after state of the component must be invisible. + * + *

You often use this effect with the showEffect + * and hideEffect triggers. The showEffect + * trigger occurs when a component becomes visible by changing its + * visible property from false to true. + * The hideEffect trigger occurs when the component becomes + * invisible by changing its visible property from + * true to false.

+ * + *

This effect inherits the MaskEffect.show property. + * If you set the value to true, the component appears. + * If you set the value to false, the component disappears. + * The default value is true.

+ * + *

If you specify this effect for a showEffect or + * hideEffect trigger, Flex sets the show property + * for you, either to true if the component becomes invisible, + * or false if the component becomes visible.

+ * + * @mxml + * + *

The <mx:WipeLeft> tag + * inherits all of the tag attributes of its superclass, + * and adds the following tag attributes:

+ * + *
+ *  <mx:WipeLeft
+ *    id="ID"
+ *  />
+ *  
+ * + * @see mx.effects.effectClasses.WipeLeftInstance + * + * @includeExample examples/WipeLeftExample.mxml + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class WipeLeft extends Wipe +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @param target The Object to animate with this effect. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function WipeLeft(target:Object = null) + { + super(target as IUIBase); + + direction = "left"; + } +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeRight.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeRight.as new file mode 100644 index 0000000..9aa2438 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeRight.as @@ -0,0 +1,96 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects +{ + +import org.apache.royale.core.IUIBase; +import org.apache.royale.effects.Wipe; + +/** + * The WipeRight class defines a wipe right effect. + * The before or after state of the component must be invisible. + * + *

You often use this effect with the showEffect + * and hideEffect triggers. The showEffect + * trigger occurs when a component becomes visible by changing its + * visible property from false to true. + * The hideEffect trigger occurs when the component becomes + * invisible by changing its visible property from + * true to false.

+ * + *

This effect inherits the MaskEffect.show property. + * If you set the value to true, the component appears. + * If you set the value to false, the component disappears. + * The default value is true.

+ * + *

If you specify this effect for a showEffect or + * hideEffect trigger, Flex sets the show property + * for you, either to true if the component becomes invisible, + * or false if the component becomes visible.

+ * + * @mxml + * + *

The <mx:WipeRight> tag + * inherits all of the tag attributes of its superclass, + * and adds the following tag attributes:

+ * + *
+ *  <mx:WipeRight
+ *    id="ID"
+ *  />
+ *  
+ * + * @see mx.effects.effectClasses.WipeRightInstance + * + * @includeExample examples/WipeRightExample.mxml + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class WipeRight extends Wipe +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @param target The Object to animate with this effect. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function WipeRight(target:Object = null) + { + super(target as IUIBase); + + direction = "right"; + } +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeUp.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeUp.as new file mode 100644 index 0000000..63fb224 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/WipeUp.as @@ -0,0 +1,96 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects +{ + +import org.apache.royale.core.IUIBase; +import org.apache.royale.effects.Wipe; + +/** + * The WipeUp class defines a wipe up effect. + * The before or after state of the component must be invisible. + * + *

You often use this effect with the showEffect + * and hideEffect triggers. The showEffect + * trigger occurs when a component becomes visible by changing its + * visible property from false to true. + * The hideEffect trigger occurs when the component becomes + * invisible by changing its visible property from + * true to false.

+ * + *

This effect inherits the MaskEffect.show property. + * If you set the value to true, the component appears. + * If you set the value to false, the component disappears. + * The default value is true.

+ * + *

If you specify this effect for a showEffect or + * hideEffect trigger, Flex sets the show property + * for you, either to true if the component becomes invisible, + * or false if the component becomes visible.

+ * + * @mxml + * + *

The <mx:WipeUp> tag + * inherits all of the tag attributes of its superclass, + * and adds the following tag attributes:

+ * + *
+ *  <mx:WipeUp
+ *    id="ID"
+ *  />
+ *  
+ * + * @see mx.effects.effectClasses.WipeUpInstance + * + * @includeExample examples/WipeUpExample.mxml + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class WipeUp extends Wipe +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @param target The Object to animate with this effect. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function WipeUp(target:Object = null) + { + super(target as IUIBase); + + direction = "up"; + } +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Bounce.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Bounce.as new file mode 100644 index 0000000..e754cc3 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/easing/Bounce.as @@ -0,0 +1,134 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.effects.easing +{ + +/** + * The Bounce class defines three easing functions to implement + * bounce motion with Flex effect classes. + * + * For more information, see http://www.robertpenner.com/profmx. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class Bounce +{ +// include "../../core/Version.as"; + + //-------------------------------------------------------------------------- + // + // Class methods + // + //-------------------------------------------------------------------------- + + /** + * The easeOut() method starts the bounce motion fast, + * and then decelerates motion as it executes. + * + * @param t Specifies time. + * + * @param b Specifies the initial position of a component. + * + * @param c Specifies the total change in position of the component. + * + * @param d Specifies the duration of the effect, in milliseconds. + * + * @return Number corresponding to the position of the component. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public static function easeOut(t:Number, b:Number, + c:Number, d:Number):Number + { + if ((t /= d) < (1 / 2.75)) + return c * (7.5625 * t * t) + b; + + else if (t < (2 / 2.75)) + return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b; + + else if (t < (2.5 / 2.75)) + return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b; + + else + return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b; + } + + /** + * The easeIn() method starts the bounce motion slowly, + * and then accelerates motion as it executes. + * + * @param t Specifies time. + * + * @param b Specifies the initial position of a component. + * + * @param c Specifies the total change in position of the component. + * + * @param d Specifies the duration of the effect, in milliseconds. + * + * @return Number corresponding to the position of the component. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public static function easeIn(t:Number, b:Number, + c:Number, d:Number):Number + { + return c - easeOut(d - t, 0, c, d) + b; + } + + /** + * The easeInOut() method combines the motion + * of the easeIn() and easeOut() methods + * to start the bounce motion slowly, accelerate motion, then decelerate. + * + * @param t Specifies time. + * + * @param b Specifies the initial position of a component. + * + * @param c Specifies the total change in position of the component. + * + * @param d Specifies the duration of the effect, in milliseconds. + * + * @return Number corresponding to the position of the component. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public static function easeInOut(t:Number, b:Number, + c:Number, d:Number):Number + { + if (t < d/2) + return easeIn(t * 2, 0, c, d) * 0.5 + b; + else + return easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b; + } +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as b/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as new file mode 100644 index 0000000..ea38e25 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/states/Transition.as @@ -0,0 +1,264 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.states +{ + +//import mx.effects.IEffect; +import org.apache.royale.states.Transition; + +[DefaultProperty("effect")] + +/** + * The Transition class defines a set of effects that play in response + * to a change of view state. While a view state definition + * defines how to change states, a transition defines the order in which + * visual changes occur during the state change. + * + *

To define a transition, you set the transitions property of an Application + * to an Array of Transition objects.

+ * + *

You use the toState and fromState properties of + * the Transition class to specify the state changes that trigger the transition. + * By default, both the fromState and toState properties + * are set to "*", meaning apply the transition to any changes to the view state.

+ * + *

You can use the fromState property to explicitly specify a + * view state that your are changing from, and the toState property + * to explicitly specify a view state that you are changing to. + * If a state change matches two transitions, the toState property + * takes precedence over the fromState property. If more than one + * transition match, Flex uses the first definition in the transition array.

+ * + *

You use the effect property to specify the Effect object to play + * when you apply the transition. Typically, this is a composite effect object, + * such as the Parallel or Sequence effect, that contains multiple effects, + * as the following example shows:

+ *
+ *  <mx:Transition id="myTransition" fromState="*" toState="*">
+ *    <mx:Parallel>
+ *        ...
+ *    </mx:Parallel>
+ *  </mx:Transition>
+ *  
+ * + * @mxml + * + *

The <mx:Transition> tag + * defines the following attributes:

+ * + *
+ *  <mx:Transition
+ *    Properties
+ *    id="ID"
+ *    effect=""
+ *    fromState="*"
+ *    toState="*"
+ *    autoReverse="false"
+ *  />
+ *  
+ * + * @see mx.effects.AddChildAction + * @see mx.effects.RemoveChildAction + * @see mx.effects.SetPropertyAction + * @see mx.effects.SetStyleAction + * + * @includeExample examples/TransitionExample.mxml + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class Transition extends org.apache.royale.states.Transition +{ + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function Transition() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // effect + //---------------------------------- + + /** + * The IEffect object to play when you apply the transition. Typically, + * this is a composite effect object, such as the Parallel or Sequence effect, + * that contains multiple effects. + * + *

The effect property is the default property of the + * Transition class. You can omit the <mx:effect> tag + * if you use MXML tag syntax.

+ * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + //public var effect:IEffect; + + //---------------------------------- + // fromState + //---------------------------------- + + //[Inspectable(category="General")] + + /** + * A String specifying the view state that your are changing from when + * you apply the transition. The default value is "*", meaning any view state. + * + *

You can set this property to an empty string, "", + * which corresponds to the base view state.

+ * + * @default "*" + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + //public var fromState:String = "*"; + + //---------------------------------- + // toState + //---------------------------------- + + //[Inspectable(category="General")] + + /** + * A String specifying the view state that you are changing to when + * you apply the transition. The default value is "*", meaning any view state. + * + *

You can set this property to an empty string, "", + * which corresponds to the base view state.

+ * + * @default "*" + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + //public var toState:String = "*"; + + /** + * Set to true to specify that this transition applies + * to both the forward and reverse view state changes. + * Therefore, use this transition on a change from view state A to + * view state B, and on the change from B to A. + * + *

While the transition from view state A to view state B is playing, + * the reverse transition can occur to interrupt the current transition. + * The reverse transition always halts the current transition at + * its current location. + * That is, the reverse transition always plays as if + * the interruptionBehavior property was set to stop, + * regardless of the real value of interruptionBehavior.

+ * + *

This property is only checked when the new transition is going in the + * exact opposite direction of the currently playing one. That is, if + * a transition is playing between states A and B and then a transition + * to return to A is started.

+ * + *

If a transition uses the toState and fromState + * properties to explicitly handle the transition from view state B to A, + * then Flex ignores the autoReverse property.

+ * + * @default false + * + * @see Transition#interruptionBehavior + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var autoReverse:Boolean = false; + + /** + * Flex does not support the playing of multiple transitions simultaneously. + * If a transition is currently playing when a new transition occurs, + * the current transition is interrupted. + * This property controls how the current transition behaves when interrupted. + * + *

By default, the current transition ends, which snaps all effects in + * the transition to their end values. + * This corresponds to a property value of end. + * If the value of this property is stop, the current transition + * halts at its current location. + * The new transition start playing from the halt location of + * the previous transition.

+ * + *

The value of stop can smooth out the appearance of an + * interrupted transition. + * That is because the user does not see the current transition snap + * to its end state before the new transition begins.

+ * + *

In some cases, the interrupting transition can be the reverse of + * the current transition. + * For example, while the transition from view state A to view state B + * is playing, the reverse transition occurs to interrupt the current transition. + * If you set the autoReverse property of a transition instance + * to true, you can use the same transition to handle both + * the forward and reverse transitions. + * When the interrupting transition is the reverse transition of the + * current transition and has autoReverse set to true, + * the interrupting transition runs as if the + * interruptionBehavior property was set to stop, + * regardless of the real value of interruptionBehavior.

+ * + *

The mx.states.InterruptionBehavior class defines + * the possible values for this property.

+ * + * @default end + * + * @see Transition#autoReverse + * @see mx.states.InterruptionBehavior + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.5 + * @productversion Flex 4.5 + */ + //[Inspectable(category="General", enumeration="end,stop", defaultValue="end")] + //public var interruptionBehavior:String = InterruptionBehavior.END; +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/EmailValidator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/EmailValidator.as index 2cd160f..4afe3ac 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/EmailValidator.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/EmailValidator.as @@ -23,7 +23,7 @@ package mx.validators //import mx.events.FlexEvent; //import org.apache.royale.events.IEventDispatcher; //import mx.events.ValidationResultEvent; - [ResourceBundle("validators")] + //[ResourceBundle("validators")] /** * The EmailValidator class validates that a String has a single @ sign, diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/NumberValidator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/NumberValidator.as index bddb6c2..4cf7f8f 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/NumberValidator.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/NumberValidator.as @@ -272,6 +272,52 @@ public class NumberValidator extends Validator // "validators", "numberValidatorDomain"); } + //---------------------------------- + // integerError + //---------------------------------- + + /** + * @private + * Storage for the integerError property. + */ + private var _integerError:String; + + /** + * @private + */ + //private var integerErrorOverride:String; + + [Inspectable(category="Errors", defaultValue="null")] + + /** + * Error message when the number must be an integer, as defined + * by the domain property. + * + * @default "The number must be an integer." + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function get integerError():String + { + return _integerError; + } + + /** + * @private + */ + public function set integerError(value:String):void + { + //integerErrorOverride = value; + + _integerError = value != null ? + value : + /*resourceManager.getString( + "validators", */"integerError"/*)*/; + } + //---------------------------------- // maxValue //---------------------------------- diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidationResult.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidationResult.as new file mode 100644 index 0000000..26160a1 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidationResult.as @@ -0,0 +1,147 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.validators +{ + +/** + * The RegExpValidator class dispatches the valid + * and invalid events. + * For an invalid event, the event object + * is an instance of the ValidationResultEvent class, + * and the ValidationResultEvent.results property + * contains an Array of ValidationResult objects. + * + *

However, for a valid event, the + * ValidationResultEvent.results property contains + * an Array of RegExpValidationResult objects. + * The RegExpValidationResult class is a child class + * of the ValidationResult class, and contains additional properties + * used with regular expressions.

+ * + * @see mx.events.ValidationResultEvent + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class RegExpValidationResult extends ValidationResult +{ +// include "../core/Version.as"; + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor + * + * @param isError Pass true if there was a validation error. + * + * @param subField Name of the subfield of the validated Object. + * + * @param errorCode Validation error code. + * + * @param errorMessage Validation error message. + * + * @param matchedString Matching substring. + * + * @param matchedIndex Index of the matching String. + * + * @param matchedSubstrings Array of substring matches. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function RegExpValidationResult(isError:Boolean, + subField:String = "", + errorCode:String = "", + errorMessage:String = "", + matchedString:String = "", + matchedIndex:int = 0, + matchedSubstrings:Array = null) + { + super(isError, subField, errorCode, errorMessage); + + this.matchedString = matchedString; + this.matchedIndex = matchedIndex; + this.matchedSubstrings = matchedSubstrings ? matchedSubstrings : []; + } + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + // matchedIndex + //-------------------------------------------------------------------------- + + /** + * An integer that contains the starting index + * in the input String of the match. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var matchedIndex:int; + + //-------------------------------------------------------------------------- + // matchedString + //-------------------------------------------------------------------------- + + /** + * A String that contains the substring of the input String + * that matches the regular expression. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var matchedString:String; + + //-------------------------------------------------------------------------- + // matchedSubstrings + //-------------------------------------------------------------------------- + + /** + * An Array of Strings that contains parenthesized + * substring matches, if any. + * If no substring matches are found, this Array is of length 0. + * Use matchedSubStrings[0] to access + * the first substring match. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var matchedSubstrings:Array; +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidator.as index 6612da1..f0c3a15 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidator.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/RegExpValidator.as @@ -123,7 +123,7 @@ public class RegExpValidator extends Validator /** * @private */ - //private var foundMatch:Boolean = false; + private var foundMatch:Boolean = false; //-------------------------------------------------------------------------- // @@ -390,7 +390,7 @@ public class RegExpValidator extends Validator * @private * Performs validation on the validator */ - /* private function validateRegExpression(value:Object):Array + private function validateRegExpression(value:Object):Array { var results:Array = []; foundMatch = false; @@ -417,22 +417,26 @@ public class RegExpValidator extends Validator foundMatch = true; } + /* if (results.length == 0) { results.push(new ValidationResult( true, null, "noMatch", noMatchError)); } + */ } + /* else { results.push(new ValidationResult( true, null, "noExpression", noExpressionError)); } + */ return results; - } */ + } } } diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/StringValidator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/StringValidator.as index 9377f85..079a857 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/StringValidator.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/StringValidator.as @@ -248,7 +248,7 @@ public class StringValidator extends Validator * @private * Storage for the tooLongError property. */ - // private var _tooLongError:String; + private var _tooLongError:String; /** * @private @@ -268,23 +268,23 @@ public class StringValidator extends Validator * @playerversion AIR 1.1 * @productversion Flex 3 */ - /* public function get tooLongError():String + public function get tooLongError():String { return _tooLongError; - } */ + } /** * @private */ - /* public function set tooLongError(value:String):void + public function set tooLongError(value:String):void { - tooLongErrorOverride = value; + //tooLongErrorOverride = value; _tooLongError = value != null ? value : - resourceManager.getString( - "validators", "tooLongError"); - } */ + /*resourceManager.getString( + "validators", */"tooLongError"/*)*/; + } //---------------------------------- // tooShortError @@ -294,7 +294,7 @@ public class StringValidator extends Validator * @private * Storage for the tooShortError property. */ - //private var _tooShortError:String; + private var _tooShortError:String; /** * @private @@ -314,23 +314,23 @@ public class StringValidator extends Validator * @playerversion AIR 1.1 * @productversion Flex 3 */ - /* public function get tooShortError():String + public function get tooShortError():String { return _tooShortError; - } */ + } /** * @private */ - /* public function set tooShortError(value:String):void + public function set tooShortError(value:String):void { - tooShortErrorOverride = value; + //tooShortErrorOverride = value; _tooShortError = value != null ? value : - resourceManager.getString( - "validators", "tooShortError"); - } */ + /*resourceManager.getString( + "validators", */"tooShortError"/*)*/; + } //-------------------------------------------------------------------------- // diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/ValidationResult.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/ValidationResult.as new file mode 100644 index 0000000..eca3b59 --- /dev/null +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/ValidationResult.as @@ -0,0 +1,147 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.validators +{ + +/** + * The ValidationResult class contains the results of a validation. + * + *

The ValidationResultEvent class defines the event object + * that is passed to event listeners for the valid + * and invalid validator events. + * The class also defines the results property, + * which contains an Array of ValidationResult objects, + * one for each field examined by the validator. + * This lets you access the ValidationResult objects + * from within an event listener.

+ * + * @see mx.events.ValidationResultEvent + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ +public class ValidationResult +{ +// include "../core/Version.as"; + + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructor + * + * @param isError Pass true if there was a validation error. + * + * @param subField Name of the subfield of the validated Object. + * + * @param errorCode Validation error code. + * + * @param errorMessage Validation error message. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public function ValidationResult(isError:Boolean, subField:String = "", + errorCode:String = "", + errorMessage:String = "") + { + super(); + + this.isError = isError; + this.subField = subField; + this.errorMessage = errorMessage; + this.errorCode = errorCode; + } + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // errorCode + //---------------------------------- + + /** + * The validation error code + * if the value of the isError property is true. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var errorCode:String; + + //---------------------------------- + // errorMessage + //---------------------------------- + + /** + * The validation error message + * if the value of the isError property is true. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var errorMessage:String; + + //---------------------------------- + // isError + //---------------------------------- + + /** + * Contains true if the field generated a validation failure. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var isError:Boolean; + + //---------------------------------- + // subField + //---------------------------------- + + /** + * The name of the subfield that the result is associated with. + * Some validators, such as CreditCardValidator and DateValidator, + * validate multiple subfields at the same time. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + public var subField:String; +} + +} diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/Validator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/Validator.as index 00d390c..f096ab8 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/Validator.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/Validator.as @@ -49,7 +49,7 @@ package mx.validators * @playerversion AIR 1.1 * @productversion Royale 0.9.3 */ -//[Event(name="valid", type="mx.events.ValidationResultEvent")] +[Event(name="valid", type="mx.events.ValidationResultEvent")] /** * Dispatched when validation fails. @@ -61,7 +61,7 @@ package mx.validators * @playerversion AIR 1.1 * @productversion Royale 0.9.3 */ -//[Event(name="invalid", type="mx.events.ValidationResultEvent")] +[Event(name="invalid", type="mx.events.ValidationResultEvent")] //-------------------------------------- // Other metadata