dataProvider="{Imagery.instance().getAvailableImagery()}"
rowCount="{Imagery.instance().getAvailableImagery().length}"/>
<mx:HBox>
- <mx:CheckBox width="100%" label="Dim" selected="{FlexGlobals.topLevelApplication.theMap.getDimming()}" id="dim"
+ <mx:CheckBox width="100%" label="Dim" selected="{application.theMap.getDimming()}" id="dim"
change="setDimming(dim.selected)" />
- <mx:CheckBox width="100%" label="Sharpen" selected="{FlexGlobals.topLevelApplication.theMap.getSharpen()}" id="sharpen"
+ <mx:CheckBox width="100%" label="Sharpen" selected="{application.theMap.getSharpen()}" id="sharpen"
change="setSharpen(sharpen.selected)" />
</mx:HBox>
import mx.collections.ArrayCollection;
import mx.managers.PopUpManager;
+ [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
+
public function setDimming(v:Boolean):void {
FlexGlobals.topLevelApplication.theMap.setDimming(dim.selected);
FlexGlobals.topLevelApplication.yahoo.alpha = dim.selected ? 0.5 : 1;
panel.setEntity(entity);
PopUpManager.centerPopUp(panel);
}
+
+ public function updateSelectButton():void {
+ selectButton.enabled=relationSelector.selectedItems.length>0;
+ }
]]></fx:Script>
<mx:Text id="warning" text="" />
- <mx:List width="100%" height="100%" id="relationSelector" verticalScrollPolicy="on" allowMultipleSelection="true" >
+ <mx:List width="100%" height="100%" id="relationSelector" change="updateSelectButton();" verticalScrollPolicy="on" allowMultipleSelection="true" >
</mx:List>
<mx:ControlBar>
<mx:Button label="New Relation..." click="closeAndNewRelation();" styleName="titleWindowButton" />
<mx:Button label="Load Relation..." click="closeAndLoadRelation();" styleName="titleWindowButton" />
<mx:Spacer width="100%"/>
- <mx:Button label="Select" click="updateEntityAndClose();" enabled="{relationSelector.selectedItems.length>0}" styleName="titleWindowButton" />
+ <mx:Button label="Select" id="selectButton" click="updateEntityAndClose();" enabled="false" styleName="titleWindowButton" />
</mx:ControlBar>
</mx:TitleWindow>
import mx.core.Application;
import mx.core.FlexGlobals;
+ [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
+
/** Pops up a multi-tabbed help window in the middle of the screen, then remembers that the user has seen it. */
public function init():void {
- PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
+ PopUpManager.addPopUp(this, Application(application), true);
PopUpManager.centerPopUp(this);
this.addEventListener(CloseEvent.CLOSE, helpDialog_close);
</mx:TabNavigator>
<mx:ControlBar>
- <mx:Label text="Version: {FlexGlobals.topLevelApplication.version} Build: {FlexGlobals.topLevelApplication.build_number}" />
+ <mx:Label text="Version: {application.version} Build: {application.build_number}" />
<mx:Spacer width="100%"/>
<mx:Button label="Ok" click="PopUpManager.removePopUp(this);" styleName="titleWindowButton" />
</mx:ControlBar>
<fx:Declarations>
<mx:ArrayCollection id="changesetTags">
<fx:Object k="created_by" v="Potlatch 2"/>
- <fx:Object k="version" v="{FlexGlobals.topLevelApplication.version}"/>
- <fx:Object k="build" v="{FlexGlobals.topLevelApplication.build_number}"/>
+ <fx:Object k="version" v="{application.version}"/>
+ <fx:Object k="build" v="{application.build_number}"/>
</mx:ArrayCollection>
</fx:Declarations>
private var _connection:Connection;
private var doSkip:Boolean = false;
- [Bindable]
- private var failureText:String = "";
+ [Bindable] private var failureText:String = "";
+ [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
public function setConnection(connection:Connection):void {
_connection=connection;
<mx:WipeRight id="wipeIn" duration="250"/>
</fx:Declarations>
- <mx:ApplicationControlBar dock="true">
+ <mx:ApplicationControlBar id="controlbar" dock="true">
<mx:PopUpButton id="bgButton" label="Background" openAlways="true" styleName="appBarButton"
creationComplete="bgButton.popUp = new BackgroundSelector();"/>
<mx:PopUpButton id="styleButton" label="Map Style" openAlways="true" styleName="appBarButton"
}
private function continueInit(r:Event):void {
+ controlbar.setStyle('dropShadowEnabled',"false"); // Flex 4 doesn't permit this in Application.css
+
// Set font
var FontLibrary:Class = r.target.applicationDomain.getDefinition("FontLibrary") as Class;
Font.registerFont(FontLibrary.DejaVu);
fillAlphas: 1,1;
fillColors: haloBlue, #6495ED;
/*fillColors: #ffffcc, #ffff99;*/
- backgroundColor: #ffffcc;
- dropShadowEnabled: false;
+ /*backgroundColor: #ffffcc;*/
+ /*dropShadowEnabled: false;*/
/*borderSkin: ClassReference("mx.skins.halo.ApplicationBackground");*/
}