royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [royale-asjs] branch develop updated: *IClassSelectorList Support for components that implements that functionality * StyledMXMLItemRenderer * StyledImageBase * Jewel Image
Date Sat, 30 Jun 2018 14:41:46 GMT
This is an automated email from the ASF dual-hosted git repository.

carlosrovira 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 ab98f25  *IClassSelectorList Support for components that implements that functionality
* StyledMXMLItemRenderer * StyledImageBase * Jewel Image
ab98f25 is described below

commit ab98f25acd999b0f64f7f14ce219876ff937f229
Author: Carlos Rovira <carlosrovira@apache.org>
AuthorDate: Sat Jun 30 16:41:41 2018 +0200

    *IClassSelectorList Support for components that implements that functionality
    * StyledMXMLItemRenderer
    * StyledImageBase
    * Jewel Image
---
 .../projects/Core/src/main/royale/CoreClasses.as   |  3 +
 .../{StyledUIBase.as => StyledMXMLItemRenderer.as} | 95 ++++++++++++----------
 .../royale/org/apache/royale/core/StyledUIBase.as  | 27 +++++-
 .../royale/core/supportClasses/StyledImageBase.as  | 89 ++++++++++++++++++++
 .../royale/utils/IClassSelectorListSupport.as      | 62 ++++++++++++++
 .../projects/Jewel/src/main/resources/defaults.css | 42 +++++-----
 .../Jewel/src/main/resources/jewel-manifest.xml    |  3 +
 .../projects/Jewel/src/main/royale/JewelClasses.as |  2 +
 .../main/royale/org/apache/royale/jewel/Image.as   | 81 ++++++++++++++++++
 .../apache/royale/jewel/beads/models/ImageModel.as | 89 ++++++++++++++++++++
 .../apache/royale/jewel/beads/views/ImageView.as   | 45 ++++++++++
 .../projects/Jewel/src/main/sass/_global.sass      | 22 +++--
 12 files changed, 483 insertions(+), 77 deletions(-)

diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as b/frameworks/projects/Core/src/main/royale/CoreClasses.as
index 85a6c9c..8b43253 100644
--- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
@@ -27,7 +27,10 @@ package {
 internal class CoreClasses
 {
 	import org.apache.royale.core.UIBase; UIBase;
+	import org.apache.royale.utils.IClassSelectorListSupport; IClassSelectorListSupport;
 	import org.apache.royale.core.StyledUIBase; StyledUIBase;
+	import org.apache.royale.core.supportClasses.StyledImageBase; StyledImageBase;
+	import org.apache.royale.core.StyledMXMLItemRenderer; StyledMXMLItemRenderer;
 	import org.apache.royale.core.LayoutBase; LayoutBase;
 	import org.apache.royale.core.ViewBase; ViewBase;
 	import org.apache.royale.core.GroupBase; GroupBase;
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledMXMLItemRenderer.as
similarity index 65%
copy from frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
copy to frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledMXMLItemRenderer.as
index b546053..216cc97 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledMXMLItemRenderer.as
@@ -19,52 +19,34 @@
 package org.apache.royale.core
 {
     import org.apache.royale.utils.ClassSelectorList;
-
-    COMPILE::JS
-    {
-        import org.apache.royale.core.WrappedHTMLElement;
-    }
-
-    /**
-     *  The StyledUIBase is the base class for UIBase components that makes
-     *  heavy use of styles
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.0
-     */
-    public class StyledUIBase extends UIBase
-    {
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-		public function StyledUIBase()
+    import org.apache.royale.utils.IClassSelectorListSupport;
+	
+	/**
+	 *  The StyledMXMLItemRenderer class is the base class for itemRenderers that are MXML-based
+	 *  and provides support for ClassSelectorList.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.3
+	 */
+	public class StyledMXMLItemRenderer extends MXMLItemRenderer implements IClassSelectorListSupport
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function StyledMXMLItemRenderer()
 		{
-            super();
+			super();
+            typeNames = "";
             classSelectorList = new ClassSelectorList(this);
 		}
 
-        COMPILE::JS
-		private var _positioner:WrappedHTMLElement;
-
-		COMPILE::JS
-		override public function get positioner():WrappedHTMLElement
-		{
-			return _positioner;
-		}
-
-		COMPILE::JS
-		override public function set positioner(value:WrappedHTMLElement):void
-		{
-			_positioner = value;
-		}
-
         protected var classSelectorList:ClassSelectorList;
 
         COMPILE::JS
@@ -73,6 +55,14 @@ package org.apache.royale.core
             classSelectorList.addNames(value);
         }
 
+        /**
+         *  adds a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+         */
         public function addClass(name:String):void
         {
             COMPILE::JS
@@ -81,6 +71,14 @@ package org.apache.royale.core
             }
         }
 
+        /**
+		 *  removes a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+		 */
         public function removeClass(name:String):void
         {
             COMPILE::JS
@@ -89,6 +87,14 @@ package org.apache.royale.core
             }
         }
 
+        /**
+		 *  toggle a class name
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
         public function toggleClass(name:String, value:Boolean):void
         {
             COMPILE::JS
@@ -96,5 +102,6 @@ package org.apache.royale.core
             classSelectorList.toggle(name, value);
             }
         }
-    }
-}
\ No newline at end of file
+
+	}
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
index b546053..c8f85d0 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/StyledUIBase.as
@@ -19,6 +19,7 @@
 package org.apache.royale.core
 {
     import org.apache.royale.utils.ClassSelectorList;
+    import org.apache.royale.utils.IClassSelectorListSupport;
 
     COMPILE::JS
     {
@@ -34,7 +35,7 @@ package org.apache.royale.core
      *  @playerversion AIR 2.6
      *  @productversion Royale 0.0
      */
-    public class StyledUIBase extends UIBase
+    public class StyledUIBase extends UIBase implements IClassSelectorListSupport
     {
         /**
          *  Constructor.
@@ -73,6 +74,14 @@ package org.apache.royale.core
             classSelectorList.addNames(value);
         }
 
+        /**
+         *  adds a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+         */
         public function addClass(name:String):void
         {
             COMPILE::JS
@@ -81,6 +90,14 @@ package org.apache.royale.core
             }
         }
 
+        /**
+		 *  removes a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+		 */
         public function removeClass(name:String):void
         {
             COMPILE::JS
@@ -89,6 +106,14 @@ package org.apache.royale.core
             }
         }
 
+        /**
+		 *  toggle a class name
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
         public function toggleClass(name:String, value:Boolean):void
         {
             COMPILE::JS
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/supportClasses/StyledImageBase.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/supportClasses/StyledImageBase.as
new file mode 100644
index 0000000..d09f8cf
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/supportClasses/StyledImageBase.as
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core.supportClasses
+{
+	import org.apache.royale.core.IImage;
+	import org.apache.royale.core.IImageModel;
+	import org.apache.royale.core.StyledUIBase;
+	
+	/**
+	 *  The StyledImageBase class serves as a base class for components that displays a bitmap
and used
+     *  ClassSelectorList for set class selector names
+     *  The Image uses
+	 *  the following beads:
+	 * 
+	 *  org.apache.royale.core.IBeadModel: the data model for the Image, including the url/binary
property.
+	 *  org.apache.royale.core.IBeadView: constructs the visual elements of the component.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.0
+	 */
+	public class StyledImageBase extends StyledUIBase implements IImage
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+		 */
+		public function StyledImageBase()
+		{
+			super();
+		}
+		
+		/**
+		 *  The location of the bitmap, usually a URL.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IImageModel
+		 */
+		public function get src():String
+		{
+			return (model as IImageModel).url;
+		}
+		/**
+		 * @royaleignorecoercion org.apache.royale.core.IImageModel
+		 */
+		public function set src(value:String):void
+		{
+			(model as IImageModel).url = value;
+		}
+		
+		COMPILE::JS
+		public function get imageElement():Element
+		{
+			return null;
+			// override this
+		}
+		
+		COMPILE::JS
+		public function applyImageData(binaryDataAsString:String):void
+		{
+			// override this
+		}
+		
+	}
+}
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/IClassSelectorListSupport.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/IClassSelectorListSupport.as
new file mode 100644
index 0000000..b131984
--- /dev/null
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/IClassSelectorListSupport.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.utils
+{
+    /**
+     *  The IClassSelectorList interface stablish the contract methods
+     *  for componnets that use ClassSelectorList to deal with class selector names
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Royale 0.9.3
+     */
+	public interface IClassSelectorListSupport
+	{
+        /**
+         *  adds a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+         */
+		function addClass(name:String):void
+		
+		/**
+		 *  removes a class name
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.3
+		 */
+		function removeClass(name:String):void
+		
+		/**
+		 *  toggle a class name
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		function toggleClass(name:String, value:Boolean):void
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 144929f..f968493 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -42,17 +42,6 @@ j|ApplicationView {
   IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.VerticalLayout");
 }
 
-.responsive {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  overflow-y: auto;
-  overflow-x: hidden;
-  position: relative;
-  -webkit-overflow-scrolling: touch;
-}
-
 j|Group {
   IBeadView: ClassReference("org.apache.royale.core.beads.GroupView");
 }
@@ -72,6 +61,11 @@ j|Container {
   IViewportModel: ClassReference("org.apache.royale.core.beads.models.ViewportModel");
 }
 
+j|Image {
+  IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.ImageModel");
+  IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ImageView");
+}
+
 @media -royale-swf {
   j|Container {
     IContentView: ClassReference("org.apache.royale.core.supportClasses.ContainerContentArea");
@@ -321,25 +315,27 @@ j|ControlBar {
     IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory");
   }
 }
-.jewel.item {
+.jewel.item, .jewel.navigationlink {
   display: flex;
   cursor: pointer;
-  min-height: 34px;
+  min-height: 34;
+  text-decoration: none;
+  align-items: center;
+  letter-spacing: 0;
+  line-height: normal !important;
+  overflow: hidden;
+}
+
+.jewel.navigationlink {
+  min-height: 48px;
 }
 
 j|ListItemRenderer {
   IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ItemRendererMouseController");
 }
 
-.jewel.navigationlink {
-  text-decoration: none;
-  margin: 0;
-  padding: 16px 0px;
-  vertical-align: middle;
-  font-size: 14px;
-  font-weight: 400;
-  line-height: 24px;
-  letter-spacing: 0;
+j|NavigationLinkItemRenderer {
+  IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ItemRendererMouseController");
 }
 
 .jewel.label {
@@ -2419,7 +2415,7 @@ j|Label {
   }
 }
 
-.jewel.list {
+.jewel.list, .jewel.navigation {
   align-items: stretch;
   align-content: flex-start;
 }
diff --git a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
index ce4ee36..2995103 100644
--- a/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
+++ b/frameworks/projects/Jewel/src/main/resources/jewel-manifest.xml
@@ -55,6 +55,9 @@
     <component id="DrawerHeader" class="org.apache.royale.jewel.DrawerHeader"/>
     <component id="DrawerContent" class="org.apache.royale.jewel.DrawerContent"/>
     <component id="Divider" class="org.apache.royale.jewel.Divider"/>
+
+    <component id="Image" class="org.apache.royale.jewel.Image"/>
+
     <component id="Card" class="org.apache.royale.jewel.Card"/>
     
     <component id="DropDownListList" class="org.apache.royale.jewel.supportClasses.DropDownListList"/>
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 9c7ffef..0d990d1 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -27,6 +27,7 @@ package
      */
     internal class JewelClasses
     {
+        import org.apache.royale.jewel.beads.models.ImageModel; ImageModel;
         import org.apache.royale.jewel.beads.models.SliderRangeModel; SliderRangeModel;
         import org.apache.royale.jewel.beads.models.AlertModel; AlertModel;
         import org.apache.royale.jewel.beads.models.TitleBarModel; TitleBarModel;
@@ -37,6 +38,7 @@ package
         import org.apache.royale.jewel.beads.controllers.AlertController; AlertController;
         import org.apache.royale.jewel.beads.controllers.ListSingleSelectionMouseController;
ListSingleSelectionMouseController;
         
+        import org.apache.royale.jewel.beads.views.ImageView; ImageView;
         import org.apache.royale.jewel.beads.views.SliderView; SliderView;
         import org.apache.royale.jewel.beads.views.AlertView; AlertView;
         import org.apache.royale.jewel.beads.views.TitleBarView; TitleBarView;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Image.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Image.as
new file mode 100644
index 0000000..a716ecc
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Image.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.supportClasses.StyledImageBase;
+
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+		import org.apache.royale.html.util.addElementToWrapper;
+    }
+
+	  /**
+	   *  Load Images.
+	   *
+	   *  @toplevel
+	   *  @langversion 3.0
+	   *  @playerversion Flash 10.2
+	   *  @playerversion AIR 2.6
+	   *  @productversion Royale 0.9.3
+	   */
+	public class Image extends StyledImageBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function Image()
+		{
+			super();
+            typeNames = '';
+		}
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {			
+            addElementToWrapper(this, 'img');
+            positioner = element;
+            return element;
+        }
+
+		COMPILE::JS
+		override public function get imageElement():Element
+		{
+			return element;
+		}
+
+		/**
+		 * @royaleignorecoercion HTMLImageElement
+		 */
+		COMPILE::JS
+		override public function applyImageData(binaryDataAsString:String):void
+		{
+			(element as HTMLImageElement).src = binaryDataAsString;
+		}
+
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/ImageModel.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/ImageModel.as
new file mode 100644
index 0000000..b62d36d
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/ImageModel.as
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads.models
+{
+	import org.apache.royale.core.IImageModel;
+	import org.apache.royale.core.IStrand;
+	import org.apache.royale.events.Event;
+	import org.apache.royale.events.EventDispatcher;
+	
+	/**
+	 *  The ImageModel class bead defines the data associated with an org.apache.royale.jewel.Image
+	 *  component, namely the source of the image.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.3
+	 */
+	public class ImageModel extends EventDispatcher implements IImageModel
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function ImageModel()
+		{
+			super();
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.royale.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+		
+		protected var _url:String;
+		
+		/**
+		 *  The source of the image.
+		 * 
+		 *  @copy org.apache.royale.core.IImageModel#source
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function get url():String
+		{
+			return _url;
+		}
+		public function set url(value:String):void
+		{
+			if (value != _url) {
+				_url = value;
+				dispatchEvent( new Event("urlChanged") );
+			}
+		}
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ImageView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ImageView.as
new file mode 100644
index 0000000..cf1a052
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ImageView.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads.views
+{
+	import org.apache.royale.core.ImageViewBase;
+	
+	/**
+	 *  The ImageView class creates the visual elements of the org.apache.royale.jewel.Image
component.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.3
+	 */
+	public class ImageView extends ImageViewBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion Royale 0.9.3
+		 */
+		public function ImageView()
+		{
+        }	
+	}
+}
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index a8132bb..aa0bf71 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -44,15 +44,15 @@ j|ApplicationView
 	IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.VerticalLayout")
 	// IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.BasicLayout")
 
-.responsive
-	width: 100%
-	height: 100%
-	display: flex
-	flex-direction: column
-	overflow-y: auto
-	overflow-x: hidden
-	position: relative
-	-webkit-overflow-scrolling: touch
+// .responsive
+// 	width: 100%
+// 	height: 100%
+// 	display: flex
+// 	flex-direction: column
+// 	overflow-y: auto
+// 	overflow-x: hidden
+// 	position: relative
+// 	-webkit-overflow-scrolling: touch
 
 j|Group
 	IBeadView: ClassReference("org.apache.royale.core.beads.GroupView")
@@ -70,6 +70,10 @@ j|Container
 	IViewportModel: ClassReference("org.apache.royale.core.beads.models.ViewportModel")
 	//align-items: flex-start
 
+j|Image
+	IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.ImageModel")
+	IBeadView:  ClassReference("org.apache.royale.jewel.beads.views.ImageView")
+//vertical-align: top
 
 //j|Grid
 //	IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.GridLayout")


Mime
View raw message