You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pu...@apache.org on 2021/09/18 15:18:28 UTC
[royale-asjs] branch develop updated: Added keyfocuschange in
UIComponent.as and allowedFormatChars in DateValidator.as
This is an automated email from the ASF dual-hosted git repository.
pushminakazi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 317d292 Added keyfocuschange in UIComponent.as and allowedFormatChars in DateValidator.as
317d292 is described below
commit 317d29257721457f2c930e61531d84fad78fff40
Author: pashminakazi <pa...@gmail.com>
AuthorDate: Sat Sep 18 08:18:16 2021 -0700
Added keyfocuschange in UIComponent.as and allowedFormatChars in DateValidator.as
---
.../src/main/royale/mx/core/UIComponent.as | 37 +++++++++++++
.../src/main/royale/mx/validators/DateValidator.as | 62 ++++++++++++++++++++++
2 files changed, 99 insertions(+)
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 e218708..5eb5ab8 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -584,6 +584,43 @@ import mx.binding.BindingManager;
[Event(name="dragOver", type="mx.events.DragEvent")]
/**
+ * Dispatched when the object has moved.
+ *
+ * <p>You can move the component by setting the <code>x</code>
+ * or <code>y</code> properties, by calling the <code>move()</code>
+ * method, by setting one
+ * of the following properties either on the component or on other
+ * components such that the LayoutManager needs to change the
+ * <code>x</code> or <code>y</code> properties of the component:</p>
+ *
+ * <ul>
+ * <li><code>minWidth</code></li>
+ * <li><code>minHeight</code></li>
+ * <li><code>maxWidth</code></li>
+ * <li><code>maxHeight</code></li>
+ * <li><code>explicitWidth</code></li>
+ * <li><code>explicitHeight</code></li>
+ * </ul>
+ *
+ * <p>When you call the <code>move()</code> method, the <code>move</code>
+ * event is dispatched before the method returns.
+ * In all other situations, the <code>move</code> event is not dispatched
+ * until after the property changes.</p>
+ *
+ * <p>This event only dispatched when there are one or more
+ * relevant listeners attached to the dispatching object.</p>
+ *
+ * @eventType mx.events.FocusEvent.KEY_FOCUS_CHANGE
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+
+[Event(name="keyFocusChange", type="mx.events.FocusEvent")]
+
+/**
* The main color for a component.
*
* @langversion 3.0
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/DateValidator.as b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/DateValidator.as
index a6d0754..4c1318e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/validators/DateValidator.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/validators/DateValidator.as
@@ -293,6 +293,68 @@ public class DateValidator extends Validator
// resourceManager.getString(
// "validators", "requiredFieldError");
}
+
+
+ //----------------------------------
+ // allowedFormatChars
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for the allowedFormatChars property.
+ */
+ private var _allowedFormatChars:String;
+
+ /**
+ * @private
+ */
+ private var allowedFormatCharsOverride:String;
+
+ [Inspectable(category="General", defaultValue="null")]
+
+ /**
+ * The set of formatting characters allowed for separating
+ * the month, day, and year values.
+ *
+ * @default "/\-. "
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get allowedFormatChars():String
+ {
+ return _allowedFormatChars;
+ }
+
+ /**
+ * @private
+ */
+ public function set allowedFormatChars(value:String):void
+ {
+ if (value != null)
+ {
+ var n:int = value.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ if (DECIMAL_DIGITS.indexOf(value.charAt(i)) != -1)
+ {
+ /* var message:String = resourceManager.getString(
+ "validators", "invalidFormatChars");
+ throw new Error(message); */
+ }
+ }
+ }
+
+ allowedFormatCharsOverride = value;
+
+ _allowedFormatChars = value != null ?
+ value : "";
+ /* resourceManager.getString(
+ "validators",
+ "dateValidatorAllowedFormatChars"); */
+ }
}