Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE37911E8C for ; Sat, 23 Aug 2014 03:25:42 +0000 (UTC) Received: (qmail 16983 invoked by uid 500); 23 Aug 2014 03:25:39 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 16870 invoked by uid 500); 23 Aug 2014 03:25:39 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 16098 invoked by uid 99); 23 Aug 2014 03:25:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Aug 2014 03:25:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 86F589550C2; Sat, 23 Aug 2014 03:25:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: jmclean@apache.org To: commits@flex.apache.org Date: Sat, 23 Aug 2014 03:25:55 -0000 Message-Id: <035ec9a4a34a48da98b86ab2cebe2dc7@git.apache.org> In-Reply-To: <034f4603dc3442d18fb87a61311837f1@git.apache.org> References: <034f4603dc3442d18fb87a61311837f1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/51] [partial] Merged TourDeFlex release from develop http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceStyles.css ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceStyles.css b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceStyles.css new file mode 100644 index 0000000..9d5210f --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceStyles.css @@ -0,0 +1,155 @@ +/* + * 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. + */ +body { + font-family: Courier New, Courier, monospace; + font-size: medium; +} + +.ActionScriptASDoc { + color: #3f5fbf; +} + +.ActionScriptBracket/Brace { +} + +.ActionScriptComment { + color: #009900; + font-style: italic; +} + +.ActionScriptDefault_Text { +} + +.ActionScriptMetadata { + color: #0033ff; + font-weight: bold; +} + +.ActionScriptOperator { +} + +.ActionScriptReserved { + color: #0033ff; + font-weight: bold; +} + +.ActionScriptString { + color: #990000; + font-weight: bold; +} + +.ActionScriptclass { + color: #9900cc; + font-weight: bold; +} + +.ActionScriptfunction { + color: #339966; + font-weight: bold; +} + +.ActionScriptinterface { + color: #9900cc; + font-weight: bold; +} + +.ActionScriptpackage { + color: #9900cc; + font-weight: bold; +} + +.ActionScripttrace { + color: #cc6666; + font-weight: bold; +} + +.ActionScriptvar { + color: #6699cc; + font-weight: bold; +} + +.MXMLASDoc { + color: #3f5fbf; +} + +.MXMLComment { + color: #800000; +} + +.MXMLComponent_Tag { + color: #0000ff; +} + +.MXMLDefault_Text { +} + +.MXMLProcessing_Instruction { +} + +.MXMLSpecial_Tag { + color: #006633; +} + +.MXMLString { + color: #990000; +} + +.CSS@font-face { + color: #990000; + font-weight: bold; +} + +.CSS@import { + color: #006666; + font-weight: bold; +} + +.CSS@media { + color: #663333; + font-weight: bold; +} + +.CSS@namespace { + color: #923196; +} + +.CSSComment { + color: #999999; +} + +.CSSDefault_Text { +} + +.CSSDelimiters { +} + +.CSSProperty_Name { + color: #330099; +} + +.CSSProperty_Value { + color: #3333cc; +} + +.CSSSelector { + color: #ff00ff; +} + +.CSSString { + color: #990000; +} + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceTree.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceTree.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceTree.html new file mode 100644 index 0000000..80281a9 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/SourceTree.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + +
+

+ To view this page ensure that Adobe Flash Player version + 10.0.0 or greater is installed. +

+ +
+ + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/index.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/index.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/index.html new file mode 100644 index 0000000..2caa9d3 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/index.html @@ -0,0 +1,32 @@ + + + + + + +Source of Sample-AIR2-NetworkInfo + + + + + + + <body> + </body> + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample-app.xml.txt ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample-app.xml.txt b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample-app.xml.txt new file mode 100644 index 0000000..58d0d2e --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample-app.xml.txt @@ -0,0 +1,153 @@ + + + + + + + + NetworkInfoSample + + + Network Info Sample + + + Network Info Sample + + + v1 + + + + + + + + + + + + [This value will be overwritten by Flash Builder in the output app.xml] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample.mxml.html new file mode 100644 index 0000000..31bcce6 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/sample.mxml.html @@ -0,0 +1,85 @@ + + + + + + +sample.mxml + + + +
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
+                       xmlns:s="library://ns.adobe.com/flex/spark" 
+                       xmlns:mx="library://ns.adobe.com/flex/mx" 
+                       styleName="plain" width="100%" height="100%">
+    
+    <fx:Script>
+        <![CDATA[
+            import flash.events.ErrorEvent;
+            import flash.events.MouseEvent;
+            import flash.net.NetworkInfo;
+            import flash.net.NetworkInterface;
+            import flash.events.UncaughtErrorEvent;
+            
+            import mx.collections.ArrayCollection;
+            
+            []private var ac:ArrayCollection = new ArrayCollection();
+            
+            protected function button1_clickHandler(event:MouseEvent):void
+            {
+                var ni:NetworkInfo = NetworkInfo.networkInfo;
+                var interfaceVector:Vector.<NetworkInterface> = ni.findInterfaces();
+                
+                for each (var item:NetworkInterface in interfaceVector)
+                {
+                    ac.addItem(item);
+                }
+            }
+            
+            protected function addressFunction(item:Object, column:DataGridColumn):String
+            {
+                if (NetworkInterface(item).addresses.length > 0)
+                {
+                    return NetworkInterface(item).addresses[0].address;    
+                }
+                else return "";
+            }
+        ]]>
+    </fx:Script>
+
+    <s:Panel width="100%" height="100%" title="NetworkInfo Sample" skinClass="skins.TDFPanelSkin">
+        <s:VGroup width="98%" height="98%" top="5" left="10">
+            <s:Button label="Find Network Interfaces" click="button1_clickHandler(event)"/>    
+            <mx:DataGrid id="dataGrid" dataProvider="{ac}" width="650" height="120">
+                <mx:columns>
+                    <mx:DataGridColumn dataField="name"/>
+                    <mx:DataGridColumn dataField="hardwareAddress" width="140"/>
+                    <mx:DataGridColumn dataField="active" width="70"/>
+                    <mx:DataGridColumn dataField="addresses" labelFunction="addressFunction" width="150"/>
+                    <mx:DataGridColumn dataField="mtu"/>
+                </mx:columns>
+            </mx:DataGrid>
+            <s:Label width="650" verticalAlign="justify" color="#323232" 
+                     text="The NetworkInfo class provides information about the network interfaces on a computer. Most computers 
+    have one or more interfaces, such as a wired and a wireless network interface. Additional interfaces such as VPN, loopback, or virtual interfaces may also be present. Click
+    the Find Network Interfaces button to display your current interfaces."/>
+        </s:VGroup>
+    </s:Panel>
+    
+</s:WindowedApplication>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/skins/TDFPanelSkin.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/skins/TDFPanelSkin.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/skins/TDFPanelSkin.mxml.html new file mode 100644 index 0000000..847dc77 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/NetworkInfo/srcview/source/skins/TDFPanelSkin.mxml.html @@ -0,0 +1,158 @@ + + + + + + TDFPanelSkin.mxml + + + + + +

<?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.

+


+

-->

+


+

<!--

+


+

ADOBE SYSTEMS INCORPORATED

+

Copyright 2008 Adobe Systems Incorporated

+

All Rights Reserved.

+


+

NOTICE: Adobe permits you to use, modify, and distribute this file

+

in accordance with the terms of the license agreement accompanying it.

+


+

-->

+


+

<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 

+

        alpha.disabled="0.5" minWidth="131" minHeight="127">

+

    

+

    <fx:Metadata>

+

        [HostComponent("spark.components.Panel")]

+

    </fx:Metadata> 

+

    

+

    <s:states>

+

        <s:State name="normal" />

+

        <s:State name="disabled" />

+

        <s:State name="normalWithControlBar" />

+

        <s:State name="disabledWithControlBar" />

+

    </s:states>

+

    

+

    <!-- drop shadow -->

+

    <s:Rect left="0" top="0" right="0" bottom="0">

+

        <s:filters>

+

            <s:DropShadowFilter blurX="15" blurY="15" alpha="0.18" distance="11" angle="90" knockout="true" />

+

        </s:filters>

+

        <s:fill>

+

            <s:SolidColor color="0" />

+

        </s:fill>

+

    </s:Rect>

+

    

+

    <!-- layer 1: border -->

+

    <s:Rect left="0" right="0" top="0" bottom="0">

+

        <s:stroke>

+

            <s:SolidColorStroke color="0" alpha="0.50" weight="1" />

+

        </s:stroke>

+

    </s:Rect>

+

    

+

    <!-- layer 2: background fill -->

+

    <s:Rect left="0" right="0" bottom="0" height="15">

+

        <s:fill>

+

            <s:LinearGradient rotation="90">

+

                <s:GradientEntry color="0xE2E2E2" />

+

                <s:GradientEntry color="0x000000" />

+

            </s:LinearGradient>

+

        </s:fill>

+

    </s:Rect>

+

    

+

    <!-- layer 3: contents -->

+

    <s:Group left="1" right="1" top="1" bottom="1" >

+

        <s:layout>

+

            <s:VerticalLayout gap="0" horizontalAlign="justify" />

+

        </s:layout>

+

        

+

        <s:Group id="topGroup" >

+

            <!-- layer 0: title bar fill -->

+

            <!-- Note: We have custom skinned the title bar to be solid black for Tour de Flex -->

+

            <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0x000000" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 1: title bar highlight -->

+

            <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0" >

+

                <s:stroke>

+

                    <s:LinearGradientStroke rotation="90" weight="1">

+

                        <s:GradientEntry color="0xEAEAEA" />

+

                        <s:GradientEntry color="0xD9D9D9" />

+

                    </s:LinearGradientStroke>

+

                </s:stroke>

+

            </s:Rect>

+

            

+

            <!-- layer 2: title bar divider -->

+

            <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">

+

                <s:fill>

+

                    <s:SolidColor color="0xC0C0C0" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 3: text -->

+

            <s:Label id="titleDisplay" maxDisplayedLines="1"

+

                     left="9" right="3" top="1" minHeight="30"

+

                     verticalAlign="middle" fontWeight="bold" color="#E2E2E2">

+

            </s:Label>

+

            

+

        </s:Group>

+

        

+

        <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">

+

        </s:Group>

+

        

+

        <s:Group id="bottomGroup" minWidth="0" minHeight="0"

+

                 includeIn="normalWithControlBar, disabledWithControlBar" >

+

            <!-- layer 0: control bar background -->

+

            <s:Rect left="0" right="0" bottom="0" top="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0xE2EdF7" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 1: control bar divider line -->

+

            <s:Rect left="0" right="0" top="0" height="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0xD1E0F2" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 2: control bar -->

+

            <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">

+

                <s:layout>

+

                    <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />

+

                </s:layout>

+

            </s:Group>

+

        </s:Group>

+

    </s:Group>

+

</s:Skin>

+ + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/TDFPanelSkin.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/TDFPanelSkin.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/TDFPanelSkin.mxml.html new file mode 100644 index 0000000..df79d11 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/TDFPanelSkin.mxml.html @@ -0,0 +1,147 @@ + + + + + + TDFPanelSkin.mxml + + + + + +

<?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.

+


+

-->

+


+

<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 

+

        alpha.disabled="0.5" minWidth="131" minHeight="127">

+

    

+

    <fx:Metadata>

+

        [HostComponent("spark.components.Panel")]

+

    </fx:Metadata> 

+

    

+

    <s:states>

+

        <s:State name="normal" />

+

        <s:State name="disabled" />

+

        <s:State name="normalWithControlBar" />

+

        <s:State name="disabledWithControlBar" />

+

    </s:states>

+

    

+

    <!-- drop shadow -->

+

    <s:Rect left="0" top="0" right="0" bottom="0">

+

        <s:filters>

+

            <s:DropShadowFilter blurX="15" blurY="15" alpha="0.18" distance="11" angle="90" knockout="true" />

+

        </s:filters>

+

        <s:fill>

+

            <s:SolidColor color="0" />

+

        </s:fill>

+

    </s:Rect>

+

    

+

    <!-- layer 1: border -->

+

    <s:Rect left="0" right="0" top="0" bottom="0">

+

        <s:stroke>

+

            <s:SolidColorStroke color="0" alpha="0.50" weight="1" />

+

        </s:stroke>

+

    </s:Rect>

+

    

+

    <!-- layer 2: background fill -->

+

    <s:Rect left="0" right="0" bottom="0" height="15">

+

        <s:fill>

+

            <s:LinearGradient rotation="90">

+

                <s:GradientEntry color="0xE2E2E2" />

+

                <s:GradientEntry color="0x000000" />

+

            </s:LinearGradient>

+

        </s:fill>

+

    </s:Rect>

+

    

+

    <!-- layer 3: contents -->

+

    <s:Group left="1" right="1" top="1" bottom="1" >

+

        <s:layout>

+

            <s:VerticalLayout gap="0" horizontalAlign="justify" />

+

        </s:layout>

+

        

+

        <s:Group id="topGroup" >

+

            <!-- layer 0: title bar fill -->

+

            <!-- Note: We have custom skinned the title bar to be solid black for Tour de Flex -->

+

            <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0x000000" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 1: title bar highlight -->

+

            <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0" >

+

                <s:stroke>

+

                    <s:LinearGradientStroke rotation="90" weight="1">

+

                        <s:GradientEntry color="0xEAEAEA" />

+

                        <s:GradientEntry color="0xD9D9D9" />

+

                    </s:LinearGradientStroke>

+

                </s:stroke>

+

            </s:Rect>

+

            

+

            <!-- layer 2: title bar divider -->

+

            <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">

+

                <s:fill>

+

                    <s:SolidColor color="0xC0C0C0" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 3: text -->

+

            <s:Label id="titleDisplay" maxDisplayedLines="1"

+

                     left="9" right="3" top="1" minHeight="30"

+

                     verticalAlign="middle" fontWeight="bold" color="#E2E2E2">

+

            </s:Label>

+

            

+

        </s:Group>

+

        

+

        <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">

+

        </s:Group>

+

        

+

        <s:Group id="bottomGroup" minWidth="0" minHeight="0"

+

                 includeIn="normalWithControlBar, disabledWithControlBar" >

+

            <!-- layer 0: control bar background -->

+

            <s:Rect left="0" right="0" bottom="0" top="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0xE2EdF7" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 1: control bar divider line -->

+

            <s:Rect left="0" right="0" top="0" height="1" >

+

                <s:fill>

+

                    <s:SolidColor color="0xD1E0F2" />

+

                </s:fill>

+

            </s:Rect>

+

            

+

            <!-- layer 2: control bar -->

+

            <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">

+

                <s:layout>

+

                    <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />

+

                </s:layout>

+

            </s:Group>

+

        </s:Group>

+

    </s:Group>

+

</s:Skin>

+ + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample1.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample1.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample1.mxml.html new file mode 100644 index 0000000..9241f98 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample1.mxml.html @@ -0,0 +1,59 @@ + + + + + + +sample1.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<s:WindowedApplication     xmlns:fx="http://ns.adobe.com/mxml/2009" 
+            xmlns:s="library://ns.adobe.com/flex/spark" 
+            xmlns:mx="library://ns.adobe.com/flex/mx" styleName="plain" width="100%" height="100%">
+    <fx:Script>
+        <![CDATA[
+            import flash.events.MouseEvent;
+            
+            import mx.controls.FileSystemDataGrid;
+            
+            protected function datagridHandler(event:MouseEvent):void
+            {
+                var fsg:FileSystemDataGrid = event.currentTarget as FileSystemDataGrid;
+                if (fsg.selectedItem != null)
+                    (fsg.selectedItem as File).openWithDefaultApplication();
+            }
+        ]]>
+    </fx:Script>
+    
+    <s:Panel width="100%" height="100%" title="Open With Default Application Sample" skinClass="skins.TDFPanelSkin">
+        <s:VGroup top="10" left="10">
+            <s:Label width="660" verticalAlign="justify" color="#323232" 
+                     text="The Open With Default Application support allows you to open any file with it's associated default application. Locate a file
+item in the file system grid and double-click it to see it in action:"/>
+            <mx:Button icon="@Embed(source='up.png')" click="fileGrid.navigateUp();"
+                       enabled="{fileGrid.canNavigateUp}"/>
+            <mx:FileSystemDataGrid id="fileGrid" directory="{File.desktopDirectory}" width="660" height="150" 
+                                   doubleClickEnabled="true" doubleClick="datagridHandler(event)">
+            </mx:FileSystemDataGrid>    
+        </s:VGroup>
+    </s:Panel>
+
+</s:WindowedApplication>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample2.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample2.mxml.html b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample2.mxml.html new file mode 100644 index 0000000..ab989c3 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/sample2.mxml.html @@ -0,0 +1,58 @@ + + + + + + +sample2.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
+                       xmlns:s="library://ns.adobe.com/flex/spark" 
+                       xmlns:mx="library://ns.adobe.com/flex/mx" styleName="plain" width="100%" height="100%">
+    <fx:Declarations>
+        <!-- Place non-visual elements (e.g., services, value objects) here -->
+    </fx:Declarations>
+    <fx:Script>
+        <![CDATA[
+            protected var fileToOpen:File = File.documentsDirectory; 
+            
+            private function onLoadFileClick():void
+            {
+                var file:File = File.createTempDirectory().resolvePath("tourdeflex-air2-sample.txt");
+                var fileStream:FileStream = new FileStream();
+                fileStream.open(file, FileMode.WRITE);
+                fileStream.writeUTFBytes(txtArea.text);
+                fileStream.close();
+                file.openWithDefaultApplication();
+            }
+        ]]>
+    </fx:Script>
+    <s:Panel width="100%" height="100%" title="Open With Default Application Sample" skinClass="skins.TDFPanelSkin">
+        <s:VGroup paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8">
+            <s:Label horizontalCenter="0" top="15" width="400" verticalAlign="justify" color="#323232" 
+                     text="This sample demonstrates how you can write some text into a file and then open it immediately with the default text application."/>
+            <s:Label horizontalCenter="0" text="Enter text and click button:"/>
+            <s:TextArea id="txtArea" width="80%" height="40%"/>
+            <s:Button label="Load File" click="onLoadFileClick()"/>    
+        </s:VGroup>
+    </s:Panel>
+</s:WindowedApplication>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e1f9d1df/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/srcview/Sample-AIR2-OpenWithDefaultApplication/src/sample1-app.xml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/srcview/Sample-AIR2-OpenWithDefaultApplication/src/sample1-app.xml b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/srcview/Sample-AIR2-OpenWithDefaultApplication/src/sample1-app.xml new file mode 100755 index 0000000..e47ce20 --- /dev/null +++ b/TourDeFlex/TourDeFlex/src/objects/AIR20/OpenWithDefaultApp/srcview/Sample-AIR2-OpenWithDefaultApplication/src/sample1-app.xml @@ -0,0 +1,153 @@ + + + + + + + + sample1 + + + sample1 + + + sample1 + + + v1 + + + + + + + + + + + + [This value will be overwritten by Flash Builder in the output app.xml] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +