You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/09/18 17:22:00 UTC

[royale-asjs] branch develop updated (d2cb748 -> 2d19541)

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from d2cb748  tour-de-jewel: DataGridSort Example (temporal for Piotr)
     new 93ab184  Added support to use external (e.g. svg) image assets in IconButton or ToggleButton via ImageIcon
     new 2d19541  Initial approach for permitting custom variations in Jewel ToolTip.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../Jewel/src/main/resources/jewel-manifest.xml    |  1 +
 .../royale/jewel/{Divider.as => ImageIcon.as}      | 56 ++++++++++++----------
 .../apache/royale/jewel/beads/controls/ToolTip.as  | 21 ++++++++
 3 files changed, 52 insertions(+), 26 deletions(-)
 copy frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/{Divider.as => ImageIcon.as} (62%)


[royale-asjs] 02/02: Initial approach for permitting custom variations in Jewel ToolTip.

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 2d195410caaa94c25156d38f772411a3a0615a1f
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Sep 19 05:21:22 2020 +1200

    Initial approach for permitting custom variations in Jewel ToolTip.
---
 .../apache/royale/jewel/beads/controls/ToolTip.as   | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
index ec992d1..716b6be 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
@@ -87,6 +87,26 @@ package org.apache.royale.jewel.beads.controls
             _toolTip = value;
 		}
 
+		private var _className:String;
+		/**
+		 *  An optional css class to add to specific tooltips for additional
+		 *  styling via css.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.4
+		 */
+		public function get className():String
+		{
+			return _className;
+		}
+		public function set className(value:String):void
+		{
+			_className = value;
+			if (tt) tt.className = value;
+		}
+
 		/**
 		 *  Sets the tooltip y relative position to one of
 		 *  LEFT, MIDDLE or RIGHT.
@@ -160,6 +180,7 @@ package org.apache.royale.jewel.beads.controls
 			if (tt) host.popUpParent.removeElement(tt);
 
             tt = new ToolTipLabel();
+			if (_className) tt.className = _className;
             tt.html = toolTip;
 
 			// add this before measuring or measurement is not accurate.


[royale-asjs] 01/02: Added support to use external (e.g. svg) image assets in IconButton or ToggleButton via ImageIcon

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 93ab18479fca5ea3a4d0d2811f83456e7f8a40dc
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Sep 19 05:05:11 2020 +1200

    Added support to use external (e.g. svg) image assets in IconButton or ToggleButton via ImageIcon
---
 .../Jewel/src/main/resources/jewel-manifest.xml    |  1 +
 .../royale/org/apache/royale/jewel/ImageIcon.as    | 66 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index bb85f81..2436252 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -151,6 +151,7 @@
     <component id="Divider" class="org.apache.royale.jewel.Divider"/>
 
     <component id="Image" class="org.apache.royale.jewel.Image"/>
+    <component id="ImageIcon" class="org.apache.royale.jewel.ImageIcon"/>
 	<component id="BinaryImage" class="org.apache.royale.jewel.BinaryImage"/>
 	
     <component id="ClipImage" class="org.apache.royale.jewel.beads.controls.image.ClipImage"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ImageIcon.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ImageIcon.as
new file mode 100644
index 0000000..881711f
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ImageIcon.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.jewel
+{
+	import org.apache.royale.core.IIcon;
+
+
+	
+	  /**
+	   *  The Jewel Image is a simple component that loads an Image.
+	   *  For button images use ImageButton
+	   *
+	   *  @toplevel
+	   *  @langversion 3.0
+	   *  @playerversion Flash 10.2
+	   *  @playerversion AIR 2.6
+	   *  @productversion Royale 0.9.4
+	   */
+	public class ImageIcon extends Image implements IIcon
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.4
+		 */
+		public function ImageIcon()
+		{
+			super();
+		}
+		/**
+		 * This is a proxy accessor for Image src property that complies with IIcon interface
+		 *
+		 */
+		public function get text():String{
+			return src;
+		}
+		/**
+		 * This is a proxy accessor for Image src property that complies with IIcon interface
+		 *
+		 */
+		public function set text(value:String):void{
+			src = value;
+		}
+
+
+	}
+}