You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/02/08 20:01:53 UTC

flex-tourjs git commit: Changed the ImageButton example to use URLUtils.getFullPath to make the SWF platform version works.

Repository: flex-tourjs
Updated Branches:
  refs/heads/develop 1def6968e -> ae2dca1e4


Changed the ImageButton example to use URLUtils.getFullPath to make the SWF platform version works.


Project: http://git-wip-us.apache.org/repos/asf/flex-tourjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tourjs/commit/ae2dca1e
Tree: http://git-wip-us.apache.org/repos/asf/flex-tourjs/tree/ae2dca1e
Diff: http://git-wip-us.apache.org/repos/asf/flex-tourjs/diff/ae2dca1e

Branch: refs/heads/develop
Commit: ae2dca1e482c3caf47812e36f970d91bcc48b86d
Parents: 1def696
Author: Peter Ent <pe...@apache.org>
Authored: Wed Feb 8 15:01:51 2017 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Feb 8 15:01:51 2017 -0500

----------------------------------------------------------------------
 .../ImageButton/src/main/flex/ImageButton.mxml  |  72 +++++++++++--------
 .../ImageButton/src/main/flex/start-button.png  | Bin 79225 -> 62960 bytes
 .../ImageButton/src/main/flex/stop-button.png   | Bin 78831 -> 62592 bytes
 3 files changed, 43 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/ae2dca1e/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/ImageButton.mxml
----------------------------------------------------------------------
diff --git a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/ImageButton.mxml b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/ImageButton.mxml
index 99227d7..2352f72 100644
--- a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/ImageButton.mxml
+++ b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/ImageButton.mxml
@@ -18,38 +18,52 @@ limitations under the License.
 
 -->
 <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
-                   xmlns:js="library://ns.apache.org/flexjs/basic" >
-    <fx:Script>
-    	<![CDATA[
-    		import org.apache.flex.html.SimpleAlert;
-    		
-    		private function startProcess():void {
-    			SimpleAlert.show("Process started!", mainView);
-    		}
-    		
-    		private function stopProcess():void {
-    			SimpleAlert.show("Process stopped!", mainView);
-    		}
-    		
-    	]]>
-    </fx:Script>
-    <fx:Style>
-    	@namespace js "library://ns.apache.org/flexjs/basic";
-    	
-    	js|ImageButton {
-    	    margin: 10px;
-    	}
-    </fx:Style>
+                   xmlns:js="library://ns.apache.org/flexjs/basic"
+				   xmlns:local="*">
+	<fx:Script>
+		<![CDATA[
+			import org.apache.flex.html.SimpleAlert;
+			import org.apache.flex.utils.URLUtils;
+			import org.apache.flex.utils.StringUtil;
+			import org.apache.flex.html.ImageButton;
+			
+			[Bindable]
+			private var outputStatus:String = "";
+			
+			private function startProcess():void {
+				outputStatus = "Process Started!";
+			}
+			
+			private function stopProcess():void {
+				outputStatus = "Process Stopped!";
+			}
+		]]>
+	</fx:Script>
+	
+	<js:beads>
+		<js:ApplicationDataBinding />
+	</js:beads>
+    
     <js:valuesImpl>
         <js:SimpleCSSValuesImpl />
     </js:valuesImpl>
     <js:initialView>
-        <js:View id="mainView">
-        	<js:beads>
-        		<js:VerticalLayout />
-        	</js:beads>
-        	<js:ImageButton source="start-button.png" click="startProcess()" />
-        	<js:ImageButton source="stop-button.png" click="stopProcess()" />
-        </js:View>
+		<js:View id="mainView">
+			<js:beads>
+				<js:VerticalLayout />
+			</js:beads>
+			
+			<js:Label text="Image Buttons Below" />
+			<js:Spacer height="50" />
+			
+			<js:HContainer>
+				<js:ImageButton source="{URLUtils.getFullPath(mainView,'start-button.png')}" click="startProcess()" />
+				<js:Spacer width="10" />
+				<js:Label text="{outputStatus}" width="150" />
+				<js:Spacer width="10" />
+				<js:ImageButton id="stopButton" source="{URLUtils.getFullPath(mainView,'stop-button.png')}" click="stopProcess()" />
+			</js:HContainer>
+			
+		</js:View>
     </js:initialView>
 </js:Application>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/ae2dca1e/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/start-button.png
----------------------------------------------------------------------
diff --git a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/start-button.png b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/start-button.png
index 37f612b..3c1495b 100644
Binary files a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/start-button.png and b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/start-button.png differ

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/ae2dca1e/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/stop-button.png
----------------------------------------------------------------------
diff --git a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/stop-button.png b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/stop-button.png
index b434ef3..ef3bd6f 100644
Binary files a/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/stop-button.png and b/examples/visualComponents/generalComponents/button/ImageButton/src/main/flex/stop-button.png differ