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

[GitHub] aharui closed pull request #195: FormHeading.as Added

aharui closed pull request #195: FormHeading.as Added
URL: https://github.com/apache/royale-asjs/pull/195
 
 
   

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

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

diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index 1a9655f97..03d166f47 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -97,6 +97,7 @@ internal class MXRoyaleClasses
 	import mx.charts.HitData; HitData;
 	import mx.collections.GroupingField; GroupingField;
 	import mx.collections.Grouping; Grouping;
+	import mx.containers.FormHeading; FormHeading;
 	import mx.charts.chartClasses.DataTransform; DataTransform;
 	import mx.skins.Border; Border;
 	import mx.effects.CompositeEffect; CompositeEffect;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormHeading.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormHeading.as
new file mode 100644
index 000000000..97090cf5a
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormHeading.as
@@ -0,0 +1,209 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers
+{
+
+//import flash.events.Event;
+import org.apache.royale.events.Event;
+//import flash.text.TextFieldAutoSize;
+import mx.controls.Label;
+import mx.core.EdgeMetrics;
+import mx.core.UIComponent;
+/* 
+include "../styles/metadata/LeadingStyle.as"
+include "../styles/metadata/PaddingStyles.as"
+include "../styles/metadata/TextStyles.as" */
+
+/**
+ *  Number of pixels between the label area and the heading text.
+ *
+ *  @default 14
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="indicatorGap", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Width of the form labels.
+ *  The default value is the length of the longest label in the form.
+ *  For FormHeading, the <code>labelWidth</code>
+ *  is space to the left of the heading text.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="labelWidth", type="Number", format="Length", inherit="yes")]
+
+/**
+ *  Number of pixels above the heading text.
+ *
+ *  @default 0
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+//[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+//[IconFile("FormHeading.png")]
+
+[Alternative(replacement="spark.components.FormHeading", since="4.5")]
+
+/**
+ *  The FormHeading container is used to display a heading
+ *  for a group of controls inside a Form container.
+ *  The left side of the heading is aligned
+ *  with the left side of the controls inside the form.
+ *  You can include multiple FormHeading containers within a single Form
+ *  container.
+ *
+ *  @mxml
+ *
+ *  <p>The <code>&lt;mx:FormHeading&gt;</code> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:</p>
+ *
+ *  <pre>
+ *  &lt;mx:FormHeading
+ *    <strong>Properties</strong>
+ *    label=""
+ *  
+ *    <strong>Styles</strong>
+ *    color="0x0B333C"
+ *    disabledColor="0xAAB3B3"
+ *    fontAntiAliasType="advanced|normal"
+ *    fontFamily="Verdana"
+ *    fontGridFitType="pixel|subpixel|none"
+ *    fontSharpness="0"
+ *    fontSize="12"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    indicatorGap="14"
+ *    labelWidth="<i>Calculated</i>"
+ *    leading="2"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    paddingTop="0"
+ *    textAlign="<i>Calculated</i>"
+ *    textDecoration="none|underline"
+ *    textIndent="0"
+ *  /&gt;
+ *  </pre>
+ *
+ *  @see mx.containers.Form
+ *  @see mx.containers.FormItem
+ * 
+ *  @includeExample examples/FormExample.mxml
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Royale 0.9.3
+ */
+public class FormHeading extends UIComponent
+{
+	/* include "../core/Version.as";
+ */
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function FormHeading()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var labelObj:Label;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  label
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the label property.
+	 */
+	private var _label:String = "";
+
+	[Bindable("labelChanged")]
+	[Inspectable(category="General", defaultValue="")]
+
+	/**
+	 *  Form heading text.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 */
+	public function get label():String
+	{
+		return _label;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set label(value:String):void
+	{
+		_label = value;
+
+		invalidateProperties();
+
+		dispatchEvent(new Event("labelChanged"));
+	}
+
+
+
+	
+}
+
+}


 

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


With regards,
Apache Git Services