flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Sample app showing Panel and Alerts.
Date Thu, 27 Jun 2013 17:12:21 GMT
Updated Branches:
  refs/heads/develop b116436ad -> 318d5fc44


Sample app showing Panel and Alerts.


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

Branch: refs/heads/develop
Commit: 318d5fc448cb7cd2c6f4aed3fefd5a48045549de
Parents: b116436
Author: Peter Ent <pent@apache.org>
Authored: Thu Jun 27 13:12:13 2013 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Thu Jun 27 13:12:13 2013 -0400

----------------------------------------------------------------------
 .../FlexJSTest_Panel/src/FlexJSTest_Panel.mxml  |  32 +++++
 .../FlexJSTest_Panel/src/MyInitialView.mxml     | 125 +++++++++++++++++++
 2 files changed, 157 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/318d5fc4/examples/FlexJSTest_Panel/src/FlexJSTest_Panel.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_Panel/src/FlexJSTest_Panel.mxml b/examples/FlexJSTest_Panel/src/FlexJSTest_Panel.mxml
new file mode 100644
index 0000000..2e50fc8
--- /dev/null
+++ b/examples/FlexJSTest_Panel/src/FlexJSTest_Panel.mxml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+				   xmlns:local="*"
+				   xmlns:basic="library://ns.apache.org/flexjs/basic" 
+				   >
+
+	<basic:valuesImpl>
+		<basic:SimpleCSSValuesImpl />
+	</basic:valuesImpl>
+	<basic:initialView>
+		<local:MyInitialView />
+	</basic:initialView>
+</basic:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/318d5fc4/examples/FlexJSTest_Panel/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_Panel/src/MyInitialView.mxml b/examples/FlexJSTest_Panel/src/MyInitialView.mxml
new file mode 100644
index 0000000..89f5a1f
--- /dev/null
+++ b/examples/FlexJSTest_Panel/src/MyInitialView.mxml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:basic="library://ns.apache.org/flexjs/basic"
+			    initComplete="initControls()">
+    <fx:Script>
+        <![CDATA[
+			import org.apache.flex.html.staticControls.Alert;
+			import org.apache.flex.html.staticControls.SimpleAlert;
+			import org.apache.flex.html.staticControls.Spinner;
+			
+			private function initControls():void
+			{
+			}
+			
+			private function onButtonClick() : void
+			{
+				Alert.show("This is an Alert! I want to see all of this text.",
+					this,
+					"Testing",
+					Alert.OK|Alert.CANCEL);
+
+			}
+			
+			private function spinnerChanged():void
+			{
+				spinMe.text = "Spin: "+String(spinner.value);
+			}
+			
+			private function showSimpleAlert() : void
+			{
+				SimpleAlert.show("A Simple Alert", this);
+			}
+		]]>
+    </fx:Script>
+
+	<fx:Style>
+		@namespace basic "library://ns.apache.org/flexjs/basic";
+		
+		.Alert {
+			background-color: #EEEEEE;
+			border-style: solid;
+			border-color: #0000FF;
+			border-thickness: 5;
+		}
+		
+		.Alert #titleBar #title {
+			font-weight: bold;
+			color: #EEEEEE;
+		}
+		
+		.SimpleAlert {
+			background-color: #99FF00;
+			border-style: solid;
+			border-color: #FF9900;
+			border-thickness: 5;
+			padding: 5px;
+		}
+		
+		.TitleBar {
+			padding: 5px;
+			color: #FFFFFF;
+			font-weight: bold;
+			text-align: center;
+			background-color: #444444;
+			iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead');
+		}
+		
+		.panel1 {
+			padding: 1px;
+			background-color: #EEEEEE;
+			border-color: #000000;
+			border-thickness: 1;
+			iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead');
+			iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead');
+		}
+		
+		.numStepper {
+			padding: 5px;
+			border-style: solid;
+			border-color: #000000;
+			border-thickness: 1;
+			background-color: #FFFFCC;
+			iBorderBead: ClassReference('org.apache.flex.html.staticControls.beads.SingleLineBorderBead');
+			iBackgroundBead: ClassReference('org.apache.flex.html.staticControls.beads.SolidBackgroundBead');
+		}
+	</fx:Style>
+	
+	
+	<basic:Panel title="Example" x="300" width="300" y="50" className="panel1">
+		<basic:beads>
+			<basic:NonVirtualVerticalLayout />
+		</basic:beads>
+		<basic:Label text="Displays a SimpleAlert that has an OK button." />
+		<basic:TextButton text="Show Simple Alert" click="showSimpleAlert()" />
+		<basic:Label text="Displays an Alert which can have multiple buttons." />
+		<basic:TextButton text="Push Me" click="onButtonClick()" />
+		<basic:Container className="numStepper">
+			<basic:beads>
+				<basic:NonVirtualHorizontalLayout />
+			</basic:beads>
+			<basic:Label id="spinMe" width="50" text="Spin: 0" />
+			<basic:Spinner id="spinner" valueChanged="spinnerChanged()" />
+		</basic:Container>
+	</basic:Panel>
+		
+	
+</basic:ViewBase>


Mime
View raw message