royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: [royale-asjs] 02/02: Added Label
Date Mon, 04 Dec 2017 19:23:37 GMT
There’s only 4 left on my list. I’ll probably get to them later. It would probably be a
good idea to put together an example project which uses as many of the HTML elements as possible.
I don’t know if I’m going to have the time to do that.

> On Dec 4, 2017, at 9:19 PM, harbs@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> harbs pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> commit 4b207a36c245caf570c660c5c760b6f40bced136
> Author: Harbs <harbs@in-tools.com>
> AuthorDate: Mon Dec 4 21:18:50 2017 +0200
> 
>    Added Label
> ---
> .../HTML/src/main/resources/html-manifest.xml      |  1 +
> .../org/apache/royale/html/elements/Label.as       | 94 ++++++++++++++++++++++
> 2 files changed, 95 insertions(+)
> 
> diff --git a/frameworks/projects/HTML/src/main/resources/html-manifest.xml b/frameworks/projects/HTML/src/main/resources/html-manifest.xml
> index 2bbab7f..d987a24 100644
> --- a/frameworks/projects/HTML/src/main/resources/html-manifest.xml
> +++ b/frameworks/projects/HTML/src/main/resources/html-manifest.xml
> @@ -39,6 +39,7 @@
>     <component id="I" class="org.apache.royale.html.elements.I" />
>     <component id="Img" class="org.apache.royale.html.elements.Img" />
>     <component id="Input" class="org.apache.royale.html.elements.Input" />
> +    <component id="Label" class="org.apache.royale.html.elements.Label" />
>     <component id="Li" class="org.apache.royale.html.elements.Li" />
>     <component id="Ol" class="org.apache.royale.html.elements.Ol" />
>     <component id="Option" class="org.apache.royale.html.elements.Option"/>
> diff --git a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Label.as
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Label.as
> new file mode 100644
> index 0000000..05dbe25
> --- /dev/null
> +++ b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Label.as
> @@ -0,0 +1,94 @@
> +////////////////////////////////////////////////////////////////////////////////
> +//
> +//  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 org.apache.royale.html.elements
> +{
> +	import org.apache.royale.core.UIBase;
> +
> +    COMPILE::JS
> +    {
> +        import org.apache.royale.core.WrappedHTMLElement;
> +		import org.apache.royale.html.util.addElementToWrapper;
> +    }
> +    import org.apache.royale.html.NodeElementBase;
> +
> +	/**
> +	 *  The Label class represents an HTML <label> element
> +     *  
> +	 *  
> +     *  @toplevel
> +	 *  @langversion 3.0
> +	 *  @playerversion Flash 10.2
> +	 *  @playerversion AIR 2.6
> +	 *  @productversion Royale 0.0
> +	 */
> +	public class Label extends NodeElementBase
> +	{
> +		/**
> +		 *  constructor.
> +		 *
> +		 *  @langversion 3.0
> +		 *  @playerversion Flash 10.2
> +		 *  @playerversion AIR 2.6
> +		 *  @productversion Royale 0.0
> +		 */
> +		public function Label()
> +		{
> +			super();
> +		}
> +
> +        private var _for:String;
> +        /**
> +         *  The id of the associated element
> +         *  
> +         *  @langversion 3.0
> +         *  @playerversion Flash 10.2
> +         *  @playerversion AIR 2.6
> +         *  @productversion Royale 0.9
> +         */
> +        public function get for():String
> +        {
> +            COMPILE::SWF
> +            {
> +                return _for;
> +            }
> +            COMPILE::JS
> +            {
> +                return element.getAttribute("for");
> +            }
> +        }
> +        public function set for(value:String):void
> +        {
> +            COMPILE::SWF
> +            {
> +                _for = value;
> +            }
> +
> +            COMPILE::JS
> +            {
> +                element.setAttribute("for", value);
> +            }
> +        }
> +
> +        COMPILE::JS
> +        override protected function createElement():WrappedHTMLElement
> +        {
> +			return addElementToWrapper(this,'label');
> +        }
> +    }
> +}
> 
> -- 
> To stop receiving notification emails like this one, please contact
> "commits@royale.apache.org" <commits@royale.apache.org>.


Mime
View raw message