You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pe...@apache.org on 2018/03/27 21:24:09 UTC

[royale-asjs] branch feature/MXRoyale updated: Updated ControlsExample.

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

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


The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
     new 6506842  Updated ControlsExample.
6506842 is described below

commit 65068425157c867a0ce6265c7a21eec0eec636ef
Author: Peter Ent <pe...@apache.org>
AuthorDate: Tue Mar 27 17:24:02 2018 -0400

    Updated ControlsExample.
---
 examples/mxroyale/ControlsExample/build.xml        |   1 +
 .../{smallgreenrect.jpg => mediumredrect.jpg}      | Bin 13542 -> 13138 bytes
 .../src/main/resources/assets/smallgreenrect.jpg   | Bin 13542 -> 13128 bytes
 .../src/main/royale/ControlsExample.mxml           |  46 ++++++++++++++++-----
 4 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/examples/mxroyale/ControlsExample/build.xml b/examples/mxroyale/ControlsExample/build.xml
index 9b8d270..6db143a 100644
--- a/examples/mxroyale/ControlsExample/build.xml
+++ b/examples/mxroyale/ControlsExample/build.xml
@@ -31,6 +31,7 @@
     <include file="${basedir}/../../build_example.xml" />
     
     <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+    	<property name="theme_arg" value="–theme=frameworks/themes/MXRoyale/src/mx.css" />
     	<mkdir dir="${basedir}/bin/js-debug/assets" />
         <copy todir="${basedir}/bin/js-debug/assets" >
             <fileset dir="${basedir}/src/main/resources/assets">
diff --git a/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg b/examples/mxroyale/ControlsExample/src/main/resources/assets/mediumredrect.jpg
similarity index 93%
copy from examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg
copy to examples/mxroyale/ControlsExample/src/main/resources/assets/mediumredrect.jpg
index c5f9ce6..c5e5715 100644
Binary files a/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg and b/examples/mxroyale/ControlsExample/src/main/resources/assets/mediumredrect.jpg differ
diff --git a/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg b/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg
index c5f9ce6..2cbca5c 100644
Binary files a/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg and b/examples/mxroyale/ControlsExample/src/main/resources/assets/smallgreenrect.jpg differ
diff --git a/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml b/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
index 52f717f..1a3f7ad 100644
--- a/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
+++ b/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
@@ -40,26 +40,50 @@ limitations under the License.
 		}
 	</fx:Style>
 	
-	<mx:VBox >
+	<fx:Script>
+		<![CDATA[
+			import org.apache.royale.events.Event;
+			import org.apache.royale.events.MouseEvent;
+			
+			private function pushMePushed(event:MouseEvent):void
+			{
+				trace("The PushMe button was pushed");
+			}
+			
+			private function changeIcon():void
+			{
+				button2.icon = "assets/mediumredrect.jpg";
+			}
+			
+			private function otherPushMe():void
+			{
+				trace("The other button was pushed");
+				text1.html = "The Button with an icon was pushed.";
+				dispatchEvent(new Event("layoutNeeded"));
+			}
+		]]>
+	</fx:Script>
+	
+	<mx:VBox id="vbox1">
 		<mx:Label text="Hello World"/>
-		<mx:Button label="Push Me" toolTip="I do nothing" />
-		<mx:Button label="Green" icon="assets/smallgreenrect.jpg" toolTip="I also do nothing"  />
-		<mx:Image source="assets/smallgreenrect.jpg" toolTip="Green Square"  />
-		<mx:Text width="200" height="60" toolTip="More than meets the eye.">
+		<mx:Button label="Change Icon" click="changeIcon()" />
+		<mx:Button id="button2" label="Make Shorter" className="GreenButton" icon="assets/smallgreenrect.jpg" click="otherPushMe()"/>
+		<mx:Image source="assets/mediumredrect.jpg" toolTip="Green Square"  />
+		<mx:Text id="text1" toolTip="More than meets the eye.">
 			<mx:html><![CDATA[
 				This is <b>Text!</b> This more than a few words in it to show how
 				it works and <b>wraps</b>.
 			]]></mx:html>
 		</mx:Text>
 	</mx:VBox>
-	<mx:HBox>
+	<mx:HBox id="hbox1">
 		<mx:Label text="Hello World"/>
-		<mx:Button label="Push Me" toolTip="I do nothing" />
-		<mx:Button label="Green" icon="assets/smallgreenrect.jpg" toolTip="I also do nothing"  />
-		<mx:Image source="assets/smallgreenrect.jpg" toolTip="Green Square"  />
+		<mx:Button label="Push Me Longer Title" toolTip="I do nothing" />
+		<mx:Button label="Green Icon Button" className="GreenButton" icon="assets/smallgreenrect.jpg" toolTip="I also do nothing"  />
+		<mx:Image source="assets/mediumredrect.jpg" toolTip="Green Square"  />
 	</mx:HBox>
-	<mx:TextArea width="200" height="100" text="This is the TextArea control!"
-		displayAsPassword="true" maxChars="100"/>
+	<mx:TextArea text="This is the TextArea control!"
+		maxChars="100"/>
 
         
 </mx:Application>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
pent@apache.org.