Add full selection from P1, and minor layout changes
[potlatch2.git] / net / systemeD / potlatch2 / StyleSelector.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:VBox
3         xmlns:mx="http://www.adobe.com/2006/mxml"
4         paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"
5         horizontalAlign="left" backgroundColor="white" borderStyle="inset">
6         
7         <mx:List width="100%" height="100%" id="mapStyle" change="updateMapStyle();"> 
8             <!-- This should be pulled in from an XML file rather than sitting in the source -->
9             <mx:dataProvider>
10                 <mx:Object label="Potlatch" data="potlatch.css" />
11                 <mx:Object label="Wireframe" data="wireframe.css" />
12             </mx:dataProvider>
13         </mx:List>
14
15         <mx:Script><![CDATA[
16                 import net.systemeD.halcyon.*;
17                 import net.systemeD.halcyon.connection.*;
18                 import net.systemeD.potlatch2.*;
19
20                 private function updateMapStyle():void {
21             var theMap:Map = Globals.vars.root;
22                         var style:String=mapStyle.selectedItem.data;
23                         theMap.setStyle(style);
24                 }
25
26     ]]></mx:Script>     
27 </mx:VBox>
28