STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/27883617?noj=FRM27883617-22DC" width="1" height="1"></div>

subwoofer.swf

This is the info page for
Flash #143541

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS3]
Section 1
//IAutomationObject (mx.automation.IAutomationObject) package mx.automation { import flash.events.*; public interface IAutomationObject { function createAutomationIDPart(_arg1:IAutomationObject):Object; function get automationName():String; function get automationDelegate():Object; function set automationName(_arg1:String):void; function getAutomationChildAt(_arg1:int):IAutomationObject; function get showInAutomationHierarchy():Boolean; function get automationTabularData():Object; function resolveAutomationIDPart(_arg1:Object):Array; function replayAutomatableEvent(_arg1:Event):Boolean; function set automationDelegate(_arg1:Object):void; function get automationValue():Array; function get numAutomationChildren():int; function set showInAutomationHierarchy(_arg1:Boolean):void; } }//package mx.automation
Section 2
//BindabilityInfo (mx.binding.BindabilityInfo) package mx.binding { import mx.events.*; public class BindabilityInfo { private var typeDescription:XML; private var childChangeEvents:Object; private var classChangeEvents:Object; public static const METHOD:String = "method"; public static const ACCESSOR:String = "accessor"; public static const CHANGE_EVENT:String = "ChangeEvent"; public static const NON_COMMITTING_CHANGE_EVENT:String = "NonCommittingChangeEvent"; public static const BINDABLE:String = "Bindable"; mx_internal static const VERSION:String = "2.0.1.0"; public static const MANAGED:String = "Managed"; public function BindabilityInfo(_arg1:XML){ childChangeEvents = {}; super(); this.typeDescription = _arg1; } private function getClassChangeEvents():Object{ if (!classChangeEvents){ classChangeEvents = {}; addBindabilityEvents(typeDescription.metadata, classChangeEvents); if (typeDescription.metadata.(@name == MANAGED).length() > 0){ classChangeEvents[PropertyChangeEvent.PROPERTY_CHANGE] = true; }; }; return (classChangeEvents); } private function addBindabilityEvents(_arg1:XMLList, _arg2:Object):void{ var metadata = _arg1; var eventListObj = _arg2; addChangeEvents(metadata.(@name == BINDABLE), eventListObj, true); addChangeEvents(metadata.(@name == CHANGE_EVENT), eventListObj, true); addChangeEvents(metadata.(@name == NON_COMMITTING_CHANGE_EVENT), eventListObj, false); } private function addChangeEvents(_arg1:XMLList, _arg2:Object, _arg3:Boolean):void{ var _local4:XML; var _local5:XMLList; var _local6:String; for each (_local4 in _arg1) { _local5 = _local4.arg; if (_local5.length() > 0){ _local6 = _local5[0].@value; _arg2[_local6] = _arg3; } else { trace((("warning: unconverted Bindable metadata in class '" + typeDescription.@name) + "'")); }; }; } private function copyProps(_arg1:Object, _arg2:Object):Object{ var _local3:String; for (_local3 in _arg1) { _arg2[_local3] = _arg1[_local3]; }; return (_arg2); } public function getChangeEvents(_arg1:String):Object{ var changeEvents:Object; var childDesc:XMLList; var numChildren:int; var childName = _arg1; changeEvents = childChangeEvents[childName]; if (!changeEvents){ changeEvents = copyProps(getClassChangeEvents(), {}); childDesc = (typeDescription.accessor.(@name == childName) + typeDescription.method.(@name == childName)); numChildren = childDesc.length(); if (numChildren == 0){ if (!typeDescription.@dynamic){ trace((((("warning: no describeType entry for '" + childName) + "' on non-dynamic type '") + typeDescription.@name) + "'")); }; } else { if (numChildren > 1){ trace(((((("warning: multiple describeType entries for '" + childName) + "' on type '") + typeDescription.@name) + "':\n") + childDesc)); }; addBindabilityEvents(childDesc.metadata, changeEvents); }; childChangeEvents[childName] = changeEvents; }; return (changeEvents); } } }//package mx.binding
Section 3
//Binding (mx.binding.Binding) package mx.binding { import mx.collections.errors.*; public class Binding { mx_internal var destFunc:Function; mx_internal var srcFunc:Function; mx_internal var destString:String; mx_internal var document:Object; private var hasHadValue:Boolean; mx_internal var isExecuting:Boolean; mx_internal var isHandlingEvent:Boolean; public var twoWayCounterpart:Binding; private var wrappedFunctionSuccessful:Boolean; public var uiComponentWatcher:int; private var lastValue:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){ this.document = _arg1; this.srcFunc = _arg2; this.destFunc = _arg3; this.destString = _arg4; isExecuting = false; isHandlingEvent = false; hasHadValue = false; uiComponentWatcher = -1; BindingManager.addBinding(_arg1, _arg4, this); } public function watcherFired(_arg1:Boolean, _arg2:int):void{ var commitEvent = _arg1; var cloneIndex = _arg2; if (isHandlingEvent){ return; }; try { isHandlingEvent = true; execute(cloneIndex); } finally { isHandlingEvent = false; }; } protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{ var result:Object; var thisArg = _arg1; var wrappedFunction = _arg2; var object = _arg3; var args = _args; wrappedFunctionSuccessful = false; try { result = wrappedFunction.apply(thisArg, args); wrappedFunctionSuccessful = true; return (result); } catch(itemPendingError:ItemPendingError) { itemPendingError.addResponder(new EvalBindingResponder(this, object)); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError)); }; } catch(rangeError:RangeError) { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + rangeError)); }; } catch(error:Error) { if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){ throw (error); } else { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + error)); }; }; }; return (null); } public function execute(_arg1:Object=null):void{ var o = _arg1; if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){ hasHadValue = true; return; }; try { isExecuting = true; wrapFunctionCall(this, innerExecute, o); } finally { isExecuting = false; }; } private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{ var _local3:uint; var _local4:uint; _local3 = _arg1.length(); if (_local3 == _arg2.length()){ _local4 = 0; while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) { _local4++; }; return ((_local4 == _local3)); //unresolved jump }; return (false); } private function innerExecute():void{ var _local1:Object; _local1 = wrapFunctionCall(document, srcFunc); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1)); }; if (((hasHadValue) || (wrappedFunctionSuccessful))){ if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){ destFunc.call(document, _local1); lastValue = _local1; hasHadValue = true; }; }; } } }//package mx.binding
Section 4
//BindingManager (mx.binding.BindingManager) package mx.binding { public class BindingManager { mx_internal static const VERSION:String = "2.0.1.0"; static var debugDestinationStrings:Object = {}; public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:String; if (((!(_arg2)) || ((_arg2 == "")))){ return; }; if (((((((_arg1) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){ for (_local4 in _arg1._bindingsByDestination) { if (_local4.charAt(0) == _arg2.charAt(0)){ if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){ _arg1._bindingsByDestination[_local4].execute(_arg3); }; }; }; }; } public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{ if (!_arg1._bindingsByDestination){ _arg1._bindingsByDestination = {}; _arg1._bindingsBeginWithWord = {}; }; _arg1._bindingsByDestination[_arg2] = _arg3; _arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true; } public static function debugBinding(_arg1:String):void{ debugDestinationStrings[_arg1] = true; } private static function getFirstWord(_arg1:String):String{ var _local2:int; var _local3:int; var _local4:int; _local2 = _arg1.indexOf("."); _local3 = _arg1.indexOf("["); if (_local2 == _local3){ return (_arg1); }; _local4 = Math.min(_local2, _local3); if (_local4 == -1){ _local4 = Math.max(_local2, _local3); }; return (_arg1.substr(0, _local4)); } public static function getUIComponentWatcherForDestination(_arg1:Object, _arg2:String):int{ var _local3:String; if (_arg1._bindingsByDestination){ for (_local3 in _arg1._bindingsByDestination) { if ((((_local3 == _arg2)) && (!((_arg1._bindingsByDestination[_local3].uiComponentWatcher == -1))))){ return (_arg1._bindingsByDestination[_local3].uiComponentWatcher); }; }; }; return (-1); } } }//package mx.binding
Section 5
//EvalBindingResponder (mx.binding.EvalBindingResponder) package mx.binding { import mx.rpc.*; public class EvalBindingResponder implements IResponder { private var binding:Binding; private var object:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function EvalBindingResponder(_arg1:Binding, _arg2:Object){ this.binding = _arg1; this.object = _arg2; } public function fault(_arg1:Object):void{ } public function result(_arg1:Object):void{ binding.execute(object); } } }//package mx.binding
Section 6
//IWatcherSetupUtil (mx.binding.IWatcherSetupUtil) package mx.binding { public interface IWatcherSetupUtil { function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void; } }//package mx.binding
Section 7
//PropertyWatcher (mx.binding.PropertyWatcher) package mx.binding { import mx.core.*; import mx.events.*; import flash.events.*; import flash.utils.*; import mx.utils.*; public class PropertyWatcher extends Watcher { private var useRTTI:Boolean; protected var events:Object; private var _propertyGetter:Function; private var _propertyName:String; private var parentObj:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function PropertyWatcher(_arg1:String, _arg2:Object){ _propertyName = _arg1; this.events = _arg2; useRTTI = !(_arg2); } public function set propertyGetter(_arg1:Function):void{ _propertyGetter = _arg1; } private function objectIsEmpty(_arg1:Object):Boolean{ var _local2:String; for (_local2 in _arg1) { return (false); }; return (true); } private function addParentEventListeners():void{ var _local1:String; for (_local1 in events) { if (_local1 != "__NoChangeEvent__"){ parentObj.addEventListener(_local1, eventHandler, false, EventPriority.BINDING, true); }; }; } override public function updateParent(_arg1:Object):void{ var _local2:String; var _local3:BindabilityInfo; if (((parentObj) && ((parentObj is IEventDispatcher)))){ for (_local2 in events) { parentObj.removeEventListener(_local2, eventHandler); }; }; if ((_arg1 is Watcher)){ parentObj = _arg1.value; } else { parentObj = _arg1; }; if (parentObj){ if (useRTTI){ events = {}; if ((parentObj is IEventDispatcher)){ _local3 = DescribeTypeCache.describeType(parentObj).bindabilityInfo; events = _local3.getChangeEvents(_propertyName); if (objectIsEmpty(events)){ trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "'")); } else { addParentEventListeners(); }; } else { trace((((("warning: unable to bind to property '" + _propertyName) + "' on class '") + getQualifiedClassName(parentObj)) + "' (class is not an IEventDispatcher)")); }; } else { if ((parentObj is IEventDispatcher)){ addParentEventListeners(); }; }; }; wrapUpdate(updateProperty); } public function eventHandler(_arg1:Event):void{ var _local2:Object; if ((_arg1 is PropertyChangeEvent)){ _local2 = PropertyChangeEvent(_arg1).property; if (_local2 != _propertyName){ return; }; }; wrapUpdate(updateProperty); notifyListeners(events[_arg1.type]); } public function get propertyName():String{ return (_propertyName); } private function updateProperty():void{ if (parentObj){ if (_propertyName == "this"){ value = parentObj; } else { if (_propertyGetter != null){ value = _propertyGetter.apply(parentObj, [_propertyName]); } else { value = parentObj[_propertyName]; }; }; } else { value = null; }; updateChildren(); } private function eventNamesToString():String{ var _local1:String; var _local2:String; _local1 = " "; for (_local2 in events) { _local1 = (_local1 + (_local2 + " ")); }; return (_local1); } override protected function shallowClone():Watcher{ var _local1:PropertyWatcher; _local1 = new PropertyWatcher(_propertyName, events); if (_propertyGetter != null){ _local1.propertyGetter = _propertyGetter; }; return (_local1); } private function traceInfo():String{ return ((((((("Watcher(" + getQualifiedClassName(parentObj)) + ".") + _propertyName) + "): events = [") + eventNamesToString()) + (useRTTI) ? "] (RTTI)" : "]")); } } }//package mx.binding
Section 8
//Watcher (mx.binding.Watcher) package mx.binding { import mx.collections.errors.*; public class Watcher { private var listeners:Array; public var value:Object; protected var cloneIndex:int; protected var children:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function Watcher(){ listeners = []; super(); } public function removeChildren(_arg1:int):void{ children.splice(_arg1); } public function updateChildren():void{ var _local1:int; var _local2:int; if (children){ _local1 = children.length; _local2 = 0; while (_local2 < _local1) { children[_local2].updateParent(this); _local2++; }; }; } protected function shallowClone():Watcher{ return (new Watcher()); } protected function wrapUpdate(_arg1:Function):void{ var wrappedFunction = _arg1; try { wrappedFunction.apply(this); } catch(itemPendingError:ItemPendingError) { value = null; } catch(rangeError:RangeError) { value = null; } catch(error:Error) { if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){ throw (error); }; }; } private function valueChanged(_arg1:Object):Boolean{ var _local2:String; if ((((_arg1 == null)) && ((value == null)))){ return (false); }; _local2 = typeof(value); if (_local2 == "string"){ if ((((_arg1 == null)) && ((value == "")))){ return (false); }; return (!((_arg1 == value))); }; if (_local2 == "number"){ if ((((_arg1 == null)) && ((value == 0)))){ return (false); }; return (!((_arg1 == value))); }; if (_local2 == "boolean"){ if ((((_arg1 == null)) && ((value == false)))){ return (false); }; return (!((_arg1 == value))); }; return (true); } public function notifyListeners(_arg1:Boolean):void{ var _local2:int; var _local3:int; _local2 = listeners.length; _local3 = 0; while (_local3 < _local2) { listeners[_local3].watcherFired(_arg1, cloneIndex); _local3++; }; } protected function deepClone(_arg1:int):Watcher{ var _local2:Watcher; var _local3:int; var _local4:int; var _local5:Watcher; _local2 = shallowClone(); _local2.cloneIndex = _arg1; _local2.listeners = listeners.concat(); if (children){ _local3 = children.length; _local4 = 0; while (_local4 < _local3) { _local5 = children[_local4].deepClone(_arg1); _local2.addChild(_local5); _local4++; }; }; return (_local2); } public function updateParent(_arg1:Object):void{ } public function addChild(_arg1:Watcher):void{ if (!children){ children = [_arg1]; } else { children.push(_arg1); }; _arg1.updateParent(this); } public function addListener(_arg1:Binding):void{ listeners.push(_arg1); } } }//package mx.binding
Section 9
//AxisBase (mx.charts.chartClasses.AxisBase) package mx.charts.chartClasses { import flash.events.*; public class AxisBase extends EventDispatcher { private var _title:String;// = "" protected var _transforms:Array; private var _displayName:String;// = "" mx_internal static const VERSION:String = "2.0.1.0"; public function AxisBase(){ _transforms = []; _displayName = ""; _title = ""; super(); } public function get title():String{ return (_title); } public function set displayName(_arg1:String):void{ _displayName = _arg1; } public function unregisterDataTransform(_arg1:DataTransform):void{ var _local2:int; _local2 = 0; while (_local2 < _transforms.length) { if (_transforms[_local2].transform == _arg1){ _transforms.splice(_local2, 1); break; }; _local2++; }; dataChanged(); } protected function describeData(_arg1:uint):Array{ var _local2:Array; var _local3:int; _local2 = []; _local3 = 0; while (_local3 < _transforms.length) { _local2 = _local2.concat(_transforms[_local3].transform.describeData(_transforms[_local3].dimension, _arg1)); _local3++; }; return (_local2); } public function get unitSize():Number{ return (1); } public function dataChanged():void{ } public function get displayName():String{ return (_displayName); } public function set title(_arg1:String):void{ dispatchEvent(new Event("titleChange")); _title = _arg1; } public function set chartDataProvider(_arg1:Object):void{ } public function registerDataTransform(_arg1:DataTransform, _arg2:String):void{ _transforms.push({transform:_arg1, dimension:_arg2}); dataChanged(); } } }//package mx.charts.chartClasses
Section 10
//AxisLabelSet (mx.charts.chartClasses.AxisLabelSet) package mx.charts.chartClasses { public class AxisLabelSet { public var minorTicks:Array; public var accurate:Boolean; public var labels:Array; public var ticks:Array; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.charts.chartClasses
Section 11
//BoundedValue (mx.charts.chartClasses.BoundedValue) package mx.charts.chartClasses { public class BoundedValue { public var upperMargin:Number; public var value:Number; public var lowerMargin:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function BoundedValue(_arg1:Number, _arg2:Number=0, _arg3:Number=0){ this.value = _arg1; this.lowerMargin = _arg2; this.upperMargin = _arg3; } } }//package mx.charts.chartClasses
Section 12
//CartesianChart (mx.charts.chartClasses.CartesianChart) package mx.charts.chartClasses { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.graphics.*; import mx.charts.*; import mx.collections.*; import mx.charts.styles.*; public class CartesianChart extends ChartBase { private var _horizontalAxis:IAxis; private var _horizontalAxisRenderer2:IAxisRenderer; private var _defaultGridLines:GridLines; private var _userSeries2:Array; private var _horizontalAxis2:IAxis; private var _computedGutters:Rectangle; private var _verticalAxis2:IAxis; private var _horizontalAxisRenderer:IAxisRenderer; private var _verticalAxisRenderer:IAxisRenderer; public var horizontalAxisRatio:Number;// = 0.33 private var _bDualMode:Boolean;// = false private var _bAxesRenderersDirty:Boolean;// = false private var _bgridLinesStyleNameDirty:Boolean;// = true private var _dataProvider2:ICollectionView; private var _bAxisLayoutDirty:Boolean;// = true public var verticalAxisRatio:Number;// = 0.33 private var _verticalAxis:IAxis; private var _verticalAxisRenderer2:IAxisRenderer; private var _transformBounds:Rectangle; private var _bAxisStylesDirty:Boolean;// = true private var _series2:Array; private var _labelElements2:Array; mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); public function CartesianChart(){ var _local1:GridLines; _transformBounds = new Rectangle(); _computedGutters = new Rectangle(); _bAxisLayoutDirty = true; _bgridLinesStyleNameDirty = true; _bAxisStylesDirty = true; _bAxesRenderersDirty = false; _bDualMode = false; horizontalAxisRatio = 0.33; verticalAxisRatio = 0.33; super(); StyleManager.registerInheritingStyle("axisTitleStyleName"); horizontalAxisRenderer = new AxisRenderer(); verticalAxisRenderer = new AxisRenderer(); horizontalAxis = new LinearAxis(); verticalAxis = new LinearAxis(); _series2 = (_userSeries2 = []); transforms = [new CartesianTransform()]; _local1 = new GridLines(); backgroundElements = [_local1]; _defaultGridLines = _local1; } override public function localToData(_arg1:Point):Array{ var _local2:Array; _local2 = _transforms[0].invertTransform((_arg1.x - _transformBounds.left), (_arg1.y - _transformBounds.top)); return (_local2); } public function get secondSeries():Array{ return (_series2); } override mx_internal function updateData():void{ if (dataProvider != null){ applyDataProvider(ICollectionView(dataProvider), _transforms[0]); }; if (((!((_dataProvider2 == null))) && ((_transforms.length >= 2)))){ applyDataProvider(_dataProvider2, _transforms[1]); }; } public function set secondSeries(_arg1:Array):void{ _arg1 = ((_arg1 == null)) ? [] : _arg1; _userSeries2 = _arg1; if (!_bDualMode){ initSecondaryMode(); }; invalidateSeries(); invalidateData(); legendDataChanged(); } public function set verticalAxisRenderer(_arg1:IAxisRenderer):void{ if (_verticalAxisRenderer){ if (DisplayObject(_verticalAxisRenderer).parent == this){ removeChild(DisplayObject(_verticalAxisRenderer)); }; }; _verticalAxisRenderer = _arg1; _verticalAxisRenderer.horizontal = false; invalidateProperties(); _bAxisStylesDirty = true; _bAxesRenderersDirty = true; invalidateProperties(); } public function get verticalAxis():IAxis{ return (_verticalAxis); } public function setSecondAxis(_arg1:String, _arg2:IAxis):void{ transforms[0].setAxis(_arg1, _arg2); } public function set verticalAxis(_arg1:IAxis):void{ _verticalAxis = _arg1; _bAxesRenderersDirty = true; invalidateData(); invalidateChildOrder(); invalidateProperties(); } override public function set backgroundElements(_arg1:Array):void{ super.backgroundElements = _arg1; _defaultGridLines = null; } public function set secondDataProvider(_arg1:Object):void{ if ((_arg1 is Array)){ _arg1 = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ } else { if ((_arg1 is IList)){ _arg1 = new ListCollectionView((_arg1 as IList)); } else { if ((_arg1 is XMLList)){ _arg1 = new XMLListCollection(XMLList(_arg1)); } else { if (_arg1 != null){ _arg1 = new ArrayCollection([_arg1]); } else { _arg1 = new ArrayCollection(); }; }; }; }; }; _dataProvider2 = ICollectionView(_arg1); if (!_bDualMode){ initSecondaryMode(); }; invalidateData(); } public function get secondVerticalAxisRenderer():IAxisRenderer{ return (_verticalAxisRenderer2); } override mx_internal function updateSeries():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:DisplayObject; var _local5:IChartElement; var _local6:UIComponent; _local1 = applySeriesSet(series, _transforms[0]); if (((!((_userSeries2 == null))) && ((_transforms.length >= 2)))){ _series2 = applySeriesSet(_userSeries2, _transforms[1]); }; _local3 = (_local1) ? _local1.length : 0; removeElements(_backgroundElementHolder, true); removeElements(_seriesFilterer, false); removeElements(_annotationElementHolder, true); addElements(backgroundElements, _transforms[0], _backgroundElementHolder); allElements = backgroundElements.concat(); addElements(_local1, _transforms[0], _seriesFilterer); allElements = allElements.concat(_local1); addElements(_series2, _transforms[1], _seriesFilterer); allElements = allElements.concat(_series2); labelElements = []; _local2 = 0; while (_local2 < _local1.length) { _local5 = (_local1[_local2] as IChartElement); if (!_local5){ } else { _local6 = UIComponent(_local5.labelContainer); if (_local6){ labelElements.push(_local6); }; }; _local2++; }; _local2 = 0; while (_local2 < _series2.length) { _local5 = (_series2[_local2] as IChartElement); if (!_local5){ } else { _local6 = UIComponent(_local5.labelContainer); if (_local6){ labelElements.push(_local6); }; }; _local2++; }; addElements(labelElements, _transforms[0], _annotationElementHolder); allElements = allElements.concat(labelElements); addElements(annotationElements, _transforms[0], _annotationElementHolder); allElements = allElements.concat(annotationElements); _transforms[0].elements = annotationElements.concat(_local1).concat(backgroundElements); if (_transforms.length >= 2){ _transforms[1].elements = _series2; }; invalidateData(); invalidateSeriesStyles(); } override protected function setChartState(_arg1:uint):void{ var _local2:uint; if (chartState == _arg1){ return; }; _local2 = chartState; super.setChartState(_arg1); if (_horizontalAxisRenderer){ _horizontalAxisRenderer.chartStateChanged(_local2, _arg1); }; if (_verticalAxisRenderer){ _verticalAxisRenderer.chartStateChanged(_local2, _arg1); }; if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.chartStateChanged(_local2, _arg1); }; if (_verticalAxisRenderer2){ _verticalAxisRenderer2.chartStateChanged(_local2, _arg1); }; } public function set secondVerticalAxisRenderer(_arg1:IAxisRenderer):void{ if (_verticalAxisRenderer2){ if (DisplayObject(_verticalAxisRenderer2).parent == this){ removeChild(DisplayObject(_verticalAxisRenderer2)); }; }; _verticalAxisRenderer2 = _arg1; _verticalAxisRenderer2.horizontal = false; invalidateProperties(); _bAxisStylesDirty = true; _bAxesRenderersDirty = true; invalidateChildOrder(); invalidateProperties(); } override mx_internal function updateAxisOrder(_arg1:int):int{ var _temp1 = _arg1; _arg1 = (_arg1 + 1); setChildIndex(DisplayObject(_horizontalAxisRenderer), _temp1); var _temp2 = _arg1; _arg1 = (_arg1 + 1); setChildIndex(DisplayObject(_verticalAxisRenderer), _temp2); if (_horizontalAxisRenderer2){ var _temp3 = _arg1; _arg1 = (_arg1 + 1); setChildIndex(DisplayObject(_horizontalAxisRenderer2), _temp3); }; if (_verticalAxisRenderer2){ var _temp4 = _arg1; _arg1 = (_arg1 + 1); setChildIndex(DisplayObject(_verticalAxisRenderer2), _temp4); }; return (_arg1); } override protected function measure():void{ super.measure(); measuredMinHeight = (_horizontalAxisRenderer.minHeight + 40); measuredMinWidth = (_verticalAxisRenderer.minWidth + 40); if (_horizontalAxisRenderer2 != null){ measuredMinHeight = (measuredMinHeight + _horizontalAxisRenderer2.minWidth); }; if (_verticalAxisRenderer2 != null){ measuredMinWidth = (measuredMinWidth + _verticalAxisRenderer2.minWidth); }; } public function set secondVerticalAxis(_arg1:IAxis):void{ _verticalAxis2 = _arg1; if (!_bDualMode){ initSecondaryMode(); }; _bAxesRenderersDirty = true; invalidateData(); invalidateProperties(); } override protected function commitProperties():void{ var _local1:int; var _local2:Array; if (_bAxesRenderersDirty){ _local1 = (dataTipLayerIndex - 1); addChild(DisplayObject(_horizontalAxisRenderer)); addChild(DisplayObject(_verticalAxisRenderer)); if (_horizontalAxisRenderer2){ addChild(DisplayObject(_horizontalAxisRenderer2)); }; if (_verticalAxisRenderer2){ addChild(DisplayObject(_verticalAxisRenderer2)); }; invalidateDisplayList(); if (_transforms){ CartesianTransform(_transforms[0]).setAxis(CartesianTransform.HORIZONTAL_AXIS, _horizontalAxis); CartesianTransform(_transforms[0]).setAxis(CartesianTransform.VERTICAL_AXIS, _verticalAxis); if (_transforms.length > 1){ CartesianTransform(_transforms[1]).setAxis(CartesianTransform.HORIZONTAL_AXIS, ((_horizontalAxis2 == null)) ? _horizontalAxis : _horizontalAxis2); CartesianTransform(_transforms[1]).setAxis(CartesianTransform.VERTICAL_AXIS, ((_verticalAxis2 == null)) ? _verticalAxis : _verticalAxis2); }; }; _horizontalAxisRenderer.axis = _horizontalAxis; _verticalAxisRenderer.axis = _verticalAxis; if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.axis = ((_horizontalAxis2 == null)) ? _horizontalAxis : _horizontalAxis2; }; if (_verticalAxisRenderer2){ if (_verticalAxis2 == null){ _verticalAxisRenderer2.axis = _verticalAxis; } else { _verticalAxisRenderer2.axis = _verticalAxis2; }; }; _local2 = []; if (_verticalAxisRenderer){ _local2.push(_verticalAxisRenderer); }; if (_verticalAxisRenderer2){ _local2.push(_verticalAxisRenderer2); }; if (_horizontalAxisRenderer){ _horizontalAxisRenderer.otherAxes = _local2; }; if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.otherAxes = _local2; }; _bAxesRenderersDirty = false; }; if (_bAxisStylesDirty){ if ((_horizontalAxisRenderer is DualStyleObject)){ DualStyleObject(_horizontalAxisRenderer).internalStyleName = getStyle("horizontalAxisStyleName"); }; if ((_verticalAxisRenderer is DualStyleObject)){ DualStyleObject(_verticalAxisRenderer).internalStyleName = getStyle("verticalAxisStyleName"); }; if ((_horizontalAxisRenderer2 is DualStyleObject)){ DualStyleObject(_horizontalAxisRenderer2).internalStyleName = getStyle("secondHorizontalAxisStyleName"); }; if ((_verticalAxisRenderer2 is DualStyleObject)){ DualStyleObject(_verticalAxisRenderer2).internalStyleName = getStyle("secondVerticalAxisStyleName"); }; _bAxisStylesDirty = false; }; if (_bgridLinesStyleNameDirty){ if (_defaultGridLines){ _defaultGridLines.internalStyleName = getStyle("gridLinesStyleName"); }; _bgridLinesStyleNameDirty = false; }; super.commitProperties(); } public function get horizontalAxisRenderer():IAxisRenderer{ return (_horizontalAxisRenderer); } public function get horizontalAxis():IAxis{ return (_horizontalAxis); } protected function initSecondaryMode():void{ _bDualMode = true; transforms = [_transforms[0], new CartesianTransform()]; } public function get verticalAxisRenderer():IAxisRenderer{ return (_verticalAxisRenderer); } public function getSecondAxis(_arg1:String):IAxis{ return (transforms[0].getAxis(_arg1)); } public function get secondDataProvider():Object{ return (_dataProvider2); } override public function dataToLocal(... _args):Point{ var _local2:Object; var _local3:Array; var _local4:int; _local2 = {}; _local3 = [_local2]; _local4 = _args.length; if (_local4 > 0){ _local2["d0"] = _args[0]; _transforms[0].getAxis(CartesianTransform.HORIZONTAL_AXIS).mapCache(_local3, "d0", "v0"); }; if (_local4 > 1){ _local2["d1"] = _args[1]; _transforms[0].getAxis(CartesianTransform.VERTICAL_AXIS).mapCache(_local3, "d1", "v1"); }; _transforms[0].transformCache(_local3, "v0", "s0", "v1", "s1"); return (new Point((_local2.s0 + _transformBounds.left), (_local2.s1 + _transformBounds.top))); } public function set secondHorizontalAxisRenderer(_arg1:IAxisRenderer):void{ if (_horizontalAxisRenderer2){ if (DisplayObject(_horizontalAxisRenderer2).parent == this){ removeChild(DisplayObject(_horizontalAxisRenderer2)); }; _horizontalAxisRenderer2.otherAxes = null; }; _horizontalAxisRenderer2 = _arg1; if (!_bDualMode){ initSecondaryMode(); }; if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.horizontal = true; }; invalidateProperties(); _bAxesRenderersDirty = true; _bAxisStylesDirty = true; invalidateChildOrder(); invalidateProperties(); } public function get secondVerticalAxis():IAxis{ return (_verticalAxis2); } public function get computedGutters():Rectangle{ return (_computedGutters); } public function set secondHorizontalAxis(_arg1:IAxis):void{ _horizontalAxis2 = _arg1; if (!_bDualMode){ initSecondaryMode(); }; _bAxesRenderersDirty = true; invalidateData(); invalidateProperties(); } override protected function get dataRegion():Rectangle{ return (_transformBounds); } public function get secondHorizontalAxisRenderer():IAxisRenderer{ return (_horizontalAxisRenderer2); } public function get secondHorizontalAxis():IAxis{ return (_horizontalAxis2); } public function set horizontalAxisRenderer(_arg1:IAxisRenderer):void{ if (_horizontalAxisRenderer){ if (DisplayObject(_horizontalAxisRenderer).parent == this){ removeChild(DisplayObject(_horizontalAxisRenderer)); }; _horizontalAxisRenderer.otherAxes = null; }; _horizontalAxisRenderer = _arg1; _horizontalAxisRenderer.horizontal = true; invalidateProperties(); _bAxesRenderersDirty = true; _bAxisStylesDirty = true; invalidateChildOrder(); invalidateProperties(); } override public function styleChanged(_arg1:String):void{ if ((((_arg1 == null)) || (((!((_horizontalAxisRenderer == null))) && ((_arg1 == "horizontalAxisStyleName")))))){ _bAxisStylesDirty = true; invalidateDisplayList(); }; if ((((_arg1 == null)) || (((!((_verticalAxisRenderer == null))) && ((_arg1 == "verticalAxisStyleName")))))){ _bAxisStylesDirty = true; invalidateDisplayList(); }; if ((((_arg1 == null)) || (((!((_horizontalAxisRenderer2 == null))) && ((_arg1 == "secondHorizontalAxisStyleName")))))){ _bAxisStylesDirty = true; invalidateDisplayList(); }; if ((((_arg1 == null)) || (((!((_verticalAxisRenderer2 == null))) && ((_arg1 == "secondVerticalAxisStyleName")))))){ _bAxisStylesDirty = true; invalidateDisplayList(); }; if ((((_arg1 == null)) || (((!((_defaultGridLines == null))) && ((_arg1 == "gridLinesStyleName")))))){ _bgridLinesStyleNameDirty = true; invalidateDisplayList(); }; if ((((_arg1 == null)) || ((_arg1.indexOf("gutter") == 0)))){ _bAxisLayoutDirty = true; invalidateDisplayList(); }; super.styleChanged(_arg1); } private function updateAxisLayout(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Object; var _local8:Object; var _local9:Object; var _local10:Object; var _local11:Object; var _local12:int; var _local13:int; var _local14:String; var _local15:String; var _local16:DisplayObject; _local3 = getStyle("paddingLeft"); _local4 = getStyle("paddingRight"); _local5 = getStyle("paddingTop"); _local6 = getStyle("paddingBottom"); _local7 = getStyle("gutterLeft"); _local8 = getStyle("gutterRight"); _local9 = getStyle("gutterTop"); _local10 = getStyle("gutterBottom"); if (!isNaN(horizontalAxisRatio)){ _horizontalAxisRenderer.heightLimit = (horizontalAxisRatio * _arg2); }; if (!isNaN(verticalAxisRatio)){ _verticalAxisRenderer.heightLimit = (verticalAxisRatio * _arg1); }; _horizontalAxisRenderer.setActualSize(((_arg1 - _local3) - _local4), ((_arg2 - _local5) - _local6)); _horizontalAxisRenderer.move(_local3, _local5); _verticalAxisRenderer.setActualSize(((_arg1 - _local3) - _local4), ((_arg2 - _local5) - _local6)); _verticalAxisRenderer.move(_local3, _local5); if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.setActualSize(((_arg1 - _local3) - _local4), ((_arg2 - _local5) - _local6)); _horizontalAxisRenderer2.move(_local3, _local5); _local14 = _horizontalAxisRenderer.placement; switch (_local14){ case "left": case "bottom": _horizontalAxisRenderer2.placement = "right"; break; case "top": case "right": _horizontalAxisRenderer2.placement = "left"; break; }; }; if (_verticalAxisRenderer2){ _verticalAxisRenderer2.setActualSize(((_arg1 - _local3) - _local4), ((_arg2 - _local5) - _local6)); _verticalAxisRenderer2.move(_local3, _local5); _local15 = _verticalAxisRenderer.placement; switch (_local15){ case "left": case "bottom": _verticalAxisRenderer2.placement = "top"; break; case "top": case "right": _verticalAxisRenderer2.placement = "bottom"; break; }; }; _computedGutters = new Rectangle(); _local11 = {}; if (_local7 != null){ _computedGutters.left = Number(_local7); _local11.left = false; }; if (_local8 != null){ _computedGutters.right = Number(_local8); _local11.right = false; }; if (_local9 != null){ _computedGutters.top = Number(_local9); _local11.top = false; }; if (_local10 != null){ _computedGutters.bottom = Number(_local10); _local11.bottom = false; }; _computedGutters = _verticalAxisRenderer.adjustGutters(_computedGutters, _local11); if (_verticalAxisRenderer2){ _computedGutters = _verticalAxisRenderer2.adjustGutters(_computedGutters, _local11); }; if (_horizontalAxisRenderer2){ _computedGutters = _horizontalAxisRenderer2.adjustGutters(_computedGutters, _local11); }; _computedGutters = _horizontalAxisRenderer.adjustGutters(_computedGutters, _local11); _verticalAxisRenderer.gutters = _computedGutters; if (_verticalAxisRenderer2){ _verticalAxisRenderer2.gutters = _computedGutters; }; if (_horizontalAxisRenderer2){ _horizontalAxisRenderer2.gutters = _computedGutters; }; _transformBounds = new Rectangle((_computedGutters.left + _local3), (_computedGutters.top + _local5), (((_arg1 - _computedGutters.right) - _local4) - (_computedGutters.left + _local3)), (((_arg2 - _computedGutters.bottom) - _local6) - (_computedGutters.top + _local5))); if (_transforms){ _local13 = 0; while (_local13 < _transforms.length) { _transforms[_local13].pixelWidth = _transformBounds.width; _transforms[_local13].pixelHeight = _transformBounds.height; _local13++; }; }; _local12 = allElements.length; _local13 = 0; while (_local13 < _local12) { _local16 = allElements[_local13]; if ((_local16 is UIComponent)){ (_local16 as UIComponent).setActualSize(_transformBounds.width, _transformBounds.height); } else { _local16.width = _transformBounds.width; _local16.height = _transformBounds.height; }; _local13++; }; if (_seriesHolder.mask != null){ _seriesHolder.mask.width = _transformBounds.width; _seriesHolder.mask.height = _transformBounds.height; }; if (_backgroundElementHolder.mask != null){ _backgroundElementHolder.mask.width = _transformBounds.width; _backgroundElementHolder.mask.height = _transformBounds.height; }; if (_annotationElementHolder.mask != null){ _annotationElementHolder.mask.width = _transformBounds.width; _annotationElementHolder.mask.height = _transformBounds.height; }; _seriesHolder.x = _transformBounds.left; _seriesHolder.y = _transformBounds.top; _backgroundElementHolder.move(_transformBounds.left, _transformBounds.top); _annotationElementHolder.move(_transformBounds.left, _transformBounds.top); _bAxisLayoutDirty = false; } public function set horizontalAxis(_arg1:IAxis):void{ _horizontalAxis = _arg1; _bAxesRenderersDirty = true; invalidateData(); invalidateProperties(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); updateAxisLayout(_arg1, _arg2); } private static function initStyles():Boolean{ var cartesianChartStyle:CSSStyleDeclaration; HaloDefaults.init(); cartesianChartStyle = HaloDefaults.createSelector("CartesianChart"); cartesianChartStyle.defaultFactory = function ():void{ this.axisColor = 14016221; this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles; this.dataTipRenderer = DataTip; this.fill = new SolidColor(0xFFFFFF, 0); this.calloutStroke = new Stroke(0x888888, 2); this.fontSize = 10; this.horizontalAxisStyleName = "blockCategoryAxis"; this.secondHorizontalAxisStyleName = "blockCategoryAxis"; this.secondVerticalAxisStyleName = "blockNumericAxis"; this.verticalAxisStyleName = "blockNumericAxis"; }; return (true); } } }//package mx.charts.chartClasses
Section 13
//CartesianTransform (mx.charts.chartClasses.CartesianTransform) package mx.charts.chartClasses { public class CartesianTransform extends DataTransform { private var _width:Number;// = 0 private var _height:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public static const VERTICAL_AXIS:String = "v"; public static const HORIZONTAL_AXIS:String = "h"; public function CartesianTransform(){ _width = 0; _height = 0; super(); } public function set pixelWidth(_arg1:Number):void{ _width = _arg1; } public function set pixelHeight(_arg1:Number):void{ _height = _arg1; } override public function invertTransform(... _args):Array{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:Object; _local2 = (_args[0] / _width); _local3 = (1 - (_args[1] / _height)); _local4 = axes[HORIZONTAL_AXIS].invertTransform(_local2); _local5 = axes[VERTICAL_AXIS].invertTransform(_local3); return ([_local4, _local5]); } override public function transformCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{ var _local6:Number; var _local7:Number; var _local8:Object; var _local9:uint; var _local10:int; _local6 = _width; _local7 = _height; _local9 = _arg1.length; if (_local9 == 0){ return; }; if (((_arg2) && (!((_arg2 == ""))))){ axes[HORIZONTAL_AXIS].transformCache(_arg1, _arg2, _arg3); }; if (((_arg4) && (!((_arg4 == ""))))){ axes[VERTICAL_AXIS].transformCache(_arg1, _arg4, _arg5); }; _local10 = (_local9 - 1); if (((((((_arg3) && (_arg3.length))) && (_arg5))) && (_arg5.length))){ do { _local8 = _arg1[_local10]; _local8[_arg3] = (_local8[_arg3] * _local6); _local8[_arg5] = ((1 - _local8[_arg5]) * _local7); --_local10; } while (_local10 >= 0); } else { if (((_arg3) && (_arg3.length))){ do { _local8 = _arg1[_local10]; _local8[_arg3] = (_local8[_arg3] * _local6); --_local10; } while (_local10 >= 0); } else { do { _local8 = _arg1[_local10]; _local8[_arg5] = ((1 - _local8[_arg5]) * _local7); --_local10; } while (_local10 >= 0); }; }; } } }//package mx.charts.chartClasses
Section 14
//ChartBase (mx.charts.chartClasses.ChartBase) package mx.charts.chartClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; import mx.graphics.*; import mx.charts.*; import mx.collections.*; import mx.effects.effectClasses.*; import flash.utils.*; import mx.charts.events.*; import mx.charts.styles.*; public class ChartBase extends UIComponent implements IFocusManagerComponent { protected var labelElements:Array; private var _dataTipMode:String;// = "multiple" protected var _transforms:Array; private var _dataTipOverlay:Shape; private var _currentHitSet:Array; public var mouseSensitivity:Number;// = 5 protected var _seriesHolder:UIComponent; private var _tipCache:InstanceCache; private var _commitPropertiesCalled:Boolean;// = false private var _childOrderDirty:Boolean;// = false private var _clipContent:Boolean;// = true private var _dataProvider:ICollectionView; protected var _annotationElementHolder:UIComponent; private var _bDataDirty:Boolean;// = false protected var allElements:Array; private var _transitionEffect:ParallelInstance; protected var _backgroundElementHolder:UIComponent; private var _transitionState:uint;// = 0 private var _showDataTips:Boolean;// = false private var _description:String;// = "" private var _annotationElementMask:Shape; private var _seriesStylesDirty:Boolean;// = true private var _mouseEventsInitialzed:Boolean;// = false private var _backgroundElements:Array; private var _backgroundElementMask:Shape; public var dataTipFunction:Function; private var _seriesMask:Shape; private var _userSeries:Array; private var _bSeriesDirty:Boolean;// = false protected var _seriesFilterer:UIComponent; private var _annotationElements:Array; private static const TOOLTIP_TARGET_RADIUS:Number = 4.5; mx_internal static const VERSION:String = "2.0.1.0"; private static const TOOLTIP_TARGET_INNER_RADIUS:Number = 1.5; private static var stylesInited:Boolean = initStyles(); private static var ITEM_EVENTS:Object = {itemClick:true, itemDoubleClick:true, itemMouseDown:true, itemMouseUp:true, itemMouseMove:true, itemRollOver:true, itemRollOut:true}; public function ChartBase(){ var g:Graphics; var licenseHandlerClass:Class; _commitPropertiesCalled = false; _bSeriesDirty = false; _bDataDirty = false; _childOrderDirty = false; _userSeries = []; _backgroundElements = []; _annotationElements = []; _description = ""; allElements = []; labelElements = []; _clipContent = true; _showDataTips = false; _dataTipMode = "multiple"; _mouseEventsInitialzed = false; _transitionState = 0; _seriesStylesDirty = true; mouseSensitivity = 5; super(); try { licenseHandlerClass = Class(getDefinitionByName("mx.charts.chartClasses.ChartsLicenseHandler")); if (licenseHandlerClass != null){ var _local2 = licenseHandlerClass; _local2["displayWatermark"](this); }; } catch(e:Error) { }; tabEnabled = false; _seriesHolder = new UIComponent(); _seriesFilterer = new UIComponent(); _seriesHolder.addChild(_seriesFilterer); addChild(_seriesHolder); _backgroundElementHolder = new UIComponent(); addChild(_backgroundElementHolder); _annotationElementHolder = new UIComponent(); addChild(_annotationElementHolder); _dataTipOverlay = new FlexShape(); _dataTipOverlay.name = "dataTipOverlay"; addChild(_dataTipOverlay); _seriesMask = new FlexShape(); _seriesMask.name = "seriesMask"; g = _seriesMask.graphics; g.clear(); g.beginFill(0, 100); g.drawRect(0, 0, 10, 10); g.endFill(); _seriesMask.visible = false; _backgroundElementMask = new FlexShape(); _backgroundElementMask.name = "backgroundElementMask"; g = _backgroundElementMask.graphics; g.clear(); g.beginFill(0, 100); g.drawRect(0, 0, 10, 10); g.endFill(); _backgroundElementMask.visible = false; _annotationElementMask = new FlexShape(); _annotationElementMask.name = "annotationElementMask"; g = _annotationElementMask.graphics; g.clear(); g.beginFill(0, 100); g.drawRect(0, 0, 10, 10); g.endFill(); _annotationElementMask.visible = false; _seriesHolder.addChild(_seriesMask); _seriesHolder.mask = _seriesMask; _backgroundElementHolder.addChild(_backgroundElementMask); _backgroundElementHolder.mask = _backgroundElementMask; _annotationElementHolder.addChild(_annotationElementMask); _annotationElementHolder.mask = _annotationElementMask; _currentHitSet = []; invalidateChildOrder(); } private function reduceStacks(_arg1:Array, _arg2:TipStack):void{ var _local3:TipStack; while (_arg1.length > 0) { _local3 = _arg1[(_arg1.length - 1)]; if ((_local3.gy + _local3.height) < _arg2.gy){ break; }; _local3.merge(_arg2, screen.height); _arg2 = _arg1.pop(); }; _arg1.push(_arg2); } public function get description():String{ return (_description); } public function localToData(_arg1:Point):Array{ return (null); } public function getAxis(_arg1:String):IAxis{ return (transforms[0].getAxis(_arg1)); } public function hideData():void{ if (_transitionEffect != null){ setChartState(ChartState.NONE); _transitionEffect.end(); _transitionEffect = null; }; setChartState(ChartState.PREPARING_TO_HIDE_DATA); } mx_internal function updateData():void{ if (_dataProvider != null){ applyDataProvider(_dataProvider, _transforms[0]); }; } public function get showDataTips():Boolean{ return (_showDataTips); } public function set showDataTips(_arg1:Boolean):void{ if (_showDataTips == _arg1){ return; }; _showDataTips = _arg1; if (_showDataTips){ if (_mouseEventsInitialzed == false){ setupMouseDispatching(); }; }; updateDataTips(); } public function get backgroundElements():Array{ return (_backgroundElements); } public function set backgroundElements(_arg1:Array):void{ _backgroundElements = _arg1; invalidateSeries(); } private function mouseDoubleClickHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local2)); _local3 = findDataPoints(_local2.x, _local2.y); processRollEvents(_local3, _arg1); if (((!((_currentHitSet == null))) && ((_currentHitSet.length > 0)))){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_DOUBLE_CLICK, _currentHitSet, _arg1, this)); }; } protected function customizeSeries(_arg1:Series, _arg2:uint):void{ } private function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; var _local4:int; var _local5:int; var _local6:IFlexDisplayObject; if (_tipCache){ _local4 = _tipCache.count; _local5 = 0; while (_local5 < _local4) { _local6 = _tipCache.instances[_local5]; if ((((_arg1.target == _local6)) || ((((_local6 is DisplayObjectContainer)) && ((_local6 as DisplayObjectContainer).contains((_arg1.target as DisplayObject))))))){ return; }; _local5++; }; }; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local2)); _local3 = findDataPoints(_local2.x, _local2.y); processRollEvents(_local3, _arg1); } mx_internal function updateSeries():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:DisplayObject; var _local5:IChartElement; var _local6:UIComponent; _local1 = applySeriesSet(_userSeries, _transforms[0]); _local3 = (_local1) ? _local1.length : 0; _local3 = labelElements.numChildren; removeElements(_backgroundElementHolder, true); removeElements(_seriesFilterer, false); removeElements(_annotationElementHolder, true); addElements(_backgroundElements, _transforms[0], _backgroundElementHolder); allElements = _backgroundElements.concat(); addElements(_local1, _transforms[0], _seriesFilterer); allElements = allElements.concat(_local1); labelElements = []; _local2 = 0; while (_local2 < _local1.length) { _local5 = (_local1[_local2] as IChartElement); if (!_local5){ } else { _local6 = UIComponent(_local5.labelContainer); if (_local6){ labelElements.push(_local6); }; }; _local2++; }; addElements(labelElements, _transforms[0], _annotationElementHolder); allElements = allElements.concat(labelElements); addElements(_annotationElements, _transforms[0], _annotationElementHolder); allElements = allElements.concat(_annotationElements); _transforms[0].elements = _annotationElements.concat(_local1).concat(_backgroundElements); _bDataDirty = true; invalidateSeriesStyles(); } private function cancelEffect():void{ if (_transitionEffect != null){ _transitionEffect.end(); _transitionEffect = null; }; setChartState(ChartState.NONE); } override public function setActualSize(_arg1:Number, _arg2:Number):void{ if (((!((_arg1 == this.width))) || (!((_arg2 == this.height))))){ cancelEffect(); }; super.setActualSize(_arg1, _arg2); } mx_internal function addElements(_arg1:Array, _arg2:DataTransform, _arg3:UIComponent):void{ var _local4:DisplayObject; var _local5:IChartElement; var _local6:int; _local6 = 0; while (_local6 < _arg1.length) { _local4 = _arg1[_local6]; _local5 = (_local4 as IChartElement); if (_local5){ _local5.dataTransform = _arg2; }; _arg3.addChild(_local4); _local6++; }; } public function set series(_arg1:Array):void{ var _local2:int; _arg1 = ((_arg1 == null)) ? [] : _arg1; _userSeries = _arg1; _local2 = 0; while (_local2 < _arg1.length) { if ((_arg1[_local2] is Series)){ (_arg1[_local2] as Series).owner = this; }; _local2++; }; invalidateSeries(); invalidateData(); legendDataChanged(); } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } private function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local2)); _local3 = findDataPoints(_local2.x, _local2.y); processRollEvents(_local3, _arg1); if (_currentHitSet != null){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_MOUSE_UP, _currentHitSet, _arg1, this)); }; } protected function set transforms(_arg1:Array):void{ _transforms = _arg1; invalidateProperties(); invalidateSeries(); invalidateData(); legendDataChanged(); } mx_internal function get labelElementsArray():Array{ return (labelElements); } mx_internal function updateChildOrder():void{ var _local1:int; _local1 = 0; var _temp1 = _local1; _local1 = (_local1 + 1); setChildIndex(_backgroundElementHolder, _temp1); _local1 = updateAxisOrder(_local1); var _temp2 = _local1; _local1 = (_local1 + 1); setChildIndex(_seriesHolder, _temp2); var _temp3 = _local1; _local1 = (_local1 + 1); setChildIndex(_annotationElementHolder, _temp3); var _temp4 = _local1; _local1 = (_local1 + 1); setChildIndex(_dataTipOverlay, _temp4); } public function get annotationElements():Array{ return (_annotationElements); } protected function setChartState(_arg1:uint):void{ var _local2:uint; var _local3:int; var _local4:int; var _local5:IChartElement; if (_transitionState == _arg1){ return; }; _local2 = _transitionState; _transitionState = _arg1; _local3 = allElements.length; _local4 = 0; while (_local4 < _local3) { _local5 = (allElements[_local4] as IChartElement); if (_local5){ _local5.chartStateChanged(_local2, _arg1); }; _local4++; }; invalidateDisplayList(); } public function get legendData():Array{ var _local1:Array; var _local2:int; var _local3:int; var _local4:Series; _local1 = []; _local2 = allElements.length; _local3 = 0; while (_local3 < _local2) { _local4 = (allElements[_local3] as Series); if (_local4){ _local1 = _local1.concat(_local4.legendData); }; _local3++; }; return (_local1); } public function legendDataChanged():void{ dispatchEvent(new Event("legendDataChanged")); } mx_internal function updateAxisOrder(_arg1:int):int{ return (_arg1); } protected function get dataTipLayerIndex():int{ return (getChildIndex(_dataTipOverlay)); } override protected function measure():void{ super.measure(); measuredWidth = 400; measuredHeight = 400; } public function get seriesFilters():Array{ return (_seriesFilterer.filters); } mx_internal function removeElements(_arg1:UIComponent, _arg2:Boolean):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:DisplayObject; var _local7:IChartElement; _local3 = _arg1.numChildren; _local4 = (_arg2) ? 1 : 0; _local5 = (_local3 - 1); while (_local5 >= _local4) { _local6 = _arg1.removeChildAt(_local5); _local7 = (_local6 as IChartElement); if (_local7){ _local7.dataTransform = null; }; _local5--; }; } mx_internal function updateSeriesStyles():void{ var _local1:uint; var _local2:Array; var _local3:int; var _local4:int; var _local5:IChartElement; if (_seriesStylesDirty){ _seriesStylesDirty = false; _local1 = 0; _local2 = getStyle("chartSeriesStyles"); if (_local2){ _local3 = allElements.length; _local4 = 0; while (_local4 < _local3) { _local5 = (allElements[_local4] as IChartElement); if (_local5){ _local1 = _local5.claimStyles(_local2, _local1); }; _local4++; }; }; }; } override protected function commitProperties():void{ _commitPropertiesCalled = true; super.commitProperties(); if (_bSeriesDirty){ updateSeries(); _bSeriesDirty = false; }; updateSeriesStyles(); if (_bDataDirty){ updateData(); _bDataDirty = false; }; if (_childOrderDirty){ updateChildOrder(); _childOrderDirty = false; }; } public function get dataTipMode():String{ return (_dataTipMode); } private function tipCreated(_arg1:IEventDispatcher, _arg2:InstanceCache):void{ _arg1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); _arg1.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); } private function updateDataTipToMatchHitSet(_arg1:Array):void{ var _local2:Number; var _local3:int; var _local4:*; var _local5:HitData; var _local6:IFlexDisplayObject; if (_showDataTips == false){ _local2 = 0; } else { if (_dataTipMode == "multiple"){ _local2 = getStyle("maximumDataTipCount"); if (isNaN(_local2)){ _local2 = _arg1.length; } else { _local2 = Math.min(_local2, _arg1.length); }; } else { _local2 = Math.min(_arg1.length, 1); }; }; if (_local2 == 0){ if (_tipCache){ _tipCache.count = 0; }; } else { if (_tipCache == null){ _local4 = getStyle("dataTipRenderer"); _tipCache = new InstanceCache(_local4, systemManager.toolTipChildren); _tipCache.creationCallback = tipCreated; }; _tipCache.count = _local2; _local3 = 0; while (_local3 < _local2) { _local5 = _arg1[_local3]; _local6 = _tipCache.instances[_local3]; if (dataTipFunction != null){ _local5.dataTipFunction = invokeDTFunction; }; if ((_local6 is IDataRenderer)){ (_local6 as IDataRenderer).data = _local5; }; _local3++; }; }; positionDataTips(); } private function mouseClickHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local2)); _local3 = findDataPoints(_local2.x, _local2.y); processRollEvents(_local3, _arg1); if (((!((_currentHitSet == null))) && ((_currentHitSet.length > 0)))){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_CLICK, _currentHitSet, _arg1, this)); }; } private function mouseOverHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:IFlexDisplayObject; var _local5:Point; var _local6:Array; if (_tipCache){ _local2 = _tipCache.count; _local3 = 0; while (_local3 < _local2) { _local4 = _tipCache.instances[_local3]; if ((((_arg1.target == _local4)) || ((((_local4 is DisplayObjectContainer)) && ((_local4 as DisplayObjectContainer).contains((_arg1.target as DisplayObject))))))){ return; }; if (((!((_arg1.relatedObject == null))) && ((((_local4 == _arg1.relatedObject)) || ((((_local4 is DisplayObjectContainer)) && ((_local4 as DisplayObjectContainer).contains(_arg1.relatedObject)))))))){ return; }; _local3++; }; }; if ((((_arg1.relatedObject == null)) || (((!((_arg1.relatedObject == this))) && (!(contains(_arg1.relatedObject))))))){ _local5 = new Point(_arg1.localX, _arg1.localY); _local5 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local5)); _local6 = findDataPoints(_local5.x, _local5.y); processRollEvents(_local6, _arg1); }; } private function updateDataTips():void{ var _local1:Array; _local1 = findDataPoints(mouseX, mouseY); _currentHitSet = _local1; updateDataTipToMatchHitSet(_currentHitSet); } public function set clipContent(_arg1:Boolean):void{ if (_clipContent == _arg1){ return; }; _clipContent = _arg1; _seriesHolder.mask = (_clipContent) ? _seriesMask : null; _backgroundElementHolder.mask = (_clipContent) ? _backgroundElementMask : null; _annotationElementHolder.mask = (_clipContent) ? _annotationElementMask : null; } private function collectTransitions():Array{ var _local1:Array; var _local2:int; var _local3:int; var _local4:IChartElement; _local1 = []; _local2 = allElements.length; _local3 = 0; while (_local3 < _local2) { _local4 = (allElements[_local3] as IChartElement); if (_local4){ _local4.collectTransitions(_transitionState, _local1); }; _local3++; }; return (_local1); } mx_internal function setDescription(_arg1:String):void{ _description = _arg1; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if ((((_mouseEventsInitialzed == false)) && ((ITEM_EVENTS[_arg1] == true)))){ setupMouseDispatching(); }; super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } mx_internal function applyDataProvider(_arg1:ICollectionView, _arg2:DataTransform):void{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:int; _local3 = _arg2.axes; for (_local4 in _local3) { _local3[_local4].chartDataProvider = _arg1; }; _local5 = _arg2.elements; _local6 = 0; while (_local6 < _local5.length) { if ((_local5[_local6] is Series)){ _local5[_local6].chartDataProvider = _arg1; }; _local6++; }; } private function dataEffectEndHandler(_arg1:EffectEvent):void{ _arg1.target.removeEventListener(EffectEvent.EFFECT_END, dataEffectEndHandler); if (chartState == ChartState.HIDING_DATA){ setChartState(ChartState.PREPARING_TO_SHOW_DATA); } else { setChartState(ChartState.NONE); }; _transitionEffect = null; invalidateDisplayList(); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Array; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = globalToLocal(DisplayObject(_arg1.target).localToGlobal(_local2)); _local3 = findDataPoints(_local2.x, _local2.y); processRollEvents(_local3, _arg1); if (_currentHitSet != null){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_MOUSE_DOWN, _currentHitSet, _arg1, this)); }; } protected function positionDataTips():void{ var _local1:int; var _local2:Rectangle; var _local3:Graphics; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:int; var _local9:TipPositionData; var _local10:Number; var _local11:Number; var _local12:int; var _local13:Array; var _local14:TipStack; var _local15:IStroke; var _local16:Number; var _local17:Number; var _local18:Object; var _local19:Boolean; var _local20:Point; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Boolean; var _local26:Number; var _local27:HitData; var _local28:IFlexDisplayObject; var _local29:Point; var _local30:Number; var _local31:Number; var _local32:Point; var _local33:Point; var _local34:int; var _local35:TipPositionData; var _local36:Boolean; var _local37:Boolean; var _local38:int; var _local39:uint; _local1 = ((_tipCache)!=null) ? _tipCache.count : 0; _local2 = dataRegion; _local3 = _dataTipOverlay.graphics; _local5 = []; _local6 = []; _local7 = []; _local15 = getStyle("calloutStroke"); _local16 = getStyle("horizontalDataTipOffset"); _local17 = getStyle("horizontalDataTipOffset"); if (isNaN(_local16)){ _local16 = 6; }; if (isNaN(_local17)){ _local17 = 6; }; _local3.clear(); if (_local1 == 0){ return; }; _local18 = getStyle("showDataTipTargets"); _local19 = ((!((_local18 == false))) && (!((_local18 == "false")))); _local4 = _tipCache.instances.slice(0, _local1); _local20 = new Point(); _local8 = 0; while (_local8 < _local1) { _local27 = _currentHitSet[_local8]; _local28 = _local4[_local8]; _local20.x = Math.max(_local2.left, Math.min(_local27.x, _local2.right)); _local20.y = Math.max(_local2.top, Math.min(_local27.y, _local2.bottom)); _local29 = localToGlobal(_local20); if ((_local28 is ILayoutManagerClient)){ ILayoutManagerClient(_local28).validateSize(); }; _local9 = new TipPositionData(_local28, _local27, _local20.x, _local20.y, _local29.x, _local29.y); if (((_local9.gy - _local17) - _local28.measuredHeight) > 0){ _local9.py = ((_local9.gy - _local17) - _local28.measuredHeight); } else { _local9.py = (_local9.gy + _local17); }; _local7.push(_local9); _local4[_local8] = _local9; _local8++; }; if (_local7.length > 0){ _local7.sortOn("gx", Array.NUMERIC); _local10 = _local7[0].gx; _local11 = _local7[(_local7.length - 1)].gx; _local32 = new Point(4, 4); _local33 = new Point((screen.width - 4), (screen.height - 4)); _local8 = 0; _local34 = Math.floor((_local7.length / 2)); if (_local5.length > _local6.length){ _local34 = Math.max(0, (_local34 - (_local5.length - _local6.length))); } else { if (_local6.length > _local5.length){ _local34 = Math.min(_local7.length, (_local34 + (_local6.length - _local5.length))); }; }; _local5 = _local5.concat(_local7.slice(0, _local34)); _local6 = _local6.concat(_local7.slice(_local34, _local7.length)); }; _local6.sortOn("gy"); _local12 = _local6.length; _local13 = []; _local14 = null; _local8 = 0; while (_local8 < _local12) { _local9 = _local6[_local8]; _local9.isRight = true; _local9.px = (_local9.gx + _local16); if (_local14 != null){ if (_local9.py < (_local14.gy + _local14.height)){ _local14.addTip(_local9, screen.height); } else { reduceStacks(_local13, _local14); _local14 = new TipStack(); _local14.addTip(_local9, screen.height); }; } else { _local14 = new TipStack(); _local14.addTip(_local9, screen.height); }; _local8++; }; if (_local14){ reduceStacks(_local13, _local14); }; _local21 = 0; _local22 = 0; _local12 = _local13.length; _local8 = 0; while (_local8 < _local12) { _local13[_local8].positionY(); _local8++; }; _local5.sortOn("gy"); _local12 = _local5.length; _local13 = []; _local14 = null; _local8 = 0; while (_local8 < _local12) { _local9 = _local5[_local8]; _local9.isRight = false; _local9.px = ((_local9.gx - _local9.width) - _local16); if (_local14 != null){ if (_local9.py < (_local14.gy + _local14.height)){ _local14.addTip(_local9, screen.height); } else { reduceStacks(_local13, _local14); _local14 = new TipStack(); _local14.addTip(_local9, screen.height); }; } else { _local14 = new TipStack(); _local14.addTip(_local9, screen.height); }; _local8++; }; if (_local14){ reduceStacks(_local13, _local14); }; _local12 = _local13.length; _local8 = 0; while (_local8 < _local12) { _local13[_local8].positionY(); _local8++; }; _local4.sortOn("py"); _local12 = _local4.length; _local11 = -(Infinity); _local10 = Infinity; _local23 = -(Infinity); _local24 = Infinity; _local25 = true; _local26 = 0; while (((_local25) && ((_local26 <= 2)))) { _local25 = false; _local26++; _local8 = 0; while (_local8 < _local12) { _local35 = _local4[_local8]; _local36 = false; _local37 = false; while ((((_local21 < _local4.length)) && (((_local4[_local21].gy + TOOLTIP_TARGET_RADIUS) < _local35.py)))) { if (_local4[_local21].gx >= _local11){ _local36 = true; }; if (_local4[_local21].gx <= _local10){ _local37 = true; }; _local21++; }; _local22 = Math.max(_local22, _local21); while ((((_local22 < _local4.length)) && (((_local4[_local22].gy - TOOLTIP_TARGET_RADIUS) < (_local35.py + _local35.height))))) { if (_local4[_local22].gx >= _local11){ _local36 = false; _local11 = _local4[_local22].gx; }; if (_local4[_local22].gx <= _local10){ _local37 = false; _local10 = _local4[_local22].gx; }; _local22++; }; if (((_local36) || (_local37))){ _local11 = -(Infinity); _local10 = Infinity; _local38 = _local21; while (_local38 < _local22) { _local11 = Math.max(_local11, _local4[_local38].gx); _local10 = Math.min(_local10, _local4[_local38].gx); _local38++; }; }; if (_local35.isRight){ _local35.px = Math.max(_local35.px, (_local11 + TOOLTIP_TARGET_RADIUS)); _local35.px = Math.max(_local23, _local35.px); if (_local35.px > (_local33.x - _local35.width)){ _local35.px = (_local33.x - _local35.width); if (_local24 > _local35.px){ _local24 = _local35.px; _local25 = true; }; }; } else { _local35.px = Math.min(_local35.px, ((_local10 - TOOLTIP_TARGET_RADIUS) - _local35.width)); _local35.px = Math.min((_local24 - _local35.width), _local35.px); if (_local35.px < _local32.x){ _local35.px = _local32.x; if ((_local35.px + _local35.width) > _local23){ _local23 = (_local35.px + _local35.width); _local25 = true; }; }; }; _local35.tip.move(_local35.px, _local35.py); if (_local19){ if (_local12 > 1){ if (_local15 != null){ _local15.apply(_local3); _local29.x = _local35.px; _local29.y = _local35.py; _local20 = globalToLocal(_local29); if (_local35.isRight){ _local3.moveTo(_local20.x, (_local20.y + (_local35.height / 2))); _local3.lineTo(_local35.x, (_local20.y + (_local35.height / 2))); _local3.lineTo(_local35.x, _local35.y); } else { _local3.moveTo((_local20.x + _local35.width), (_local20.y + (_local35.height / 2))); _local3.lineTo(_local35.x, (_local20.y + (_local35.height / 2))); _local3.lineTo(_local35.x, _local35.y); }; }; }; _local39 = _local27.contextColor; _local3.lineStyle(1, _local39, 100); _local3.moveTo(_local35.x, _local35.y); _local3.beginFill(0xFFFFFF, 1); _local3.drawCircle(_local35.x, _local35.y, TOOLTIP_TARGET_RADIUS); _local3.endFill(); _local3.beginFill(_local39, 1); _local3.drawCircle(_local35.x, _local35.y, TOOLTIP_TARGET_INNER_RADIUS); _local3.endFill(); }; _local8++; }; }; } public function get series():Array{ return (_userSeries); } protected function get transforms():Array{ return (_transforms); } public function set annotationElements(_arg1:Array):void{ _annotationElements = _arg1; invalidateSeries(); } public function dataToLocal(... _args):Point{ return (null); } protected function applySeriesSet(_arg1:Array, _arg2:DataTransform):Array{ var _local3:int; var _local4:IChartElement; _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if ((_local4 is Series)){ customizeSeries(Series(_arg1[_local3]), _local3); }; _local3++; }; return (_arg1); } private function mouseOutHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:IFlexDisplayObject; if (_tipCache){ _local2 = _tipCache.count; _local3 = 0; while (_local3 < _local2) { _local4 = _tipCache.instances[_local3]; if ((((_arg1.target == _local4)) || ((((_local4 is DisplayObjectContainer)) && ((_local4 as DisplayObjectContainer).contains((_arg1.target as DisplayObject))))))){ return; }; if (((!((_arg1.relatedObject == null))) && ((((_local4 == _arg1.relatedObject)) || ((((_local4 is DisplayObjectContainer)) && ((_local4 as DisplayObjectContainer).contains(_arg1.relatedObject)))))))){ return; }; _local3++; }; }; if ((((_arg1.relatedObject == null)) || (((!((_arg1.relatedObject == this))) && (!(contains(_arg1.relatedObject))))))){ processRollEvents([], _arg1); }; } private function invokeDTFunction(_arg1:HitData):String{ return (dataTipFunction(_arg1)); } public function set seriesFilters(_arg1:Array):void{ _seriesFilterer.filters = _arg1; } public function setAxis(_arg1:String, _arg2:IAxis):void{ transforms[0].setAxis(_arg1, _arg2); } public function get clipContent():Boolean{ return (_clipContent); } protected function invalidateChildOrder():void{ if (_childOrderDirty == false){ _childOrderDirty = true; invalidateProperties(); }; } public function invalidateSeriesStyles():void{ if (!_seriesStylesDirty){ _seriesStylesDirty = true; invalidateProperties(); }; } protected function get dataRegion():Rectangle{ return (null); } public function get chartState():uint{ return (_transitionState); } public function set dataProvider(_arg1:Object):void{ if ((_arg1 is Array)){ _arg1 = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ } else { if ((_arg1 is IList)){ _arg1 = new ListCollectionView((_arg1 as IList)); } else { if ((_arg1 is XMLList)){ _arg1 = new XMLListCollection(XMLList(_arg1)); } else { if (_arg1 != null){ _arg1 = new ArrayCollection([_arg1]); } else { _arg1 = new ArrayCollection(); }; }; }; }; }; _dataProvider = ICollectionView(_arg1); invalidateData(); } protected function invalidateData():void{ _bDataDirty = true; invalidateProperties(); } protected function invalidateSeries():void{ if (_bSeriesDirty == false){ _bSeriesDirty = true; invalidateProperties(); invalidateDisplayList(); }; } mx_internal function get allElementsArray():Array{ return (allElements); } public function set dataTipMode(_arg1:String):void{ _dataTipMode = _arg1; updateDataTips(); } private function advanceEffectState():void{ var _local1:Parallel; var _local2:Array; var _local3:int; if (_transitionState == ChartState.PREPARING_TO_HIDE_DATA){ _local2 = collectTransitions(); if (_local2.length == 0){ setChartState(ChartState.PREPARING_TO_SHOW_DATA); } else { setChartState(ChartState.HIDING_DATA); _local1 = new Parallel(); _transitionEffect = ParallelInstance(_local1.createInstance()); _local3 = 0; while (_local3 < _local2.length) { _transitionEffect.addChildSet([_local2[_local3]]); _local3++; }; _transitionEffect.addEventListener(EffectEvent.EFFECT_END, dataEffectEndHandler); _transitionEffect.play(); }; }; if (_transitionState == ChartState.PREPARING_TO_SHOW_DATA){ _local2 = collectTransitions(); if (_local2.length == 0){ setChartState(ChartState.NONE); } else { setChartState(ChartState.SHOWING_DATA); _local1 = new Parallel(); _transitionEffect = ParallelInstance(_local1.createInstance()); _local3 = 0; while (_local3 < _local2.length) { _transitionEffect.addChildSet([_local2[_local3]]); _local3++; }; _transitionEffect.addEventListener(EffectEvent.EFFECT_END, dataEffectEndHandler); _transitionEffect.play(); }; }; invalidateDisplayList(); } public function get dataProvider():Object{ return (_dataProvider); } private function processRollEvents(_arg1:Array, _arg2:MouseEvent):void{ var _local3:Array; var _local4:Array; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Array; _local3 = []; _local4 = []; _local5 = []; _local6 = _arg1.length; _local7 = _currentHitSet.length; _local8 = 0; _local9 = 0; if ((((_arg1.length == 0)) && ((_currentHitSet.length == 0)))){ return; }; _local10 = _arg1.concat(); if (_local6 > 1){ _local10.sortOn("id", Array.NUMERIC); }; while ((((_local8 < _local7)) || ((_local9 < _local6)))) { if ((((_local9 == _local6)) || ((((_local8 < _local7)) && ((_currentHitSet[_local8].id < _local10[_local9].id)))))){ _local3.push(_currentHitSet[_local8]); _local8++; } else { if ((((_local8 == _local7)) || ((((_local9 < _local6)) && ((_currentHitSet[_local8].id > _local10[_local9].id)))))){ _local4.push(_local10[_local9]); _local9++; } else { _local5.push(_local10[_local9]); _local9++; _local8++; }; }; }; if (_local3.length > 0){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_ROLL_OUT, _local3, _arg2, this)); }; if (_local4.length > 0){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_ROLL_OVER, _local4, _arg2, this)); }; if (_local5.length > 0){ dispatchEvent(new ChartItemEvent(ChartItemEvent.ITEM_MOUSE_MOVE, _local5, _arg2, this)); }; _currentHitSet = _arg1; updateDataTipToMatchHitSet(_currentHitSet); } override public function styleChanged(_arg1:String):void{ if ((((_arg1 == null)) || ((_arg1 == "chartSeriesStyles")))){ invalidateSeries(); }; super.styleChanged(_arg1); } private function setupMouseDispatching():void{ _mouseEventsInitialzed = true; super.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); super.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); super.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); super.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); super.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); super.addEventListener(MouseEvent.CLICK, mouseClickHandler); super.addEventListener(MouseEvent.DOUBLE_CLICK, mouseDoubleClickHandler); } public function findDataPoints(_arg1:Number, _arg2:Number):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:IChartElement; var _local7:Array; _local3 = []; if (dataRegion.contains(_arg1, _arg2) == false){ return (_local3); }; _local4 = allElements.length; _local5 = (_local4 - 1); while (_local5 >= 0) { _local6 = (allElements[_local5] as IChartElement); if ((((_local6 == null)) || ((_local6.visible == false)))){ } else { _local7 = _local6.findDataPoints((_arg1 - _seriesHolder.x), (_arg2 - _seriesHolder.y), mouseSensitivity); if (_local7.length == 0){ } else { _local3 = _local3.concat(_local7); }; }; _local5--; }; _local5 = 0; while (_local5 < _local3.length) { _local3[_local5].x = (_local3[_local5].x + _seriesHolder.x); _local3[_local5].y = (_local3[_local5].y + _seriesHolder.y); _local5++; }; return (_local3); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:IFill; super.updateDisplayList(_arg1, _arg2); if (_commitPropertiesCalled == false){ commitProperties(); }; graphics.clear(); graphics.lineStyle(0, 0, 0); _local3 = GraphicsUtilities.fillFromStyle(getStyle("fill")); GraphicsUtilities.fillRect(graphics, 0, 0, _arg1, _arg2, _local3); advanceEffectState(); } public function set description(_arg1:String):void{ setDescription(_arg1); tabEnabled = true; } override public function invalidateSize():void{ cancelEffect(); super.invalidateSize(); } private static function initStyles():Boolean{ var chartBaseFill:IFill; var selector:CSSStyleDeclaration; HaloDefaults.init(); chartBaseFill = IFill(new SolidColor(0xFFFFFF, 0)); selector = HaloDefaults.createSelector("ChartBase"); selector.defaultFactory = function ():void{ this.chartSeriesStyles = HaloDefaults.chartBaseChartSeriesStyles; this.fill = chartBaseFill; this.calloutStroke = new Stroke(0x888888, 2); this.dataTipRenderer = DataTip; this.fontSize = 10; }; return (true); } } }//package mx.charts.chartClasses import mx.core.*; import mx.charts.*; class TipPositionData { public var y:Number; public var width:Number; public var px:Number; public var py:Number; public var isRight:Boolean; public var tip:IFlexDisplayObject; public var height:Number; public var gx:Number; public var gy:Number; public var x:Number; public var hd:HitData; private function TipPositionData(_arg1:IFlexDisplayObject, _arg2:HitData, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ tip = _arg1; hd = _arg2; this.x = _arg3; this.y = _arg4; this.gx = _arg5; this.gy = _arg6; this.width = _arg1.measuredWidth; this.height = (_arg1.measuredHeight + 4); } } class TipStack { public var gy:Number; public var height:Number; public var tips:Array; private function TipStack(){ tips = []; super(); } public function positionY():void{ var _local1:Number; var _local2:int; var _local3:TipPositionData; _local1 = this.gy; _local2 = 0; while (_local2 < tips.length) { _local3 = tips[_local2]; _local3.py = _local1; _local1 = (_local1 + _local3.height); _local2++; }; } public function addTip(_arg1:TipPositionData, _arg2:Number):void{ tips.push(_arg1); if (tips.length == 1){ gy = _arg1.py; height = _arg1.height; } else { if (tips.length == 2){ height = (height + _arg1.height); gy = Math.min((_arg2 - height), (Math.max(0, ((tips[0].gy + tips[1].gy) / 2)) - (height / 2))); } else { height = (height + _arg1.height); gy = Math.min((_arg2 - height), Math.max(0, (((((gy + (height / 2)) * (tips.length - 1)) + _arg1.gy) / tips.length) - (height / 2)))); }; }; } public function merge(_arg1:TipStack, _arg2:Number):void{ var _local3:Number; tips = tips.concat(_arg1.tips); _local3 = ((_arg1.gy + _arg1.height) - gy); gy = Math.max(0, (gy - (((gy + height) - _arg1.gy) / 2))); if ((gy + _local3) > _arg2){ gy = Math.max(0, (_arg2 - _local3)); }; height = _local3; } }
Section 15
//ChartElement (mx.charts.chartClasses.ChartElement) package mx.charts.chartClasses { import mx.events.*; import flash.display.*; import mx.collections.*; public class ChartElement extends DualStyleObject implements IChartElement { private var _dataTransform:DataTransform; private var _userDataProvider:Object; private var _dataProvider:ICollectionView; private var _glyphID:uint; protected var cursor:IViewCursor; mx_internal static const VERSION:String = "2.0.1.0"; private static var nextID:uint = 0; public function ChartElement(){ _glyphID = generateGlyphID(); } protected function get chart():ChartBase{ var _local1:DisplayObject; _local1 = parent; while (((!((_local1 is ChartBase))) && (!((_local1 == null))))) { _local1 = _local1.parent; }; return ((_local1 as ChartBase)); } public function claimStyles(_arg1:Array, _arg2:uint):uint{ return (_arg2); } override public function addChild(_arg1:DisplayObject):DisplayObject{ super.addChild(_arg1); if (((!((_dataTransform == null))) && ((_arg1 is IChartElement)))){ IChartElement(_arg1).dataTransform = _dataTransform; }; return (_arg1); } public function describeData(_arg1:String, _arg2:uint):Array{ return ([]); } public function set chartDataProvider(_arg1:Object):void{ if (_userDataProvider == null){ processNewDataProvider(_arg1); }; } public function set dataTransform(_arg1:DataTransform):void{ var _local2:uint; var _local3:DisplayObject; _dataTransform = _arg1; _local2 = 0; while (_local2 < numChildren) { _local3 = getChildAt(_local2); if (((!((_dataTransform == null))) && ((_local3 is IChartElement)))){ IChartElement(_local3).dataTransform = _dataTransform; }; _local2++; }; if (_dataTransform){ _dataTransform.dataChanged(); }; invalidateDisplayList(); } public function mappingChanged():void{ } public function collectTransitions(_arg1:Number, _arg2:Array):void{ var _local3:int; var _local4:int; var _local5:IChartElement; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (getChildAt(_local4) as IChartElement); if (_local5){ _local5.collectTransitions(_arg1, _arg2); }; _local4++; }; } protected function createDataID(_arg1:Number):Number{ return (((_glyphID << 16) + _arg1)); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ super.addChildAt(_arg1, _arg2); if (((!((_dataTransform == null))) && ((_arg1 is IChartElement)))){ IChartElement(_arg1).dataTransform = _dataTransform; }; return (_arg1); } public function get dataTransform():DataTransform{ return (_dataTransform); } protected function processNewDataProvider(_arg1:Object):void{ if (_dataProvider != null){ _dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler); }; if ((_arg1 is Array)){ _arg1 = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ } else { if ((_arg1 is IList)){ _arg1 = new ListCollectionView(IList(_arg1)); } else { if ((_arg1 is XMLList)){ _arg1 = new XMLListCollection(XMLList(_arg1)); } else { if (_arg1 != null){ _arg1 = new ArrayCollection([_arg1]); } else { _arg1 = new ArrayCollection(); }; }; }; }; }; _dataProvider = ICollectionView(_arg1); cursor = _dataProvider.createCursor(); if (_dataProvider != null){ _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true); }; dataChanged(); } public function set dataProvider(_arg1:Object):void{ _userDataProvider = _arg1; processNewDataProvider(_arg1); } private function collectionChangeHandler(_arg1:CollectionEvent=null):void{ if (((_arg1) && ((_arg1.kind == CollectionEventKind.RESET)))){ cursor = _dataProvider.createCursor(); }; dataChanged(); } protected function dataChanged():void{ invalidateDisplayList(); if (_dataTransform){ _dataTransform.dataChanged(); }; } public function get dataProvider():Object{ return (_dataProvider); } public function chartStateChanged(_arg1:uint, _arg2:uint):void{ var _local3:int; var _local4:int; var _local5:IChartElement; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (getChildAt(_local4) as IChartElement); if (_local5){ _local5.chartStateChanged(_arg1, _arg2); }; _local4++; }; } public function findDataPoints(_arg1:Number, _arg2:Number, _arg3:Number):Array{ var _local4:Array; var _local5:int; var _local6:IChartElement; var _local7:Array; _local4 = []; _local5 = (numChildren - 1); while (_local5 >= 0) { _local6 = (getChildAt(_local5) as IChartElement); if ((((_local6 == null)) || ((_local6.visible == false)))){ } else { _local7 = _local6.findDataPoints(_arg1, _arg2, _arg3); if (_local7.length == 0){ } else { _local4 = _local4.concat(_local7); }; }; _local5--; }; return (_local4); } public function get labelContainer():Sprite{ return (null); } private static function generateGlyphID():uint{ return (nextID++); } } }//package mx.charts.chartClasses
Section 16
//ChartLabel (mx.charts.chartClasses.ChartLabel) package mx.charts.chartClasses { import mx.core.*; import flash.display.*; import flash.geom.*; import flash.text.*; import mx.charts.*; public class ChartLabel extends UIComponent implements IDataRenderer { private var _data:Object; private var _label:UITextField; private var _capturedText:BitmapData; private var _text:String; private var _bitmap:Bitmap; mx_internal static const VERSION:String = "2.0.1.0"; private static var ORIGIN:Point = new Point(0, 0); private static var X_UNIT:Point = new Point(1, 0); override protected function measure():void{ var _local1:TextLineMetrics; _label.validateNow(); if (_label.embedFonts){ measuredWidth = (_label.measuredWidth + 6); measuredHeight = (_label.measuredHeight + UITextField.TEXT_HEIGHT_PADDING); } else { _local1 = measureText(_text); measuredWidth = (_local1.width + 6); measuredHeight = (_local1.height + UITextField.TEXT_HEIGHT_PADDING); }; } override protected function createChildren():void{ super.createChildren(); _label = new UITextField(); _label.multiline = true; _label.selectable = false; _label.autoSize = "left"; _label.styleName = this; addChild(_label); } public function set data(_arg1:Object):void{ if (_arg1 == _data){ return; }; _data = _arg1; if ((_arg1 is AxisLabel)){ _text = AxisLabel(_arg1).text; } else { if ((_arg1 is String)){ _text = String(_arg1); }; }; _label.text = ((_text == null)) ? "" : _text; invalidateSize(); invalidateDisplayList(); } public function get data():Object{ return (_data); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Point; var _local4:Point; var _local5:Boolean; _label.validateNow(); _label.setActualSize(_arg1, _arg2); _local5 = true; if ((((((_label.embedFonts == false)) && ((_arg1 > 0)))) && ((_arg2 > 0)))){ _local3 = globalToLocal(X_UNIT); _local4 = globalToLocal(ORIGIN); _local5 = ((((_local3.x - _local4.x) == 1)) && (((_local3.y - _local4.y) == 0))); }; if (_local5){ if (_bitmap != null){ removeChild(_bitmap); _bitmap = null; }; _label.visible = true; } else { _label.visible = false; if ((((((_capturedText == null)) || (!((_capturedText.width == _arg1))))) || (!((_capturedText.height == _arg2))))){ _capturedText = new BitmapData(_arg1, _arg2); if (_bitmap != null){ removeChild(_bitmap); _bitmap = null; }; }; if (_bitmap == null){ _bitmap = new FlexBitmap(_capturedText); _bitmap.smoothing = true; addChild(_bitmap); }; _capturedText.fillRect(new Rectangle(0, 0, _arg1, _arg2), 0); _capturedText.draw(_label); }; } override public function invalidateSize():void{ super.invalidateSize(); } } }//package mx.charts.chartClasses
Section 17
//ChartState (mx.charts.chartClasses.ChartState) package mx.charts.chartClasses { public final class ChartState { public static const PREPARING_TO_SHOW_DATA:uint = 3; public static const SHOWING_DATA:uint = 4; public static const HIDING_DATA:uint = 2; mx_internal static const VERSION:String = "2.0.1.0"; public static const PREPARING_TO_HIDE_DATA:uint = 1; public static const NONE:uint = 0; } }//package mx.charts.chartClasses
Section 18
//DataDescription (mx.charts.chartClasses.DataDescription) package mx.charts.chartClasses { public class DataDescription { public var max:Number; public var padding:Number; public var min:Number; public var minInterval:Number; public var boundedValues:Array; public static const REQUIRED_PADDING:uint = 8; public static const REQUIRED_MIN_INTERVAL:uint = 1; public static const REQUIRED_BOUNDED_VALUES:uint = 2; public static const REQUIRED_MIN_MAX:uint = 4; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.charts.chartClasses
Section 19
//DataTip (mx.charts.chartClasses.DataTip) package mx.charts.chartClasses { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.graphics.*; import mx.charts.*; import mx.charts.styles.*; public class DataTip extends UIComponent implements IDataRenderer { private const HEX_DIGITS:String = "0123456789ABCDEF"; private var _shadowFill:IFill; private var _hitData:HitData; private var _labelWidth:Number; private var _format:TextFormat; private var _label:UITextField; private var stroke:Stroke; private var _labelHeight:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); public static var maxTipWidth:Number = 300; public function DataTip(){ _shadowFill = IFill(new SolidColor(0xAAAAAA, 0.55)); stroke = new Stroke(0, 0, 1); super(); mouseChildren = false; mouseEnabled = false; } private function setText(_arg1:String):void{ var _local2:TextFormat; var _local3:String; _local2 = _label.getTextStyles(); _local2.leftMargin = 0; _local2.rightMargin = 0; _local3 = (((((("<FONT FACE='" + _local2.font) + "' SIZE='") + _local2.size) + "' COLOR='") + decToColor(Number(_local2.color))) + "'>"); _label.htmlText = ((_local3 + _arg1) + "</FONT>"); invalidateSize(); } override protected function measure():void{ var _local1:Rectangle; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; super.measure(); _local1 = new Rectangle(1, 1, 0, 0); _local2 = (_local1.left + getStyle("paddingLeft")); _local3 = (_local1.top + getStyle("paddingTop")); _local4 = (_local1.right + getStyle("paddingRight")); _local5 = (_local1.bottom + getStyle("paddingBottom")); _local6 = (_local2 + _local4); _local7 = (_local3 + _local5); _label.wordWrap = false; if ((_label.textWidth + _local6) > DataTip.maxTipWidth){ _label.width = (DataTip.maxTipWidth - _local6); _label.wordWrap = true; _label.width = (_label.textWidth + _local6); }; _labelWidth = (_label.width + _local6); _labelHeight = (_label.height + _local7); measuredWidth = (_labelWidth + 6); measuredHeight = (_labelHeight + 6); } override protected function createChildren():void{ super.createChildren(); if (!_label){ _label = new UITextField(); _label.x = getStyle("paddingLeft"); _label.y = getStyle("paddingTop"); _label.autoSize = TextFieldAutoSize.LEFT; _label.selectable = false; _label.multiline = true; addChild(_label); }; } private function decToColor(_arg1:Number):String{ var _local2:String; var _local3:int; _local2 = "#"; _local3 = 5; while (_local3 >= 0) { _local2 = (_local2 + HEX_DIGITS.charAt(((_arg1 >> (_local3 * 4)) & 15))); _local3--; }; return (_local2); } public function set data(_arg1:Object):void{ _hitData = HitData(_arg1); stroke = new Stroke(_hitData.contextColor, 0, 100); setText(_hitData.displayText); invalidateDisplayList(); } public function get data():Object{ return (_hitData); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; var _local4:Number; var _local5:Number; var _local6:IFill; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local4 = 0; _local5 = 0; _local3.moveTo(_arg1, 2); _shadowFill.begin(_local3, new Rectangle(_local4, _local5, _arg1, _arg2)); _local3.lineTo((_arg1 + 2), 2); _local3.lineTo((_arg1 + 2), (_arg2 + 2)); _local3.lineTo(2, (_arg2 + 2)); _local3.lineTo(2, _arg2); _local3.lineTo((_arg1 - 2), (_arg2 - 2)); _local3.lineTo((_arg1 - 2), 2); _shadowFill.end(_local3); _local6 = IFill(new SolidColor(getStyle("backgroundColor"), 0.8)); GraphicsUtilities.fillRect(_local3, _local4, _local5, _arg1, _arg2, _local6, stroke); _label.x = (_local4 + getStyle("paddingLeft")); _label.y = (_local5 + getStyle("paddingTop")); } private static function initStyles():Boolean{ var dtStyle:CSSStyleDeclaration; HaloDefaults.init(); dtStyle = HaloDefaults.createSelector("DataTip"); dtStyle.defaultFactory = function ():void{ this.backgroundColor = 0xFFFFFF; }; return (true); } } }//package mx.charts.chartClasses
Section 20
//DataTransform (mx.charts.chartClasses.DataTransform) package mx.charts.chartClasses { import flash.events.*; import mx.charts.*; public class DataTransform extends EventDispatcher { private var _axes:Object; private var _elements:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function DataTransform(){ _axes = {}; _elements = []; super(); } private function setAxisNoEvent(_arg1:String, _arg2:IAxis):void{ var _local3:IAxis; _local3 = _axes[_arg1]; if (_local3 != null){ _local3.unregisterDataTransform(this); _local3.removeEventListener("mappingChange", mappingChangeHandler); }; _axes[_arg1] = _arg2; _arg2.registerDataTransform(this, _arg1); _arg2.addEventListener("mappingChange", mappingChangeHandler); } private function mappingChangeHandler(_arg1:Event=null):void{ var _local2:int; var _local3:int; var _local4:IChartElement; _local2 = elements.length; _local3 = 0; while (_local3 < _local2) { _local4 = (elements[_local3] as IChartElement); if (_local4){ _local4.mappingChanged(); }; _local3++; }; } public function getAxis(_arg1:String):IAxis{ var _local2:LinearAxis; if (_axes[_arg1] == null){ _local2 = new LinearAxis(); _local2.autoAdjust = false; setAxisNoEvent(_arg1, _local2); }; return (_axes[_arg1]); } public function describeData(_arg1:String, _arg2:uint):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:IChartElement; _local3 = []; _local4 = elements.length; _local5 = 0; while (_local5 < _local4) { _local6 = (elements[_local5] as IChartElement); if (!_local6){ } else { _local3 = _local3.concat(_local6.describeData(_arg1, _arg2)); }; _local5++; }; return (_local3); } public function setAxis(_arg1:String, _arg2:IAxis):void{ setAxisNoEvent(_arg1, _arg2); mappingChangeHandler(); } public function get axes():Object{ return (_axes); } public function dataChanged():void{ var _local1:String; for (_local1 in _axes) { if (_axes[_local1] != null){ _axes[_local1].dataChanged(); }; }; } public function set elements(_arg1:Array):void{ _elements = _arg1; } public function invertTransform(... _args):Array{ return (null); } public function get elements():Array{ return (_elements); } public function transformCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{ } } }//package mx.charts.chartClasses
Section 21
//DualStyleObject (mx.charts.chartClasses.DualStyleObject) package mx.charts.chartClasses { import mx.core.*; import mx.styles.*; public class DualStyleObject extends UIComponent { private var _internalStyleName:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function get internalStyleName():Object{ return (_internalStyleName); } override mx_internal function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local2:CSSStyleDeclaration; var _local3:Object; var _local4:IStyleClient; var _local5:Array; var _local6:int; var _local7:int; var _local8:Object; var _local9:CSSStyleDeclaration; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((styleName is IFlexDisplayObject)){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; if (internalStyleName){ if ((internalStyleName is CSSStyleDeclaration)){ _local2 = CSSStyleDeclaration(internalStyleName); } else { if ((internalStyleName is IFlexDisplayObject)){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((internalStyleName is String)){ _local2 = StyleManager.getStyleDeclaration(("." + internalStyleName)); }; }; }; _local3 = StyleManager.stylesRoot; if (_local3.effects){ registerEffects(_local3.effects); }; _local4 = (parent as IStyleClient); if (_local4){ _local8 = _local4.inheritingStyles; if (_local8 == UIComponent.STYLE_UNINITIALIZED){ _local8 = _local3; }; } else { _local8 = StyleManager.stylesRoot; }; _local5 = getClassStyleDeclarations(); _local6 = _local5.length; _local7 = 0; while (_local7 < _local6) { _local9 = _local5[_local7]; _local8 = _local9.addStyleToProtoChain(_local8, this); _local3 = _local9.addStyleToProtoChain(_local3, this); if (_local9.effects){ registerEffects(_local9.effects); }; _local7++; }; if (_local2){ _local8 = _local2.addStyleToProtoChain(_local8, this); _local3 = _local2.addStyleToProtoChain(_local3, this); if (_local2.effects){ registerEffects(_local2.effects); }; }; if (_local1){ _local8 = _local1.addStyleToProtoChain(_local8, this); _local3 = _local1.addStyleToProtoChain(_local3, this); if (_local1.effects){ registerEffects(_local1.effects); }; }; inheritingStyles = (styleDeclaration) ? styleDeclaration.addStyleToProtoChain(_local8, this) : _local8; nonInheritingStyles = (styleDeclaration) ? styleDeclaration.addStyleToProtoChain(_local3, this) : _local3; } public function set internalStyleName(_arg1:Object):void{ if (_internalStyleName == _arg1){ return; }; _internalStyleName = _arg1; if (inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ regenerateStyleCache(true); initThemeColor(); styleChanged("internalStyleName"); styleChanged("styleName"); notifyStyleChangeInChildren("styleName", true); }; } } }//package mx.charts.chartClasses
Section 22
//GraphicsUtilities (mx.charts.chartClasses.GraphicsUtilities) package mx.charts.chartClasses { import flash.display.*; import flash.geom.*; import mx.graphics.*; public class GraphicsUtilities { mx_internal static const VERSION:String = "2.0.1.0"; private static var LINE_FORM:Object = {segment:0, step:1, vertical:2, horizontal:3, reverseStep:4, curve:5}; public static function fillFromStyle(_arg1:Object):IFill{ if ((_arg1 is IFill)){ return (IFill(_arg1)); }; if (_arg1 != null){ return (IFill(new SolidColor(uint(_arg1)))); }; return (null); } public static function drawPolyLine(_arg1:Graphics, _arg2:Array, _arg3:int, _arg4:int, _arg5:String, _arg6:String, _arg7:IStroke, _arg8:Object, _arg9:Boolean=true):void{ var _local10:int; var _local11:Number; var _local12:int; var _local13:int; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Boolean; var _local18:int; var _local19:Point; var _local20:Point; var _local21:Number; var _local22:int; var _local23:Point; var _local24:Point; var _local25:Point; var _local26:Point; var _local27:Point; var _local28:Point; var _local29:Number; var _local30:Object; var _local31:Number; if (_arg3 == _arg4){ return; }; _local10 = _arg3; _arg8 = convertForm(_arg8); if (_arg7 != null){ _arg7.apply(_arg1); }; _local17 = (_arg3 > _arg4); if (_local17){ _local12 = -1; } else { _local12 = 1; }; if (_arg9){ _arg1.moveTo(_arg2[_arg3][_arg5], _arg2[_arg3][_arg6]); } else { _arg1.lineTo(_arg2[_arg3][_arg5], _arg2[_arg3][_arg6]); }; _arg3 = (_arg3 + _local12); if (_arg8 == LINE_FORM.segment){ _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; } else { if (_arg8 == LINE_FORM.step){ _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineTo(_arg2[_local13][_arg5], _arg2[(_local13 - _local12)][_arg6]); _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; } else { if (_arg8 == LINE_FORM.reverseStep){ _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineTo(_arg2[(_local13 - _local12)][_arg5], _arg2[_local13][_arg6]); _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; } else { if (_arg8 == LINE_FORM.horizontal){ if (_local17){ _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineStyle(0, 0, 0); _arg1.lineTo(_arg2[(_local13 - _local12)][_arg5], _arg2[_local13][_arg6]); if (_arg7 != null){ _arg7.apply(_arg1); }; _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; } else { _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineStyle(0, 0, 0); _arg1.lineTo(_arg2[(_local13 - _local12)][_arg5], _arg2[(_local13 - _local12)][_arg6]); if (_arg7 != null){ _arg7.apply(_arg1); }; _arg1.lineTo(_arg2[_local13][_arg5], _arg2[(_local13 - _local12)][_arg6]); _local13 = (_local13 + _local12); }; }; } else { if (_arg8 == LINE_FORM.vertical){ if (_local17){ _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineStyle(0, 0, 0); _arg1.lineTo(_arg2[(_local13 - _local12)][_arg5], _arg2[_local13][_arg6]); if (_arg7 != null){ _arg7.apply(_arg1); }; _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; } else { _local13 = _arg3; while (_local13 != _arg4) { _arg1.lineStyle(0, 0, 0); _arg1.lineTo(_arg2[_local13][_arg5], _arg2[(_local13 - _local12)][_arg6]); if (_arg7 != null){ _arg7.apply(_arg1); }; _arg1.lineTo(_arg2[_local13][_arg5], _arg2[_local13][_arg6]); _local13 = (_local13 + _local12); }; }; } else { if (_arg8 == LINE_FORM.curve){ _arg3 = _local10; _local18 = (_arg4 - _local12); while (_arg3 != _arg4) { if (((!((_arg2[(_arg3 + _local12)][_arg5] == _arg2[_arg3][_arg5]))) || (!((_arg2[(_arg3 + _local12)][_arg6] == _arg2[_arg3][_arg6]))))){ break; }; _arg3 = (_arg3 + _local12); }; if ((((_arg3 == _arg4)) || (((_arg3 + _local12) == _arg4)))){ return; }; if (Math.abs((_arg4 - _arg3)) == 2){ _arg1.lineTo(_arg2[(_arg3 + _local12)][_arg5], _arg2[(_arg3 + _local12)][_arg6]); return; }; _local19 = new Point(); _local20 = new Point(); _local21 = 0.25; if (_local17){ _local21 = (_local21 * -1); }; _local22 = _arg3; _local23 = new Point(); _local24 = new Point((_arg2[(_local22 + _local12)][_arg5] - _arg2[_local22][_arg5]), (_arg2[(_local22 + _local12)][_arg6] - _arg2[_local22][_arg6])); _local25 = new Point(); _local26 = new Point(); _local27 = new Point(); _local28 = new Point(); _local11 = Math.sqrt(((_local24.x * _local24.x) + (_local24.y * _local24.y))); _local24.x = (_local24.x / _local11); _local24.y = (_local24.y / _local11); _local29 = (_arg2[(_local22 + _local12)][_arg5] - _arg2[_local22][_arg5]); _local30 = _arg2[_local22]; _local22 = (_local22 + _local12); while (_local22 != _local18) { if ((((_arg2[(_local22 + _local12)][_arg5] == _arg2[_local22][_arg5])) && ((_arg2[(_local22 + _local12)][_arg6] == _arg2[_local22][_arg6])))){ } else { _local23.x = -(_local24.x); _local23.y = -(_local24.y); _local24.x = (_arg2[(_local22 + _local12)][_arg5] - _arg2[_local22][_arg5]); _local24.y = (_arg2[(_local22 + _local12)][_arg6] - _arg2[_local22][_arg6]); _local11 = Math.sqrt(((_local24.x * _local24.x) + (_local24.y * _local24.y))); _local24.x = (_local24.x / _local11); _local24.y = (_local24.y / _local11); _local25.x = (_local24.x - _local23.x); _local25.y = (_local24.y - _local23.y); _local31 = Math.sqrt(((_local25.x * _local25.x) + (_local25.y * _local25.y))); _local25.x = (_local25.x / _local31); _local25.y = (_local25.y / _local31); if ((_local23.y * _local24.y) >= 0){ _local25 = new Point(1, 0); }; _local19.x = ((-(_local25.x) * _local29) * _local21); _local19.y = ((-(_local25.y) * _local29) * _local21); if (_local22 == (_local12 + _arg3)){ _arg1.curveTo((_arg2[_local22][_arg5] + _local19.x), (_arg2[_local22][_arg6] + _local19.y), _arg2[_local22][_arg5], _arg2[_local22][_arg6]); } else { _local26.x = (_local30[_arg5] + _local20.x); _local26.y = (_local30[_arg6] + _local20.y); _local27.x = (_arg2[_local22][_arg5] + _local19.x); _local27.y = (_arg2[_local22][_arg6] + _local19.y); _local28.x = ((_local26.x + _local27.x) / 2); _local28.y = ((_local26.y + _local27.y) / 2); _arg1.curveTo(_local26.x, _local26.y, _local28.x, _local28.y); _arg1.curveTo(_local27.x, _local27.y, _arg2[_local22][_arg5], _arg2[_local22][_arg6]); }; _local29 = (_arg2[(_local22 + _local12)][_arg5] - _arg2[_local22][_arg5]); _local20.x = ((_local25.x * _local29) * _local21); _local20.y = ((_local25.y * _local29) * _local21); _local30 = _arg2[_local22]; }; _local22 = (_local22 + _local12); }; _arg1.curveTo((_local30[_arg5] + _local20.x), (_local30[_arg6] + _local20.y), _arg2[_local22][_arg5], _arg2[_local22][_arg6]); }; }; }; }; }; }; } public static function drawArc(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=NaN, _arg8:Boolean=false):void{ var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:uint; if (isNaN(_arg7)){ _arg7 = _arg6; }; if (Math.abs(_arg5) > (2 * Math.PI)){ _arg5 = (2 * Math.PI); }; _local13 = Math.ceil((Math.abs(_arg5) / (Math.PI / 4))); _local9 = (_arg5 / _local13); _local10 = -(_local9); _local11 = -(_arg4); if (_local13 > 0){ _local14 = (_arg2 + (Math.cos(_arg4) * _arg6)); _local15 = (_arg3 + (Math.sin(-(_arg4)) * _arg7)); if (_arg8 == true){ _arg1.lineTo(_local14, _local15); } else { _arg1.moveTo(_local14, _local15); }; _local20 = 0; while (_local20 < _local13) { _local11 = (_local11 + _local10); _local12 = (_local11 - (_local10 / 2)); _local16 = (_arg2 + (Math.cos(_local11) * _arg6)); _local17 = (_arg3 + (Math.sin(_local11) * _arg7)); _local18 = (_arg2 + (Math.cos(_local12) * (_arg6 / Math.cos((_local10 / 2))))); _local19 = (_arg3 + (Math.sin(_local12) * (_arg7 / Math.cos((_local10 / 2))))); _arg1.curveTo(_local18, _local19, _local16, _local17); _local20++; }; }; } private static function convertForm(_arg1:Object):Number{ if (typeof(_arg1) == "number"){ return (Number(_arg1)); }; switch (_arg1){ case "segment": default: return (LINE_FORM.segment); case "curve": return (LINE_FORM.curve); case "step": return (LINE_FORM.step); case "horizontal": return (LINE_FORM.horizontal); case "vertical": return (LINE_FORM.vertical); case "reverseStep": return (LINE_FORM.reverseStep); }; return (NaN); } public static function fillRect(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Object=null, _arg7:Object=null):void{ var _local8:Boolean; _arg1.moveTo(_arg2, _arg3); if (_arg6 != null){ if ((_arg6 is IFill)){ _local8 = false; _arg6.begin(_arg1, new Rectangle(_arg2, _arg3, (_arg4 - _arg2), (_arg5 - _arg3))); } else { _local8 = true; _arg1.beginFill(uint(_arg6)); }; }; if (_arg7 != null){ _arg7.apply(_arg1); }; _arg1.lineTo(_arg4, _arg3); _arg1.lineTo(_arg4, _arg5); _arg1.lineTo(_arg2, _arg5); _arg1.lineTo(_arg2, _arg3); if (_arg6 != null){ _arg1.endFill(); }; } public static function setLineStyle(_arg1:Graphics, _arg2:IStroke):void{ if (!_arg2){ _arg1.lineStyle(0, 0, 0); } else { _arg2.apply(_arg1); }; } public static function colorFromFill(_arg1:Object):uint{ var _local2:uint; if (_arg1 == null){ } else { if ((_arg1 is SolidColor)){ _local2 = SolidColor(_arg1).color; } else { if ((((_arg1 is LinearGradient)) && ((LinearGradient(_arg1).entries.length > 0)))){ _local2 = LinearGradient(_arg1).entries[0].color; } else { if ((((_arg1 is RadialGradient)) && ((RadialGradient(_arg1).entries.length > 0)))){ _local2 = RadialGradient(_arg1).entries[0].color; } else { if ((((((_arg1 is Number)) || ((_arg1 is uint)))) || ((_arg1 is int)))){ _local2 = uint(_arg1); }; }; }; }; }; return (_local2); } } }//package mx.charts.chartClasses
Section 23
//IAxis (mx.charts.chartClasses.IAxis) package mx.charts.chartClasses { import flash.events.*; import mx.charts.*; public interface IAxis extends IEventDispatcher { function get baseline():Number; function update():void; function formatForScreen(_arg1:Object):String; function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):AxisLabelSet; function getLabelEstimate():AxisLabelSet; function unregisterDataTransform(_arg1:DataTransform):void; function get title():String; function mapCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:Boolean=false):void; function get unitSize():Number; function dataChanged():void; function get displayName():String; function filterCache(_arg1:Array, _arg2:String, _arg3:String):void; function set chartDataProvider(_arg1:Object):void; function getLabels(_arg1:Number):AxisLabelSet; function transformCache(_arg1:Array, _arg2:String, _arg3:String):void; function invertTransform(_arg1:Number):Object; function preferDropLabels():Boolean; function registerDataTransform(_arg1:DataTransform, _arg2:String):void; } }//package mx.charts.chartClasses
Section 24
//IAxisRenderer (mx.charts.chartClasses.IAxisRenderer) package mx.charts.chartClasses { import mx.core.*; import flash.geom.*; public interface IAxisRenderer extends IUIComponent { function get ticks():Array; function get axis():IAxis; function get horizontal():Boolean; function set heightLimit(_arg1:Number):void; function adjustGutters(_arg1:Rectangle, _arg2:Object):Rectangle; function get gutters():Rectangle; function set horizontal(_arg1:Boolean):void; function get minorTicks():Array; function set placement(_arg1:String):void; function set axis(_arg1:IAxis):void; function get heightLimit():Number; function chartStateChanged(_arg1:uint, _arg2:uint):void; function set otherAxes(_arg1:Array):void; function get placement():String; function set gutters(_arg1:Rectangle):void; } }//package mx.charts.chartClasses
Section 25
//IChartElement (mx.charts.chartClasses.IChartElement) package mx.charts.chartClasses { import mx.core.*; import flash.display.*; public interface IChartElement extends IFlexDisplayObject { function set dataTransform(_arg1:DataTransform):void; function set chartDataProvider(_arg1:Object):void; function chartStateChanged(_arg1:uint, _arg2:uint):void; function findDataPoints(_arg1:Number, _arg2:Number, _arg3:Number):Array; function get labelContainer():Sprite; function mappingChanged():void; function describeData(_arg1:String, _arg2:uint):Array; function collectTransitions(_arg1:Number, _arg2:Array):void; function claimStyles(_arg1:Array, _arg2:uint):uint; } }//package mx.charts.chartClasses
Section 26
//InstanceCache (mx.charts.chartClasses.InstanceCache) package mx.charts.chartClasses { import mx.core.*; import flash.text.*; public class InstanceCache { public var creationCallback:Function; private var _parent:Object; private var _factory:IFactory; public var hide:Boolean;// = true private var _format:TextFormat; private var _insertPosition:int; public var discard:Boolean;// = false private var _props:Object; private var _class:Class;// = null private var _instanceCount:int;// = 0 public var remove:Boolean;// = false private var _instances:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function InstanceCache(_arg1:Object, _arg2:Object=null, _arg3:int=-1){ _class = null; _instanceCount = 0; discard = false; hide = true; _instances = []; _props = {}; remove = false; super(); _parent = _arg2; if ((_arg1 is IFactory)){ _factory = IFactory(_arg1); } else { if ((_arg1 is Class)){ _class = Class(_arg1); _factory = new ClassFactory(Class(_arg1)); }; }; _insertPosition = _arg3; } public function get instances():Array{ return (_instances); } public function get factory():IFactory{ return (_factory); } private function applyFormat(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:UITextField; _local3 = _arg1; while (_local3 < _arg2) { _local4 = _instances[_local3]; _local4.setTextFormat(_format); _local4.defaultTextFormat = _format; _local3++; }; } private function applyProperties(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:Object; var _local5:String; _local3 = _arg1; while (_local3 < _arg2) { _local4 = _instances[_local3]; for (_local5 in _props) { _local4[_local5] = _props[_local5]; }; _local3++; }; } public function set factory(_arg1:IFactory):void{ var _local2:Number; if ((((_arg1 == _factory)) || ((((((_arg1 is ClassFactory)) && ((_factory is ClassFactory)))) && ((ClassFactory(_factory).generator == ClassFactory(_arg1).generator)))))){ return; }; _factory = _arg1; _class = null; _local2 = _instanceCount; count = 0; count = _local2; } public function set insertPosition(_arg1:int):void{ var _local2:int; if (_arg1 != _insertPosition){ _insertPosition = _arg1; if (_parent != null){ _local2 = 0; while (_local2 < _instances.length) { _parent.setChildIndex(_instances[_local2], (_local2 + _insertPosition)); _local2++; }; }; }; } public function set count(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Object; if (_arg1 == _instanceCount){ return; }; _local2 = _arg1; _local3 = _instanceCount; _local4 = _instances.length; _local5 = Math.min(_insertPosition, (_parent.numChildren - _local4)); if (_local2 > _local3){ if (_factory == null){ _arg1 = 0; } else { _local6 = _local3; while ((((_local6 < _local2)) && ((_local6 < _local4)))) { if (hide){ _instances[_local6].visible = true; }; if (((_parent) && (remove))){ if (_local5 >= 0){ _parent.addChildAt(_instances[_local6], (_local5 + _local6)); } else { _parent.addChild(_instances[_local6]); }; }; _local6++; }; while (_local6 < _local2) { _local7 = _factory.newInstance(); if (_parent){ if (_local5 > 0){ _parent.addChildAt(_local7, (_local5 + _local6)); } else { _parent.addChild(_local7); }; }; if (creationCallback != null){ creationCallback(_local7, this); }; _instances.push(_local7); _local6++; }; applyProperties(_local4, _local2); if (_format){ applyFormat(_local4, _local2); }; }; } else { if (_local2 < _local3){ if (remove){ _local6 = _local2; while (_local6 < _local3) { _parent.removeChild(_instances[_local6]); _local6++; }; }; if (hide){ _local6 = _local2; while (_local6 < _local3) { _instances[_local6].visible = false; _local6++; }; }; if (discard){ _instances = _instances.slice(0, _local2); }; }; }; _instanceCount = _arg1; } public function set properties(_arg1:Object):void{ _props = _arg1; applyProperties(0, _instances.length); } public function get count():int{ return (_instanceCount); } public function set format(_arg1:TextFormat):void{ _format = _arg1; if (_format){ applyFormat(0, _instances.length); }; } public function get format():TextFormat{ return (_format); } public function get properties():Object{ return (_props); } } }//package mx.charts.chartClasses
Section 27
//LegendData (mx.charts.chartClasses.LegendData) package mx.charts.chartClasses { import mx.core.*; public class LegendData { public var aspectRatio:Number; public var label:String;// = "" public var marker:IFlexDisplayObject; public var element:IChartElement; mx_internal static const VERSION:String = "2.0.1.0"; public function LegendData(){ label = ""; super(); } } }//package mx.charts.chartClasses
Section 28
//NumericAxis (mx.charts.chartClasses.NumericAxis) package mx.charts.chartClasses { import flash.events.*; import mx.charts.*; public class NumericAxis extends AxisBase implements IAxis { private var _cachedDataDescriptions:Array; private var _labelSet:AxisLabelSet; protected var computedMinimum:Number; protected var computedMaximum:Number; private var _cachedValuesHaveBounds:Boolean; protected var assignedMinimum:Number; private var _regenerateAutoValues:Boolean;// = true protected var assignedMaximum:Number; protected var labelMinimum:Number; protected var labelMaximum:Number; public var baseAtZero:Boolean;// = true private var _parseFunction:Function;// = null private var _autoAdjust:Boolean;// = true protected var minorTickCache:Array; private var _padding:Number; private var _labelFunction:Function;// = null protected var labelCache:Array; protected var computedInterval:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function NumericAxis(){ _regenerateAutoValues = true; _autoAdjust = true; baseAtZero = true; _labelFunction = null; _parseFunction = null; super(); } public function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):AxisLabelSet{ return (_labelSet); } protected function buildLabelCache():Boolean{ return (false); } public function get padding():Number{ return (_padding); } public function preferDropLabels():Boolean{ return (true); } public function get autoAdjust():Boolean{ return (_autoAdjust); } protected function invalidateCache():void{ minorTickCache = null; _regenerateAutoValues = true; labelCache = null; } protected function adjustMinMax(_arg1:Number, _arg2:Number):void{ } public function set padding(_arg1:Number):void{ _padding = _arg1; invalidateCache(); dispatchEvent(new Event("axisChange")); } public function invertTransform(_arg1:Number):Object{ update(); return (((_arg1 * (computedMaximum - computedMinimum)) + computedMinimum)); } private function updateCache(_arg1:Boolean, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:Number; var _local8:Array; var _local9:int; var _local10:DataDescription; var _local11:Number; if (_regenerateAutoValues){ _local3 = computedMinimum; _local4 = computedMaximum; _local5 = computedInterval; if (!isNaN(assignedMinimum)){ computedMinimum = assignedMinimum; }; if (!isNaN(assignedMaximum)){ computedMaximum = assignedMaximum; }; _local6 = ((isNaN(assignedMinimum)) || (isNaN(assignedMaximum))); if (_local6){ autoGenerate(_arg1, _arg2); }; adjustMinMax(computedMinimum, computedMaximum); labelMinimum = computedMinimum; labelMaximum = computedMaximum; if (((((((autoAdjust) || (_local6))) && (_arg1))) && (_cachedValuesHaveBounds))){ adjustForMargins(_arg2); }; _local7 = unitSize; if (!isNaN(_padding)){ if ((labelMinimum - computedMinimum) < (_padding * _local7)){ computedMinimum = (labelMinimum - (_padding * _local7)); }; if ((computedMaximum - labelMaximum) < (_padding * _local7)){ computedMaximum = (labelMaximum + (_padding * _local7)); }; }; _local8 = dataDescriptions; _local9 = 0; while (_local9 < _local8.length) { _local10 = _local8[_local9]; if (!isNaN(_local10.padding)){ if (((isNaN(assignedMinimum)) && (((_local10.min - computedMinimum) < (_local10.padding * _local7))))){ computedMinimum = (_local10.min - (_local10.padding * _local7)); }; if (((isNaN(assignedMaximum)) && (((computedMaximum - _local10.max) < (_local10.padding * _local7))))){ computedMaximum = (_local10.max + (_local10.padding * _local7)); }; }; _local9++; }; if (computedMinimum == computedMaximum){ _local11 = (unitSize / 2); computedMinimum = (computedMinimum - _local11); computedMaximum = (computedMaximum + _local11); }; if (((((!((_local3 == computedMinimum))) || (!((_local4 == computedMaximum))))) || (!((_local5 == computedInterval))))){ labelCache = null; minorTickCache = null; }; _regenerateAutoValues = false; }; } public function set autoAdjust(_arg1:Boolean):void{ _autoAdjust = _arg1; dataChanged(); } public function get baseline():Number{ var _local1:Number; if (computedMinimum >= 0){ _local1 = computedMinimum; } else { if (computedMaximum <= 0){ _local1 = computedMaximum; } else { _local1 = 0; }; }; return (_local1); } private function autoGenerate(_arg1:Boolean, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Array; var _local7:int; var _local8:Number; var _local9:Array; var _local10:int; var _local11:DataDescription; _local6 = this.dataDescriptions; if (((autoAdjust) && (baseAtZero))){ _local3 = zeroValue; }; _local7 = _local6.length; if (_local7 > 0){ _local4 = _local6[0].max; _local3 = (isNaN(_local3)) ? _local6[0].min : Math.min(_local3, _local6[0].min); _local10 = 0; while (_local10 < _local7) { _local11 = _local6[_local10]; if (!isNaN(_local11.min)){ _local3 = Math.min(_local3, _local11.min); }; if (!isNaN(_local11.max)){ _local4 = Math.max(_local4, _local11.max); }; _cachedValuesHaveBounds = ((_cachedValuesHaveBounds) || (((!((_local11.boundedValues == null))) && ((_local11.boundedValues.length > 0))))); _local10++; }; }; _local9 = guardMinMax(_local3, _local4); if (_local9 != null){ _local3 = _local9[0]; _local4 = _local9[1]; }; if (isNaN(assignedMinimum)){ computedMinimum = _local3; }; if (isNaN(assignedMaximum)){ computedMaximum = _local4; }; } public function set parseFunction(_arg1:Function):void{ _parseFunction = _arg1; invalidateCache(); _cachedDataDescriptions = null; dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function formatForScreen(_arg1:Object):String{ return (_arg1.toString()); } private function adjustForMargins(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:Number; var _local10:Number; var _local11:int; var _local12:Boolean; var _local13:Number; var _local14:BoundedValue; var _local15:Number; var _local16:BoundedValue; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:BoundedValue; var _local23:Number; _local2 = computedMinimum; _local3 = computedMaximum; _local6 = []; _local7 = dataDescriptions; _local5 = 0; while (_local5 < _local7.length) { if (_local7[_local5].boundedValues != null){ _local6 = _local6.concat(_local7[_local5].boundedValues); }; _local5++; }; if ((((_local6.length > 0)) && ((_arg1 > 0)))){ if (isNaN(_local2)){ _local2 = _local6[0].value; }; if (isNaN(_local3)){ _local3 = _local6[0].value; }; _local9 = _arg1; _local10 = (_local3 - _local2); _local11 = 0; _local4 = _local6.length; _local12 = true; while (_local12) { _local13 = _arg1; _local15 = 0; _local17 = _local3; _local18 = 0; _local19 = _local2; _local20 = 0; _local5 = 0; while (_local5 < _local4) { _local22 = _local6[_local5]; _local23 = (((_local22.value - _local2) / _local10) * _arg1); if (((!(isNaN(_local22.lowerMargin))) && (((_local23 - _local22.lowerMargin) < _local13)))){ _local13 = (_local23 - _local22.lowerMargin); _local14 = _local22; }; if (((!(isNaN(_local22.upperMargin))) && (((_local23 + _local22.upperMargin) > _local15)))){ _local15 = (_local23 + _local22.upperMargin); _local16 = _local22; }; _local5++; }; if ((((_local13 > -0.0001)) && ((_local15 < (_arg1 + 0.0001))))){ break; }; if (_local15 > _arg1){ _local17 = _local16.value; _local18 = _local16.upperMargin; } else { _local12 = false; }; if (_local13 < 0){ _local19 = _local14.value; _local20 = _local14.lowerMargin; } else { _local12 = false; }; _local21 = (_arg1 - _local18); _local2 = (((_local21 * _local19) - (_local20 * _local17)) / (_local21 - _local20)); _local3 = (((_arg1 * (_local17 - _local2)) / (_arg1 - _local18)) + _local2); _local10 = (_local3 - _local2); var _temp1 = _local11; _local11 = (_local11 + 1); if (_temp1 == 3){ break; }; }; }; _local8 = guardMinMax(_local2, _local3); if (_local8 != null){ _local2 = _local8[0]; _local3 = _local8[1]; }; if (isNaN(assignedMinimum)){ computedMinimum = _local2; }; if (isNaN(assignedMaximum)){ computedMaximum = _local3; }; } protected function get requiredDescribedFields():uint{ return ((DataDescription.REQUIRED_MIN_MAX | DataDescription.REQUIRED_BOUNDED_VALUES)); } protected function get ticks():Array{ var _local1:Array; var _local2:int; var _local3:int; _local1 = []; _local2 = labelCache.length; _local3 = 0; while (_local3 < _local2) { _local1.push(labelCache[_local3].position); _local3++; }; return (_local1); } public function transformCache(_arg1:Array, _arg2:String, _arg3:String):void{ var _local4:Number; var _local5:int; var _local6:int; update(); _local4 = (computedMaximum - computedMinimum); _local5 = _arg1.length; _local6 = 0; while (_local6 < _local5) { _arg1[_local6][_arg3] = ((_arg1[_local6][_arg2] - computedMinimum) / _local4); _local6++; }; } public function mapCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:Boolean=false):void{ var _local5:int; var _local6:int; var _local7:Object; _local5 = _arg1.length; if (_parseFunction != null){ _local6 = 0; while (_local6 < _local5) { _local7 = _arg1[_local6]; _local7[_arg3] = _parseFunction(_local7[_arg2]); _local6++; }; } else { _local6 = 0; while ((((_local6 < _local5)) && ((_arg1[_local6][_arg2] == null)))) { _local6++; }; if (_local6 == _local5){ return; }; if ((_arg1[_local6][_arg2] is String)){ while (_local6 < _local5) { _local7 = _arg1[_local6]; _local7[_arg3] = Number(_local7[_arg2]); _local6++; }; } else { if ((((_arg1[_local6][_arg2] is XML)) || ((_arg1[_local6][_arg2] is XMLList)))){ while (_local6 < _local5) { _local7 = _arg1[_local6]; _local7[_arg3] = parseFloat(_local7[_arg2].toString()); _local6++; }; } else { if ((((((_arg1[_local6][_arg2] is Number)) || ((_arg1[_local6][_arg2] is int)))) || ((_arg1[_local6][_arg2] is uint)))){ while (_local6 < _local5) { _local7 = _arg1[_local6]; _local7[_arg3] = ((_local7[_arg2] == null)) ? NaN : _local7[_arg2]; _local6++; }; } else { while (_local6 < _local5) { _local7 = _arg1[_local6]; _local7[_arg3] = parseFloat(_local7[_arg2]); _local6++; }; }; }; }; }; } mx_internal function get zeroValue():Number{ return (0); } override public function dataChanged():void{ minorTickCache = null; _cachedDataDescriptions = null; _regenerateAutoValues = true; if (((isNaN(assignedMinimum)) || (isNaN(assignedMaximum)))){ dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); }; } public function get parseFunction():Function{ return (_parseFunction); } protected function buildMinorTickCache():Array{ return ([]); } public function get minorTicks():Array{ if (!minorTickCache){ minorTickCache = buildMinorTickCache(); }; return (minorTickCache); } protected function guardMinMax(_arg1:Number, _arg2:Number):Array{ if (((isNaN(_arg1)) || (!(isFinite(_arg1))))){ return ([0, 100]); }; if (((isNaN(_arg2)) || (!(isFinite(_arg2))))){ return ([_arg1, (_arg1 + 100)]); }; if (_arg1 == _arg2){ return ([0, 100]); }; return (null); } protected function get dataDescriptions():Array{ if (_cachedDataDescriptions == null){ _cachedDataDescriptions = describeData(requiredDescribedFields); _cachedValuesHaveBounds = false; }; return (_cachedDataDescriptions); } public function update():void{ updateCache(true, 0); } public function getLabelEstimate():AxisLabelSet{ var _local1:Boolean; update(); _local1 = buildLabelCache(); if (_local1){ _labelSet = new AxisLabelSet(); _labelSet.labels = labelCache; _labelSet.accurate = (_cachedValuesHaveBounds == false); _labelSet.minorTicks = minorTicks; _labelSet.ticks = ticks; }; return (_labelSet); } public function set labelFunction(_arg1:Function):void{ _labelFunction = _arg1; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function filterCache(_arg1:Array, _arg2:String, _arg3:String):void{ var _local4:Number; var _local5:Number; var _local6:int; var _local7:int; var _local8:Object; update(); _local4 = (computedMaximum + 1E-5); _local5 = (computedMinimum - 1E-5); _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7][_arg2]; _arg1[_local7][_arg3] = ((((_local8 >= _local5)) && ((_local8 <= _local4)))) ? _local8 : NaN; _local7++; }; } public function get labelFunction():Function{ return (_labelFunction); } public function getLabels(_arg1:Number):AxisLabelSet{ var _local2:Boolean; if (((_cachedValuesHaveBounds) || ((labelCache == null)))){ _regenerateAutoValues = true; updateCache(true, _arg1); _local2 = buildLabelCache(); } else { _local2 = false; }; if (_local2){ _labelSet = new AxisLabelSet(); _labelSet.labels = labelCache; _labelSet.minorTicks = minorTicks; _labelSet.ticks = ticks; }; return (_labelSet); } } }//package mx.charts.chartClasses
Section 29
//RenderData (mx.charts.chartClasses.RenderData) package mx.charts.chartClasses { import flash.geom.*; public class RenderData { public var cache:Array; public var filteredCache:Array; public var visibleRegion:Rectangle; public var elementBounds:Array; public var bounds:Rectangle; mx_internal static const VERSION:String = "2.0.1.0"; public function RenderData(_arg1:Array=null, _arg2:Array=null){ this.cache = _arg1; this.filteredCache = _arg2; } public function get length():uint{ return ((cache) ? cache.length : 0); } public function clone():RenderData{ return (null); } } }//package mx.charts.chartClasses
Section 30
//Series (mx.charts.chartClasses.Series) package mx.charts.chartClasses { import mx.core.*; import mx.events.*; import mx.effects.*; import mx.charts.*; import mx.charts.effects.effectClasses.*; public class Series extends ChartElement { private var _previousTransitionData:Object; private var _transitionRenderData:Object; private var _displayName:String; private var _bHideTransitionDirty:Boolean;// = false private var _filterData:Boolean;// = true private var _interactive:Boolean;// = true private var _bDataDirty:Boolean;// = true private var _bTransformDirty:Boolean;// = true private var _bMappingDirty:Boolean;// = true private var _bFilterDirty:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function Series(){ _bDataDirty = true; _bMappingDirty = true; _bFilterDirty = true; _bTransformDirty = true; _bHideTransitionDirty = false; _filterData = true; _interactive = true; super(); super.showInAutomationHierarchy = false; } override public function invalidateSize():void{ invalidateTransform(); super.invalidateSize(); } protected function updateData():void{ _bDataDirty = false; } public function getRenderDataForTransition(_arg1:String):Object{ if (_arg1 == "hide"){ return (_previousTransitionData); }; validateData(); validateTransform(); return (renderData); } override public function claimStyles(_arg1:Array, _arg2:uint):uint{ internalStyleName = _arg1[_arg2]; return (((_arg2 + 1) % _arg1.length)); } protected function invalidateTransform(_arg1:Boolean=true):void{ if (_arg1){ _bTransformDirty = true; invalidateDisplayList(); } else { _bTransformDirty = false; }; } override public function stylesInitialized():void{ legendDataChanged(); } protected function invalidateFilter(_arg1:Boolean=true):void{ if (_arg1){ _bFilterDirty = true; _bTransformDirty = true; invalidateTransitions(); invalidateDisplayList(); } else { _bFilterDirty = false; }; } public function endInterpolation(_arg1:Object):void{ transitionRenderData = null; } protected function getMissingInterpolationValues(_arg1:Object, _arg2:Array, _arg3:Object, _arg4:Array, _arg5:Number, _arg6:Object):void{ } protected function updateTransform():void{ _bTransformDirty = false; } override public function setActualSize(_arg1:Number, _arg2:Number):void{ invalidateTransform(); super.setActualSize(_arg1, _arg2); } private function applyInterpolation(_arg1:Object, _arg2:Array):void{ var _local3:int; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Object; var _local8:int; var _local9:Number; var _local10:Object; var _local11:Object; var _local12:Object; var _local13:String; _local3 = _arg2.length; _local4 = _arg1.interpolationSource; _local5 = _arg1.deltaCache; _local6 = _arg1.cache; _local7 = _arg1.properties; _local3 = _local6.length; _local8 = 0; while (_local8 < _local3) { _local9 = _arg2[_local8]; _local10 = _local4[_local8]; _local11 = _local5[_local8]; _local12 = _local6[_local8]; for (_local13 in _local7) { _local12[_local13] = (_local10[_local13] + (_local11[_local13] * _local9)); }; _local8++; }; } protected function cacheNamedValues(_arg1:String, _arg2:Array, _arg3:String):Boolean{ var _local4:int; var _local5:int; var _local6:Object; if (_arg1 == ""){ return (false); }; _local4 = _arg2.length; _local5 = 0; while (_local5 < _local4) { _local6 = _arg2[_local5]; if (_local6.item == null){ } else { _local6[_arg3] = _local6.item[_arg1]; }; _local5++; }; return (true); } public function set displayName(_arg1:String):void{ var _local2:ChartBase; _displayName = _arg1; _local2 = chart; if (_local2){ _local2.legendDataChanged(); }; } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } public function interpolate(_arg1:Array, _arg2:Object):void{ applyInterpolation(_arg2, _arg1); } public function get legendData():Array{ return (null); } protected function legendDataChanged():void{ var _local1:ChartBase; _local1 = chart; if (_local1){ _local1.legendDataChanged(); }; } private function transformChangeHandler(_arg1:FlexEvent):void{ invalidateTransform(); } protected function invalidateTransitions():void{ var _local1:ChartBase; if (_bHideTransitionDirty == false){ _previousTransitionData = renderData; _local1 = chart; if (_local1){ _local1.hideData(); }; _bHideTransitionDirty = true; }; } protected function extractMinMax(_arg1:Array, _arg2:String, _arg3:DataDescription, _arg4:Boolean=false):void{ var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; var _local9:Number; _local5 = _arg1.length; _local9 = Number.POSITIVE_INFINITY; if (isNaN(_arg3.min)){ _local6 = 0; while (_local6 < _local5) { _local7 = _arg1[_local6][_arg2]; if (isNaN(_local7) == false){ break; }; _local6++; }; if (isNaN(_local7)){ return; }; _arg3.min = (_arg3.max = _local7); _local8 = _local7; }; _local6++; while (_local6 < _local5) { _local7 = _arg1[_local6][_arg2]; if (isNaN(_local7)){ } else { if (_local7 < _arg3.min){ _arg3.min = _local7; }; if (_local7 > _arg3.max){ _arg3.max = _local7; }; if (((_arg4) && (((_local7 - _local8) < _local9)))){ _local9 = Math.abs((_local7 - _local8)); }; _local8 = _local7; }; _local6++; }; if (((((_arg4) && ((_local9 < Number.POSITIVE_INFINITY)))) && ((((_local9 < _arg3.minInterval)) || (isNaN(_arg3.minInterval)))))){ _arg3.minInterval = _local9; }; } public function get transitionRenderData():Object{ return (_transitionRenderData); } protected function updateFilter():void{ _bFilterDirty = false; } protected function initializeInterpolationData(_arg1:Array, _arg2:Array, _arg3:Object, _arg4:Class=null, _arg5:Object=null):Object{ var _local6:Array; var _local7:Array; var _local8:int; var _local9:Array; var _local10:int; var _local11:Object; var _local12:ChartItem; var _local13:ChartItem; var _local14:ChartItem; var _local15:ChartItem; var _local16:ChartItem; var _local17:Boolean; var _local18:Object; var _local19:Object; var _local20:Boolean; var _local21:String; var _local22:Number; var _local23:Number; _local6 = []; _local7 = []; _local8 = Math.max(_arg1.length, _arg2.length); _local9 = []; if (_arg4 == null){ _arg4 = Object; }; _local10 = 0; while (_local10 < _local8) { _local12 = _arg1[_local10]; _local13 = _arg2[_local10]; _local14 = ((_local13 == null)) ? _local12.clone() : _local13.clone(); _local15 = ((_local12 == null)) ? _local13.clone() : _local12.clone(); _local16 = new (_arg4); _local17 = false; _local18 = {}; _local19 = {}; _local20 = false; for (_local21 in _arg3) { if (_local12){ _local22 = _local12[_local21]; } else { _local22 = NaN; }; if (_local13){ _local23 = _local13[_local21]; } else { _local23 = NaN; }; if (((isNaN(_local22)) || (isNaN(_local23)))){ _local20 = true; _local18[_local21] = _local22; _local19[_local21] = _local23; } else { _local15[_local21] = _local22; _local14[_local21] = _local22; _local16[_local21] = (_local23 - _local22); }; }; if (_local20){ getMissingInterpolationValues(_local18, _arg1, _local19, _arg2, _local10, _arg5); for (_local21 in _local18) { _local22 = _local18[_local21]; _local15[_local21] = _local22; _local14[_local21] = _local22; _local16[_local21] = (_local19[_local21] - _local22); }; }; _local9[_local10] = _local15; _local6[_local10] = _local14; _local7[_local10] = _local16; _local10++; }; _local11 = {cache:_local6, interpolationSource:_local9, deltaCache:_local7, properties:_arg3}; return (_local11); } override public function set dataTransform(_arg1:DataTransform):void{ if (dataTransform){ dataTransform.removeEventListener(FlexEvent.TRANSFORM_CHANGE, transformChangeHandler); }; super.dataTransform = _arg1; if (_arg1){ _arg1.addEventListener(FlexEvent.TRANSFORM_CHANGE, transformChangeHandler, false, 0, false); }; } public function getElementBounds(_arg1:Object):void{ } protected function validateData():void{ if (dataTransform){ if (_bDataDirty){ updateData(); }; if (_bMappingDirty){ updateMapping(); }; }; } protected function extractMinInterval(_arg1:Array, _arg2:String, _arg3:DataDescription):void{ var _local4:int; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = _arg1.length; _local8 = Number.POSITIVE_INFINITY; _local5 = 0; while (_local5 < _local4) { _local6 = _arg1[_local5][_arg2]; if (isNaN(_local6) == false){ break; }; _local5++; }; if (isNaN(_local6)){ return; }; _local7 = _local6; _local5++; while (_local5 < _local4) { _local6 = _arg1[_local5][_arg2]; if (isNaN(_local6)){ } else { if ((_local6 - _local7) < _local8){ _local8 = Math.abs((_local6 - _local7)); }; _local7 = _local6; }; _local5++; }; if ((((_local8 < Number.POSITIVE_INFINITY)) && ((((_local8 < _arg3.minInterval)) || (isNaN(_arg3.minInterval)))))){ _arg3.minInterval = _local8; }; } override public function mappingChanged():void{ invalidateMapping(); } public function set interactive(_arg1:Boolean):void{ _interactive = _arg1; invalidateDisplayList(); } protected function stripNaNs(_arg1:Array, _arg2:String):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; if (filterData == false){ return; }; _local3 = _arg1.length; _local4 = -1; _local5 = -1; if (_arg2 == ""){ _local6 = (_arg1.length - 1); while (_local6 >= 0) { if (isNaN(_arg1[_local6])){ if (_local4 < 0){ _local5 = _local6; _local4 = _local5; } else { if ((_local5 - 1) == _local6){ _local5 = _local6; } else { _arg1.splice(_local5, ((_local4 - _local5) + 1)); _local5 = _local6; _local4 = _local5; }; }; }; _local6--; }; } else { _local6 = (_arg1.length - 1); while (_local6 >= 0) { if (isNaN(_arg1[_local6][_arg2])){ if (_local4 < 0){ _local5 = _local6; _local4 = _local5; } else { if ((_local5 - 1) == _local6){ _local5 = _local6; } else { _arg1.splice(_local5, ((_local4 - _local5) + 1)); _local5 = _local6; _local4 = _local5; }; }; }; _local6--; }; }; if (_local4 >= 0){ _arg1.splice(_local5, ((_local4 - _local5) + 1)); }; } override public function collectTransitions(_arg1:Number, _arg2:Array):void{ var _local3:Effect; var _local4:IEffectInstance; _local3 = null; if (_arg1 == ChartState.PREPARING_TO_HIDE_DATA){ _local3 = (EffectManager.mx_internal::createEffectForType(this, "hideData") as Effect); if (_local3){ _local4 = _local3.createInstance(this); if ((_local4 is SeriesEffectInstance)){ (_local4 as SeriesEffectInstance).type = "hide"; }; }; } else { if (_arg1 == ChartState.PREPARING_TO_SHOW_DATA){ validateProperties(); _local3 = (EffectManager.mx_internal::createEffectForType(this, "showData") as Effect); if (_local3){ _local4 = _local3.createInstance(this); if ((_local4 is SeriesEffectInstance)){ (_local4 as SeriesEffectInstance).type = "show"; }; }; }; }; if (_local4 != null){ _arg2.push(_local4); }; super.collectTransitions(_arg1, _arg2); } protected function cacheDefaultValues(_arg1:String, _arg2:Array, _arg3:String):Boolean{ var _local4:int; var _local5:int; var _local6:Object; _local4 = _arg2.length; if ((((_arg1 == "")) || ((_arg1 == null)))){ _local5 = 0; while (_local5 < _local4) { _local6 = _arg2[_local5]; _local6[_arg3] = _local6.item; _local5++; }; return (false); //unresolved jump }; _local5 = 0; while (_local5 < _local4) { _local6 = _arg2[_local5]; if (_local6.item == null){ } else { _local6[_arg3] = _local6.item[_arg1]; }; _local5++; }; return (true); } public function get displayName():String{ return (_displayName); } protected function get renderData():Object{ return (null); } public function set filterData(_arg1:Boolean):void{ _filterData = _arg1; invalidateFilter(); } protected function validateTransform():void{ if (dataTransform){ if (_bFilterDirty){ updateFilter(); }; if (_bTransformDirty){ updateTransform(); }; }; } public function get interactive():Boolean{ return (_interactive); } protected function invalidateMapping(_arg1:Boolean=true):void{ if (_arg1){ _bDataDirty = true; _bMappingDirty = true; _bFilterDirty = true; _bTransformDirty = true; invalidateTransitions(); invalidateDisplayList(); } else { _bMappingDirty = true; }; } public function set transitionRenderData(_arg1:Object):void{ _transitionRenderData = _arg1; } public function get filterData():Boolean{ return (_filterData); } protected function invalidateData(_arg1:Boolean=true):void{ if (_arg1){ _bDataDirty = true; _bMappingDirty = true; _bFilterDirty = true; _bTransformDirty = true; invalidateTransitions(); invalidateDisplayList(); } else { _bDataDirty = false; }; } public function beginInterpolation(_arg1:Object, _arg2:Object):Object{ return (null); } override protected function dataChanged():void{ invalidateData(); super.dataChanged(); } protected function cacheIndexValues(_arg1:String, _arg2:Array, _arg3:String):Boolean{ var _local4:int; var _local5:int; var _local6:Object; _local4 = _arg2.length; if (_arg1 == ""){ _local5 = 0; while (_local5 < _local4) { _local6 = _arg2[_local5]; _local6[_arg3] = _local6.index; _local5++; }; return (false); //unresolved jump }; _local5 = 0; while (_local5 < _local4) { _local6 = _arg2[_local5]; if (_local6.item == null){ } else { _local6[_arg3] = _local6.item[_arg1]; }; _local5++; }; return (true); } protected function updateMapping():void{ _bMappingDirty = false; } override public function chartStateChanged(_arg1:uint, _arg2:uint):void{ invalidateDisplayList(); if ((((_arg2 == ChartState.PREPARING_TO_SHOW_DATA)) || ((_arg2 == ChartState.NONE)))){ transitionRenderData = null; }; super.chartStateChanged(_arg1, _arg2); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:ChartBase; var _local4:uint; super.updateDisplayList(_arg1, _arg2); if (_bHideTransitionDirty){ _bHideTransitionDirty = false; }; _local3 = chart; if (_local3){ _local4 = _local3.chartState; }; validateData(); validateTransform(); } } }//package mx.charts.chartClasses
Section 31
//SeriesEffectInstance (mx.charts.effects.effectClasses.SeriesEffectInstance) package mx.charts.effects.effectClasses { import mx.effects.*; import mx.effects.effectClasses.*; import mx.charts.chartClasses.*; public class SeriesEffectInstance extends TweenEffectInstance { public var type:String;// = "show" private var _playHeads:Array; private var _elementCount:Number; private var _elementDuration:Number; protected var targetSeries:Series; private var _forward:Boolean;// = true public var offset:Number;// = 0 private var easingFunctionHolder:Function; public var elementOffset:Number;// = 20 public var minimumElementDuration:Number;// = 0 protected var interpolationValues:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function SeriesEffectInstance(_arg1:Object=null){ _forward = true; elementOffset = 20; minimumElementDuration = 0; offset = 0; type = "show"; targetSeries = Series(_arg1); super(_arg1); } protected function beginTween(_arg1:int):void{ easingFunctionHolder = findEasingEquation(target, easingFunction); _elementCount = _arg1; if (elementOffset < 0){ _forward = false; elementOffset = (elementOffset * -1); }; if (_arg1 > 0){ if (!isNaN(duration)){ _elementDuration = (duration - (Math.abs(elementOffset) * (_arg1 - 1))); }; if (((isNaN(duration)) || ((_elementDuration < minimumElementDuration)))){ _elementDuration = minimumElementDuration; duration = ((Math.abs(elementOffset) * (_arg1 - 1)) + _elementDuration); }; duration = (duration + offset); }; elementOffset = (elementOffset / duration); _elementDuration = (_elementDuration / duration); offset = (offset / duration); interpolationValues = []; _playHeads = []; tween = new Tween(this, 0, 1, duration); tween.easingFunction = LinearEase; } private function findEasingEquation(_arg1:Object, _arg2:Object):Function{ var _local3:Object; if (_arg2 == null){ return (sinEase); }; if ((_arg2 is Function)){ return ((_arg2 as Function)); }; while (_arg1 != null) { _local3 = _arg1[_arg2]; if (((!((_local3 == null))) && ((_local3 is Function)))){ return ((_local3 as Function)); }; _arg1 = _arg1.parent; }; return (sinEase); } override public function onTweenUpdate(_arg1:Object):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:Number; _local2 = Number(_arg1); _local3 = _elementCount; if (_forward){ _local4 = 0; while (_local4 < _local3) { if (_playHeads[_local4] != 1){ _local5 = (((_local2 - offset) - (_local4 * elementOffset)) / _elementDuration); if (_local5 > 1){ interpolationValues[_local4] = 1; } else { if (_local5 >= 0){ interpolationValues[_local4] = easingFunctionHolder(_local5, 0, 1, 1); } else { interpolationValues[_local4] = 0; }; }; _playHeads[_local4] = _local5; }; _local4++; }; } else { _local4 = 0; while (_local4 < _local3) { if (_playHeads[_local4] != 1){ _local5 = (((_local2 - offset) - (((_local3 - 1) - _local4) * elementOffset)) / _elementDuration); if (_local5 > 1){ interpolationValues[_local4] = 1; } else { if (_local5 >= 0){ interpolationValues[_local4] = easingFunctionHolder(_local5, 0, 1, 1); } else { interpolationValues[_local4] = 0; }; }; _playHeads[_local4] = _local5; }; _local4++; }; }; } private static function LinearEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((_arg2 + ((_arg3 * _arg1) / _arg4))); } private static function sinEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((_arg2 + ((_arg3 * (1 - Math.cos(((Math.PI * _arg1) / _arg4)))) / 2))); } } }//package mx.charts.effects.effectClasses
Section 32
//ChartItemEvent (mx.charts.events.ChartItemEvent) package mx.charts.events { import flash.events.*; import flash.display.*; import flash.geom.*; import mx.charts.*; import mx.charts.chartClasses.*; public class ChartItemEvent extends MouseEvent { public var hitSet:Array; public static const ITEM_MOUSE_UP:String = "itemMouseUp"; public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; public static const ITEM_MOUSE_DOWN:String = "itemMouseDown"; public static const ITEM_ROLL_OVER:String = "itemRollOver"; mx_internal static const VERSION:String = "2.0.1.0"; public static const ITEM_CLICK:String = "itemClick"; public static const ITEM_MOUSE_MOVE:String = "itemMouseMove"; public static const ITEM_ROLL_OUT:String = "itemRollOut"; public function ChartItemEvent(_arg1:String, _arg2:Array=null, _arg3:MouseEvent=null, _arg4:ChartBase=null){ var _local5:Point; var _local6:Boolean; var _local7:Boolean; var _local8:InteractiveObject; var _local9:Boolean; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; var _local13:int; if (((_arg3) && (_arg3.target))){ _local5 = _arg4.globalToLocal(_arg3.target.localToGlobal(new Point(_arg3.localX, _arg3.localY))); } else { if (_arg4){ _local5 = new Point(_arg4.mouseX, _arg4.mouseY); } else { _local5 = new Point(0, 0); }; }; _local6 = true; _local7 = false; _local8 = null; _local9 = false; _local10 = false; _local11 = false; _local12 = false; _local13 = 0; if (_arg3){ _local6 = _arg3.bubbles; _local7 = _arg3.cancelable; _local8 = _arg3.relatedObject; _local9 = _arg3.ctrlKey; _local11 = _arg3.altKey; _local10 = _arg3.shiftKey; _local12 = _arg3.buttonDown; _local13 = _arg3.delta; }; super(_arg1, _local6, _local7, _local5.x, _local5.y, _local8, _local9, _local11, _local10, _local12, _local13); this.hitSet = _arg2; } override public function clone():Event{ return (new ChartItemEvent(type, hitSet, this, ChartBase(this.target))); } public function get hitData():HitData{ return ((((hitSet) && ((hitSet.length > 0)))) ? hitSet[0] : null); } } }//package mx.charts.events
Section 33
//LegendMouseEvent (mx.charts.events.LegendMouseEvent) package mx.charts.events { import flash.events.*; import flash.display.*; import mx.charts.*; public class LegendMouseEvent extends MouseEvent { public var item:LegendItem; public static const ITEM_MOUSE_UP:String = "itemMouseUp"; public static const ITEM_MOUSE_OUT:String = "itemMouseOut"; public static const ITEM_MOUSE_DOWN:String = "itemMouseDown"; mx_internal static const VERSION:String = "2.0.1.0"; public static const ITEM_MOUSE_OVER:String = "itemMouseOver"; public static const ITEM_CLICK:String = "itemClick"; public function LegendMouseEvent(_arg1:String, _arg2:MouseEvent=null, _arg3:LegendItem=null){ var _local4:String; var _local5:Boolean; var _local6:Boolean; var _local7:int; var _local8:int; var _local9:InteractiveObject; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; var _local13:Boolean; var _local14:int; _local4 = convertType(_arg1); _local5 = true; _local6 = false; _local7 = 0; _local8 = 0; _local9 = null; _local10 = false; _local11 = false; _local12 = false; _local13 = false; _local14 = 0; if (_arg2){ _local5 = _arg2.bubbles; _local6 = _arg2.cancelable; _local7 = _arg2.localX; _local8 = _arg2.localY; _local9 = _arg2.relatedObject; _local10 = _arg2.ctrlKey; _local12 = _arg2.altKey; _local11 = _arg2.shiftKey; _local13 = _arg2.buttonDown; _local14 = _arg2.delta; }; super(_local4, _local5, _local6, _local7, _local8, _local9, _local10, _local12, _local11, _local13, _local14); this.item = _arg3; } override public function clone():Event{ return (new LegendMouseEvent(type, this, item)); } private static function convertType(_arg1:String):String{ switch (_arg1){ case MouseEvent.CLICK: return (ITEM_CLICK); case MouseEvent.MOUSE_DOWN: return (ITEM_MOUSE_DOWN); case MouseEvent.MOUSE_UP: return (ITEM_MOUSE_UP); case MouseEvent.MOUSE_OVER: return (ITEM_MOUSE_OVER); case MouseEvent.MOUSE_OUT: return (ITEM_MOUSE_OUT); }; return (_arg1); } } }//package mx.charts.events
Section 34
//BoxItemRenderer (mx.charts.renderers.BoxItemRenderer) package mx.charts.renderers { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.skins.*; public class BoxItemRenderer extends ProgrammaticSkin implements IDataRenderer { private var _data:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function set data(_arg1:Object):void{ if (_data == _arg1){ return; }; _data = _arg1; } public function get data():Object{ return (_data); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:IFill; var _local4:IStroke; var _local5:Number; var _local6:Rectangle; var _local7:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = GraphicsUtilities.fillFromStyle(getStyle("fill")); _local4 = getStyle("stroke"); _local5 = (_local4) ? (_local4.weight / 2) : 0; _local6 = new Rectangle(_local5, _local5, (width - (2 * _local5)), (height - (2 * _local5))); _local7 = graphics; _local7.clear(); _local7.moveTo(_local6.left, _local6.top); if (_local4){ _local4.apply(_local7); }; if (_local3){ _local3.begin(_local7, _local6); }; _local7.lineTo(_local6.right, _local6.top); _local7.lineTo(_local6.right, _local6.bottom); _local7.lineTo(_local6.left, _local6.bottom); _local7.lineTo(_local6.left, _local6.top); if (_local3){ _local3.end(_local7); }; } } }//package mx.charts.renderers
Section 35
//LineRenderer (mx.charts.renderers.LineRenderer) package mx.charts.renderers { import mx.core.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.skins.*; public class LineRenderer extends ProgrammaticSkin implements IDataRenderer { private var _lineSegment:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function set data(_arg1:Object):void{ _lineSegment = _arg1; invalidateDisplayList(); } public function get data():Object{ return (_lineSegment); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:IStroke; var _local4:String; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("lineStroke"); _local4 = getStyle("form"); graphics.clear(); GraphicsUtilities.drawPolyLine(graphics, _lineSegment.items, _lineSegment.start, (_lineSegment.end + 1), "x", "y", _local3, _local4); } } }//package mx.charts.renderers
Section 36
//LineSeriesItem (mx.charts.series.items.LineSeriesItem) package mx.charts.series.items { import mx.charts.*; import mx.charts.series.*; public class LineSeriesItem extends ChartItem { public var xFilter:Number; public var yFilter:Number; public var xValue:Object; public var yValue:Object; public var xNumber:Number; public var yNumber:Number; public var y:Number; public var x:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function LineSeriesItem(_arg1:LineSeries=null, _arg2:Object=null, _arg3:uint=0){ super(_arg1, _arg2, _arg3); } override public function clone():ChartItem{ var _local1:LineSeriesItem; _local1 = new LineSeriesItem(LineSeries(element), item, index); _local1.itemRenderer = itemRenderer; return (_local1); } } }//package mx.charts.series.items
Section 37
//LineSeriesSegment (mx.charts.series.items.LineSeriesSegment) package mx.charts.series.items { import mx.charts.series.*; public class LineSeriesSegment { public var items:Array; public var start:uint; public var index:uint; public var end:uint; public var element:LineSeries; mx_internal static const VERSION:String = "2.0.1.0"; public function LineSeriesSegment(_arg1:LineSeries, _arg2:uint, _arg3:Array, _arg4:uint, _arg5:uint){ this.element = _arg1; this.items = _arg3; this.index = _arg2; this.start = _arg4; this.end = _arg5; } public function clone():LineSeriesSegment{ return (new LineSeriesSegment(element, index, items, start, end)); } } }//package mx.charts.series.items
Section 38
//LineSeriesRenderData (mx.charts.series.renderData.LineSeriesRenderData) package mx.charts.series.renderData { import mx.charts.chartClasses.*; public class LineSeriesRenderData extends RenderData { public var segments:Array; public var radius:Number; public var validPoints:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function LineSeriesRenderData(_arg1:Array=null, _arg2:Array=null, _arg3:Number=0, _arg4:Array=null, _arg5:Number=0){ super(_arg1, _arg2); this.validPoints = _arg3; this.segments = _arg4; this.radius = _arg5; } override public function clone():RenderData{ var _local1:Array; var _local2:int; var _local3:int; _local1 = []; _local2 = segments.length; _local3 = 0; while (_local3 < _local2) { _local1[_local3] = segments[_local3].clone(); _local3++; }; return (new LineSeriesRenderData(cache, filteredCache, validPoints, _local1, radius)); } } }//package mx.charts.series.renderData
Section 39
//LineSeries (mx.charts.series.LineSeries) package mx.charts.series { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.graphics.*; import mx.charts.*; import mx.collections.*; import mx.charts.chartClasses.*; import mx.charts.series.items.*; import mx.charts.series.renderData.*; import mx.charts.styles.*; import mx.charts.renderers.*; public class LineSeries extends Series { private var _renderData:LineSeriesRenderData; private var _xField:String;// = "" private var _yField:String;// = "" private var _segmentInstanceCache:InstanceCache; private var _pointInstanceCache:InstanceCache; private var _interpolateValues:Boolean;// = false private var _sortOnXField:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); public function LineSeries(){ _interpolateValues = false; _sortOnXField = true; _xField = ""; _yField = ""; super(); _pointInstanceCache = new InstanceCache(null, this, 1000); _pointInstanceCache.creationCallback = applyItemRendererProperties; _segmentInstanceCache = new InstanceCache(null, this, 0); _segmentInstanceCache.properties = {styleName:this}; } public function set yField(_arg1:String):void{ _yField = _arg1; dataChanged(); } public function get yField():String{ return (_yField); } public function set sortOnXField(_arg1:Boolean):void{ if (_sortOnXField == _arg1){ return; }; _sortOnXField = _arg1; invalidateMapping(); } override protected function updateData():void{ var _local1:Class; var _local2:int; var _local3:Class; _local1 = this.renderDataType; _renderData = new (_local1); _renderData.cache = []; if (dataProvider){ cursor.seek(CursorBookmark.FIRST); _local2 = 0; _local3 = itemType; while (!(cursor.afterLast)) { _renderData.cache[_local2] = new _local3(this, cursor.current, _local2); _local2++; cursor.moveNext(); }; cacheDefaultValues(_yField, _renderData.cache, "yValue"); cacheIndexValues(_xField, _renderData.cache, "xValue"); }; _renderData.validPoints = _renderData.cache.length; super.updateData(); } protected function get lineSegmentType():Class{ return (LineSeriesSegment); } private function formatDataTip(_arg1:HitData):String{ var _local2:String; var _local3:String; var _local4:String; var _local5:String; _local2 = ""; _local3 = displayName; if (((_local3) && (!((_local3 == ""))))){ _local2 = (_local2 + (("<b>" + _local3) + "</b><BR/>")); }; _local4 = dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).displayName; if (_local4 != ""){ _local2 = (_local2 + (("<i>" + _local4) + ":</i> ")); }; _local2 = (_local2 + (dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).formatForScreen(LineSeriesItem(_arg1.chartItem).xValue) + "\n")); _local5 = dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).displayName; if (_local5 != ""){ _local2 = (_local2 + (("<i>" + _local5) + ":</i> ")); }; _local2 = (_local2 + (dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).formatForScreen(LineSeriesItem(_arg1.chartItem).yValue) + "\n")); return (_local2); } override protected function getMissingInterpolationValues(_arg1:Object, _arg2:Array, _arg3:Object, _arg4:Array, _arg5:Number, _arg6:Object):void{ var _local7:Array; var _local8:Array; var _local9:String; var _local10:Number; var _local11:Number; var _local12:int; var _local13:int; _local7 = _arg6.sourceRenderData.cache; _local8 = _arg6.destRenderData.cache; for (_local9 in _arg1) { _local10 = _arg1[_local9]; _local11 = _arg3[_local9]; _local12 = _arg5; if (isNaN(_local10)){ if (_local7.length == 0){ _local10 = ((_local9)=="x") ? _local8[_arg5].x : unscaledHeight; } else { if (_local12 >= _local7.length){ _local12 = (_local7.length - 1); }; while ((((_local12 >= 0)) && (isNaN(_local7[_local12][_local9])))) { _local12--; }; if (_local12 >= 0){ _local10 = (_local7[_local12][_local9] + (0.01 * (_local12 - _arg5))); }; if (isNaN(_local10)){ _local12 = (_arg5 + 1); _local13 = _local7.length; while ((((_local12 < _local13)) && (isNaN(_local7[_local12][_local9])))) { _local12++; }; if (_local12 < _local13){ _local10 = (_local7[_local12][_local9] + (0.01 * (_local12 - _arg5))); }; }; }; }; _arg1[_local9] = _local10; _arg3[_local9] = _local11; }; } override protected function updateTransform():void{ dataTransform.transformCache(_renderData.filteredCache, "xNumber", "x", "yNumber", "y"); super.updateTransform(); } public function get radius():Number{ return (getStyle("radius")); } protected function get itemType():Class{ return (LineSeriesItem); } override public function describeData(_arg1:String, _arg2:uint):Array{ var _local3:DataDescription; var _local4:Number; var _local5:IStroke; var _local6:Number; var _local7:Object; var _local8:Array; validateData(); if (_renderData.cache.length == 0){ return ([]); }; _local3 = new DataDescription(); _local3.boundedValues = null; if (_arg1 == CartesianTransform.VERTICAL_AXIS){ extractMinMax(_renderData.cache, "yNumber", _local3); if ((_arg2 & DataDescription.REQUIRED_BOUNDED_VALUES) != 0){ _local4 = 0; _local5 = getStyle("lineStroke"); if (_local5 != null){ _local4 = (_local5.weight / 2); }; _local6 = getStyle("radius"); _local7 = getStyle("itemRenderer"); if ((((_local6 > 0)) && (!((_local7 == null))))){ _local5 = getStyle("stroke"); if (_local5 != null){ _local6 = (_local6 + (_local5.weight / 2)); }; _local4 = Math.max(_local6, _local4); }; if (_local4 > 0){ _local3.boundedValues = []; _local3.boundedValues.push(new BoundedValue(_local3.max, 0, _local4)); _local3.boundedValues.push(new BoundedValue(_local3.min, _local4, 0)); }; }; } else { if (_arg1 == CartesianTransform.HORIZONTAL_AXIS){ if (_xField != ""){ if ((_arg2 & DataDescription.REQUIRED_MIN_INTERVAL) != 0){ _local8 = _renderData.cache; if (_sortOnXField == false){ _local8 = _renderData.cache.concat(); _local8.sortOn("xNumber", Array.NUMERIC); }; extractMinMax(_local8, "xNumber", _local3, !((0 == (_arg2 & DataDescription.REQUIRED_MIN_INTERVAL)))); } else { extractMinMax(_renderData.cache, "xNumber", _local3, !(((_arg2 & DataDescription.REQUIRED_MIN_INTERVAL) == 0))); }; } else { _local3.min = _renderData.cache[0].xNumber; _local3.max = _renderData.cache[(_renderData.cache.length - 1)].xNumber; if ((_arg2 & DataDescription.REQUIRED_MIN_INTERVAL) != 0){ extractMinInterval(_renderData.cache, "xNumber", _local3); }; }; if ((_arg2 & DataDescription.REQUIRED_BOUNDED_VALUES) != 0){ _local4 = 0; _local5 = getStyle("lineStroke"); if (_local5 != null){ _local4 = (_local5.weight / 2); }; _local6 = getStyle("radius"); _local7 = getStyle("itemRenderer"); if ((((_local6 > 0)) && (!((_local7 == null))))){ _local5 = getStyle("stroke"); if (_local5 != null){ _local6 = (_local6 + (_local5.weight / 2)); }; _local4 = Math.max(_local6, _local4); }; if (_local4 > 0){ _local3.boundedValues = []; _local3.boundedValues.push(new BoundedValue(_local3.max, 0, _local4)); _local3.boundedValues.push(new BoundedValue(_local3.min, _local4, 0)); }; }; } else { return ([]); }; }; return ([_local3]); } override public function getElementBounds(_arg1:Object):void{ var _local2:Array; var _local3:Array; var _local4:Array; var _local5:int; var _local6:Number; var _local7:int; var _local8:Object; var _local9:Rectangle; var _local10:int; var _local11:Object; var _local12:int; var _local13:Rectangle; _local2 = _arg1.cache; _local3 = _arg1.segments; _local4 = []; _local5 = _local2.length; if (_local5 == 0){ _local9 = new Rectangle(); } else { _local6 = _arg1.radius; if ((((_local6 == 0)) || (isNaN(_local6)))){ _local6 = 1; }; _local7 = _local3.length; _local8 = _local2[_arg1.segments[0].start]; _local9 = new Rectangle(_local8.x, _local8.y, 0, 0); _local10 = 0; while (_local10 < _local7) { _local11 = _arg1.segments[_local10]; _local12 = _local11.start; while (_local12 <= _local11.end) { _local8 = _local2[_local12]; _local13 = new Rectangle((_local8.x - _local6), (_local8.y - _local6), (2 * _local6), (2 * _local6)); _local9.left = Math.min(_local9.left, _local13.left); _local9.top = Math.min(_local9.top, _local13.top); _local9.right = Math.max(_local9.right, _local13.right); _local9.bottom = Math.max(_local9.bottom, _local13.bottom); _local4[_local12] = _local13; _local12++; }; _local10++; }; }; _arg1.elementBounds = _local4; _arg1.bounds = _local9; } public function set radius(_arg1:Number):void{ setStyle("radius", _arg1); } override public function get legendData():Array{ var _local1:Number; var _local2:IFactory; var _local3:Number; var _local4:int; var _local5:IFlexDisplayObject; var _local6:LegendData; var _local7:IFactory; _local1 = getStyle("radius"); _local2 = getStyle("itemRenderer"); _local4 = 0; _local6 = new LegendData(); _local6.element = this; _local6.label = displayName; _local7 = getStyle("legendMarkerRenderer"); if (_local7 != null){ _local5 = _local7.newInstance(); if ((_local5 is ISimpleStyleClient)){ (_local5 as ISimpleStyleClient).styleName = this; }; _local6.aspectRatio = 1; } else { if ((((((_local2 == null)) || ((_local1 == 0)))) || (isNaN(_local1)))){ _local5 = new LineSeriesLegendMarker(this); } else { _local7 = getStyle("itemRenderer"); _local5 = _local7.newInstance(); _local6.aspectRatio = 1; if ((_local5 as ISimpleStyleClient)){ (_local5 as ISimpleStyleClient).styleName = this; }; }; }; _local6.marker = _local5; return ([_local6]); } public function get interpolateValues():Boolean{ return (_interpolateValues); } override protected function updateFilter():void{ var _local1:Class; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:LineSeriesItem; _renderData.segments = []; _local1 = this.lineSegmentType; if (filterData){ _renderData.filteredCache = _renderData.cache.concat(); dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).filterCache(_renderData.filteredCache, "xNumber", "xFilter"); dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).filterCache(_renderData.filteredCache, "yNumber", "yFilter"); if (xField != ""){ stripNaNs(_renderData.filteredCache, "xFilter"); }; _renderData.validPoints = _renderData.filteredCache.length; if (_interpolateValues == false){ _local3 = -1; _local4 = _renderData.filteredCache.length; while (_local3 < _local4) { _local5 = (_local3 + 1); while (_local5 < _local4) { _local6 = LineSeriesItem(_renderData.filteredCache[_local5]); if (((!(isNaN(_local6.xFilter))) && (!(isNaN(_local6.yFilter))))){ break; }; _renderData.validPoints--; _local5++; }; if (_local5 == _local4){ break; }; _local2 = _local5; _local5 = (_local2 + 1); while (_local5 < _local4) { _local6 = LineSeriesItem(_renderData.filteredCache[_local5]); if (((isNaN(_local6.xFilter)) || (isNaN(_local6.yFilter)))){ break; }; _local5++; }; _local3 = (_local5 - 1); if (_local3 != _local2){ _renderData.segments.push(new _local1(this, _renderData.segments.length, _renderData.filteredCache, _local2, _local3)); }; }; } else { stripNaNs(_renderData.filteredCache, "yFilter"); _renderData.validPoints = _renderData.filteredCache.length; if (_renderData.filteredCache.length > 0){ _renderData.segments.push(new _local1(this, 0, _renderData.filteredCache, _local2, (_renderData.filteredCache.length - 1))); }; }; } else { _renderData.filteredCache = _renderData.cache; _renderData.segments.push(new _local1(this, 0, _renderData.filteredCache, _local2, (_renderData.filteredCache.length - 1))); }; super.updateFilter(); } protected function get renderDataType():Class{ return (LineSeriesRenderData); } public function get sortOnXField():Boolean{ return (_sortOnXField); } override protected function get renderData():Object{ var _local1:Class; var _local2:LineSeriesRenderData; if ((((((_renderData == null)) || ((_renderData.cache == null)))) || ((_renderData.cache.length == 0)))){ _local1 = this.renderDataType; _local2 = new (_local1); _local2.cache = (_local2.filteredCache = []); _local2.segments = []; _local2.radius = 0; return (_local2); }; _renderData.radius = getStyle("radius"); return (_renderData); } public function set xField(_arg1:String):void{ _xField = _arg1; dataChanged(); } public function set interpolateValues(_arg1:Boolean):void{ if (_interpolateValues != _arg1){ _interpolateValues = _arg1; invalidateData(); }; } public function get xField():String{ return (_xField); } override public function beginInterpolation(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:LineSeriesRenderData; var _local5:Array; var _local6:int; var _local7:int; _local3 = initializeInterpolationData(_arg1.cache, _arg2.cache, {x:true, y:true}, itemType, {sourceRenderData:_arg1, destRenderData:_arg2}); _local4 = LineSeriesRenderData(_arg2.clone()); _local4.cache = _local3.cache; _local4.filteredCache = _local3.cache; _local5 = _local4.segments; _local6 = _local5.length; _local7 = 0; while (_local7 < _local6) { _local5[_local7].items = _local3.cache; _local7++; }; transitionRenderData = _local4; return (_local3); } mx_internal function get items():Array{ return ((_renderData) ? _renderData.filteredCache : null); } override protected function updateMapping():void{ dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS).mapCache(_renderData.cache, "xValue", "xNumber", (_xField == "")); dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS).mapCache(_renderData.cache, "yValue", "yNumber"); if (((!((_xField == ""))) && (_sortOnXField))){ _renderData.cache.sortOn("xNumber", Array.NUMERIC); }; super.updateMapping(); } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); invalidateDisplayList(); legendDataChanged(); } override public function findDataPoints(_arg1:Number, _arg2:Number, _arg3:Number):Array{ var _local4:Number; var _local5:Number; var _local6:LineSeriesItem; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Boolean; var _local13:LineSeriesItem; var _local14:Number; var _local15:HitData; var _local16:IStroke; var _local17:LinearGradientStroke; if ((((interactive == false)) || ((_renderData == null)))){ return ([]); }; _local4 = getStyle("radius"); _local5 = (_local4 + _arg3); _local5 = ((_local4 + _arg3) * _local5); _local7 = (_local4 * _local4); _local8 = _renderData.filteredCache.length; if (_local8 == 0){ return ([]); }; _local9 = 0; _local10 = _local8; _local11 = Math.floor(((_local9 + _local10) / 2)); _local12 = isNaN(_renderData.filteredCache[0]); while (true) { _local13 = _renderData.filteredCache[_local11]; if (((!(isNaN(_local13.yFilter))) && (!(isNaN(_local13.xFilter))))){ _local14 = (((_local13.x - _arg1) * (_local13.x - _arg1)) + ((_local13.y - _arg2) * (_local13.y - _arg2))); if (_local14 <= _local5){ _local5 = _local14; _local6 = _local13; }; }; if ((((_local13.x < _arg1)) || (((isNaN(_local13.x)) && (_local12))))){ _local9 = _local11; _local11 = Math.floor(((_local9 + _local10) / 2)); if (_local11 == _local9){ break; }; } else { _local10 = _local11; _local11 = Math.floor(((_local9 + _local10) / 2)); if (_local11 == _local10){ break; }; }; }; if (_local6 != null){ _local15 = new HitData(createDataID(_local6.index), Math.sqrt(_local5), _local6.x, _local6.y, _local6); _local16 = getStyle("lineStroke"); if ((_local16 is Stroke)){ _local15.contextColor = Stroke(_local16).color; } else { if ((_local16 is LinearGradientStroke)){ _local17 = LinearGradientStroke(_local16); if (_local17.entries.length > 0){ _local15.contextColor = _local17.entries[0].color; }; }; }; _local15.dataTipFunction = formatDataTip; return ([_local15]); }; return ([]); } protected function applyItemRendererProperties(_arg1:DisplayObject, _arg2:InstanceCache):void{ if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = this; }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:LineSeriesRenderData; var _local4:Graphics; var _local5:Number; var _local6:int; var _local7:int; var _local8:int; var _local9:Array; var _local10:Array; var _local11:LineSeriesItem; var _local12:Array; var _local13:Object; var _local14:LineSeriesItem; var _local15:IFlexDisplayObject; var _local16:int; var _local17:Boolean; var _local18:Rectangle; var _local19:IFlexDisplayObject; var _local20:Object; super.updateDisplayList(_arg1, _arg2); _local3 = ((transitionRenderData)!=null) ? LineSeriesRenderData(transitionRenderData) : _renderData; if ((((_local3 == null)) || ((_local3.filteredCache == null)))){ return; }; _local4 = graphics; _local4.clear(); _local5 = getStyle("radius"); _local6 = _local3.filteredCache.length; _local8 = _local3.segments.length; if ((((_local3 == transitionRenderData)) && (!((_local3.elementBounds == null))))){ _local12 = _local3.elementBounds; _local6 = _local12.length; _local9 = _local3.filteredCache; _local7 = 0; while (_local7 < _local6) { _local13 = _local12[_local7]; _local14 = _local9[_local7]; _local14.x = ((_local13.left + _local13.right) / 2); _local14.y = ((_local13.bottom + _local13.top) / 2); _local7++; }; } else { _local9 = _local3.filteredCache; }; _segmentInstanceCache.factory = getStyle("lineSegmentRenderer"); _segmentInstanceCache.count = _local8; _local10 = _segmentInstanceCache.instances; _local7 = 0; while (_local7 < _local8) { _local15 = _local10[_local7]; if ((_local15 is IDataRenderer)){ IDataRenderer(_local15).data = _local3.segments[_local7]; }; _local15.setActualSize(_arg1, _arg2); _local7++; }; if (_local5 > 0){ _pointInstanceCache.factory = getStyle("itemRenderer"); _pointInstanceCache.count = _local3.validPoints; _local10 = _pointInstanceCache.instances; _local16 = 0; _local17 = (((_local6 > 0)) && ((_local10[0] is IDataRenderer))); if ((((_local3 == transitionRenderData)) && (!((_local3.elementBounds == null))))){ _local7 = 0; while (_local7 < _local6) { _local11 = _local9[_local7]; var _temp1 = _local16; _local16 = (_local16 + 1); _local19 = _local10[_temp1]; _local11.itemRenderer = _local19; if (_local19 != null){ if (_local17){ IDataRenderer(_local19).data = _local11; }; _local18 = _local12[_local7]; _local19.move(_local18.left, _local18.top); _local19.setActualSize(_local18.width, _local18.height); }; _local7++; }; } else { _local7 = 0; while (_local7 < _local6) { _local11 = _local9[_local7]; _local20 = _local3.filteredCache[_local7]; if (((filterData) && (((isNaN(_local20.x)) || (isNaN(_local20.y)))))){ } else { var _temp2 = _local16; _local16 = (_local16 + 1); _local19 = _local10[_temp2]; _local11.itemRenderer = _local19; if (_local19 != null){ if (_local17){ IDataRenderer(_local19).data = _local11; }; _local19.move((_local11.x - _local5), (_local11.y - _local5)); _local19.setActualSize((2 * _local5), (2 * _local5)); }; }; _local7++; }; }; }; } private static function initStyles():Boolean{ var seriesStyle:CSSStyleDeclaration; HaloDefaults.init(); seriesStyle = HaloDefaults.createSelector("LineSeries"); seriesStyle.defaultFactory = function ():void{ this.fill = new SolidColor(0xFFFFFF); this.lineSegmentRenderer = new ClassFactory(LineRenderer); this.lineStroke = new Stroke(0, 3); this.radius = 4; }; return (true); } } }//package mx.charts.series import flash.display.*; import mx.graphics.*; import mx.skins.*; class LineSeriesLegendMarker extends ProgrammaticSkin { private var _element:LineSeries; private function LineSeriesLegendMarker(_arg1:LineSeries){ _element = _arg1; styleName = _element; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:IStroke; var _local4:Number; var _local5:Graphics; var _local6:LinearGradientStroke; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("lineStroke"); if ((_local3 is Stroke)){ _local4 = Stroke(_local3).color; } else { if ((_local3 is LinearGradientStroke)){ _local6 = LinearGradientStroke(_local3); if (_local6.entries.length > 0){ _local4 = _local6.entries[0].color; }; }; }; _local5 = graphics; _local5.clear(); _local5.moveTo(0, 0); _local5.lineStyle(0, 0, 0); _local5.beginFill(_local4); _local5.lineTo(width, 0); _local5.lineTo(width, height); _local5.lineTo(0, height); _local5.lineTo(0, 0); _local5.endFill(); } }
Section 40
//HaloDefaults (mx.charts.styles.HaloDefaults) package mx.charts.styles { import mx.styles.*; import mx.graphics.*; public class HaloDefaults { mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var chartBaseChartSeriesStyles:Array; mx_internal static var pointStroke:IStroke; mx_internal static var emptyStroke:IStroke; private static var inited:Boolean; mx_internal static var defaultColors:Array = [14976769, 10861646, 1807833, 13290142, 6722480, 15752743, 8835556, 15006112, 16766226, 0x75B000, 418480, 15591622, 0xCC3300, 13754343, 5428426, 12968029, 15188340, 16775063, 12973711, 12448230, 10393725, 15440013, 9554405, 9690186, 0xFFB900, 10402765, 0x9797, 897730]; mx_internal static var defaultFills:Array = []; public static function init():void{ var seriesStyleCount:int; var i:int; var f:Function; var styleName:String; var o:CSSStyleDeclaration; if (inited){ return; }; seriesStyleCount = defaultColors.length; i = 0; while (i < seriesStyleCount) { defaultFills[i] = new SolidColor(defaultColors[i]); i = (i + 1); }; pointStroke = new Stroke(0, 0, 0.5); emptyStroke = new Stroke(0, 0, 0); chartBaseChartSeriesStyles = []; i = 0; while (i < seriesStyleCount) { styleName = ("haloSeries" + i); chartBaseChartSeriesStyles[i] = styleName; o = HaloDefaults.createSelector(("." + styleName)); f = function (_arg1:CSSStyleDeclaration, _arg2:IFill, _arg3:IStroke):void{ var o = _arg1; var defaultFill = _arg2; var defaultStroke = _arg3; o.defaultFactory = function ():void{ this.fill = defaultFill; this.areaFill = defaultFill; this.areaStroke = emptyStroke; this.lineStroke = defaultStroke; }; }; f(o, HaloDefaults.defaultFills[i], new Stroke(defaultColors[i], 3, 1)); i = (i + 1); }; } public static function createSelector(_arg1:String):CSSStyleDeclaration{ var _local2:CSSStyleDeclaration; _local2 = StyleManager.getStyleDeclaration(_arg1); if (!_local2){ _local2 = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(_arg1, _local2, false); }; return (_local2); } } }//package mx.charts.styles
Section 41
//AxisLabel (mx.charts.AxisLabel) package mx.charts { public class AxisLabel { public var value:Object; public var position:Number; public var text:String; mx_internal static const VERSION:String = "2.0.1.0"; public function AxisLabel(_arg1:Number=0, _arg2:Object=null, _arg3:String=null){ this.position = _arg1; this.value = _arg2; this.text = _arg3; } } }//package mx.charts
Section 42
//AxisRenderer (mx.charts.AxisRenderer) package mx.charts { import mx.core.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.charts.styles.*; public class AxisRenderer extends DualStyleObject implements IAxisRenderer { private var _titleFieldChanged:Boolean; private var _labelPlacement:Object; private var _axis:IAxis; private var _inverted:Boolean;// = false private var _labelFormatCache:TextFormat; private var _maxRotatedLabelHeight:Number; private var _otherAxes:Array; private var _bGuttersAdjusted:Boolean;// = false private var _labelFunction:Function;// = null private var _heightLimit:Number; private var _labels:Array; private var _measuringField:DisplayObject; private var _minorTicks:Array; private var _axisLabelSet:AxisLabelSet; private var _gutters:Rectangle; private var _ticks:Array; private var _horizontal:Boolean; private var _maxLabelWidth:Number; private var _labelRenderer:IFactory;// = null private var _supressInvalidations:int;// = 0 private var _labelCache:InstanceCache; private var _cacheDirty:Boolean;// = true private var _titleField:ChartLabel; private var _forceLabelUpdate:Boolean;// = false private var _maxLabelHeight:Number; private var _canRotate:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); private static var textFieldFactory:ClassFactory = new ClassFactory(UITextField); public function AxisRenderer(){ _labelFunction = null; _cacheDirty = true; _ticks = []; _minorTicks = []; _labels = []; _forceLabelUpdate = false; _inverted = false; _bGuttersAdjusted = false; _supressInvalidations = 0; _gutters = new Rectangle(); _labelRenderer = null; super(); _labelCache = new InstanceCache(UITextField, this); updateRotation(); super.showInAutomationHierarchy = false; } protected function get chart():ChartBase{ var _local1:DisplayObject; _local1 = parent; while (((!((_local1 is ChartBase))) && (!((_local1 == null))))) { _local1 = _local1.parent; }; return ((_local1 as ChartBase)); } public function get horizontal():Boolean{ return (_horizontal); } public function adjustGutters(_arg1:Rectangle, _arg2:Object):Rectangle{ var _local3:IStroke; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Boolean; var _local11:Object; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Point; var _local16:Number; var _local17:IStroke; var _local18:Number; var _local19:Rectangle; var _local20:ARLabelData; var _local21:int; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:int; var _local27:ARLabelData; var _local28:Number; _bGuttersAdjusted = true; _local3 = getStyle("axisStroke"); updateCaches(); _local4 = unscaledWidth; _local5 = unscaledHeight; _local6 = 1; if (_horizontal == false){ _local19 = new Rectangle(_arg1.top, _arg1.right, 0, 0); _local19.right = _arg1.bottom; _local19.bottom = _arg1.left; _arg1 = _local19; _gutters = _arg1; _arg2 = {left:_arg2.top, top:_arg2.right, right:_arg2.bottom, bottom:_arg2.left}; } else { _arg1 = _arg1.clone(); _gutters = _arg1; }; if (_inverted){ _local7 = _arg1.top; _arg1.top = _arg1.bottom; _arg1.bottom = _local7; }; _local8 = 0; _local9 = getStyle("showLabels"); _local10 = ((!((_local9 == false))) && (!((_local9 == "false")))); _local11 = getStyle("showLine"); _local12 = ((!((_local11 == false))) && (!((_local11 == "false")))); _local8 = (_local8 + tickSize(_local12)); _local8 = (_local8 + getStyle("labelGap")); _local8 = (_local8 + Number(((((_local12 == true)) && (!((_local3 == null))))) ? _local3.weight : 0)); _local13 = 0; _local14 = 1; _local15 = measureTitle(); _local13 = _local15.y; _local8 = (_local8 + (_local13 * _local14)); if (_arg2.bottom == false){ _local16 = Math.max(0, (_arg1.bottom - _local8)); } else { if (!isNaN(heightLimit)){ _local16 = Math.max(0, (heightLimit - _local8)); }; }; _local17 = getStyle("tickStroke"); if (_local17 != null){ _arg1.left = Math.max(_arg1.left, (_local17.weight / 2)); _arg1.right = Math.max(_arg1.right, (_local17.weight / 2)); }; _local17 = getStyle("minorTickStroke"); if (_local17 != null){ _arg1.left = Math.max(_arg1.left, (_local17.weight / 2)); _arg1.right = Math.max(_arg1.right, (_local17.weight / 2)); }; if (_local10 != false){ _labelPlacement = calcRotationAndSpacing(_local4, _local5, _local16, _arg1, _arg2); _local20 = _labels[0]; _local21 = _labels.length; if (_labelPlacement.rotation == 0){ if (_labelPlacement.staggered){ _local8 = (_local8 + ((2 * _local20.height) * _labelPlacement.scale)); } else { _local8 = (_local8 + (_maxLabelHeight * _labelPlacement.scale)); }; } else { _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local24 = (1 - this.leftAlignOffset); _local25 = 0; _local6 = _labelPlacement.scale; _local26 = 0; while (_local26 < _local21) { _local27 = _labels[_local26]; _local28 = ((((_local22 * _local27.height) * _local24) * _local6) + ((_local23 * _local27.width) * _local6)); _local25 = Math.max(_local28, _local25); _local26++; }; _maxRotatedLabelHeight = _local25; _local8 = (_local8 + _local25); }; } else { measureLabels(false, _local4); _labelPlacement = {rotation:0, left:0, right:0, scale:1, staggered:false}; }; _local18 = Math.max(_arg1.left, _labelPlacement.left); _arg1 = new Rectangle(_local18, _arg1.top, (Math.max(_arg1.right, _labelPlacement.right) - _local18), (Math.max(_arg1.bottom, _local8) - _arg1.top)); if (_inverted){ _local7 = _arg1.top; _arg1.top = _arg1.bottom; _arg1.bottom = _local7; }; _gutters = _arg1; invalidateDisplayList(); return (gutters); } override public function invalidateDisplayList():void{ if (_supressInvalidations == 0){ super.invalidateDisplayList(); }; } public function set horizontal(_arg1:Boolean):void{ _horizontal = _arg1; updateRotation(); } private function measureHorizontalGutters(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:ARLabelData, _arg5:ARLabelData, _arg6:Object):Object{ var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Boolean; var _local16:Boolean; _local7 = this.leftAlignOffset; _local8 = ((_arg1 - _arg2) - _arg3); _local9 = (_arg4.width * _local7); _local10 = (_arg5.width * (1 - _local7)); _local11 = _arg4.position; _local12 = (1 - _arg5.position); _local15 = ((!((_arg6.left == false))) && ((_local9 > (_arg2 + (_local11 * _local8))))); _local16 = ((!((_arg6.right == false))) && ((_local10 > (_arg3 + (_local12 * _local8))))); if ((((_local15 == false)) && ((_local16 == false)))){ _local13 = _arg2; _local14 = _arg3; } else { if ((((_local15 == true)) && ((_local16 == false)))){ _local8 = (((_arg1 - _arg3) - _local9) / (1 - _local11)); _local13 = ((_arg1 - _arg3) - _local8); _local14 = _arg3; _local16 = (_local10 > (_local14 + (_local12 * _local8))); } else { if ((((_local15 == false)) && ((_local16 == true)))){ _local8 = (((_arg1 - _arg2) - _local10) / (1 - _local12)); _local13 = _arg2; _local14 = ((_arg1 - _arg2) - _local8); _local15 = (_local9 > (_local13 + (_local11 * _local8))); }; }; }; if (((_local15) && (_local16))){ _local8 = (((_arg1 - _local9) - _local10) / ((1 - _local11) - _local12)); _local13 = (_local9 - (_local11 * _local8)); _local14 = (_local10 - (_local12 * _local8)); }; return ({horizontalleftGutter:_local13, horizontalrightGutter:_local14, minimumAxisLength:((_arg1 - _local13) - _local14)}); } private function calcAngledSpacing(_arg1:Object):Object{ var _local2:Number; _local2 = ((_arg1.sint * _arg1.minDist) * _arg1.minimumAxisLength); _arg1.scale = Math.max(0, Math.min(_arg1.scale, (_local2 / _maxLabelHeight))); return (_arg1); } public function set otherAxes(_arg1:Array):void{ _otherAxes = _arg1; } override public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Number; if (_horizontal){ super.setActualSize(_arg1, _arg2); } else { _local3 = (x - unscaledHeight); super.setActualSize(_arg2, _arg1); move((_local3 + _arg1), y); }; } private function calcVerticalSpacing(_arg1:Number, _arg2:Object, _arg3:Number, _arg4:ARLabelData, _arg5:ARLabelData, _arg6:Boolean):Object{ var _local7:Number; var _local8:Number; var _local9:ARLabelData; var _local10:ARLabelData; var _local11:Number; var _local12:Number; var _local13:Boolean; var _local14:int; var _local15:int; var _local16:int; var _local17:Boolean; var _local18:Boolean; var _local19:*; var _local20:*; var _local21:*; var _local22:*; _local8 = ((_arg1 - _arg2.hlm) - _arg2.hrm); if (!isNaN(_arg3)){ _local7 = Math.min(1, (_arg3 / _maxLabelWidth)); } else { _local7 = 1; }; _local9 = _arg4; _local13 = true; if (_arg6){ _local16 = 0; _local18 = true; do { _local16 = 0; _local19 = 0; if (_horizontal){ if (_labels.length > 0){ _local9 = _labels[0]; }; _local14 = 0; _local15 = 1; } else { if (_labels.length > 0){ _local9 = _labels[(_labels.length - 1)]; }; _local14 = (_labels.length - 1); _local15 = -1; }; _local22 = 1; while (_local22 < _labels.length) { _local10 = _labels[(_local14 + (_local15 * _local22))]; _local11 = (Math.abs((_local10.position - _local9.position)) * _local8); _local12 = ((_local10.height + _local9.height) / 2); if (_local12 > _local11){ _local19++; } else { if (_local19 > _local16){ _local16 = _local19; _local20 = _local9; _local21 = _labels[(_local14 + (_local15 * (_local22 - 1)))]; }; break; }; _local22++; }; if (_local19 > _local16){ _local16 = _local19; _local20 = _local9; _local21 = _labels[(_local14 + (_local15 * (_local22 - 1)))]; }; if (_local16){ _local17 = reduceLabels(_local20.value, _local21.value); } else { _local18 = false; _local13 = false; }; } while (((_local18) && (_local17))); }; if (_local13){ _local9 = _labels[0]; _local22 = 1; while (_local22 < _labels.length) { _local10 = _labels[_local22]; _local11 = ((_local10.position - _local9.position) * _local8); _local12 = ((_local10.height + _local9.height) / 2); _local7 = Math.min(_local7, (_local11 / _local12)); _local9 = _local10; _local22++; }; }; return ({rotation:(Math.PI / 2), left:_arg2.hlm, right:_arg2.hrm, scale:Math.max(0, _local7), staggered:false}); } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } private function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):Boolean{ var _local3:AxisLabelSet; _local3 = _axis.reduceLabels(_arg1, _arg2); if ((((_local3 == null)) || ((_local3 == _axisLabelSet)))){ return (false); }; processAxisLabels(_local3); _axisLabelSet = _local3; return (true); } private function renderLabels():void{ var _local1:int; var _local2:int; var _local3:ARLabelData; var _local4:Object; var _local5:Boolean; var _local6:int; _local1 = 0; _local4 = getStyle("showLabels"); _local5 = ((!((_local4 == false))) && (!((_local4 == "false")))); if (_local5 == false){ _labelCache.count = 0; } else { _labelCache.count = _labels.length; _local6 = _labels.length; if (_labelRenderer == null){ _local2 = 0; while (_local2 < _local6) { _local3 = _labels[_local2]; var _temp1 = _local1; _local1 = (_local1 + 1); _local3.instance = _labelCache.instances[_temp1]; (_local3.instance as UITextField).htmlText = _local3.value.text; _local3.instance.width = _local3.width; _local3.instance.height = _local3.height; _local2++; }; } else { while (_local2 < _local6) { _local3 = _labels[_local2]; var _temp2 = _local1; _local1 = (_local1 + 1); _local3.instance = _labelCache.instances[_temp2]; (_local3.instance as IDataRenderer).data = _local3.value; (_local3.instance as IFlexDisplayObject).setActualSize((_local3.width * _labelPlacement.scale), (_local3.height * _labelPlacement.scale)); _local2++; }; }; }; } public function set gutters(_arg1:Rectangle):void{ var _local2:Rectangle; _local2 = _arg1; if (((((((((!((_gutters == null))) && ((_gutters.left == _local2.left)))) && ((_gutters.right == _local2.right)))) && ((_gutters.top == _local2.top)))) && ((_gutters.bottom == _local2.bottom)))){ _gutters = _local2; return; }; adjustGutters(_arg1, {left:false, top:false, right:false, bottom:false}); } private function get leftAlignOffset():Number{ var _local1:Number; var _local2:String; _local2 = getStyle("labelAlign"); switch (_local2){ case "left": case "top": _local1 = 0; break; case "right": case "bottom": _local1 = 1; break; case "center": default: _local1 = 0.5; break; }; return (_local1); } override protected function measure():void{ var _local1:Number; var _local2:Object; var _local3:Boolean; var _local4:Object; var _local5:Boolean; var _local6:IStroke; var _local7:Number; var _local8:Number; var _local9:Point; _local1 = 0; _local2 = getStyle("showLabels"); _local3 = ((!((_local2 == false))) && (!((_local2 == "false")))); _local4 = getStyle("showLine"); _local5 = ((!((_local4 == false))) && (!((_local4 == "false")))); _local6 = getStyle("axisStroke"); _local1 = (_local1 + tickSize(_local5)); _local1 = (_local1 + getStyle("labelGap")); _local1 = (_local1 + Number(((((_local5 == true)) && (!((_local6 == null))))) ? _local6.weight : 0)); _local7 = 0; _local8 = 1; _local9 = measureTitle(); _local7 = _local9.y; _local1 = (_local1 + _local7); if (_horizontal){ measuredMinHeight = _local1; } else { measuredMinWidth = _local1; }; } private function calcHorizontalSpacing(_arg1:Number, _arg2:Object, _arg3:Number, _arg4:ARLabelData, _arg5:ARLabelData, _arg6:Boolean, _arg7:Object, _arg8:Number):Object{ var _local9:Number; var _local10:Number; var _local11:Number; var _local12:ARLabelData; var _local13:ARLabelData; var _local14:int; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Boolean; var _local19:int; var _local20:int; var _local21:int; var _local22:Boolean; var _local23:Boolean; var _local24:*; var _local25:*; var _local26:*; var _local27:*; _local9 = _arg2.horizontalleftGutter; _local10 = _arg2.horizontalrightGutter; _local11 = 1; if (!isNaN(_arg3)){ _local11 = Math.min(1, (_arg3 / _maxLabelHeight)); }; _local13 = _arg4; _local14 = _labels.length; _local15 = ((_arg1 - _local9) - _local10); _local18 = true; if (_arg6){ _local21 = 0; _local23 = true; do { _local21 = 0; _local24 = 0; if (_horizontal){ if (_labels.length > 0){ _local13 = _labels[0]; }; _local19 = 0; _local20 = 1; } else { if (_labels.length > 0){ _local13 = _labels[(_labels.length - 1)]; }; _local19 = (_labels.length - 1); _local20 = -1; }; _local27 = 1; while (_local27 < _labels.length) { _local12 = _labels[(_local19 + (_local20 * _local27))]; _local16 = (Math.abs((_local12.position - _local13.position)) * _local15); _local17 = ((_local12.width + _local13.width) / 2); if (_local17 > _local16){ _local24++; } else { if (_local24 > _local21){ _local21 = _local24; _local25 = _local13; _local26 = _labels[(_local19 + (_local20 * (_local27 - 1)))]; }; _local24 = 0; _local13 = _local12; }; _local27++; }; if (_local24 > _local21){ _local21 = _local24; _local25 = _local13; _local26 = _labels[(_local19 + (_local20 * (_local27 - 1)))]; }; if (_local21){ _local22 = reduceLabels(_local25.value, _local26.value); } else { _local23 = false; _local18 = false; }; } while (((_local23) && (_local22))); }; if (_local18){ if (_arg7.left == false){ _local11 = Math.min(_local11, ((_local9 + (_arg4.position * _local15)) / (_arg4.width / 2))); }; if (_arg7.right == false){ _local11 = Math.min(_local11, ((_local10 + ((1 - _arg5.position) * _local15)) / (_arg5.width / 2))); }; _local27 = 1; while (_local27 < _local14) { _local12 = _labels[_local27]; _local16 = ((_local12.position - _local13.position) * _local15); _local17 = ((_local12.width + _local13.width) / 2); _local11 = Math.min(_local11, (_local16 / _local17)); _local13 = _local12; _local27++; }; }; return ({rotation:0, left:_local9, right:_local10, scale:Math.max(0, _local11), staggered:false}); } public function set placement(_arg1:String):void{ _inverted = (((_arg1 == "right")) || ((_arg1 == "top"))); if (chart){ chart.invalidateDisplayList(); }; _forceLabelUpdate = true; _cacheDirty = true; invalidateDisplayList(); } public function set heightLimit(_arg1:Number):void{ _heightLimit = _arg1; } private function titleChangeHandler(_arg1:Event):void{ if (chart){ chart.invalidateDisplayList(); }; invalidateDisplayList(); } private function calcStaggeredSpacing(_arg1:Number, _arg2:Object, _arg3:Number, _arg4:ARLabelData, _arg5:ARLabelData, _arg6:Boolean, _arg7:Object):Object{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:ARLabelData; var _local13:int; var _local14:ARLabelData; var _local15:Number; var _local16:Number; _local8 = _arg2.horizontalleftGutter; _local9 = _arg2.horizontalrightGutter; _local11 = ((_arg1 - _local8) - _local9); if (!isNaN(_arg3)){ _local10 = Math.min(1, (_arg3 / (2 * _maxLabelHeight))); } else { _local10 = 1; }; _local12 = _arg4; _arg5 = _labels[1]; if (_arg7.left == false){ _local10 = Math.min(_local10, (_local8 / (_arg4.width / 2))); }; if (_arg7.right == false){ _local10 = Math.min(_local10, (_local9 / (_arg5.width / 2))); }; _local13 = 2; while (_local13 < _labels.length) { _local14 = _labels[_local13]; _local15 = ((_local14.position - _local12.position) * _local11); _local16 = ((_local14.width + _local12.width) / 2); _local10 = Math.min(_local10, (_local15 / _local16)); _local12 = _arg5; _arg5 = _local14; _local13++; }; return ({rotation:0, left:_local8, right:_local9, scale:Math.max(0, _local10), staggered:true}); } mx_internal function getAxisLabelSet():AxisLabelSet{ return (_axisLabelSet); } private function renderTitle():void{ var _local1:Object; if (_titleField == null){ _titleField = new ChartLabel(); addChild(_titleField); _titleFieldChanged = true; }; if (_titleFieldChanged){ _titleFieldChanged = false; _local1 = getStyle("axisTitleStyleName"); if (_local1 != null){ _titleField.styleName = _local1; } else { _titleField.styleName = this; }; }; } private function drawLabels(_arg1:Boolean):Number{ var _local2:IStroke; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:ARLabelData; var _local7:Number; var _local8:ARLabelData; var _local9:Number; var _local10:Number; var _local11:int; var _local12:Object; var _local13:Boolean; var _local14:Number; var _local15:int; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:int; var _local21:ARLabelData; var _local22:Number; var _local23:Number; _local2 = getStyle("axisStroke"); renderLabels(); _local8 = _labels[0]; if (_inverted){ _local9 = ((_gutters.top - Number(((_arg1 == true)) ? _local2.weight : 0)) - tickSize(_arg1)); } else { _local9 = (((unscaledHeight - _gutters.bottom) + Number(((_arg1 == true)) ? _local2.weight : 0)) + tickSize(_arg1)); }; _local10 = _labelPlacement.scale; _local11 = _labels.length; _local12 = getStyle("showLabels"); _local13 = ((!((_local12 == false))) && (!((_local12 == "false")))); if (_local13 == false){ return (_local9); }; _local14 = _local10; _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.scaleX = (_local6.instance.scaleY = _local14); _local15++; }; _local16 = ((unscaledWidth - _gutters.left) - _gutters.right); _local17 = getStyle("labelGap"); _local18 = this.leftAlignOffset; if (_labelPlacement.rotation == 0){ _local19 = 0; if (_labelPlacement.staggered){ _local19 = ((_local10 * _maxLabelHeight) * Number((_inverted) ? -1 : 1)); }; if (_inverted){ _local4 = ((_local9 - _local17) - (_maxLabelHeight * _local10)); _local3 = (_local4 - _local19); } else { _local4 = (_local9 + _local17); _local3 = ((_local4 + (_maxLabelHeight * _local10)) + _local19); }; _local20 = 0; _local15 = 0; while (_local15 < _local11) { _local21 = _labels[_local15]; _local21.instance.rotation = 0; _local21.instance.x = ((_gutters.left + (_local16 * _local21.position)) - ((_local21.width * _local10) * _local18)); _local21.instance.y = (_local4 + (_local20 * _local19)); _local20 = (1 - _local20); _local15++; }; } else { if (_labelPlacement.rotation > 0){ _local5 = (2 + (((Math.sin(_labelPlacement.rotation) * _local8.height) * _local10) / 2)); if (_inverted){ _local4 = (_local9 - _local17); if (_horizontal){ _local7 = ((_labelPlacement.rotation / Math.PI) * 180); _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local18 = (1 - _local18); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = (((_gutters.left + (_local16 * _local6.position)) - ((_local6.width * _local10) * _local22)) + (((_local6.height * _local18) * _local10) * _local23)); _local6.instance.y = ((_local4 - ((_local6.width * _local10) * _local23)) - (((_local6.height * _local18) * _local10) * _local22)); _local15++; }; _local3 = (_local4 - _maxRotatedLabelHeight); } else { _local7 = (-90 - (90 - ((_labelPlacement.rotation / Math.PI) * 180))); _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = ((_gutters.left + (_local16 * _local6.position)) - (((_local6.height * _local18) * _local10) * _local23)); _local6.instance.y = (_local4 + (((_local6.height * _local18) * _local10) * _local22)); _local15++; }; _local3 = (_local4 - _maxRotatedLabelHeight); }; } else { _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local7 = ((-(_labelPlacement.rotation) / Math.PI) * 180); _local4 = (_local9 + _local17); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = (((_gutters.left + (_local16 * _local6.position)) - ((_local6.width * _local10) * _local22)) - (((_local6.height * _local18) * _local10) * _local23)); _local6.instance.y = ((_local4 + ((_local6.width * _local10) * _local23)) - (((_local6.height * _local18) * _local10) * _local22)); _local15++; }; _local3 = (_local4 + _maxRotatedLabelHeight); }; } else { if (_inverted){ if (_horizontal){ _local7 = ((_labelPlacement.rotation / Math.PI) * 180); _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local4 = (_local9 - _local17); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = ((_gutters.left + (_local16 * _local6.position)) - (((_local6.height * _local18) * _local10) * _local23)); _local6.instance.y = (_local4 - (((_local6.height * _local18) * _local10) * _local22)); _local15++; }; _local3 = (_local4 + _maxRotatedLabelHeight); } else { _local7 = ((_labelPlacement.rotation / Math.PI) * 180); _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local4 = (_local9 - _local17); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = ((_gutters.left + (_local16 * _local6.position)) - (((_local6.height * _local18) * _local10) * _local23)); _local6.instance.y = (_local4 - (((_local6.height * _local18) * _local10) * _local22)); _local15++; }; }; } else { if (_horizontal){ _local7 = ((-(_labelPlacement.rotation) / Math.PI) * 180); _local22 = Math.cos(Math.abs(_labelPlacement.rotation)); _local23 = Math.sin(Math.abs(_labelPlacement.rotation)); _local4 = (_local9 + _local17); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = ((_gutters.left + (_local16 * _local6.position)) + (((_local23 * _local6.height) * _local10) * _local18)); _local6.instance.y = (_local4 - (((_local22 * _local6.height) * _local10) * _local18)); _local15++; }; _local3 = (_local4 + _maxRotatedLabelHeight); } else { _local7 = (-180 - ((_labelPlacement.rotation / Math.PI) * 180)); _local22 = Math.cos(Math.abs((_labelPlacement.rotation + (Math.PI / 2)))); _local23 = Math.sin(Math.abs((_labelPlacement.rotation + (Math.PI / 2)))); _local4 = (_local9 + _local17); _local15 = 0; while (_local15 < _local11) { _local6 = _labels[_local15]; _local6.instance.rotation = _local7; _local6.instance.x = (((_gutters.left + (_local16 * _local6.position)) - (((_local6.height * _local18) * _local10) * _local22)) + ((_local6.width * _local10) * _local23)); _local6.instance.y = ((_local4 + (((_local6.height * _local18) * _local10) * _local23)) + ((_local6.width * _local10) * _local22)); _local15++; }; _local3 = (_local4 + _maxRotatedLabelHeight); }; }; }; }; return (_local3); } public function get ticks():Array{ return (_ticks); } public function get gutters():Rectangle{ if (_horizontal == false){ return (new Rectangle(_gutters.bottom, _gutters.left, -(_gutters.height), _gutters.width)); }; return (_gutters); } private function processAxisLabels(_arg1:AxisLabelSet):Boolean{ var _local2:int; var _local3:Array; var _local4:Boolean; var _local5:int; var _local6:Number; var _local7:Number; var _local8:AxisLabel; var _local9:ARLabelData; var _local10:SystemManager; var _local11:UITextField; var _local12:UITextFormat; var _local13:IUIComponent; var _local14:ILayoutManagerClient; var _local15:IDataRenderer; var _local16:int; var _local17:Array; _local4 = !((_labelRenderer == null)); _supressInvalidations++; _local3 = _arg1.labels; _local2 = _local3.length; _labels = []; if (_arg1 != _axisLabelSet){ if (_labelFunction != null){ _local5 = 0; while (_local5 < _local2) { _local3[_local5].text = _labelFunction(_local3[_local5].value); _local5++; }; }; }; _local6 = 0; _local7 = 0; if (!_local4){ _local10 = (systemManager as SystemManager); _local11 = (_measuringField as UITextField); if (_measuringField == null){ _local11 = new UITextField(); _measuringField = _local11; }; _local12 = determineTextFormatFromStyles(); _local11.defaultTextFormat = _local12; _local11.setTextFormat(_local12); _local11.multiline = true; _local11.antiAliasType = _local12.antiAliasType; _local11.gridFitType = _local12.gridFitType; _local11.sharpness = _local12.sharpness; _local11.thickness = _local12.thickness; _local11.autoSize = "left"; _local11.embedFonts = ((!((_local10 == null))) && (_local10.isFontFaceEmbedded(_local12))); } else { _local13 = (_measuringField as IUIComponent); if (_local13 == null){ _local13 = _labelRenderer.newInstance(); _measuringField = (_local13 as DisplayObject); if ((_local13 is ISimpleStyleClient)){ (_local13 as ISimpleStyleClient).styleName = this; }; _local13.visible = false; addChild(DisplayObject(_local13)); }; _local14 = (_local13 as ILayoutManagerClient); _local15 = (_local13 as IDataRenderer); }; if (_horizontal){ _local5 = 0; while (_local5 < _local2) { _local8 = _local3[_local5]; _local9 = new ARLabelData(_local8, _local8.position); if (!_local4){ _local11.htmlText = _local8.text; _local9.width = _local11.width; _local9.height = _local11.height; } else { _local15.data = _local8; if (_local14 != null){ _local14.validateSize(true); }; _local9.width = _local13.measuredWidth; _local9.height = _local13.measuredHeight; }; _local6 = Math.max(_local6, _local9.width); _local7 = Math.max(_local7, _local9.height); _labels[_local5] = _local9; _local5++; }; _ticks = ((_arg1.ticks == null)) ? [] : _arg1.ticks; _minorTicks = ((_arg1.minorTicks == null)) ? [] : _arg1.minorTicks; } else { _local16 = (_local2 - 1); _local5 = 0; while (_local5 < _local2) { _local8 = _local3[_local5]; _local9 = new ARLabelData(_local8, (1 - _local8.position)); if (!_local4){ _local11.htmlText = _local8.text; _local9.width = _local11.width; _local9.height = _local11.height; } else { _local15.data = _local8; if (_local14 != null){ _local14.validateSize(true); }; _local9.width = _local13.measuredWidth; _local9.height = _local13.measuredHeight; }; _local6 = Math.max(_local6, _local9.width); _local7 = Math.max(_local7, _local9.height); _labels[(_local16 - _local5)] = _local9; _local5++; }; _ticks = []; if (_arg1.ticks != null){ _local17 = _arg1.ticks; _local2 = _local17.length; _local5 = (_local2 - 1); while (_local5 >= 0) { _ticks.push((1 - _local17[_local5])); _local5--; }; }; _minorTicks = []; if (_arg1.minorTicks != null){ _local17 = _arg1.minorTicks; _local2 = _local17.length; _local5 = (_local2 - 1); while (_local5 >= 0) { _minorTicks.push((1 - _local17[_local5])); _local5--; }; }; }; _maxLabelWidth = _local6; _maxLabelHeight = _local7; _forceLabelUpdate = false; _supressInvalidations--; return ((_arg1.accurate == true)); } private function measureAngledGutters(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:ARLabelData, _arg5:Number, _arg6:Number, _arg7:Object):Object{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:ARLabelData; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:ARLabelData; var _local21:int; var _local22:int; var _local23:ARLabelData; var _local24:Boolean; var _local25:Number; var _local26:Number; var _local27:*; var _local28:*; var _local29:*; var _local30:*; _local11 = _arg5; _local12 = _arg6; _local18 = 1; _local19 = 1; _local20 = _labels[0]; _local21 = _labels.length; _local22 = 1; while (_local22 < _local21) { _local23 = _labels[_local22]; _local19 = Math.min(_local19, (_local23.position - _local20.position)); _local20 = _local23; _local22++; }; if (!isNaN(_arg2)){ _local10 = ((_arg2 / 180) * Math.PI); } else { if (_horizontal == false){ _local10 = (Math.PI / 2); }; }; if ((((_arg7.left == false)) && ((((_arg2 >= 0)) || (isNaN(_arg2)))))){ _local13 = ((_arg1 - _local11) - _local12); if (isNaN(_local10)){ _local8 = (_maxLabelHeight / (_local19 * _local13)); if (_local8 >= 1){ _local10 = (Math.PI / 2); _local8 = 1; _local18 = Math.min(_local18, (((_arg4.position * _local13) + _local11) / (_arg4.height / 2))); } else { _local10 = Math.asin(_local8); if ((Math.cos(_local10) * _arg4.width) > ((_arg4.position * _local13) + _local11)){ _local10 = Math.acos((((_arg4.position * _local13) + _local11) / _arg4.width)); _local8 = Math.sin(_local10); }; }; } else { _local8 = Math.sin(_local10); if (_local8 < 1){ _local18 = Math.min(_local18, (((_arg4.position * _local13) + _local11) / (Math.cos(_local10) * _arg4.width))); } else { _local18 = Math.min(_local18, (((_arg4.position * _local13) + _local11) / (_arg4.height / 2))); }; }; if (!isNaN(_arg3)){ _local18 = Math.min(_local18, (_arg3 / ((_maxLabelWidth * _local8) + (_maxLabelHeight * Math.cos(_local10))))); }; } else { if ((((_arg7.right == false)) && ((_arg2 < 0)))){ _local13 = ((_arg1 - _local11) - _local12); _local8 = Math.sin(-(_local10)); if (_local8 < 1){ _local18 = Math.min(_local18, ((((1 - _local20.position) * _local13) + _local12) / (Math.cos(_local10) * _local20.width))); } else { _local18 = Math.min(_local18, ((((1 - _local20.position) * _local13) + _local12) / (_arg4.height / 2))); }; if (!isNaN(_arg3)){ _local18 = Math.min(_local18, (_arg3 / ((_maxLabelWidth * _local8) + (_maxLabelHeight * Math.cos(-(_local10)))))); }; } else { if (_local10 > 0){ _local8 = Math.sin(_local10); _local9 = Math.cos(_local10); _local14 = _arg4; if (!isNaN(_arg3)){ _local18 = Math.min(1, (_arg3 / (_maxLabelWidth * _local8))); }; if (_arg7.right != false){ _local12 = Math.max(_local12, ((_labels[(_local21 - 1)].height / 2) * _local18)); }; _local13 = ((_arg1 - _local11) - _local12); _local22 = 0; while (_local22 < _local21) { _local14 = _labels[_local22]; _local17 = (((_local9 * _local14.width) * _local18) + (((_local14.height / 2) * _local18) * _local8)); _local16 = (_local11 + (_local13 * _local14.position)); if (_local17 > _local16){ _local13 = (((_arg1 - _local12) - _local17) / (1 - _local14.position)); _local11 = ((_arg1 - _local13) - _local12); }; _local22++; }; } else { if (_local10 < 0){ _local8 = Math.sin(-(_local10)); _local9 = Math.cos(-(_local10)); _local14 = _local20; if (!isNaN(_arg3)){ _local18 = Math.min(1, (_arg3 / (_maxLabelWidth * _local8))); }; if (_arg7.left != false){ _local11 = Math.max(_local11, ((_labels[0].height / 2) * _local18)); }; _local13 = ((_arg1 - _local11) - _local12); _local22 = (_local21 - 1); while (_local22 >= 0) { _local14 = _labels[_local22]; _local15 = ((_arg1 - ((_local9 * _local14.width) * _local18)) - (((_local8 * _local14.height) / 2) * _local18)); _local16 = (_local11 + (_local13 * _local14.position)); if (_local15 < _local16){ _local13 = ((_local15 - _local11) / _local14.position); _local12 = ((_arg1 - _local13) - _local11); }; _local22--; }; } else { _local12 = _arg6; _local11 = _arg5; _local22 = 0; while (_local22 < _labels.length) { _local14 = _labels[_local22]; _local24 = true; if (!isNaN(_local10)){ _local24 = ((_local14.width * _local9) > (_local11 + (_local13 * _local14.position))); }; if (_local24){ _local25 = (Math.PI / 2); _local26 = 0; _local10 = _local25; do { _local8 = Math.sin(_local10); _local9 = Math.cos(_local10); if (!isNaN(_arg3)){ _local18 = Math.min(1, (_arg3 / ((_maxLabelWidth * _local8) + (_maxLabelHeight * _local9)))); }; _local17 = ((_local9 * _local14.width) * _local18); _local27 = Math.max(_local17, (_arg5 + (((_arg1 - _arg5) - _arg6) * _local14.position))); _local13 = (((_arg1 - _local12) - _local27) / (1 - _local14.position)); _local11 = Math.max(_arg5, ((_arg1 - _local13) - _local12)); _local28 = (_local19 * _local13); _local29 = ((_maxLabelHeight * _local18) / _local8); _local30 = (_local28 - _local29); if ((((_local30 > 0)) && ((_local30 < 1)))){ break; } else { if (_local28 > _local29){ if (_local26 >= _local10){ break; }; _local25 = _local10; } else { if (_local25 <= _local10){ break; }; _local26 = _local10; }; }; } while (!((_local25 - _local26) < 1E-5)); }; _local22++; }; }; }; }; }; return ({minimumAxisLength:((_arg1 - _local11) - _local12), left:_local11, right:_local12, scale:_local18, rotation:_local10, sint:_local8, minDist:_local19}); } public function get length():Number{ return (((unscaledWidth - _gutters.left) - _gutters.right)); } public function get heightLimit():Number{ return (_heightLimit); } private function measureLabels(_arg1:Boolean, _arg2:Number):Boolean{ var _local3:AxisLabelSet; var _local4:Boolean; if (_arg1){ _local3 = _axis.getLabelEstimate(); } else { _local3 = _axis.getLabels(_arg2); }; if ((((_local3 == _axisLabelSet)) && ((_forceLabelUpdate == false)))){ return (_local3.accurate); }; _local4 = processAxisLabels(_local3); _axisLabelSet = _local3; return (_local4); } private function drawAxis(_arg1:Boolean):void{ var _local2:IStroke; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:AxisRenderer; var _local9:IStroke; var _local10:Boolean; var _local11:String; _local2 = getStyle("axisStroke"); if (_arg1 == true){ _local3 = Number(((_local2.weight == 0)) ? 1 : _local2.weight); _local4 = Number((_inverted) ? (_gutters.top - _local3) : (unscaledHeight - _gutters.bottom)); graphics.lineStyle(0, 0, 0); _local5 = 0; _local6 = 0; if (((_horizontal) && (!((_otherAxes == null))))){ _local7 = 0; while (_local7 < _otherAxes.length) { _local8 = _otherAxes[_local7]; _local9 = _local8.getStyle("axisStroke"); _local10 = _local8.getStyle("showLine"); _local11 = _local8.placement; if (((!((_local9 == null))) && (!((_local10 == false))))){ if ((((_local11 == "right")) || ((_local11 == "top")))){ _local6 = (_local6 + _local9.weight); } else { _local5 = (_local5 + _local9.weight); }; }; _local7++; }; }; graphics.moveTo((_gutters.left - _local5), (_local4 + (_local3 / 2))); _local2.apply(graphics); graphics.lineTo(((unscaledWidth - _gutters.right) + _local6), (_local4 + (_local3 / 2))); }; } public function get placement():String{ return (String((_horizontal) ? String((_inverted) ? "top" : "bottom") : String((_inverted) ? "right" : "left"))); } public function set axis(_arg1:IAxis):void{ if (_axis){ _axis.removeEventListener("axisChange", axisChangeHandler, false); _axis.removeEventListener("titleChange", titleChangeHandler, false); }; _axis = _arg1; _arg1.addEventListener("axisChange", axisChangeHandler, false, 0, true); _arg1.addEventListener("titleChange", titleChangeHandler, false, 0, true); } private function axisChangeHandler(_arg1:Event):void{ if (chart){ chart.invalidateDisplayList(); }; invalidateDisplayList(); } private function tickSize(_arg1:Boolean):Number{ var _local2:Number; var _local3:String; var _local4:IStroke; var _local5:Number; _local2 = getStyle("tickLength"); _local3 = getStyle("tickPlacement"); _local4 = getStyle("axisStroke"); _local5 = 0; switch (_local3){ case "cross": if (_arg1){ _local5 = (_local2 + _local4.weight); } else { _local5 = _local2; }; break; case "inside": _local5 = 0; break; case "none": _local5 = 0; break; case "outside": default: _local5 = _local2; break; }; return (_local5); } private function calcVerticalGutters(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:ARLabelData, _arg5:ARLabelData, _arg6:Object):Object{ var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Boolean; var _local16:Boolean; _local7 = this.leftAlignOffset; _local8 = ((_arg1 - _arg2) - _arg3); _local9 = (_arg4.height * _local7); _local10 = (_arg4.height * (1 - _local7)); _local11 = _arg4.position; _local12 = (1 - _arg5.position); _local15 = ((!((_arg6.left == false))) && ((_local9 > (_arg2 + (_local11 * _local8))))); _local16 = ((!((_arg6.right == false))) && ((_local10 > (_arg3 + (_local12 * _local8))))); if ((((_local15 == false)) && ((_local16 == false)))){ _local13 = _arg2; _local14 = _arg3; } else { if ((((_local15 == true)) && ((_local16 == false)))){ _local8 = (((_arg1 - _arg3) - _local9) / (1 - _local11)); _local13 = ((_arg1 - _arg3) - _local8); _local14 = _arg3; _local16 = (_local10 > (_local14 + (_local12 * _local8))); } else { if ((((_local15 == false)) && ((_local16 == true)))){ _local8 = (((_arg1 - _arg2) - _local10) / (1 - _local12)); _local13 = _arg2; _local14 = ((_arg1 - _arg2) - _local8); _local15 = (_local9 > (_local13 + (_local11 * _local8))); }; }; }; if (((_local15) && (_local16))){ _local8 = (((_arg1 - _local9) - _local10) / ((1 - _local11) - _local12)); _local13 = (_local9 - (_local11 * _local8)); _local14 = (_local10 - (_local12 * _local8)); }; return ({hlm:_local13, hrm:_local14, minimumAxisLength:((_arg1 - _local13) - _local14)}); } private function updateRotation():void{ rotation = Number((_horizontal) ? 0 : 90); } private function updateCaches():void{ var _local1:SystemManager; var _local2:Boolean; if (_cacheDirty){ _labelFormatCache = determineTextFormatFromStyles(); _local1 = (systemManager as SystemManager); _local2 = (_canRotate = _local1.isFontFaceEmbedded(_labelFormatCache)); if (_labelRenderer == null){ _labelCache.properties = {embedFonts:_local2, selectable:false, styleName:this}; } else { _labelCache.properties = {}; }; _cacheDirty = false; }; } private function drawTitle(_arg1:Number):void{ var _local2:Matrix; if (_axis.title == ""){ if (_titleField != null){ _titleField.visible = false; }; return; }; _titleField.visible = true; _titleField.setActualSize(_titleField.measuredWidth, _titleField.measuredHeight); _local2 = _titleField.transform.matrix; _local2.a = Math.min(1, (((unscaledWidth - _gutters.left) - _gutters.right) / _titleField.measuredWidth)); _local2.d = Math.min(1, (1.3 * _local2.a)); _titleField.transform.matrix = _local2; _titleField.y = Number((_inverted) ? (_arg1 - _titleField.measuredHeight) : _arg1); _titleField.x = (_gutters.left + ((((unscaledWidth - _gutters.left) - _gutters.right) - (_titleField.measuredWidth * _local2.a)) / 2)); } private function drawTicks(_arg1:Boolean):Number{ var _local2:IStroke; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:String; var _local15:Number; var _local16:IStroke; var _local17:int; var _local18:Graphics; var _local19:IStroke; var _local20:int; var _local21:Array; _local2 = getStyle("axisStroke"); _local3 = Number(((_arg1 == true)) ? _local2.weight : 0); _local4 = Number((_inverted) ? _gutters.top : (unscaledHeight - _gutters.bottom)); _local13 = getStyle("tickLength"); _local14 = getStyle("tickPlacement"); if (_inverted){ _local13 = (_local13 * -1); _local3 = (_local3 * -1); }; _local16 = getStyle("tickStroke"); switch (_local14){ case "inside": _local11 = (_local4 - _local13); _local12 = _local4; break; case "outside": default: _local11 = (_local4 + _local3); _local12 = ((_local4 + _local3) + _local13); break; case "cross": _local11 = (_local4 - _local13); _local12 = ((_local4 + _local3) + _local13); break; case "none": _local11 = 0; _local12 = 0; break; }; _local17 = _ticks.length; _local9 = _gutters.left; _local10 = ((unscaledWidth - _gutters.left) - _gutters.right); _local18 = graphics; if (_local11 != _local12){ _local15 = _local16.weight; _local16.weight = (_labelPlacement.scale * Number(((_local16.weight == 0)) ? 1 : _local16.weight)); _local16.apply(_local18); _local16.weight = _local15; _local20 = 0; while (_local20 < _local17) { _local7 = (_local9 + (_local10 * _ticks[_local20])); _local18.moveTo(_local7, _local11); _local18.lineTo(_local7, _local12); _local20++; }; }; _local19 = getStyle("minorTickStroke"); _local9 = _gutters.left; _local10 = ((unscaledWidth - _gutters.left) - _gutters.right); _local13 = getStyle("minorTickLength"); _local14 = getStyle("minorTickPlacement"); _local12 = 0; _local11 = _local12; if (_inverted){ _local13 = (_local13 * -1); }; switch (_local14){ case "inside": _local11 = (_local4 - _local13); _local12 = _local4; break; case "outside": default: _local11 = (_local4 + _local3); _local12 = ((_local4 + _local3) + _local13); break; case "cross": _local11 = (_local4 - _local13); _local12 = ((_local4 + _local3) + _local13); break; case "none": _local11 = 0; _local12 = 0; break; }; if (_local11 != _local12){ _local21 = _minorTicks; _local17 = ((_local21)!=null) ? _local21.length : 0; _local15 = _local19.weight; _local19.weight = (_labelPlacement.scale * Number(((_local19.weight == 0)) ? 1 : _local19.weight)); _local19.apply(_local18); _local19.weight = _local15; _local20 = 0; while (_local20 < _local17) { _local7 = (_local9 + (_local10 * _local21[_local20])); _local18.moveTo(_local7, _local11); _local18.lineTo(_local7, _local12); _local20++; }; }; return ((_local4 + _local12)); } private function measureTitle():Point{ if ((((_axis.title == null)) || ((_axis.title.length == 0)))){ return (new Point(0, 0)); }; renderTitle(); _supressInvalidations++; _titleField.data = ((_axis)!=null) ? _axis.title : ""; _titleField.validateProperties(); _titleField.validateSize(true); _supressInvalidations--; return (new Point(_titleField.measuredWidth, _titleField.measuredHeight)); } public function get axis():IAxis{ return (_axis); } public function get minorTicks():Array{ return (_minorTicks); } override public function styleChanged(_arg1:String):void{ if ((((_arg1 == null)) || ((_arg1 == "axisTitleStyleName")))){ _titleFieldChanged = true; }; if (chart){ chart.invalidateDisplayList(); }; _forceLabelUpdate = true; _cacheDirty = true; invalidateDisplayList(); } override public function move(_arg1:Number, _arg2:Number):void{ if (_horizontal){ super.move(_arg1, _arg2); } else { super.move((_arg1 + unscaledHeight), _arg2); }; } public function set labelRenderer(_arg1:IFactory):void{ var _local2:IFactory; _local2 = _labelRenderer; _labelRenderer = _arg1; if (_local2 == _arg1){ return; }; if (_measuringField != null){ removeChild(_measuringField); _measuringField = null; }; _labelCache.count = 0; if (_arg1 == null){ _labelCache.factory = textFieldFactory; } else { _labelCache.factory = _labelRenderer; }; if (chart){ chart.invalidateDisplayList(); }; _forceLabelUpdate = true; _cacheDirty = true; invalidateDisplayList(); } public function chartStateChanged(_arg1:uint, _arg2:uint):void{ invalidateDisplayList(); } private function calcRotationAndSpacing(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Rectangle, _arg5:Object):Object{ var _local6:Number; var _local7:Number; var _local8:Boolean; var _local9:ARLabelData; var _local10:ARLabelData; var _local11:Number; var _local12:Object; var _local13:Boolean; var _local14:Boolean; var _local15:Boolean; var _local16:Number; var _local17:Object; var _local18:Boolean; var _local19:Boolean; var _local20:Number; var _local21:Boolean; var _local22:Number; var _local23:Number; var _local24:Object; var _local25:Object; var _local26:Object; var _local27:Object; var _local28:Object; var _local29:Object; updateCaches(); _local6 = _arg4.left; _local7 = _arg4.right; _local8 = measureLabels(true, 0); if (_labels.length == 0){ return ({rotation:0, left:_local6, right:_local7, scale:1, staggered:false}); }; _local9 = _labels[0]; _local10 = _labels[(_labels.length - 1)]; _local11 = getStyle("labelRotation"); if (_local11 > 90){ _local11 = (0 / 0); }; if (_horizontal == false){ if (isNaN(_local11)){ _local11 = 0; }; if (_local11 >= 0){ _local11 = (90 - _local11); } else { _local11 = -((90 + _local11)); }; }; _local12 = getStyle("canDropLabels"); if (_local12 == null){ _local13 = Boolean(_axis.preferDropLabels()); } else { _local13 = ((!((_local12 == false))) && (!((_local12 == "false")))); }; _local14 = ((((((_horizontal) && (_canRotate))) && ((_local11 == 90)))) || ((((_horizontal == false)) && (((((isNaN(_local11)) || ((_local11 == 90)))) || ((_canRotate == false))))))); _local15 = (((_local14 == false)) && (((((((isNaN(_local11)) && ((_horizontal == true)))) || ((_local11 == 0)))) || ((_canRotate == false))))); _local16 = 0; _local17 = getStyle("canStagger"); _local18 = (((_local17 == null)) || (((!((_local17 == false))) && (!((_local17 == "false")))))); _local19 = (((_local14 == false)) && ((((((_local13 == false)) && (_local15))) && (!((false == _local17)))))); _local20 = 0; _local21 = (((_local14 == false)) && ((((((_canRotate == true)) && (!((_local11 == 0))))) && ((((_local13 == false)) || (!(isNaN(_local11)))))))); _local22 = 0; _local23 = ((_arg1 - _local6) - _local7); if (_local8){ if (_local14){ _local24 = calcVerticalGutters(_arg1, _local6, _local7, _local9, _local10, _arg5); return (calcVerticalSpacing(_arg1, _local24, _arg3, _local9, _local10, _local13)); }; if (((_local15) || (_local19))){ _local25 = measureHorizontalGutters(_arg1, _local6, _local7, _local9, _local10, _arg5); _local28 = calcHorizontalSpacing(_arg1, _local25, _arg3, _local9, _local10, _local13, _arg5, _local23); _local16 = _local28.scale; if (((!((_local16 == 1))) && (_local19))){ _local29 = calcStaggeredSpacing(_arg1, _local25, _arg3, _local9, _local10, _local13, _arg5); _local20 = _local29.scale; }; }; if (((((!((_local16 == 1))) && (!((_local20 == 1))))) && (_local21))){ _local26 = measureAngledGutters(_arg1, _local11, _arg3, _local9, _local6, _local7, _arg5); _local27 = calcAngledSpacing(_local26); _local22 = _local27.scale; }; if ((((_local16 >= _local20)) && ((_local16 >= _local22)))){ return (_local28); }; if (_local20 >= _local22){ return (_local29); }; return (_local27); //unresolved jump }; if (_local14){ _local24 = calcVerticalGutters(_arg1, _local6, _local7, _local9, _local10, _arg5); _local23 = Math.min(_local23, _local24.minimumAxisLength); }; if (((_local15) || (_local19))){ _local25 = measureHorizontalGutters(_arg1, _local6, _local7, _local9, _local10, _arg5); _local23 = Math.min(_local23, _local25.minimumAxisLength); }; if (_local21){ _local26 = measureAngledGutters(_arg1, _local11, _arg3, _local9, _local6, _local7, _arg5); _local23 = Math.min(_local23, _local26.minimumAxisLength); }; measureLabels(false, _local23); if (_labels.length == 0){ return ({rotation:0, left:_local6, right:_local7, scale:1, staggered:false}); }; if (_local14){ return (calcVerticalSpacing(_arg1, _local24, _arg3, _local9, _local10, _local13)); }; if (_local15){ _local28 = calcHorizontalSpacing(_arg1, _local25, _arg3, _local9, _local10, _local13, _arg5, _local23); _local16 = _local28.scale; }; if (_local19){ _local29 = calcStaggeredSpacing(_arg1, _local25, _arg3, _local9, _local10, _local13, _arg5); _local20 = _local29.scale; }; if (_local21){ _local27 = calcAngledSpacing(_local26); _local22 = _local27.scale; }; if ((((_local16 >= _local20)) && ((_local16 >= _local22)))){ return (_local28); }; if (_local20 >= _local22){ return (_local29); }; return (_local27); } public function get labelRenderer():IFactory{ return (_labelRenderer); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:ChartBase; var _local4:Boolean; var _local5:Number; super.updateDisplayList(_arg1, _arg2); _supressInvalidations++; _local3 = this.chart; if ((((((_bGuttersAdjusted == true)) && (!((_local3.chartState == ChartState.PREPARING_TO_HIDE_DATA))))) && (!((_local3.chartState == ChartState.HIDING_DATA))))){ updateCaches(); graphics.clear(); _local4 = getStyle("showLine"); _local5 = drawLabels(_local4); drawTitle(_local5); drawAxis(_local4); drawTicks(_local4); }; _supressInvalidations--; } override public function invalidateSize():void{ if (_supressInvalidations == 0){ super.invalidateSize(); }; } private static function initStyles():Boolean{ var o:CSSStyleDeclaration; var axisRendererStyle:CSSStyleDeclaration; var vaxisRendererStyle:CSSStyleDeclaration; var blockNumeric:CSSStyleDeclaration; var linedNumeric:CSSStyleDeclaration; var dashedNumeric:CSSStyleDeclaration; var blockCategory:CSSStyleDeclaration; var hangingCategory:CSSStyleDeclaration; var dashedCategory:CSSStyleDeclaration; HaloDefaults.init(); axisRendererStyle = HaloDefaults.createSelector("AxisRenderer"); axisRendererStyle.defaultFactory = function ():void{ this.axisStroke = new Stroke(0, 0, 1); this.canDropLabels = null; this.canStagger = true; this.labelGap = 3; this.labelRotation = NaN; this.minorTickLength = 0; this.minorTickPlacement = "none"; this.minorTickStroke = new Stroke(0, 0, 1); this.showLabels = true; this.showLine = true; this.tickLength = 3; this.tickPlacement = "outside"; this.tickStroke = new Stroke(0, 0, 1); this.labelAlign = "center"; }; vaxisRendererStyle = HaloDefaults.createSelector(".verticalAxisStyle"); vaxisRendererStyle.defaultFactory = function ():void{ this.minorTickLength = 2; this.minorTickPlacement = "outside"; this.tickLength = 5; }; blockNumeric = HaloDefaults.createSelector(".blockNumericAxis"); blockNumeric.defaultFactory = function ():void{ this.axisStroke = new Stroke(12307677, 8, 1, false, "normal", "none"); this.minorTickLength = 0; this.minorTickPlacement = "cross"; this.minorTickStroke = new Stroke(0xFFFFFF, 1, 1, false, "normal", "none"); this.tickLength = 8; this.tickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); }; linedNumeric = HaloDefaults.createSelector(".linedNumericAxis"); linedNumeric.defaultFactory = function ():void{ this.axisStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); this.minorTickLength = 4; this.minorTickPlacement = "outside"; this.minorTickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); this.tickLength = 8; this.tickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); }; dashedNumeric = HaloDefaults.createSelector(".dashedNumericAxis"); dashedNumeric.defaultFactory = function ():void{ this.minorTickLength = 4; this.minorTickPlacement = "outside"; this.minorTickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); this.showLine = false; this.tickLength = 8; this.tickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); }; blockCategory = HaloDefaults.createSelector(".blockCategoryAxis"); blockCategory.defaultFactory = function ():void{ this.axisStroke = new Stroke(12307677, 8, 1, false, "normal", "none"); this.minorTickLength = 0; this.minorTickPlacement = "none"; this.tickLength = 0; this.tickPlacement = "cross"; this.tickStroke = new Stroke(0xFFFFFF, 2, 1, false, "normal", "none"); }; hangingCategory = HaloDefaults.createSelector(".hangingCategoryAxis"); hangingCategory.defaultFactory = function ():void{ this.axisStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); this.minorTickLength = 0; this.minorTickPlacement = "cross"; this.minorTickStroke = new Stroke(0, 0, 0); this.tickLength = 4; this.tickStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); }; dashedCategory = HaloDefaults.createSelector(".dashedCategoryAxis"); dashedCategory.defaultFactory = function ():void{ this.axisStroke = new Stroke(12307677, 1, 1, false, "normal", "none"); this.minorTickPlacement = "none"; this.tickLength = 0; this.tickPlacement = "cross"; this.tickStroke = new Stroke(0xFFFFFF, 2, 1, false, "normal", "none"); }; return (true); } } }//package mx.charts import flash.display.*; class ARLabelData { public var width:Number; public var position:Number; public var value:AxisLabel; public var instance:DisplayObject; public var height:Number; private function ARLabelData(_arg1:AxisLabel, _arg2:Number){ this.value = _arg1; this.position = _arg2; } }
Section 43
//CategoryAxis (mx.charts.CategoryAxis) package mx.charts { import mx.events.*; import flash.events.*; import mx.collections.*; import mx.charts.chartClasses.*; public class CategoryAxis extends AxisBase implements IAxis { private var _userDataProvider:Object; private var _dataProvider:ICollectionView; private var _categoryField:String;// = "" private var _labelSet:AxisLabelSet; private var _cachedTicks:Array;// = null private var _chartDataProvider:Object; private var _catMap:Object; private var _labelFunction:Function;// = null private var _padding:Number;// = 0.5 private var _labelsMatchToCategoryValuesByIndex:Array; private var _cachedMinorTicks:Array;// = null private var _categoryValues:Array; private var _cursor:IViewCursor; private var _ticksBetweenLabels:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function CategoryAxis(){ _cachedMinorTicks = null; _cachedTicks = null; _categoryField = ""; _labelFunction = null; _padding = 0.5; _ticksBetweenLabels = true; super(); workingDataProvider = new ArrayCollection(); } public function filterCache(_arg1:Array, _arg2:String, _arg3:String):void{ var _local4:Number; var _local5:Number; var _local6:int; var _local7:int; var _local8:Number; update(); _local4 = (((_categoryValues.length - 1) + _padding) + 1E-6); _local5 = (-(_padding) - 1E-6); _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7][_arg2]; _arg1[_local7][_arg3] = ((((_local8 >= _local5)) && ((_local8 < _local4)))) ? _local8 : NaN; _local7++; }; } public function getLabels(_arg1:Number):AxisLabelSet{ update(); return (_labelSet); } private function generateTicks():Array{ var _local1:int; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; if (!_cachedTicks){ _cachedTicks = []; if (_ticksBetweenLabels == false){ _local1 = _categoryValues.length; _local2 = -(_padding); _local3 = ((_local1 - 1) + _padding); _local4 = (_local3 - _local2); _local5 = 0; while (_local5 < _local1) { _cachedTicks.push(((_local5 - _local2) / _local4)); _local5++; }; } else { _cachedMinorTicks = []; _local1 = _categoryValues.length; _local2 = -(_padding); _local3 = ((_local1 - 1) + _padding); _local4 = (_local3 - _local2); _local6 = ((_padding < 0.5)) ? 0.5 : -0.5; _local7 = ((_padding < 0.5)) ? (_local1 - 1.5) : (_local1 - 0.5); _local5 = _local6; while (_local5 <= _local7) { _cachedTicks.push(((_local5 - _local2) / _local4)); _local5 = (_local5 + 1); }; }; }; return (_cachedTicks); } private function collectionChangeHandler(_arg1:CollectionEvent=null):void{ if (((_arg1) && ((_arg1.kind == CollectionEventKind.RESET)))){ _cursor = _dataProvider.createCursor(); }; invalidateCategories(); } public function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):AxisLabelSet{ var _local3:int; var _local4:Array; var _local5:Array; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:AxisLabelSet; _local3 = ((_catMap[_arg2.value] - _catMap[_arg1.value]) + 1); if (_local3 <= 0){ return (null); }; _local4 = []; _local5 = []; _local6 = -(_padding); _local7 = ((_categoryValues.length - 1) + _padding); _local8 = (_local7 - _local6); _local9 = 0; while (_local9 < _categoryValues.length) { _local4.push(_labelsMatchToCategoryValuesByIndex[_local9]); _local5.push(_labelsMatchToCategoryValuesByIndex[_local9].position); _local9 = (_local9 + _local3); }; _local10 = new AxisLabelSet(); _local10.labels = _local4; _local10.minorTicks = minorTicks; _local10.ticks = generateTicks(); return (_local10); } public function preferDropLabels():Boolean{ return (false); } public function get padding():Number{ return (_padding); } public function get categoryField():String{ return (_categoryField); } private function set workingDataProvider(_arg1:Object):void{ if (_dataProvider != null){ _dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler); }; if ((_arg1 is Array)){ _arg1 = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ } else { if ((_arg1 is XMLList)){ _arg1 = new XMLListCollection(XMLList(_arg1)); } else { if (_arg1 != null){ _arg1 = new ArrayCollection([_arg1]); } else { _arg1 = new ArrayCollection(); }; }; }; }; _dataProvider = ICollectionView(_arg1); _cursor = _arg1.createCursor(); if (_dataProvider != null){ _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true); }; collectionChangeHandler(); } public function set padding(_arg1:Number):void{ _padding = _arg1; invalidateCategories(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function set ticksBetweenLabels(_arg1:Boolean):void{ _ticksBetweenLabels = _arg1; } public function invertTransform(_arg1:Number):Object{ var _local2:Number; var _local3:Number; var _local4:Number; update(); _local2 = -(_padding); _local3 = ((_categoryValues.length - 1) + _padding); _local4 = (_local3 - _local2); return (_categoryValues[Math.round(((_arg1 * _local4) + _local2))]); } private function invalidateCategories():void{ _labelSet = null; _cachedMinorTicks = null; _cachedTicks = null; dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function set categoryField(_arg1:String):void{ _categoryField = _arg1; collectionChangeHandler(); } public function get dataProvider():Object{ return (_dataProvider); } public function mapCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:Boolean=false):void{ var _local5:int; var _local6:int; var _local7:Object; var _local8:Object; update(); _local5 = _arg1.length; _local6 = 0; while (_local6 < _local5) { if (_arg1[_local6][_arg2] != null){ break; }; _local6++; }; if (_local6 == _local5){ return; }; _local7 = _arg1[_local6][_arg2]; if ((((_local7 is XML)) || ((_local7 is XMLList)))){ while (_local6 < _local5) { _arg1[_local6][_arg3] = _catMap[_arg1[_local6][_arg2].toString()]; _local6++; }; } else { if ((((((((_local7 is Number)) || ((_local7 is int)))) || ((_local7 is uint)))) && ((_arg4 == true)))){ _local6 = 0; while (_local6 < _local5) { _local8 = _arg1[_local6]; _local8[_arg3] = _local8[_arg2]; _local6++; }; } else { while (_local6 < _local5) { _arg1[_local6][_arg3] = _catMap[_arg1[_local6][_arg2]]; _local6++; }; }; }; } public function getLabelEstimate():AxisLabelSet{ update(); return (_labelSet); } private function get minorTicks():Array{ var _local1:int; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; if (!_cachedMinorTicks){ _cachedMinorTicks = []; if (_ticksBetweenLabels == false){ _local1 = _categoryValues.length; _local2 = -(_padding); _local3 = ((_local1 - 1) + _padding); _local4 = (_local3 - _local2); _local6 = ((_local2 <= -0.5)) ? 0 : 1; _local7 = ((_local3 >= (_local1 - 0.5))) ? _local1 : (_local1 - 1); _local5 = _local6; while (_local5 <= _local7) { _cachedMinorTicks.push((((_local5 - 0.5) - _local2) / _local4)); _local5++; }; } else { _local1 = _categoryValues.length; _local2 = -(_padding); _local3 = ((_local1 - 1) + _padding); _local4 = (_local3 - _local2); _local5 = 0; while (_local5 < _local1) { _cachedMinorTicks.push(((_local5 - _local2) / _local4)); _local5++; }; }; }; return (_cachedMinorTicks); } public function update():void{ var _local1:Object; var _local2:Array; var _local3:int; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:AxisLabel; var _local9:int; var _local10:Object; if (!_labelSet){ _catMap = {}; _categoryValues = []; _labelsMatchToCategoryValuesByIndex = []; _local2 = []; if (_categoryField == ""){ _cursor.seek(CursorBookmark.FIRST); _local3 = 0; while (!(_cursor.afterLast)) { _local1 = _cursor.current; if (_local1 != null){ _catMap[_local1.toString()] = _local3; }; _categoryValues[_local3] = (_local2[_local3] = _local1); _cursor.moveNext(); _local3++; }; } else { _cursor.seek(CursorBookmark.FIRST); _local3 = 0; while (!(_cursor.afterLast)) { _local2[_local3] = _cursor.current; if (((_local2[_local3]) && ((_categoryField in _local2[_local3])))){ _local1 = _local2[_local3][_categoryField]; if (_local1 != null){ _catMap[_local1.toString()] = _local3; }; _categoryValues[_local3] = _local1; } else { _categoryValues[_local3] = null; }; _local3++; _cursor.moveNext(); }; }; _local4 = []; _local5 = -(_padding); _local6 = ((_categoryValues.length - 1) + _padding); _local7 = (_local6 - _local5); _local9 = _categoryValues.length; if (_labelFunction != null){ _local10 = null; _local3 = 0; while (_local3 < _local9) { if (!_categoryValues[_local3]){ } else { _local8 = new AxisLabel(((_local3 - _local5) / _local7), _categoryValues[_local3], _labelFunction(_categoryValues[_local3], _local10, this, _local2[_local3])); _labelsMatchToCategoryValuesByIndex[_local3] = _local8; _local4.push(_local8); _local10 = _categoryValues[_local3]; }; _local3++; }; } else { _local3 = 0; while (_local3 < _local9) { if (!_categoryValues[_local3]){ } else { _local8 = new AxisLabel(((_local3 - _local5) / _local7), _categoryValues[_local3], _categoryValues[_local3].toString()); _labelsMatchToCategoryValuesByIndex[_local3] = _local8; _local4.push(_local8); }; _local3++; }; }; _labelSet = new AxisLabelSet(); _labelSet.labels = _local4; _labelSet.accurate = true; _labelSet.minorTicks = minorTicks; _labelSet.ticks = generateTicks(); }; } public function get baseline():Number{ return (-(_padding)); } public function formatForScreen(_arg1:Object):String{ var _local2:Object; if ((((_arg1 is Number)) && ((_arg1 < _categoryValues.length)))){ _local2 = _categoryValues[Math.round(Number(_arg1))]; return (((_local2 == null)) ? _arg1.toString() : _local2.toString()); }; return (_arg1.toString()); } public function set labelFunction(_arg1:Function):void{ _labelFunction = _arg1; invalidateCategories(); } override public function set chartDataProvider(_arg1:Object):void{ _chartDataProvider = _arg1; if (!_userDataProvider){ workingDataProvider = _chartDataProvider; }; } public function get labelFunction():Function{ return (_labelFunction); } public function set dataProvider(_arg1:Object):void{ _userDataProvider = _arg1; if (_userDataProvider != null){ workingDataProvider = _userDataProvider; } else { workingDataProvider = _chartDataProvider; }; } public function transformCache(_arg1:Array, _arg2:String, _arg3:String):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; update(); _local4 = -(_padding); _local5 = ((_categoryValues.length - 1) + _padding); _local6 = (_local5 - _local4); _local7 = _arg1.length; _local8 = 0; while (_local8 < _local7) { _arg1[_local8][_arg3] = ((_arg1[_local8][_arg2] - _local4) / _local6); _local8++; }; } public function get ticksBetweenLabels():Boolean{ return (_ticksBetweenLabels); } } }//package mx.charts
Section 44
//ChartItem (mx.charts.ChartItem) package mx.charts { import mx.core.*; import flash.events.*; import mx.charts.chartClasses.*; public class ChartItem extends EventDispatcher { public var element:IChartElement; public var index:int; public var itemRenderer:IFlexDisplayObject; public var item:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function ChartItem(_arg1:IChartElement=null, _arg2:Object=null, _arg3:uint=0){ this.element = _arg1; this.item = _arg2; this.index = _arg3; } public function clone():ChartItem{ var _local1:ChartItem; _local1 = new ChartItem(element, item, index); _local1.itemRenderer = itemRenderer; return (_local1); } } }//package mx.charts
Section 45
//GridLines (mx.charts.GridLines) package mx.charts { import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.charts.styles.*; public class GridLines extends ChartElement { mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); override public function mappingChanged():void{ invalidateDisplayList(); } override public function chartStateChanged(_arg1:uint, _arg2:uint):void{ invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:Object; var _local5:IStroke; var _local6:int; var _local7:Array; var _local8:Array; var _local9:Number; var _local10:Array; var _local11:Rectangle; var _local12:IStroke; var _local13:ChartBase; var _local14:Boolean; var _local15:Boolean; var _local16:Graphics; var _local17:String; var _local18:Object; var _local19:Object; var _local20:IAxisRenderer; var _local21:int; var _local22:int; var _local23:Number; var _local24:Number; var _local25:IAxisRenderer; var _local26:Number; var _local27:Number; var _local28:Array; var _local29:Number; super.updateDisplayList(_arg1, _arg2); _local13 = this.chart; if ((((((_local13 == null)) || ((_local13.chartState == ChartState.PREPARING_TO_HIDE_DATA)))) || ((_local13.chartState == ChartState.HIDING_DATA)))){ return; }; _local16 = graphics; _local16.clear(); _local17 = getStyle("direction"); if ((((_local17 == "horizontal")) || ((_local17 == "both")))){ _local5 = getStyle("horizontalStroke"); _local6 = Math.max(1, getStyle("horizontalChangeCount")); if (((!(((_local6 * 0) == 0))) || ((_local6 <= 1)))){ _local6 = 1; }; _local20 = CartesianChart(_local13).verticalAxisRenderer; _local7 = _local20.ticks; if (getStyle("horizontalTickAligned") == false){ _local3 = _local7.length; _local8 = []; _local21 = 1; while (_local21 < _local3) { _local8[(_local21 - 1)] = ((_local7[_local21] + _local7[(_local21 - 1)]) / 2); _local21++; }; } else { _local8 = _local7; }; _local14 = false; _local15 = false; if (_local8[0] != 0){ _local14 = true; _local8.unshift(0); }; if (_local8[(_local8.length - 1)] != 1){ _local15 = true; _local8.push(1); }; _local9 = _arg2; _local10 = [getStyle("horizontalFill"), getStyle("horizontalAlternateFill")]; _local3 = _local8.length; if (_local8[(_local3 - 1)] < 1){ _local4 = _local10[1]; if (_local4 != null){ _local16.lineStyle(0, 0, 0); GraphicsUtilities.fillRect(_local16, 0, (_local8[(_local3 - 1)] * _local9), _arg1, _arg2, _local4); }; }; _local21 = 0; while (_local21 < _local8.length) { _local22 = ((_local3 - 1) - _local21); _local4 = _local10[((_local21 / _local6) % 2)]; _local23 = (_local8[_local22] * _local9); _local24 = (_local8[Math.max(0, (_local22 - _local6))] * _local9); _local11 = new Rectangle(0, _local24, _arg1, (_local23 - _local24)); if (_local4 != null){ _local16.lineStyle(0, 0, 0); GraphicsUtilities.fillRect(_local16, _local11.left, _local11.top, _local11.right, _local11.bottom, _local4); }; if (((!((_local5 == null))) && ((_local11.bottom >= -1)))){ if (((_local14) && ((_local22 == 0)))){ } else { if (((_local15) && ((_local22 == (_local8.length - 1))))){ } else { _local5.apply(_local16); _local16.moveTo(_local11.left, _local11.bottom); _local16.lineTo(_local11.right, _local11.bottom); }; }; }; _local21 = (_local21 + _local6); }; }; if ((((_local17 == "vertical")) || ((_local17 == "both")))){ _local5 = getStyle("verticalStroke"); _local6 = Math.max(1, getStyle("verticalChangeCount")); if (((isNaN(_local6)) || ((_local6 <= 1)))){ _local6 = 1; }; _local25 = CartesianChart(_local13).horizontalAxisRenderer; _local7 = _local25.ticks.concat(); if (getStyle("verticalTickAligned") == false){ _local3 = _local7.length; _local8 = []; _local21 = 1; while (_local21 < _local3) { _local8[(_local21 - 1)] = ((_local7[_local21] + _local7[(_local21 - 1)]) / 2); _local21++; }; } else { _local8 = _local7; }; _local14 = false; _local15 = false; if (_local8[0] != 0){ _local14 = true; _local8.unshift(0); }; if (_local8[(_local8.length - 1)] != 1){ _local15 = true; _local8.push(1); }; _local9 = _arg1; _local10 = [getStyle("verticalFill"), getStyle("verticalAlternateFill")]; _local21 = 0; while (_local21 < _local8.length) { _local4 = _local10[((_local21 / _local6) % 2)]; _local26 = (_local8[_local21] * _local9); _local27 = (_local8[Math.min((_local8.length - 1), (_local21 + _local6))] * _local9); _local11 = new Rectangle(_local26, 0, (_local27 - _local26), _arg2); if (_local4 != null){ _local16.lineStyle(0, 0, 0); GraphicsUtilities.fillRect(_local16, _local11.left, _local11.top, _local11.right, _local11.bottom, _local4); }; if (_local5 != null){ if (((_local14) && ((_local21 == 0)))){ } else { if (((_local15) && ((_local21 == (_local8.length - 1))))){ } else { _local5.apply(_local16); _local16.moveTo(_local11.left, _local11.top); _local16.lineTo(_local11.left, _local11.bottom); }; }; }; _local21 = (_local21 + _local6); }; }; _local18 = getStyle("horizontalShowOrigin"); _local19 = getStyle("verticalShowOrigin"); if (((_local19) || (_local18))){ _local28 = [{xOrigin:0, yOrigin:0}]; _local29 = 0.5; dataTransform.transformCache(_local28, "xOrigin", "x", "yOrigin", "y"); if (((((_local18) && ((_local28[0].y > 0)))) && ((_local28[0].y < _arg2)))){ _local12 = getStyle("horizontalOriginStroke"); _local12.apply(_local16); _local16.moveTo(0, (_local28[0].y - (_local29 / 2))); _local16.lineTo($width, (_local28[0].y - (_local29 / 2))); }; if (((((_local19) && ((_local28[0].x > 0)))) && ((_local28[0].x < _arg1)))){ _local12 = getStyle("verticalOriginStroke"); _local12.apply(_local16); _local16.moveTo((_local28[0].x - (_local29 / 2)), 0); _local16.lineTo((_local28[0].x - (_local29 / 2)), $height); }; }; } private static function initStyles():Boolean{ var gridlinesStyleName:CSSStyleDeclaration; var hgridlinesStyle:CSSStyleDeclaration; var bothGridLines:CSSStyleDeclaration; HaloDefaults.init(); gridlinesStyleName = HaloDefaults.createSelector("GridLines"); gridlinesStyleName.defaultFactory = function ():void{ this.direction = "horizontal"; this.horizontalOriginStroke = new Stroke(11583952, 1); this.horizontalShowOrigin = true; this.horizontalStroke = new Stroke(0xEEEEEE, 0); this.verticalOriginStroke = new Stroke(11583952, 1); this.verticalShowOrigin = false; this.verticalStroke = new Stroke(0xEEEEEE, 0); }; hgridlinesStyle = HaloDefaults.createSelector(".horizontalGridLines"); hgridlinesStyle.defaultFactory = function ():void{ this.direction = "vertical"; this.horizontalFill = null; this.horizontalShowOrigin = false; this.verticalFill = null; this.verticalShowOrigin = true; }; bothGridLines = HaloDefaults.createSelector(".bothGridLines"); bothGridLines.defaultFactory = function ():void{ this.direction = "both"; this.horizontalShowOrigin = true; this.verticalShowOrigin = true; }; return (true); } } }//package mx.charts
Section 46
//HitData (mx.charts.HitData) package mx.charts { import mx.styles.*; import mx.charts.chartClasses.*; public class HitData { public var dataTipFunction:Function; public var chartItem:ChartItem; public var contextColor:uint;// = 0 public var distance:Number; public var x:Number; public var y:Number; public var item:Object; public var id:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function HitData(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:ChartItem){ var _local6:Object; contextColor = 0; super(); this.id = _arg1; this.distance = _arg2; this.x = _arg3; this.y = _arg4; this.chartItem = _arg5; this.item = _arg5.item; if ((_arg5.element is IStyleClient)){ _local6 = IStyleClient(_arg5.element).getStyle("fill"); contextColor = GraphicsUtilities.colorFromFill(_local6); }; } public function get displayText():String{ return (dataTipFunction(this)); } public function get element():IChartElement{ return (chartItem.element); } } }//package mx.charts
Section 47
//Legend (mx.charts.Legend) package mx.charts { import mx.core.*; import flash.events.*; import flash.display.*; import mx.styles.*; import mx.containers.*; import mx.collections.*; import mx.charts.chartClasses.*; import mx.charts.events.*; import mx.charts.styles.*; public class Legend extends Tile { public var legendItemClass:Class; private var _preferredMajorAxisLength:Number; private var _unscaledHeight:Number; private var _dataProvider:Object; private var _actualMajorAxisLength:Number; private var _childrenDirty:Boolean;// = false private var _unscaledWidth:Number; private var _dataProviderChanged:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); private static var legendItemLinkage:LegendItem = null; public function Legend(){ _childrenDirty = false; _dataProviderChanged = false; legendItemClass = LegendItem; super(); direction = "vertical"; addEventListener(MouseEvent.CLICK, childMouseEventHandler); addEventListener(MouseEvent.MOUSE_OVER, childMouseEventHandler); addEventListener(MouseEvent.MOUSE_OUT, childMouseEventHandler); addEventListener(MouseEvent.MOUSE_UP, childMouseEventHandler); addEventListener(MouseEvent.MOUSE_DOWN, childMouseEventHandler); _dataProvider = new ArrayCollection(); } private function calcColumnWidthsForWidth(_arg1:Number):Array{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:int; var _local7:Array; var _local8:Number; var _local9:Boolean; var _local10:UIComponent; var _local11:Number; var _local12:int; _local2 = numChildren; _local3 = getStyle("horizontalGap"); _local4 = 0; _local5 = _arg1; _local6 = 0; _local8 = 0; while (_local8 < _local2) { _local10 = UIComponent(getChildAt(_local8)); _local11 = _local10.getExplicitOrMeasuredWidth(); if ((_local4 + _local11) > _local5){ break; }; _local4 = (_local4 + (_local11 + _local3)); _local6++; _local8++; }; _local9 = true; while ((((_local6 > 1)) && (_local9))) { _local7 = []; _local8 = 0; while (_local8 < _local6) { _local7[_local8] = 0; _local8++; }; _local8 = 0; while (_local8 < _local2) { _local12 = (_local8 % _local6); _local7[_local12] = Math.max(_local7[_local12], IUIComponent(getChildAt(_local8)).getExplicitOrMeasuredWidth()); _local8++; }; _local4 = 0; _local8 = 0; while (_local8 < _local6) { if ((_local4 + _local7[_local8]) > _local5){ break; }; _local4 = (_local4 + (_local7[_local8] + _local3)); _local8++; }; if (_local8 == _local6){ _local9 = false; } else { _local6--; }; }; if (_local6 <= 1){ _local6 = 1; _local7 = [cellWidth]; }; return (_local7); } private function addLegendItem(_arg1:Object):void{ var _local2:Class; var _local3:LegendItem; _local2 = legendItemClass; _local3 = new (_local2); _local3.marker = _arg1.marker; if (_arg1.label != ""){ _local3.label = _arg1.label; }; if (_arg1.element != null){ _local3.element = _arg1.element; }; if (("fill" in _arg1)){ _local3.setStyle("fill", _arg1["fill"]); }; _local3.markerAspectRatio = _arg1.aspectRatio; _local3.legendData = _arg1; _local3.percentWidth = 100; _local3.percentHeight = 100; addChild(_local3); _local3.setStyle("backgroundColor", 15658751); } override public function get horizontalScrollPolicy():String{ return (ScrollPolicy.OFF); } private function calcColumnWidthsForHeight(_arg1:Number):Array{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; var _local6:Array; var _local7:int; var _local8:UIComponent; var _local9:int; _local2 = numChildren; _local3 = getStyle("verticalGap"); if (isNaN(_local3)){ _local3 = 0; }; _local4 = Math.min(_local2, Math.max(1, Math.floor(((_arg1 + _local3) / (cellHeight + _local3))))); _local5 = ((_local4 == 0)) ? 0 : Math.ceil((_local2 / _local4)); if (_local5 <= 1){ _local6 = [cellWidth]; } else { _local6 = []; _local7 = 0; while (_local7 < _local5) { _local6[_local7] = 0; _local7++; }; _local7 = 0; while (_local7 < _local2) { _local8 = UIComponent(getChildAt(_local7)); _local9 = Math.floor((_local7 / _local4)); _local6[_local9] = Math.max(_local6[_local9], _local8.getExplicitOrMeasuredWidth()); _local7++; }; }; return (_local6); } private function layoutVertical():void{ var _local1:Number; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:String; var _local6:String; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:Array; var _local12:int; var _local13:Number; var _local14:UIComponent; var _local15:int; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = numChildren; _local2 = viewMetricsAndPadding; _local3 = getStyle("horizontalGap"); _local4 = getStyle("verticalGap"); _local5 = getStyle("horizontalAlign"); _local6 = getStyle("verticalAlign"); _local7 = _local2.left; _local8 = _local2.top; _local9 = (unscaledHeight - _local2.bottom); _local10 = Math.min(_local1, Math.max(1, Math.floor((((_local9 - _local8) + _local4) / (cellHeight + _local4))))); _local11 = []; _local11 = calcColumnWidthsForHeight((_local9 - _local8)); _local12 = _local11.length; _local13 = 0; while (_local13 < _local1) { _local14 = UIComponent(getChildAt(_local13)); _local15 = Math.floor((_local13 / _local10)); _local16 = _local11[_local15]; if (_local14.percentWidth > 0){ _local17 = Math.min(_local16, ((_local16 * _local14.percentWidth) / 100)); } else { _local17 = _local14.getExplicitOrMeasuredWidth(); }; if (_local14.percentHeight > 0){ _local18 = Math.min(cellHeight, ((cellHeight * _local14.percentHeight) / 100)); } else { _local18 = _local14.getExplicitOrMeasuredHeight(); }; _local14.setActualSize(_local17, _local18); _local19 = Math.floor(calcHorizontalOffset(_local14.width, _local5)); _local20 = Math.floor(calcVerticalOffset(_local14.height, _local6)); _local14.move((_local7 + _local19), (_local8 + _local20)); if ((_local13 % _local10) == (_local10 - 1)){ _local8 = _local2.top; _local7 = (_local7 + (_local16 + _local3)); } else { _local8 = (_local8 + (cellHeight + _local4)); }; _local13++; }; if (_local10 != _preferredMajorAxisLength){ _actualMajorAxisLength = _local10; invalidateSize(); }; } override public function get verticalScrollPolicy():String{ return (ScrollPolicy.OFF); } private function getHorizontalAlignValue():Number{ var _local1:String; _local1 = getStyle("horizontalAlign"); if (_local1 == "center"){ return (0.5); }; if (_local1 == "right"){ return (1); }; return (0); } override public function set horizontalScrollPolicy(_arg1:String):void{ } private function heightPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = viewMetricsAndPadding; _local3 = (_local2.top + _local2.bottom); if ((((_arg1 > 1)) && ((direction == "vertical")))){ _local3 = (_local3 + (getStyle("verticalGap") * (_arg1 - 1))); }; return (_local3); } override protected function measure():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:EdgeMetrics; var _local6:int; var _local7:int; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:int; var _local15:Boolean; super.measure(); findCellSize(); _local1 = cellWidth; _local2 = cellHeight; _local8 = this.numChildren; if (_local8 > 0){ _local11 = getStyle("horizontalGap"); _local12 = getStyle("verticalGap"); _local5 = viewMetricsAndPadding; if (direction == "vertical"){ _local15 = false; if (!isNaN(explicitHeight)){ _local4 = ((explicitHeight - _local5.top) - _local5.bottom); _local15 = true; } else { if (!isNaN(_actualMajorAxisLength)){ _local4 = ((_actualMajorAxisLength * cellHeight) + ((_actualMajorAxisLength - 1) * _local12)); _actualMajorAxisLength = NaN; _local15 = true; }; }; if (_local15){ _local13 = calcColumnWidthsForHeight(_local4); _local3 = 0; _local6 = _local13.length; _local7 = 0; while (_local7 < _local6) { _local3 = (_local3 + _local13[_local7]); _local7++; }; _local3 = (_local3 + ((_local6 - 1) * _local11)); _local14 = Math.min(_local8, Math.max(1, Math.floor(((_local4 + _local12) / (cellHeight + _local12))))); _local4 = ((_local14 * cellHeight) + ((_local14 - 1) * _local12)); _preferredMajorAxisLength = _local14; } else { _local4 = ((_local8 * cellHeight) + ((_local8 - 1) * _local12)); _local3 = cellWidth; _preferredMajorAxisLength = _local8; }; } else { if (!isNaN(explicitWidth)){ _local3 = ((explicitWidth - _local5.left) - _local5.right); } else { if (!isNaN(_actualMajorAxisLength)){ _local3 = ((_actualMajorAxisLength - _local5.left) - _local5.right); _actualMajorAxisLength = NaN; } else { _local3 = ((screen.width - _local5.left) - _local5.right); }; }; _local13 = calcColumnWidthsForWidth(_local3); _local3 = 0; _local6 = _local13.length; _local7 = 0; while (_local7 < _local6) { _local3 = (_local3 + _local13[_local7]); _local7++; }; _local3 = (_local3 + ((_local6 - 1) * _local11)); _local14 = Math.ceil((_local8 / _local6)); _local4 = ((_local14 * cellHeight) + ((_local14 - 1) * _local12)); _preferredMajorAxisLength = _local6; }; } else { _local3 = _local1; _local4 = _local2; }; _local5 = viewMetricsAndPadding; _local9 = (_local5.left + _local5.right); _local10 = (_local5.top + _local5.bottom); _local1 = (_local1 + _local9); _local3 = (_local3 + _local9); _local2 = (_local2 + _local10); _local4 = (_local4 + _local10); measuredMinWidth = _local1; measuredMinHeight = _local2; measuredWidth = _local3; measuredHeight = _local4; } override protected function commitProperties():void{ super.commitProperties(); if (_childrenDirty){ populateFromArray(_dataProvider); _childrenDirty = false; }; } override public function set verticalScrollPolicy(_arg1:String):void{ } private function childMouseEventHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); while (((!((_local2 == this))) && (!((_local2.parent == this))))) { _local2 = _local2.parent; }; if ((_local2 is LegendItem)){ dispatchEvent(new LegendMouseEvent(_arg1.type, _arg1, LegendItem(_local2))); }; } private function layoutHorizontal():void{ var _local1:Number; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:String; var _local6:String; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:Array; var _local12:Number; var _local13:UIComponent; var _local14:int; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local1 = numChildren; _local2 = viewMetricsAndPadding; _local3 = getStyle("horizontalGap"); _local4 = getStyle("verticalGap"); _local5 = getStyle("horizontalAlign"); _local6 = getStyle("verticalAlign"); _local7 = _local2.left; _local8 = (_unscaledWidth - _local2.right); _local9 = _local2.top; _local10 = 0; _local11 = calcColumnWidthsForWidth((_local8 - _local7)); _local10 = _local11.length; _local12 = 0; while (_local12 < _local1) { _local13 = UIComponent(getChildAt(_local12)); _local14 = (_local12 % _local10); _local15 = _local11[_local14]; if (_local13.percentWidth > 0){ _local16 = Math.min(_local15, ((_local15 * _local13.percentWidth) / 100)); } else { _local16 = _local13.getExplicitOrMeasuredWidth(); }; if (_local13.percentHeight > 0){ _local17 = Math.min(cellHeight, ((cellHeight * _local13.percentHeight) / 100)); } else { _local17 = _local13.getExplicitOrMeasuredHeight(); }; _local13.setActualSize(_local16, _local17); _local18 = Math.floor(calcHorizontalOffset(_local13.width, _local5)); _local19 = Math.floor(calcVerticalOffset(_local13.height, _local6)); _local13.move((_local7 + _local18), (_local9 + _local19)); if (_local14 == (_local10 - 1)){ _local7 = _local2.left; _local9 = (_local9 + (cellHeight + _local4)); } else { _local7 = (_local7 + (_local11[_local14] + _local3)); }; _local12++; }; if (_local10 != _preferredMajorAxisLength){ _actualMajorAxisLength = _unscaledWidth; invalidateSize(); }; } private function populateFromArray(_arg1:Object):void{ var _local2:Object; var _local3:int; var _local4:Array; var _local5:int; var _local6:int; if ((_arg1 is ChartBase)){ _arg1 = _arg1.legendData; }; removeAllChildren(); _local3 = 0; while (_local3 < _arg1.length) { _local4 = (_arg1[_local3] as Array); if (_local4 == null){ _local2 = _arg1[_local3]; addLegendItem(_local2); } else { _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local2 = _local4[_local6]; addLegendItem(_local2); _local6++; }; }; _local3++; }; _actualMajorAxisLength = NaN; } private function legendDataChangedHandler(_arg1:Event=null):void{ invalidateProperties(); invalidateSize(); _childrenDirty = true; } public function set dataProvider(_arg1:Object):void{ if ((_dataProvider is ChartBase)){ _dataProvider.removeEventListener("legendDataChanged", legendDataChangedHandler); }; _dataProvider = (_arg1) ? _arg1 : []; if ((_dataProvider is ChartBase)){ _dataProvider.addEventListener("legendDataChanged", legendDataChangedHandler, false, 0, true); } else { if ((_dataProvider is ICollectionView)){ } else { if ((_dataProvider is IList)){ _dataProvider = new ListCollectionView(IList(_dataProvider)); } else { if ((_dataProvider is Array)){ _dataProvider = new ArrayCollection((_dataProvider as Array)); } else { if (_dataProvider != null){ _dataProvider = new ArrayCollection([_dataProvider]); } else { _dataProvider = new ArrayCollection(); }; }; }; }; }; invalidateProperties(); invalidateSize(); _childrenDirty = true; dispatchEvent(new Event("collectionChange")); } private function getVerticalAlignValue():Number{ var _local1:String; _local1 = getStyle("verticalAlign"); if (_local1 == "middle"){ return (0.5); }; if (_local1 == "bottom"){ return (1); }; return (0); } public function get dataProvider():Object{ return (_dataProvider); } private function widthPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = viewMetricsAndPadding; _local3 = (_local2.left + _local2.right); if ((((_arg1 > 1)) && ((direction == "horizontal")))){ _local3 = (_local3 + (getStyle("horizontalGap") * (_arg1 - 1))); }; return (_local3); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); _unscaledWidth = _arg1; _unscaledHeight = _arg2; if (isNaN(cellWidth)){ findCellSize(); }; if (direction == "vertical"){ layoutVertical(); } else { layoutHorizontal(); }; } private static function initStyles():Boolean{ var o:CSSStyleDeclaration; HaloDefaults.init(); o = HaloDefaults.createSelector("Legend"); o.defaultFactory = function ():void{ this.borderStyle = "none"; this.horizontalGap = 20; this.maintainAspectRatio = true; this.paddingBottom = 5; this.paddingLeft = 5; this.paddingRight = 5; this.paddingTop = 5; this.verticalGap = 7; }; return (true); } } }//package mx.charts
Section 48
//LegendItem (mx.charts.LegendItem) package mx.charts { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.charts.styles.*; import mx.charts.renderers.*; public class LegendItem extends UIComponent { private var labelChanged:Boolean;// = false private var _marker:IFlexDisplayObject; private var _label:String;// = "" public var markerAspectRatio:Number; private var _legendData:Object; public var element:IChartElement; private var nameLabel:UITextField; mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); public function LegendItem(){ _label = ""; labelChanged = false; super(); } public function get source():Object{ return (element); } public function get marker():IFlexDisplayObject{ return (_marker); } private function getMarkerHeight():Number{ var _local1:Number; _local1 = getStyle("markerHeight"); if (isNaN(_local1)){ _local1 = 15; }; return (_local1); } private function getMarkerWidth():Number{ var _local1:Number; _local1 = getStyle("markerWidth"); if (isNaN(_local1)){ _local1 = 10; }; return (_local1); } public function set marker(_arg1:IFlexDisplayObject):void{ if (_marker){ removeChild((_marker as DisplayObject)); }; _marker = _arg1; if (_marker){ addChild((_marker as DisplayObject)); }; if ((_marker is IDataRenderer)){ (_marker as IDataRenderer).data = _legendData; }; invalidateDisplayList(); } override protected function measure():void{ var _local1:String; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; super.measure(); _local1 = _label; _local2 = getStyle("labelPlacement"); if ((((_local2 == "")) && (parent))){ _local2 = UIComponent(parent).getStyle("labelPlacement"); }; _local3 = 0; _local4 = 0; if ((((((_local1 == null)) || ((_local1 == "")))) || ((_local1.length < 2)))){ _local1 = "Wj"; }; if (labelChanged){ labelChanged = false; nameLabel.text = _label; }; _local5 = (nameLabel.textWidth + UITextField.TEXT_WIDTH_PADDING); _local6 = (nameLabel.textHeight + UITextField.TEXT_HEIGHT_PADDING); if (isNaN(_local5)){ _local5 = 0; }; if (isNaN(_local6)){ _local6 = 0; }; if ((((_local5 > 0)) || ((getMarkerWidth() > 0)))){ _local3 = (_local3 + (getStyle("paddingLeft") + getStyle("paddingRight"))); _local4 = (_local4 + (getStyle("paddingTop") + getStyle("paddingBottom"))); if ((((_local2 == "top")) || ((_local2 == "bottom")))){ _local3 = (_local3 + Math.max(_local5, getMarkerWidth())); _local4 = (_local4 + ((getStyle("verticalGap") + getMarkerHeight()) + _local6)); } else { _local3 = (_local3 + ((getStyle("horizontalGap") + getMarkerWidth()) + _local5)); _local4 = (_local4 + Math.max(_local6, getMarkerHeight())); }; }; measuredWidth = _local3; measuredHeight = _local4; nameLabel.setActualSize(getExplicitOrMeasuredWidth(), measuredHeight); } public function set label(_arg1:String):void{ _label = _arg1; labelChanged = true; invalidateSize(); invalidateDisplayList(); } public function set legendData(_arg1:Object):void{ _legendData = _arg1; if ((_marker is IDataRenderer)){ (_marker as IDataRenderer).data = _legendData; }; } public function get label():String{ return (_label); } override protected function createChildren():void{ nameLabel = new UITextField(); nameLabel.selectable = false; addChild(nameLabel); super.createChildren(); if (!nameLabel){ nameLabel = new UITextField(); nameLabel.selectable = false; addChild(nameLabel); }; } override public function styleChanged(_arg1:String):void{ invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:String; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Rectangle; var _local20:Number; var _local21:IFactory; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("labelPlacement"); _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = getStyle("paddingLeft"); _local9 = getStyle("paddingRight"); _local10 = getStyle("paddingTop"); _local11 = getMarkerWidth(); _local12 = getMarkerHeight(); _local13 = _local12; _local14 = _local11; _local15 = _label; if ((((_local15 == null)) || ((_local15.length < 2)))){ _local15 = "Wj"; }; if (labelChanged){ labelChanged = false; nameLabel.text = _label; }; _local16 = (nameLabel.textWidth + UITextField.TEXT_WIDTH_PADDING); _local17 = (nameLabel.textHeight + UITextField.TEXT_HEIGHT_PADDING); if (isNaN(_local16)){ _local16 = 0; }; if (isNaN(_local17)){ _local17 = 0; }; switch (_local3){ case "top": _local5 = _local10; _local7 = ((_local5 + getStyle("verticalGap")) + _local17); _local18 = (_local8 + (((_arg1 - _local8) - _local9) / 2)); _local4 = (_local18 - (_local16 / 2)); _local6 = (_local18 - (_local14 / 2)); break; case "bottom": _local7 = _local10; _local5 = ((_local7 + getStyle("verticalGap")) + _local13); _local18 = (_local8 + (((_arg1 - _local8) - _local9) / 2)); _local4 = (_local18 - (_local16 / 2)); _local6 = (_local18 - (_local14 / 2)); break; case "left": _local6 = ((_arg1 - _local14) - _local9); _local4 = ((_local6 - getStyle("horizontalGap")) - _local16); _local7 = _local10; _local5 = _local7; if (_local17 < _local13){ _local5 = (_local5 + ((_local13 - _local17) / 2)); } else { _local7 = (_local7 + ((_local17 - _local13) / 2)); }; break; default: _local6 = _local8; _local4 = ((_local6 + getStyle("horizontalGap")) + _local14); _local5 = _local10; _local7 = _local5; if (_local13 < _local17){ _local7 = (_local7 + ((_local17 - _local13) / 2)); } else { _local5 = (_local5 + ((_local13 - _local17) / 2)); }; break; }; nameLabel.move(_local4, _local5); if (!isNaN(markerAspectRatio)){ _local20 = (_local14 / _local13); if (_local20 > markerAspectRatio){ _local14 = (markerAspectRatio * _local13); } else { _local13 = (_local14 / markerAspectRatio); }; }; _local19 = new Rectangle(((_local11 - _local14) / 2), ((_local12 - _local13) / 2), _local14, _local13); if (_marker == null){ _local21 = getStyle("legendMarkerRenderer"); if (_local21 != null){ marker = _local21.newInstance(); } else { marker = new BoxItemRenderer(); }; if ((_marker is ISimpleStyleClient)){ (_marker as ISimpleStyleClient).styleName = ((element)==null) ? this : element; }; }; _marker.x = (_local6 + ((_local11 - _local14) / 2)); _marker.y = (_local7 + ((_local12 - _local13) / 2)); _marker.setActualSize(_local14, _local13); } private static function initStyles():Boolean{ var o:CSSStyleDeclaration; HaloDefaults.init(); o = HaloDefaults.createSelector("LegendItem"); o.defaultFactory = function ():void{ this.fill = new SolidColor(0); this.fontWeight = "bold"; }; return (true); } } }//package mx.charts
Section 49
//LinearAxis (mx.charts.LinearAxis) package mx.charts { import flash.events.*; import mx.charts.chartClasses.*; public class LinearAxis extends NumericAxis { private var _labelPrecision:Number; private var _userMinorInterval:Number; private var _userInterval:Number; private var _minorInterval:Number; private var _alignLabelsToInterval:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function LinearAxis(){ _alignLabelsToInterval = true; super(); } override protected function buildLabelCache():Boolean{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Function; var _local8:Number; var _local9:Number; var _local10:Number; if (labelCache){ return (false); }; labelCache = []; _local1 = (computedMaximum - computedMinimum); _local2 = (labelMinimum - (Math.floor(((labelMinimum - computedMinimum) / computedInterval)) * computedInterval)); if (_alignLabelsToInterval){ _local2 = (Math.ceil((_local2 / computedInterval)) * computedInterval); }; _local3 = computedMaximum; _local5 = _labelPrecision; if (isNaN(_local5)){ _local9 = (Math.abs(computedInterval) - Math.floor(Math.abs(computedInterval))); _local5 = ((_local9 == 0)) ? 1 : -(Math.floor((Math.log(_local9) / Math.LN10))); _local9 = (Math.abs(computedMinimum) - Math.floor(Math.abs(computedMinimum))); _local5 = Math.max(_local5, ((_local9 == 0)) ? 1 : -(Math.floor((Math.log(_local9) / Math.LN10)))); }; _local6 = Math.pow(10, _local5); _local7 = this.labelFunction; if (_local7 != null){ _local10 = NaN; _local4 = _local2; while (_local4 <= _local3) { _local8 = (Math.round((_local4 * _local6)) / _local6); labelCache.push(new AxisLabel(((_local4 - computedMinimum) / _local1), _local4, _local7(_local8, _local10, this))); _local10 = _local8; _local4 = (_local4 + computedInterval); }; } else { _local4 = _local2; while (_local4 <= _local3) { _local8 = (Math.round((_local4 * _local6)) / _local6); labelCache.push(new AxisLabel(((_local4 - computedMinimum) / _local1), _local4, _local8.toString())); _local4 = (_local4 + computedInterval); }; }; return (true); } override public function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):AxisLabelSet{ var _local3:Number; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:AxisLabelSet; _local3 = (Math.round(((Number(_arg2.value) - Number(_arg1.value)) / computedInterval)) + 1); _local4 = (_local3 * _minorInterval); _local5 = []; _local6 = []; _local7 = []; _local8 = labelCache.length; _local9 = 0; while (_local9 < _local8) { _local5.push(labelCache[_local9]); _local7.push(labelCache[_local9].position); _local9 = (_local9 + _local3); }; _local10 = (computedMaximum - computedMinimum); _local11 = (labelMinimum - (Math.floor(((labelMinimum - computedMinimum) / _local4)) * _local4)); if (_alignLabelsToInterval){ _local11 = (Math.ceil((_local11 / _local4)) * _local4); }; _local12 = (computedMaximum + 1E-6); _local13 = _local11; while (_local13 <= _local12) { _local6.push(((_local13 - computedMinimum) / _local10)); _local13 = (_local13 + _local4); }; _local14 = new AxisLabelSet(); _local14.labels = _local5; _local14.minorTicks = _local6; _local14.ticks = _local7; _local14.accurate = true; return (_local14); } public function set minimum(_arg1:Number):void{ assignedMinimum = _arg1; computedMinimum = _arg1; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function get minimum():Number{ return (computedMinimum); } public function get maximum():Number{ return (computedMaximum); } override protected function adjustMinMax(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local3 = _userInterval; if ((((((autoAdjust == false)) && (!(isNaN(_userInterval))))) && (!(isNaN(_userMinorInterval))))){ return; }; if ((((_arg2 == 0)) && ((_arg1 == 0)))){ _arg2 = 100; }; _local4 = Math.floor((Math.log(Math.abs(_arg2)) / Math.LN10)); _local5 = Math.floor((Math.log(Math.abs(_arg1)) / Math.LN10)); _local6 = Math.floor((Math.log(Math.abs((_arg2 - _arg1))) / Math.LN10)); if (isNaN(_userInterval)){ _local7 = Math.pow(10, _local6); if ((Math.abs((_arg2 - _arg1)) / _local7) < 4){ _local6--; _local7 = ((_local7 * 2) / 10); }; } else { _local7 = _userInterval; }; _local8 = (((Math.round((_arg2 / _local7)) * _local7) == _arg2)) ? _arg2 : ((Math.floor((_arg2 / _local7)) + 1) * _local7); if (isFinite(_arg1)){ _local9 = 0; }; if ((((_arg1 < 0)) || ((baseAtZero == false)))){ _local9 = (Math.floor((_arg1 / _local7)) * _local7); if (_arg2 < 0){ _local8 = 0; }; } else { _local9 = 0; }; if (isNaN(_userInterval)){ computedInterval = _local7; }; if (isNaN(_userMinorInterval)){ _minorInterval = (computedInterval / 2); }; if (autoAdjust){ if (isNaN(assignedMinimum)){ computedMinimum = _local9; }; if (isNaN(assignedMaximum)){ computedMaximum = _local8; }; }; } public function get maximumLabelPrecision():Number{ return (_labelPrecision); } public function set minorInterval(_arg1:Number):void{ if (_arg1 <= 0){ _arg1 = NaN; }; _userMinorInterval = _arg1; _minorInterval = _arg1; invalidateCache(); dispatchEvent(new Event("axisChange")); } public function set maximum(_arg1:Number):void{ assignedMaximum = _arg1; computedMaximum = _arg1; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function set maximumLabelPrecision(_arg1:Number):void{ _labelPrecision = _arg1; invalidateCache(); } public function set interval(_arg1:Number):void{ if (_arg1 <= 0){ _arg1 = NaN; }; _userInterval = _arg1; computedInterval = _arg1; invalidateCache(); dispatchEvent(new Event("axisChange")); } public function get minorInterval():Number{ return (_minorInterval); } override protected function buildMinorTickCache():Array{ var _local1:Array; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = []; _local2 = (computedMaximum - computedMinimum); _local3 = (labelMinimum - (Math.floor(((labelMinimum - computedMinimum) / _minorInterval)) * _minorInterval)); if (_alignLabelsToInterval){ _local3 = (Math.ceil((_local3 / _minorInterval)) * _minorInterval); }; _local4 = (computedMaximum + 1E-6); _local5 = _local3; while (_local5 <= _local4) { _local1.push(((_local5 - computedMinimum) / _local2)); _local5 = (_local5 + _minorInterval); }; return (_local1); } public function get interval():Number{ return (computedInterval); } public function set alignLabelsToInterval(_arg1:Boolean):void{ if (_arg1 != _alignLabelsToInterval){ _alignLabelsToInterval = _arg1; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); }; } public function get alignLabelsToInterval():Boolean{ return (_alignLabelsToInterval); } } }//package mx.charts
Section 50
//LineChart (mx.charts.LineChart) package mx.charts { import mx.core.*; import mx.styles.*; import mx.graphics.*; import mx.charts.chartClasses.*; import mx.charts.styles.*; import mx.charts.renderers.*; import flash.filters.*; public class LineChart extends CartesianChart { mx_internal static const VERSION:String = "2.0.1.0"; private static var stylesInited:Boolean = initStyles(); public function LineChart(){ LinearAxis(horizontalAxis).autoAdjust = false; seriesFilters = [new DropShadowFilter()]; } override protected function initSecondaryMode():void{ super.initSecondaryMode(); if (!secondVerticalAxis){ secondVerticalAxis = new LinearAxis(); }; if (!secondVerticalAxisRenderer){ secondVerticalAxisRenderer = new AxisRenderer(); }; } override public function set horizontalAxis(_arg1:IAxis):void{ if ((_arg1 is CategoryAxis)){ CategoryAxis(_arg1).padding = 0; }; super.horizontalAxis = _arg1; } private static function initStyles():Boolean{ var lineChartStyle:CSSStyleDeclaration; var lineChartSeriesStyles:Array; var n:int; var i:int; var styleName:String; var o:CSSStyleDeclaration; var f:Function; HaloDefaults.init(); lineChartStyle = HaloDefaults.createSelector("LineChart"); lineChartSeriesStyles = []; lineChartStyle.defaultFactory = function ():void{ this.axisColor = 14016221; this.chartSeriesStyles = lineChartSeriesStyles; this.dataTipRenderer = DataTip; this.fill = new SolidColor(0xFFFFFF, 0); this.calloutStroke = new Stroke(0x888888, 2); this.fontSize = 10; this.horizontalAxisStyleName = "hangingCategoryAxis"; this.secondHorizontalAxisStyleName = "hangingCategoryAxis"; this.secondVerticalAxisStyleName = "blockNumericAxis"; this.textAlign = "left"; this.verticalAxisStyleName = "blockNumericAxis"; }; n = HaloDefaults.defaultColors.length; i = 0; while (i < n) { styleName = ("haloLineSeries" + i); lineChartSeriesStyles[i] = styleName; o = HaloDefaults.createSelector(("." + styleName)); f = function (_arg1:CSSStyleDeclaration, _arg2:Stroke):void{ var o = _arg1; var stroke = _arg2; o.defaultFactory = function ():void{ this.lineStroke = stroke; this.stroke = stroke; this.lineSegmentRenderer = new ClassFactory(LineRenderer); }; }; f(o, new Stroke(HaloDefaults.defaultColors[i], 3, 1)); i = (i + 1); }; return (true); } } }//package mx.charts
Section 51
//LogAxis (mx.charts.LogAxis) package mx.charts { import flash.events.*; import mx.charts.chartClasses.*; public class LogAxis extends NumericAxis { private var _labelPrecision:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function LogAxis(){ computedInterval = 1; } override protected function buildLabelCache():Boolean{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Function; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; if (labelCache){ return (false); }; labelCache = []; _local1 = (computedMaximum - computedMinimum); _local2 = (labelMinimum - (Math.floor(((labelMinimum - computedMinimum) / computedInterval)) * computedInterval)); _local3 = (computedMaximum + 1E-6); _local4 = this.labelFunction; if (!isNaN(_labelPrecision)){ _local8 = Math.pow(10, _labelPrecision); }; if (_local4 != null){ _local9 = NaN; _local5 = _local2; while (_local5 <= _local3) { _local6 = Math.pow(10, _local5); _local7 = (isNaN(_labelPrecision)) ? _local6 : (Math.round((_local6 * _local8)) / _local8); labelCache.push(new AxisLabel(((_local5 - computedMinimum) / _local1), _local6, _local4(_local7, _local9, this))); _local9 = _local6; _local5 = (_local5 + computedInterval); }; } else { _local5 = _local2; while (_local5 <= _local3) { _local6 = Math.pow(10, _local5); _local7 = (isNaN(_labelPrecision)) ? _local6 : (Math.round((_local6 * _local8)) / _local8); labelCache.push(new AxisLabel(((_local5 - computedMinimum) / _local1), _local6, _local7.toString())); _local5 = (_local5 + computedInterval); }; }; return (true); } override public function reduceLabels(_arg1:AxisLabel, _arg2:AxisLabel):AxisLabelSet{ var _local3:Number; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:AxisLabelSet; var _local12:AxisLabel; _local3 = Math.round(((Math.log(Number(_arg2.value)) / Math.LN10) - (Math.log(Number(_arg1.value)) / Math.LN10))); _local3 = (Math.floor((_local3 / computedInterval)) + 1); _local4 = []; _local5 = []; _local6 = []; _local7 = (computedMaximum - computedMinimum); _local8 = (labelMinimum - (Math.floor(((labelMinimum - computedMinimum) / computedInterval)) * computedInterval)); _local9 = (computedMaximum + 1E-6); _local10 = 0; while (_local10 < labelCache.length) { _local12 = labelCache[_local10]; _local4.push(_local12); _local6.push(_local12.position); _local5.push(_local12.position); _local10 = (_local10 + _local3); }; _local11 = new AxisLabelSet(); _local11.labels = _local4; _local11.minorTicks = _local5; _local11.ticks = _local6; _local11.accurate = true; return (_local11); } public function set minimum(_arg1:Number):void{ if (_arg1 == 0){ assignedMinimum = NaN; } else { assignedMinimum = Math.floor((Math.log(_arg1) / Math.LN10)); }; computedMinimum = assignedMinimum; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function get minimum():Number{ return (Math.pow(10, computedMinimum)); } public function get maximum():Number{ return (Math.pow(10, computedMaximum)); } override protected function adjustMinMax(_arg1:Number, _arg2:Number):void{ computedMinimum = Math.floor(computedMinimum); computedMaximum = Math.ceil(computedMaximum); } public function get maximumLabelPrecision():Number{ return (_labelPrecision); } override public function invertTransform(_arg1:Number):Object{ update(); return (Math.pow(10, ((_arg1 * (computedMaximum - computedMinimum)) + computedMinimum))); } public function set maximum(_arg1:Number):void{ computedMaximum = Math.ceil((Math.log(_arg1) / Math.LN10)); assignedMaximum = computedMaximum; invalidateCache(); dispatchEvent(new Event("mappingChange")); dispatchEvent(new Event("axisChange")); } public function set maximumLabelPrecision(_arg1:Number):void{ _labelPrecision = _arg1; invalidateCache(); } public function set interval(_arg1:Number):void{ if (!isNaN(_arg1)){ _arg1 = Math.max(1, Math.floor((Math.log(_arg1) / Math.LN10))); }; if (isNaN(_arg1)){ _arg1 = 1; }; computedInterval = _arg1; invalidateCache(); dispatchEvent(new Event("axisChange")); } override public function mapCache(_arg1:Array, _arg2:String, _arg3:String, _arg4:Boolean=false):void{ var _local5:Number; var _local6:int; var _local7:int; var _local8:Object; var _local9:Number; var _local10:Function; _local5 = Math.LN10; _local6 = _arg1.length; _local10 = this.parseFunction; if (_local10 != null){ _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7]; _local8[_arg3] = (Math.log(Number(_local10(_local8[_arg2]))) / _local5); _local7++; }; } else { _local7 = 0; while ((((_local7 < _local6)) && ((_arg1[_local7][_arg2] == null)))) { _local7++; }; if (_local7 == _local6){ return; }; if ((_arg1[_local7][_arg2] is String)){ _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7]; _local8[_arg3] = (Math.log(Number(_local8[_arg2])) / _local5); _local7++; }; } else { if ((((_arg1[_local7][_arg2] is XML)) || ((_arg1[_local7][_arg2] is XMLList)))){ _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7]; _local8[_arg3] = (Math.log(Number(_local8[_arg2].toString())) / _local5); _local7++; }; } else { if ((((((_arg1[_local7][_arg2] is Number)) || ((_arg1[_local7][_arg2] is int)))) || ((_arg1[_local7][_arg2] is uint)))){ _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7]; _local8[_arg3] = ((_local8[_arg2] == null)) ? NaN : (Math.log(_local8[_arg2]) / _local5); _local7++; }; } else { _local7 = 0; while (_local7 < _local6) { _local8 = _arg1[_local7]; _local8[_arg3] = (Math.log(parseFloat(_local8[_arg2])) / _local5); _local7++; }; }; }; }; }; } override protected function buildMinorTickCache():Array{ var _local1:Array; var _local2:int; var _local3:int; _local1 = []; _local2 = labelCache.length; _local3 = 0; while (_local3 < labelCache.length) { _local1.push(labelCache[_local3].position); _local3++; }; return (_local1); } public function get interval():Number{ return (Math.pow(10, computedInterval)); } override protected function guardMinMax(_arg1:Number, _arg2:Number):Array{ if (((isNaN(_arg1)) || (!(isFinite(_arg1))))){ _arg1 = 0; }; if (((isNaN(_arg2)) || (!(isFinite(_arg2))))){ _arg2 = (_arg1 + 2); }; if (_arg2 == _arg1){ _arg2 = (_arg1 + 2); }; return ([_arg1, _arg2]); } } }//package mx.charts
Section 52
//CollectionViewError (mx.collections.errors.CollectionViewError) package mx.collections.errors { public class CollectionViewError extends Error { mx_internal static const VERSION:String = "2.0.1.0"; public function CollectionViewError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 53
//CursorError (mx.collections.errors.CursorError) package mx.collections.errors { public class CursorError extends Error { mx_internal static const VERSION:String = "2.0.1.0"; public function CursorError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 54
//ItemPendingError (mx.collections.errors.ItemPendingError) package mx.collections.errors { import mx.rpc.*; public class ItemPendingError extends Error { private var _responders:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function ItemPendingError(_arg1:String){ super(_arg1); } public function addResponder(_arg1:IResponder):void{ if (!_responders){ _responders = []; }; _responders.push(_arg1); } public function get responders():Array{ return (_responders); } } }//package mx.collections.errors
Section 55
//SortError (mx.collections.errors.SortError) package mx.collections.errors { public class SortError extends Error { mx_internal static const VERSION:String = "2.0.1.0"; public function SortError(_arg1:String){ super(_arg1); } } }//package mx.collections.errors
Section 56
//ArrayCollection (mx.collections.ArrayCollection) package mx.collections { import flash.utils.*; public class ArrayCollection extends ListCollectionView implements IExternalizable { mx_internal static const VERSION:String = "2.0.1.0"; public function ArrayCollection(_arg1:Array=null){ this.source = _arg1; } public function writeExternal(_arg1:IDataOutput):void{ if ((list is IExternalizable)){ IExternalizable(list).writeExternal(_arg1); } else { _arg1.writeObject(source); }; } public function readExternal(_arg1:IDataInput):void{ if ((list is IExternalizable)){ IExternalizable(list).readExternal(_arg1); } else { source = (_arg1.readObject() as Array); }; } public function get source():Array{ if (((list) && ((list is ArrayList)))){ return (ArrayList(list).source); }; return (null); } public function set source(_arg1:Array):void{ list = new ArrayList(_arg1); } } }//package mx.collections
Section 57
//ArrayList (mx.collections.ArrayList) package mx.collections { import mx.core.*; import mx.events.*; import flash.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import flash.system.*; public class ArrayList extends EventDispatcher implements IList, IExternalizable, IPropertyChangeNotifier { private var _uid:String; private var _source:Array; private var _dispatchEvents:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceOutOfBounds:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); public function ArrayList(_arg1:Array=null){ _dispatchEvents = 0; super(); disableEvents(); this.source = _arg1; enableEvents(); _uid = UIDUtil.createUID(); } private function internalDispatchEvent(_arg1:String, _arg2:Object=null, _arg3:int=-1):void{ var _local4:CollectionEvent; var _local5:PropertyChangeEvent; if (_dispatchEvents == 0){ if (hasEventListener(CollectionEvent.COLLECTION_CHANGE)){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = _arg1; _local4.items.push(_arg2); _local4.location = _arg3; dispatchEvent(_local4); }; if (((hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)) && ((((_arg1 == CollectionEventKind.ADD)) || ((_arg1 == CollectionEventKind.REMOVE)))))){ _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.property = _arg3; if (_arg1 == CollectionEventKind.ADD){ _local5.newValue = _arg2; } else { _local5.oldValue = _arg2; }; dispatchEvent(_local5); }; }; } public function removeAll():void{ var _local1:int; var _local2:int; if (length > 0){ _local1 = length; _local2 = 0; while (_local2 < _local1) { stopTrackUpdates(source[_local2]); _local2++; }; source.splice(0, length); internalDispatchEvent(CollectionEventKind.RESET); }; } public function readExternal(_arg1:IDataInput):void{ source = _arg1.readObject(); } protected function startTrackUpdates(_arg1:Object):void{ if (((_arg1) && ((_arg1 is IEventDispatcher)))){ IEventDispatcher(_arg1).addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler, false, 0, true); }; } public function get source():Array{ return (_source); } public function getItemAt(_arg1:int, _arg2:int=0):Object{ if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; return (source[_arg1]); } public function toArray():Array{ return (source.concat()); } public function set uid(_arg1:String):void{ _uid = _arg1; } private function disableEvents():void{ _dispatchEvents--; } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ var _local5:PropertyChangeEvent; _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.source = _arg1; _local5.property = _arg2; _local5.oldValue = _arg3; _local5.newValue = _arg4; itemUpdateHandler(_local5); } public function addItemAt(_arg1:Object, _arg2:int):void{ if ((((_arg2 < 0)) || ((_arg2 > length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; source.splice(_arg2, 0, _arg1); startTrackUpdates(_arg1); internalDispatchEvent(CollectionEventKind.ADD, _arg1, _arg2); } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local3:Object; var _local4:Boolean; var _local5:Boolean; var _local6:PropertyChangeEvent; var _local7:CollectionEvent; if ((((_arg2 < 0)) || ((_arg2 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; _local3 = source[_arg2]; source[_arg2] = _arg1; stopTrackUpdates(_local3); startTrackUpdates(_arg1); if (_dispatchEvents == 0){ _local4 = hasEventListener(CollectionEvent.COLLECTION_CHANGE); _local5 = hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE); if (((_local4) || (_local5))){ _local6 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local6.kind = PropertyChangeEventKind.UPDATE; _local6.oldValue = _local3; _local6.newValue = _arg1; _local6.property = _arg2; }; if (_local4){ _local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local7.kind = CollectionEventKind.REPLACE; _local7.location = _arg2; _local7.items.push(_local6); dispatchEvent(_local7); }; if (_local5){ dispatchEvent(_local6); }; }; return (_local3); } protected function stopTrackUpdates(_arg1:Object):void{ if (((_arg1) && ((_arg1 is IEventDispatcher)))){ IEventDispatcher(_arg1).removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, itemUpdateHandler); }; } public function set source(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:CollectionEvent; if (((_source) && (_source.length))){ _local3 = _source.length; _local2 = 0; while (_local2 < _local3) { stopTrackUpdates(_source[_local2]); _local2++; }; }; _source = (_arg1) ? _arg1 : []; _local3 = _source.length; _local2 = 0; while (_local2 < _local3) { startTrackUpdates(_source[_local2]); _local2++; }; if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.RESET; dispatchEvent(_local4); }; } public function removeItem(_arg1:Object):Boolean{ var _local2:int; var _local3:Boolean; _local2 = getItemIndex(_arg1); _local3 = (_local2 >= 0); if (_local3){ removeItemAt(_local2); }; return (_local3); } public function getItemIndex(_arg1:Object):int{ return (ArrayUtil.getItemIndex(_arg1, source)); } public function writeExternal(_arg1:IDataOutput):void{ _arg1.writeObject(_source); } public function get uid():String{ return (_uid); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } public function removeItemAt(_arg1:int):Object{ var _local2:Object; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; _local2 = source.splice(_arg1, 1)[0]; stopTrackUpdates(_local2); internalDispatchEvent(CollectionEventKind.REMOVE, _local2, _arg1); return (_local2); } public function get length():int{ if (source){ return (source.length); }; return (0); } protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{ var _local2:PropertyChangeEvent; var _local3:uint; internalDispatchEvent(CollectionEventKind.UPDATE, _arg1); if ((((_dispatchEvents == 0)) && (hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)))){ _local2 = PropertyChangeEvent(_arg1.clone()); _local3 = getItemIndex(_arg1.target); _local2.property = ((_local3.toString() + ".") + _arg1.property); dispatchEvent(_local2); }; } override public function toString():String{ if (source){ return (source.toString()); }; return (getQualifiedClassName(this)); } private function enableEvents():void{ _dispatchEvents++; if (_dispatchEvents > 0){ _dispatchEvents = 0; }; } private static function loadResources():void{ resourceOutOfBounds = packageResources.getString("outOfBounds"); } loadResources(); } }//package mx.collections
Section 58
//CursorBookmark (mx.collections.CursorBookmark) package mx.collections { public class CursorBookmark { private var _value:Object; mx_internal static const VERSION:String = "2.0.1.0"; private static var _first:CursorBookmark; private static var _last:CursorBookmark; private static var _current:CursorBookmark; public function CursorBookmark(_arg1:Object){ _value = _arg1; } public function get value():Object{ return (_value); } public function getViewIndex():int{ return (-1); } public static function get LAST():CursorBookmark{ if (!_last){ _last = new CursorBookmark("${L}"); }; return (_last); } public static function get FIRST():CursorBookmark{ if (!_first){ _first = new CursorBookmark("${F}"); }; return (_first); } public static function get CURRENT():CursorBookmark{ if (!_current){ _current = new CursorBookmark("${C}"); }; return (_current); } } }//package mx.collections
Section 59
//ICollectionView (mx.collections.ICollectionView) package mx.collections { import flash.events.*; public interface ICollectionView extends IEventDispatcher { function refresh():Boolean; function set sort(_arg1:Sort):void; function get length():int; function set filterFunction(_arg1:Function):void; function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void; function get filterFunction():Function; function createCursor():IViewCursor; function disableAutoUpdate():void; function enableAutoUpdate():void; function get sort():Sort; function contains(_arg1:Object):Boolean; } }//package mx.collections
Section 60
//IList (mx.collections.IList) package mx.collections { import flash.events.*; public interface IList extends IEventDispatcher { function get length():int; function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void; function getItemIndex(_arg1:Object):int; function addItemAt(_arg1:Object, _arg2:int):void; function removeItemAt(_arg1:int):Object; function setItemAt(_arg1:Object, _arg2:int):Object; function addItem(_arg1:Object):void; function getItemAt(_arg1:int, _arg2:int=0):Object; function removeAll():void; function toArray():Array; } }//package mx.collections
Section 61
//ItemResponder (mx.collections.ItemResponder) package mx.collections { import mx.rpc.*; public class ItemResponder implements IResponder { private var _faultHandler:Function; private var _resultHandler:Function; private var _token:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function ItemResponder(_arg1:Function, _arg2:Function, _arg3:Object=null){ _resultHandler = _arg1; _faultHandler = _arg2; _token = _arg3; } public function fault(_arg1:Object):void{ _faultHandler(_arg1, _token); } public function result(_arg1:Object):void{ _resultHandler(_arg1, _token); } } }//package mx.collections
Section 62
//IViewCursor (mx.collections.IViewCursor) package mx.collections { import flash.events.*; public interface IViewCursor extends IEventDispatcher { function moveNext():Boolean; function get view():ICollectionView; function insert(_arg1:Object):void; function remove():Object; function get beforeFirst():Boolean; function get afterLast():Boolean; function findAny(_arg1:Object):Boolean; function movePrevious():Boolean; function get bookmark():CursorBookmark; function findFirst(_arg1:Object):Boolean; function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void; function get current():Object; function findLast(_arg1:Object):Boolean; } }//package mx.collections
Section 63
//ListCollectionView (mx.collections.ListCollectionView) package mx.collections { import mx.core.*; import mx.events.*; import flash.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import mx.collections.errors.*; import flash.system.*; public class ListCollectionView extends Proxy implements ICollectionView, IList, IMXMLObject { private var autoUpdateCounter:int; private var _list:IList; protected var localIndex:Array; private var _filterFunction:Function; private var pendingUpdates:Array; private var eventDispatcher:EventDispatcher; private var revision:int; private var _sort:Sort; mx_internal static const VERSION:String = "2.0.1.0"; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); private static var resourceInvalidIndex:String; private static var resourceBookmarkNotFound:String; private static var resourceOutOfBounds:String; private static var resourceUnknownProperty:String; private static var resourceIncorrectAddition:String; private static var resourceItemNotFound:String; public function ListCollectionView(_arg1:IList=null){ eventDispatcher = new EventDispatcher(this); this.list = _arg1; } public function set filterFunction(_arg1:Function):void{ _filterFunction = _arg1; dispatchEvent(new Event("filterFunctionChanged")); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ eventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } private function replaceItemsInView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{ var _local4:int; var _local5:Array; var _local6:Array; var _local7:int; var _local8:PropertyChangeEvent; var _local9:CollectionEvent; if (localIndex){ _local4 = _arg1.length; _local5 = []; _local6 = []; _local7 = 0; while (_local7 < _local4) { _local8 = _arg1[_local7]; _local5.push(_local8.oldValue); _local6.push(_local8.newValue); _local7++; }; removeItemsFromView(_local5, _arg2, _arg3); addItemsToView(_local6, _arg2, _arg3); } else { _local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local9.kind = CollectionEventKind.REPLACE; _local9.location = _arg2; _local9.items = _arg1; dispatchEvent(_local9); }; } public function willTrigger(_arg1:String):Boolean{ return (eventDispatcher.willTrigger(_arg1)); } private function handlePendingUpdates():void{ var _local1:Array; var _local2:CollectionEvent; var _local3:int; var _local4:CollectionEvent; var _local5:int; if (pendingUpdates){ _local1 = pendingUpdates; pendingUpdates = null; _local3 = 0; while (_local3 < _local1.length) { _local4 = _local1[_local3]; if (_local4.kind == CollectionEventKind.UPDATE){ if (!_local2){ _local2 = _local4; } else { _local5 = 0; while (_local5 < _local4.items.length) { _local2.items.push(_local4.items[_local5]); _local5++; }; }; } else { listChangeHandler(_local4); }; _local3++; }; if (_local2){ listChangeHandler(_local2); }; }; } mx_internal function findItem(_arg1:Object, _arg2:String, _arg3:Boolean=false):int{ if (!sort){ throw (new CollectionViewError(resourceItemNotFound)); }; if (localIndex.length == 0){ return ((_arg3) ? 0 : -1); }; return (sort.findItem(localIndex, _arg1, _arg2, _arg3)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ var index:int; var n:Number; var name = _arg1; if ((name is QName)){ name = name.localName; }; index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ return (false); }; return ((((index >= 0)) && ((index < length)))); } public function removeAll():void{ var _local1:int; var _local2:int; _local1 = length; if (_local1 > 0){ if (localIndex){ _local2 = (_local1 - 1); while (_local2 >= 0) { removeItemAt(_local2); _local2--; }; } else { list.removeAll(); }; }; } public function getItemAt(_arg1:int, _arg2:int=0):Object{ if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; if (localIndex){ return (localIndex[_arg1]); }; if (list){ return (list.getItemAt(_arg1, _arg2)); }; return (null); } private function moveItemInView(_arg1:Object, _arg2:Boolean=true, _arg3:Array=null):void{ var _local4:int; var _local5:int; var _local6:int; var _local7:CollectionEvent; if (localIndex){ _local4 = -1; _local5 = 0; while (_local5 < localIndex.length) { if (localIndex[_local5] == _arg1){ _local4 = _local5; break; }; _local5++; }; if (_local4 > -1){ localIndex.splice(_local4, 1); }; _local6 = addItemsToView([_arg1], -1, false); if (_arg2){ _local7 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local7.items.push(_arg1); if (((((_arg3) && ((_local6 == _local4)))) && ((_local6 > -1)))){ _arg3.push(_arg1); return; }; if ((((_local6 > -1)) && ((_local4 > -1)))){ _local7.kind = CollectionEventKind.MOVE; _local7.location = _local6; _local7.oldLocation = _local4; } else { if (_local6 > -1){ _local7.kind = CollectionEventKind.ADD; _local7.location = _local6; } else { if (_local4 > -1){ _local7.kind = CollectionEventKind.REMOVE; _local7.location = _local4; } else { _arg2 = false; }; }; }; if (_arg2){ dispatchEvent(_local7); }; }; }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return ((_arg1 - 1).toString()); } public function contains(_arg1:Object):Boolean{ return (!((getItemIndex(_arg1) == -1))); } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ list.itemUpdated(_arg1, _arg2, _arg3, _arg4); } private function removeItemsFromView(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{ var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:int; var _local9:CollectionEvent; _local4 = (localIndex) ? [] : _arg1; _local5 = _arg2; if (localIndex){ _local6 = 0; while (_local6 < _arg1.length) { _local7 = _arg1[_local6]; _local8 = getItemIndex(_local7); if (_local8 > -1){ localIndex.splice(_local8, 1); _local4.push(_local7); _local5 = _local8; }; _local6++; }; }; if (((_arg3) && ((_local4.length > 0)))){ _local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local9.kind = CollectionEventKind.REMOVE; _local9.location = (((!(localIndex)) || ((_local4.length == 1)))) ? _local5 : -1; _local9.items = _local4; dispatchEvent(_local9); }; } mx_internal function getBookmark(_arg1:int):ListCollectionViewBookmark{ var value:Object; var index = _arg1; if ((((index < 0)) || ((index > length)))){ throw (new CollectionViewError(StringUtil.substitute(resourceInvalidIndex, index))); }; try { value = getItemAt(index); } catch(e:Error) { value = null; }; return (new ListCollectionViewBookmark(value, this, revision, index)); } public function get sort():Sort{ return (_sort); } public function addItemAt(_arg1:Object, _arg2:int):void{ var _local3:int; if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 > length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; _local3 = _arg2; if (((localIndex) && (sort))){ _local3 = list.length; }; list.addItemAt(_arg1, _local3); } private function handlePropertyChangeEvents(_arg1:Array):void{ var _local2:Array; var _local3:Array; var _local4:Object; var _local5:int; var _local6:Array; var _local7:int; var _local8:PropertyChangeEvent; var _local9:Object; var _local10:Boolean; var _local11:int; var _local12:int; var _local13:CollectionEvent; _local2 = _arg1; if (((sort) || (!((filterFunction == null))))){ _local3 = []; _local5 = 0; while (_local5 < _arg1.length) { _local8 = _arg1[_local5]; if (_local8.target){ _local9 = _local8.target; _local10 = !((_local8.target == _local8.source)); } else { _local9 = _local8.source; _local10 = false; }; _local11 = 0; while (_local11 < _local3.length) { if (_local3[_local11].item == _local9){ break; }; _local11++; }; if (_local11 < _local3.length){ _local4 = _local3[_local11]; } else { _local4 = {item:_local9, move:_local10, event:_local8}; _local3.push(_local4); }; _local4.move = ((((((_local4.move) || (filterFunction))) || (!(_local8.property)))) || (((sort) && (sort.propertyAffectsSort(String(_local8.property)))))); _local5++; }; _local2 = []; _local5 = 0; while (_local5 < _local3.length) { _local4 = _local3[_local5]; if (_local4.move){ moveItemInView(_local4.item, _local4.item, _local2); } else { _local2.push(_local4.item); }; _local5++; }; _local6 = new Array(); _local7 = 0; while (_local7 < _local2.length) { _local12 = 0; while (_local12 < _local3.length) { if (_local2[_local7] == _local3[_local12].item){ _local6.push(_local3[_local12].event); }; _local12++; }; _local7++; }; _local2 = _local6; }; if (_local2.length > 0){ _local13 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local13.kind = CollectionEventKind.UPDATE; _local13.items = _local2; dispatchEvent(_local13); }; } public function get list():IList{ return (_list); } private function populateLocalIndex():void{ if (list){ localIndex = list.toArray(); } else { localIndex = []; }; } public function set sort(_arg1:Sort):void{ _sort = _arg1; dispatchEvent(new Event("sortChanged")); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){ return (getItemAt((_arg1 - 1))); } private function addItemsToView(_arg1:Array, _arg2:int, _arg3:Boolean=true):int{ var _local4:Array; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:CollectionEvent; _local4 = (localIndex) ? [] : _arg1; _local5 = _arg2; if (localIndex){ _local6 = _arg2; _local7 = 0; while (_local7 < _arg1.length) { _local8 = _arg1[_local7]; if ((((filterFunction == null)) || (filterFunction(_local8)))){ if (sort){ _local6 = findItem(_local8, Sort.ANY_INDEX_MODE, true); _local5 = _local6; }; if (((((sort) && (sort.unique))) && ((sort.compareFunction(_local8, localIndex[_local6]) == 0)))){ throw (new CollectionViewError(resourceIncorrectAddition)); }; var _temp1 = _local6; _local6 = (_local6 + 1); localIndex.splice(_temp1, 0, _local8); _local4.push(_local8); }; _local7++; }; }; if (((localIndex) && ((_local4.length > 1)))){ _local5 = -1; }; if (((_arg3) && ((_local4.length > 0)))){ _local9 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local9.kind = CollectionEventKind.ADD; _local9.location = _local5; _local9.items = _local4; dispatchEvent(_local9); }; return (_local5); } public function dispatchEvent(_arg1:Event):Boolean{ return (eventDispatcher.dispatchEvent(_arg1)); } public function getItemIndex(_arg1:Object):int{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; if (sort){ _local3 = sort.findItem(localIndex, _arg1, Sort.FIRST_INDEX_MODE); if (_local3 == -1){ return (-1); }; _local4 = sort.findItem(localIndex, _arg1, Sort.LAST_INDEX_MODE); _local2 = _local3; while (_local2 <= _local4) { if (localIndex[_local2] == _arg1){ return (_local2); }; _local2++; }; return (-1); } else { if (filterFunction != null){ _local5 = localIndex.length; _local2 = 0; while (_local2 < _local5) { if (localIndex[_local2] == _arg1){ return (_local2); }; _local2++; }; return (-1); }; }; return (list.getItemIndex(_arg1)); } public function enableAutoUpdate():void{ if (autoUpdateCounter > 0){ autoUpdateCounter--; if (autoUpdateCounter == 0){ handlePendingUpdates(); }; }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var index:int; var n:Number; var name = _arg1; if ((name is QName)){ name = name.localName; }; index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ throw (new Error(StringUtil.substitute(resourceUnknownProperty, name))); }; return (getItemAt(index)); } mx_internal function getBookmarkIndex(_arg1:CursorBookmark):int{ var _local2:ListCollectionViewBookmark; if (((!((_arg1 is ListCollectionViewBookmark))) || (!((ListCollectionViewBookmark(_arg1).view == this))))){ throw (new CollectionViewError(resourceBookmarkNotFound)); }; _local2 = ListCollectionViewBookmark(_arg1); if (_local2.viewRevision != revision){ if ((((((_local2.index < 0)) || ((_local2.index >= length)))) || (!((getItemAt(_local2.index) == _local2.value))))){ _local2.index = getItemIndex(_local2.value); }; _local2.viewRevision = revision; }; return (_local2.index); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function removeItemAt(_arg1:int):Object{ var _local2:int; var _local3:Object; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; _local2 = _arg1; if (localIndex){ _local3 = localIndex[_arg1]; _local2 = list.getItemIndex(_local3); }; return (list.removeItemAt(_local2)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){ return (null); } public function initialized(_arg1:Object, _arg2:String):void{ refresh(); } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local3:int; var _local4:Object; if ((((((_arg2 < 0)) || (!(list)))) || ((_arg2 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; _local3 = _arg2; if (localIndex){ if (_arg2 > localIndex.length){ _local3 = list.length; } else { _local4 = localIndex[_arg2]; _local3 = list.getItemIndex(_local4); }; }; return (list.setItemAt(_arg1, _local3)); } mx_internal function reset():void{ var _local1:CollectionEvent; internalRefresh(false); _local1 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local1.kind = CollectionEventKind.RESET; dispatchEvent(_local1); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var index:int; var n:Number; var name = _arg1; var value = _arg2; if ((name is QName)){ name = name.localName; }; index = -1; try { n = parseInt(String(name)); if (!isNaN(n)){ index = int(n); }; } catch(e:Error) { }; if (index == -1){ throw (new Error(StringUtil.substitute(resourceUnknownProperty, name))); }; setItemAt(value, index); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1 < length)) ? (_arg1 + 1) : 0); } public function set list(_arg1:IList):void{ var _local2:Boolean; var _local3:Boolean; if (_list != _arg1){ if (_list){ _list.removeEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler); _local2 = (_list.length > 0); }; _list = _arg1; if (_list){ _list.addEventListener(CollectionEvent.COLLECTION_CHANGE, listChangeHandler, false, 0, true); _local3 = (_list.length > 0); }; if (((_local2) || (_local3))){ reset(); }; dispatchEvent(new Event("listChanged")); }; } public function toArray():Array{ var _local1:Array; if (localIndex){ _local1 = localIndex.concat(); } else { _local1 = list.toArray(); }; return (_local1); } private function internalRefresh(_arg1:Boolean):Boolean{ var tmp:Array; var len:int; var i:int; var item:Object; var refreshEvent:CollectionEvent; var dispatch = _arg1; if (((sort) || (!((filterFunction == null))))){ try { populateLocalIndex(); } catch(pending:ItemPendingError) { pending.addResponder(new ItemResponder(function (_arg1:Object, _arg2:Object=null):void{ internalRefresh(dispatch); }, function (_arg1:Object, _arg2:Object=null):void{ })); return (false); }; if (filterFunction != null){ tmp = []; len = localIndex.length; i = 0; while (i < len) { item = localIndex[i]; if (filterFunction(item)){ tmp.push(item); }; i = (i + 1); }; localIndex = tmp; }; if (sort){ sort.sort(localIndex); dispatch = true; }; } else { if (localIndex){ localIndex = null; }; }; revision++; pendingUpdates = null; if (dispatch){ refreshEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); refreshEvent.kind = CollectionEventKind.REFRESH; dispatchEvent(refreshEvent); }; return (true); } public function disableAutoUpdate():void{ autoUpdateCounter++; } public function refresh():Boolean{ return (internalRefresh(true)); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } public function get filterFunction():Function{ return (_filterFunction); } public function createCursor():IViewCursor{ return (new ListCollectionViewCursor(this)); } public function hasEventListener(_arg1:String):Boolean{ return (eventDispatcher.hasEventListener(_arg1)); } public function get length():int{ if (localIndex){ return (localIndex.length); }; if (list){ return (list.length); }; return (0); } public function toString():String{ if (localIndex){ return (ObjectUtil.toString(localIndex)); }; if (((list) && (Object(list).toString))){ return (Object(list).toString()); }; return (getQualifiedClassName(this)); } private function listChangeHandler(_arg1:CollectionEvent):void{ if (autoUpdateCounter > 0){ if (!pendingUpdates){ pendingUpdates = []; }; pendingUpdates.push(_arg1); } else { switch (_arg1.kind){ case CollectionEventKind.ADD: addItemsToView(_arg1.items, _arg1.location); break; case CollectionEventKind.RESET: reset(); break; case CollectionEventKind.REMOVE: removeItemsFromView(_arg1.items, _arg1.location); break; case CollectionEventKind.REPLACE: replaceItemsInView(_arg1.items, _arg1.location); break; case CollectionEventKind.UPDATE: handlePropertyChangeEvents(_arg1.items); break; default: dispatchEvent(_arg1); }; }; } private static function loadResources():void{ resourceOutOfBounds = packageResources.getString("outOfBounds"); resourceInvalidIndex = packageResources.getString("invalidIndex"); resourceUnknownProperty = packageResources.getString("unknownProperty"); resourceIncorrectAddition = packageResources.getString("incorrectAddition"); resourceItemNotFound = packageResources.getString("itemNotFound"); resourceBookmarkNotFound = packageResources.getString("bookmarkNotFound"); } loadResources(); } }//package mx.collections import mx.events.*; import flash.events.*; import mx.resources.*; import mx.collections.errors.*; import flash.system.*; class ListCollectionViewBookmark extends CursorBookmark { mx_internal var viewRevision:int; mx_internal var view:ListCollectionView; mx_internal var index:int; private function ListCollectionViewBookmark(_arg1:Object, _arg2:ListCollectionView, _arg3:int, _arg4:int){ super(_arg1); this.view = _arg2; this.viewRevision = _arg3; this.index = _arg4; } override public function getViewIndex():int{ return (view.getBookmarkIndex(this)); } } class ListCollectionViewCursor extends EventDispatcher implements IViewCursor { private var _view:ListCollectionView; private var currentValue:Object; private var currentIndex:int; private var invalid:Boolean; private static const BEFORE_FIRST_INDEX:int = -1; private static const AFTER_LAST_INDEX:int = -2; private static var resourceInvalidInsert:String; private static var resourceInvalidRemove:String; private static var resourceInvalidBookmark:String; private static var resourceBookmarkInvalid:String; private static var resourceInvalidCursor:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); private function ListCollectionViewCursor(_arg1:ListCollectionView){ var view = _arg1; super(); _view = view; _view.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionEventHandler, false, 0, true); currentIndex = ((view.length > 0)) ? 0 : AFTER_LAST_INDEX; if (currentIndex == 0){ try { setCurrent(view.getItemAt(0), false); } catch(e:ItemPendingError) { currentIndex = BEFORE_FIRST_INDEX; setCurrent(null, false); }; }; } public function movePrevious():Boolean{ var _local1:int; if (beforeFirst){ return (false); }; _local1 = (afterLast) ? (view.length - 1) : (currentIndex - 1); if (_local1 == -1){ _local1 = BEFORE_FIRST_INDEX; setCurrent(null); } else { setCurrent(ListCollectionView(view).getItemAt(_local1)); }; currentIndex = _local1; return (!(beforeFirst)); } public function get beforeFirst():Boolean{ checkValid(); return ((((currentIndex == BEFORE_FIRST_INDEX)) || ((view.length == 0)))); } public function remove():Object{ var oldIndex:int; var removed:Object; if (((beforeFirst) || (afterLast))){ throw (new CursorError(resourceInvalidRemove)); }; oldIndex = currentIndex; currentIndex++; if (currentIndex >= view.length){ currentIndex = AFTER_LAST_INDEX; setCurrent(null); } else { try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(e:ItemPendingError) { setCurrent(null, false); ListCollectionView(view).removeItemAt(oldIndex); throw (e); }; }; removed = ListCollectionView(view).removeItemAt(oldIndex); return (removed); } private function collectionEventHandler(_arg1:CollectionEvent):void{ var event = _arg1; switch (event.kind){ case CollectionEventKind.ADD: if (event.location <= currentIndex){ currentIndex = (currentIndex + event.items.length); }; break; case CollectionEventKind.REMOVE: if (event.location < currentIndex){ currentIndex = (currentIndex - event.items.length); } else { if (event.location == currentIndex){ if (currentIndex < view.length){ try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(error:ItemPendingError) { setCurrent(null, false); }; } else { currentIndex = AFTER_LAST_INDEX; setCurrent(null); }; }; }; break; case CollectionEventKind.MOVE: if (event.oldLocation == currentIndex){ currentIndex = event.location; } else { if (event.oldLocation < currentIndex){ currentIndex = (currentIndex - event.items.length); }; if (event.location <= currentIndex){ currentIndex = (currentIndex + event.items.length); }; }; break; case CollectionEventKind.REFRESH: if (!((beforeFirst) || (afterLast))){ currentIndex = ListCollectionView(view).getItemIndex(currentValue); if (currentIndex == -1){ setCurrent(null); }; }; break; case CollectionEventKind.REPLACE: if (event.location == currentIndex){ try { setCurrent(ListCollectionView(view).getItemAt(currentIndex)); } catch(error:ItemPendingError) { setCurrent(null, false); }; }; break; case CollectionEventKind.RESET: currentIndex = BEFORE_FIRST_INDEX; setCurrent(null); break; }; } public function get current():Object{ checkValid(); return (currentValue); } public function get afterLast():Boolean{ checkValid(); return ((((currentIndex == AFTER_LAST_INDEX)) || ((view.length == 0)))); } public function findFirst(_arg1:Object):Boolean{ var lcView:ListCollectionView; var index:int; var values = _arg1; checkValid(); lcView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.FIRST_INDEX_MODE); } catch(sortError:SortError) { throw (new CursorError(sortError.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } public function get view():ICollectionView{ checkValid(); return (_view); } private function setCurrent(_arg1:Object, _arg2:Boolean=true):void{ currentValue = _arg1; if (_arg2){ dispatchEvent(new FlexEvent(FlexEvent.CURSOR_UPDATE)); }; } public function insert(_arg1:Object):void{ var _local2:int; if (afterLast){ _local2 = view.length; } else { if (beforeFirst){ if (view.length > 0){ throw (new CursorError(resourceInvalidInsert)); }; _local2 = 0; } else { _local2 = currentIndex; }; }; ListCollectionView(view).addItemAt(_arg1, _local2); } public function get bookmark():CursorBookmark{ checkValid(); if ((((view.length == 0)) || (beforeFirst))){ return (CursorBookmark.FIRST); }; if (afterLast){ return (CursorBookmark.LAST); }; return (ListCollectionView(view).getBookmark(currentIndex)); } private function checkValid():void{ if (invalid){ throw (new CursorError(resourceInvalidCursor)); }; } public function moveNext():Boolean{ var _local1:int; if (afterLast){ return (false); }; _local1 = (beforeFirst) ? 0 : (currentIndex + 1); if (_local1 >= view.length){ _local1 = AFTER_LAST_INDEX; setCurrent(null); } else { setCurrent(ListCollectionView(view).getItemAt(_local1)); }; currentIndex = _local1; return (!(afterLast)); } public function findLast(_arg1:Object):Boolean{ var lcView:ListCollectionView; var index:int; var values = _arg1; checkValid(); lcView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.LAST_INDEX_MODE); } catch(sortError:SortError) { throw (new CursorError(sortError.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } public function seek(_arg1:CursorBookmark, _arg2:int=0, _arg3:int=0):void{ var newIndex:int; var newCurrent:Object; var bookmark = _arg1; var offset = _arg2; var prefetch = _arg3; checkValid(); if (view.length == 0){ currentIndex = AFTER_LAST_INDEX; setCurrent(null, false); return; }; newIndex = currentIndex; if (bookmark == CursorBookmark.FIRST){ newIndex = 0; } else { if (bookmark == CursorBookmark.LAST){ newIndex = (view.length - 1); } else { if (bookmark != CursorBookmark.CURRENT){ try { newIndex = ListCollectionView(view).getBookmarkIndex(bookmark); if (newIndex < 0){ setCurrent(null); throw (new CursorError(resourceBookmarkInvalid)); }; } catch(bmError:CollectionViewError) { throw (new CursorError(resourceInvalidBookmark)); }; }; }; }; newIndex = (newIndex + offset); newCurrent = null; if (newIndex >= view.length){ currentIndex = AFTER_LAST_INDEX; } else { if (newIndex < 0){ currentIndex = BEFORE_FIRST_INDEX; } else { newCurrent = ListCollectionView(view).getItemAt(newIndex, prefetch); currentIndex = newIndex; }; }; setCurrent(newCurrent); } public function findAny(_arg1:Object):Boolean{ var lcView:ListCollectionView; var index:int; var values = _arg1; checkValid(); lcView = ListCollectionView(view); try { index = lcView.findItem(values, Sort.ANY_INDEX_MODE); } catch(e:SortError) { throw (new CursorError(e.message)); }; if (index > -1){ currentIndex = index; setCurrent(lcView.getItemAt(currentIndex)); }; return ((index > -1)); } private static function loadResources():void{ resourceInvalidInsert = packageResources.getString("invalidInsert"); resourceInvalidRemove = packageResources.getString("invalidRemove"); resourceBookmarkInvalid = packageResources.getString("bookmarkInvalid"); resourceInvalidBookmark = packageResources.getString("invalidBookmark"); resourceInvalidCursor = packageResources.getString("invalidCursor"); } loadResources(); }
Section 64
//Sort (mx.collections.Sort) package mx.collections { import flash.events.*; import mx.resources.*; import mx.utils.*; import mx.collections.errors.*; import flash.system.*; public class Sort extends EventDispatcher { private var usingCustomCompareFunction:Boolean; private var _fields:Array; private var _compareFunction:Function; private var noFieldsDescending:Boolean;// = false private var defaultEmptyField:SortField; private var fieldList:Array; private var _unique:Boolean; public static const ANY_INDEX_MODE:String = "any"; public static const FIRST_INDEX_MODE:String = "first"; mx_internal static const VERSION:String = "2.0.1.0"; public static const LAST_INDEX_MODE:String = "last"; private static var resourceNoComparator:String; private static var resourceFindRestriction:String; private static var resourceNoItems:String; private static var resourceFindCondition:String; private static var resourceUnknownMode:String; private static var resourceNonUnique:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); public function Sort(){ fieldList = []; noFieldsDescending = false; super(); } public function findItem(_arg1:Array, _arg2:Object, _arg3:String, _arg4:Boolean=false, _arg5:Function=null):int{ var compareForFind:Function; var fieldsForCompare:Array; var found:Boolean; var objFound:Boolean; var index:int; var lowerBound:int; var upperBound:int; var obj:Object; var direction:int; var fieldName:String; var hadPreviousFieldName:Boolean; var i:int; var hasFieldName:Boolean; var objIndex:int; var match:Boolean; var prevCompare:int; var nextCompare:int; var items = _arg1; var values = _arg2; var mode = _arg3; var returnInsertionIndex = _arg4; var compareFunction = _arg5; if (!items){ throw (new SortError(resourceNoItems)); }; if (items.length == 0){ return ((returnInsertionIndex) ? 1 : -1); }; if (compareFunction == null){ compareForFind = this.compareFunction; if (((values) && ((fieldList.length > 0)))){ fieldsForCompare = []; hadPreviousFieldName = true; i = 0; while (i < fieldList.length) { fieldName = fieldList[i]; if (fieldName){ try { hasFieldName = !((values[fieldName] === undefined)); } catch(e:Error) { hasFieldName = false; }; if (hasFieldName){ if (!hadPreviousFieldName){ throw (new SortError(StringUtil.substitute(resourceFindCondition, fieldName))); }; fieldsForCompare.push(fieldName); } else { hadPreviousFieldName = false; }; } else { fieldsForCompare.push(null); }; i = (i + 1); }; if (fieldsForCompare.length == 0){ throw (new SortError(resourceFindRestriction)); }; try { initSortFields(items[0]); } catch(initSortError:SortError) { }; }; } else { compareForFind = compareFunction; }; found = false; objFound = false; index = 0; lowerBound = 0; upperBound = (items.length - 1); obj = null; direction = 1; while (((!(objFound)) && ((lowerBound <= upperBound)))) { index = Math.round(((lowerBound + upperBound) / 2)); obj = items[index]; direction = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); switch (direction){ case -1: upperBound = (index - 1); break; case 0: objFound = true; switch (mode){ case ANY_INDEX_MODE: found = true; break; case FIRST_INDEX_MODE: found = (index == lowerBound); objIndex = (index - 1); match = true; while (((((match) && (!(found)))) && ((objIndex >= lowerBound)))) { obj = items[objIndex]; prevCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); match = (prevCompare == 0); if (((!(match)) || (((match) && ((objIndex == lowerBound)))))){ found = true; index = (objIndex + (match) ? 0 : 1); }; objIndex = (objIndex - 1); }; break; case LAST_INDEX_MODE: found = (index == upperBound); objIndex = (index + 1); match = true; while (((((match) && (!(found)))) && ((objIndex <= upperBound)))) { obj = items[objIndex]; nextCompare = (fieldsForCompare) ? compareForFind(values, obj, fieldsForCompare) : compareForFind(values, obj); match = (nextCompare == 0); if (((!(match)) || (((match) && ((objIndex == upperBound)))))){ found = true; index = (objIndex - (match) ? 0 : 1); }; objIndex = (objIndex + 1); }; break; default: throw (new SortError(resourceUnknownMode)); }; break; case 1: lowerBound = (index + 1); break; }; }; if (((!(found)) && (!(returnInsertionIndex)))){ return (-1); }; return (((direction)>0) ? (index + 1) : index); } public function get compareFunction():Function{ return ((usingCustomCompareFunction) ? _compareFunction : internalCompare); } public function set unique(_arg1:Boolean):void{ _unique = _arg1; } public function sort(_arg1:Array):void{ var fixedCompareFunction:Function; var uniqueRet1:Object; var fields:Array; var i:int; var sortArgs:Object; var uniqueRet2:Object; var items = _arg1; if (((!(items)) || ((items.length <= 1)))){ return; }; if (usingCustomCompareFunction){ fixedCompareFunction = function (_arg1:Object, _arg2:Object):int{ return (compareFunction(_arg1, _arg2, _fields)); }; if (unique){ uniqueRet1 = items.sort(fixedCompareFunction, Array.UNIQUESORT); if (uniqueRet1 == 0){ throw (new SortError(resourceNonUnique)); }; } else { items.sort(fixedCompareFunction); }; } else { fields = this.fields; if (((fields) && ((fields.length > 0)))){ sortArgs = initSortFields(items[0], true); if (unique){ if (((sortArgs) && ((fields.length == 1)))){ uniqueRet2 = items.sortOn(sortArgs.fields[0], (sortArgs.options[0] | Array.UNIQUESORT)); } else { uniqueRet2 = items.sort(internalCompare, Array.UNIQUESORT); }; if (uniqueRet2 == 0){ throw (new SortError(resourceNonUnique)); }; } else { if (sortArgs){ items.sortOn(sortArgs.fields, sortArgs.options); } else { items.sort(internalCompare); }; }; } else { items.sort(internalCompare); }; }; } public function propertyAffectsSort(_arg1:String):Boolean{ var _local2:int; var _local3:SortField; if (((usingCustomCompareFunction) || (!(fields)))){ return (true); }; _local2 = 0; while (_local2 < fields.length) { _local3 = fields[_local2]; if ((((_local3.name == _arg1)) || (_local3.usingCustomCompareFunction))){ return (true); }; _local2++; }; return (false); } private function internalCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{ var _local4:int; var _local5:int; var _local6:int; var _local7:SortField; _local4 = 0; if (!_fields){ _local4 = noFieldsCompare(_arg1, _arg2); } else { _local5 = 0; _local6 = (_arg3) ? _arg3.length : _fields.length; while ((((_local4 == 0)) && ((_local5 < _local6)))) { _local7 = SortField(_fields[_local5]); _local4 = _local7.internalCompare(_arg1, _arg2); _local5++; }; }; return (_local4); } public function get unique():Boolean{ return (_unique); } private function noFieldsCompare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{ var result:int; var a = _arg1; var b = _arg2; var fields = _arg3; if (!defaultEmptyField){ defaultEmptyField = new SortField(); try { defaultEmptyField.initCompare(a); } catch(e:SortError) { throw (new SortError(StringUtil.substitute(resourceNoComparator, a))); }; }; result = defaultEmptyField.compareFunction(a, b); if (noFieldsDescending){ result = (result * -1); }; return (result); } override public function toString():String{ return (ObjectUtil.toString(this)); } private function initSortFields(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:Object; var _local4:int; var _local5:SortField; var _local6:int; _local3 = null; _local4 = 0; while (_local4 < fields.length) { SortField(fields[_local4]).initCompare(_arg1); _local4++; }; if (_arg2){ _local3 = {fields:[], options:[]}; _local4 = 0; while (_local4 < fields.length) { _local5 = fields[_local4]; _local6 = _local5.getArraySortOnOptions(); if (_local6 == -1){ return (null); }; _local3.fields.push(_local5.name); _local3.options.push(_local6); _local4++; }; }; return (_local3); } public function reverse():void{ var _local1:int; if (fields){ _local1 = 0; while (_local1 < fields.length) { SortField(fields[_local1]).reverse(); _local1++; }; }; noFieldsDescending = !(noFieldsDescending); } public function set fields(_arg1:Array):void{ var _local2:SortField; var _local3:int; _fields = _arg1; fieldList = []; if (_fields){ _local3 = 0; while (_local3 < _fields.length) { _local2 = SortField(_fields[_local3]); fieldList.push(_local2.name); _local3++; }; }; dispatchEvent(new Event("fieldsChanged")); } public function get fields():Array{ return (_fields); } public function set compareFunction(_arg1:Function):void{ _compareFunction = _arg1; usingCustomCompareFunction = !((_compareFunction == null)); } private static function loadResources():void{ resourceNoItems = packageResources.getString("noItems"); resourceFindCondition = packageResources.getString("findCondition"); resourceFindRestriction = packageResources.getString("findRestriction"); resourceUnknownMode = packageResources.getString("unknownMode"); resourceNonUnique = packageResources.getString("nonUnique"); resourceNoComparator = packageResources.getString("noComparator"); } loadResources(); } }//package mx.collections
Section 65
//SortField (mx.collections.SortField) package mx.collections { import flash.events.*; import mx.resources.*; import mx.utils.*; import mx.collections.errors.*; import flash.system.*; public class SortField extends EventDispatcher { private var _caseInsensitive:Boolean; private var _compareFunction:Function; private var _numeric:Boolean; private var _descending:Boolean; private var _usingCustomCompareFunction:Boolean; private var _name:String; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceNoComparatorSortField:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); public function SortField(_arg1:String=null, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false){ _name = _arg1; _caseInsensitive = _arg2; _descending = _arg3; _numeric = _arg4; _compareFunction = stringCompare; } public function get caseInsensitive():Boolean{ return (_caseInsensitive); } public function set caseInsensitive(_arg1:Boolean):void{ if (_arg1 != _caseInsensitive){ _caseInsensitive = _arg1; dispatchEvent(new Event("caseInsensitiveChanged")); }; } public function get name():String{ return (_name); } public function set name(_arg1:String):void{ _name = _arg1; dispatchEvent(new Event("nameChanged")); } mx_internal function get usingCustomCompareFunction():Boolean{ return (_usingCustomCompareFunction); } private function numericCompare(_arg1:Object, _arg2:Object):int{ var fa:Number; var fb:Number; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? Number(a) : Number(a[_name]); } catch(error:Error) { }; try { fb = ((_name == null)) ? Number(b) : Number(b[_name]); } catch(error:Error) { }; return (ObjectUtil.numericCompare(fa, fb)); } public function set numeric(_arg1:Boolean):void{ if (_numeric != _arg1){ _numeric = _arg1; dispatchEvent(new Event("numericChanged")); }; } private function stringCompare(_arg1:Object, _arg2:Object):int{ var fa:String; var fb:String; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? String(a) : String(a[_name]); } catch(error:Error) { }; try { fb = ((_name == null)) ? String(b) : String(b[_name]); } catch(error:Error) { }; return (ObjectUtil.stringCompare(fa, fb, _caseInsensitive)); } public function get compareFunction():Function{ return (_compareFunction); } public function get numeric():Boolean{ return (_numeric); } mx_internal function internalCompare(_arg1:Object, _arg2:Object):int{ var _local3:int; _local3 = compareFunction(_arg1, _arg2); if (descending){ _local3 = (_local3 * -1); }; return (_local3); } public function reverse():void{ descending = !(descending); } override public function toString():String{ return (ObjectUtil.toString(this)); } mx_internal function getArraySortOnOptions():int{ var _local1:int; if (((((((usingCustomCompareFunction) || ((name == null)))) || ((_compareFunction == xmlCompare)))) || ((_compareFunction == dateCompare)))){ return (-1); }; _local1 = 0; if (caseInsensitive){ _local1 = (_local1 | Array.CASEINSENSITIVE); }; if (descending){ _local1 = (_local1 | Array.DESCENDING); }; if (((numeric) || ((_compareFunction == numericCompare)))){ _local1 = (_local1 | Array.NUMERIC); }; return (_local1); } private function dateCompare(_arg1:Object, _arg2:Object):int{ var fa:Date; var fb:Date; var a = _arg1; var b = _arg2; try { fa = ((_name == null)) ? (a as Date) : (a[_name] as Date); } catch(error:Error) { }; try { fb = ((_name == null)) ? (b as Date) : (b[_name] as Date); } catch(error:Error) { }; return (ObjectUtil.dateCompare(fa, fb)); } public function set descending(_arg1:Boolean):void{ if (_descending != _arg1){ _descending = _arg1; dispatchEvent(new Event("descendingChanged")); }; } private function xmlCompare(_arg1:Object, _arg2:Object):int{ var sa:String; var sb:String; var a = _arg1; var b = _arg2; try { sa = ((_name == null)) ? a.toString() : a[_name].toString(); } catch(error:Error) { }; try { sb = ((_name == null)) ? b.toString() : b[_name].toString(); } catch(error:Error) { }; if (numeric){ return (ObjectUtil.numericCompare(parseFloat(sa), parseFloat(sb))); }; return (ObjectUtil.stringCompare(sa, sb, _caseInsensitive)); } mx_internal function initCompare(_arg1:Object):void{ var value:Object; var typ:String; var test:String; var obj = _arg1; if (!usingCustomCompareFunction){ if (numeric){ _compareFunction = numericCompare; } else { if (caseInsensitive){ _compareFunction = stringCompare; } else { if (_name){ try { value = obj[_name]; } catch(error:Error) { }; }; if (value == null){ value = obj; }; typ = typeof(value); switch (typ){ case "string": _compareFunction = stringCompare; break; case "object": if ((value is Date)){ _compareFunction = dateCompare; } else { _compareFunction = stringCompare; try { test = value.toString(); } catch(error2:Error) { }; if (((!(test)) || ((test == "[object Object]")))){ _compareFunction = nullCompare; }; }; break; case "xml": _compareFunction = xmlCompare; break; case "boolean": case "number": _compareFunction = numericCompare; break; }; }; }; }; } private function nullCompare(_arg1:Object, _arg2:Object):int{ var value:Object; var left:Object; var right:Object; var found:Boolean; var typeLeft:String; var typeRight:String; var a = _arg1; var b = _arg2; found = false; if ((((a == null)) && ((b == null)))){ return (0); }; if (_name){ try { left = a[_name]; } catch(error:Error) { }; try { right = b[_name]; } catch(error:Error) { }; }; if ((((left == null)) && ((right == null)))){ return (0); }; if (left == null){ left = a; }; if (right == null){ right = b; }; typeLeft = typeof(left); typeRight = typeof(right); if ((((typeLeft == "string")) || ((typeRight == "string")))){ found = true; _compareFunction = stringCompare; } else { if ((((typeLeft == "object")) || ((typeRight == "object")))){ if ((((typeLeft is Date)) || ((typeRight is Date)))){ found = true; _compareFunction = dateCompare; }; } else { if ((((typeLeft == "xml")) || ((typeRight == "xml")))){ found = true; _compareFunction = xmlCompare; } else { if ((((((((typeLeft == "number")) || ((typeRight == "number")))) || ((typeLeft == "boolean")))) || ((typeRight == "boolean")))){ found = true; _compareFunction = numericCompare; }; }; }; }; if (found){ return (_compareFunction(left, right)); }; throw (new SortError(StringUtil.substitute(resourceNoComparatorSortField, name))); } public function get descending():Boolean{ return (_descending); } public function set compareFunction(_arg1:Function):void{ _compareFunction = _arg1; _usingCustomCompareFunction = !((_arg1 == null)); } private static function loadResources():void{ resourceNoComparatorSortField = packageResources.getString("noComparatorSortField"); } loadResources(); } }//package mx.collections
Section 66
//XMLListAdapter (mx.collections.XMLListAdapter) package mx.collections { import mx.events.*; import flash.events.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import flash.system.*; public class XMLListAdapter extends EventDispatcher implements IList, IXMLNotifiable { private var _dispatchEvents:int;// = 0 private var _source:XMLList; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceInvalidType:String; private static var resourceOutOfBounds:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("collections", ApplicationDomain.currentDomain); public function XMLListAdapter(_arg1:XMLList=null){ _dispatchEvents = 0; super(); disableEvents(); this.source = _arg1; enableEvents(); } protected function startTrackUpdates(_arg1:Object):void{ XMLNotifier.getInstance().watchXML(_arg1, this); } public function getItemIndex(_arg1:Object):int{ var _local2:int; var _local3:int; var _local4:Object; if ((((_arg1 is XML)) && (source.contains(XML(_arg1))))){ _local2 = length; _local3 = 0; while (_local3 < _local2) { _local4 = source[_local3]; if (_local4 === _arg1){ return (_local3); }; _local3++; }; }; return (-1); } public function addItem(_arg1:Object):void{ addItemAt(_arg1, length); } public function removeItemAt(_arg1:int):Object{ var _local2:Object; var _local3:CollectionEvent; if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; _local2 = source[_arg1]; delete source[_arg1]; stopTrackUpdates(_local2); if (_dispatchEvents == 0){ _local3 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local3.kind = CollectionEventKind.REMOVE; _local3.location = _arg1; _local3.items.push(_local2); dispatchEvent(_local3); }; return (_local2); } public function get source():XMLList{ return (_source); } public function toArray():Array{ var _local1:XMLList; var _local2:int; var _local3:Array; var _local4:int; _local1 = source; _local2 = _local1.length(); _local3 = []; _local4 = 0; while (_local4 < _local2) { _local3[_local4] = _local1[_local4]; _local4++; }; return (_local3); } public function get length():int{ return (source.length()); } public function itemUpdated(_arg1:Object, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ var _local5:PropertyChangeEvent; _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.source = _arg1; _local5.property = _arg2; _local5.oldValue = _arg3; _local5.newValue = _arg4; itemUpdateHandler(_local5); } public function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{ var _local6:String; var _local7:Object; var _local8:Object; if (_arg1 == _arg3){ switch (_arg2){ case "attributeAdded": _local6 = ("@" + String(_arg4)); _local8 = _arg5; break; case "attributeChanged": _local6 = ("@" + String(_arg4)); _local7 = _arg5; _local8 = _arg3[_local6]; break; case "attributeRemoved": _local6 = ("@" + String(_arg4)); _local7 = _arg5; break; case "nodeAdded": _local6 = _arg4.localName(); _local8 = _arg4; break; case "nodeChanged": _local6 = _arg4.localName(); _local7 = _arg5; _local8 = _arg4; break; case "nodeRemoved": _local6 = _arg4.localName(); _local7 = _arg4; break; case "textSet": _local6 = String(_arg4); _local8 = String(_arg3[_local6]); _local7 = _arg5; break; default: break; }; }; itemUpdated(_arg1, _local6, _local7, _local8); } public function getItemAt(_arg1:int, _arg2:int=0):Object{ if ((((_arg1 < 0)) || ((_arg1 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg1))); }; return (source[_arg1]); } override public function toString():String{ if (source){ return (source.toString()); }; return (getQualifiedClassName(this)); } public function addItemAt(_arg1:Object, _arg2:int):void{ var _local3:CollectionEvent; if ((((_arg2 < 0)) || ((_arg2 > length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; if (((!((_arg1 is XML))) && (!((((_arg1 is XMLList)) && ((_arg1.length() == 1))))))){ throw (new Error(resourceInvalidType)); }; if (_arg2 == 0){ source[0] = ((length > 0)) ? (_arg1 + source[0]) : _arg1; } else { source[(_arg2 - 1)] = (source[(_arg2 - 1)] + _arg1); }; startTrackUpdates(_arg1); if (_dispatchEvents == 0){ _local3 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local3.kind = CollectionEventKind.ADD; _local3.items.push(_arg1); _local3.location = _arg2; dispatchEvent(_local3); }; } protected function disableEvents():void{ _dispatchEvents--; } protected function itemUpdateHandler(_arg1:PropertyChangeEvent):void{ var _local2:CollectionEvent; if (_dispatchEvents == 0){ _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.UPDATE; _local2.items.push(_arg1); dispatchEvent(_local2); }; } public function set source(_arg1:XMLList):void{ var _local2:int; var _local3:int; var _local4:CollectionEvent; if (((_source) && (_source.length()))){ _local3 = _source.length(); _local2 = 0; while (_local2 < _local3) { stopTrackUpdates(_source[_local2]); _local2++; }; }; _source = (_arg1) ? _arg1 : XMLList(new XMLList("")); _local3 = _source.length(); _local2 = 0; while (_local2 < _local3) { startTrackUpdates(_source[_local2]); _local2++; }; if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.RESET; dispatchEvent(_local4); }; } public function setItemAt(_arg1:Object, _arg2:int):Object{ var _local3:Object; var _local4:CollectionEvent; var _local5:PropertyChangeEvent; if ((((_arg2 < 0)) || ((_arg2 >= length)))){ throw (new RangeError(StringUtil.substitute(resourceOutOfBounds, _arg2))); }; _local3 = source[_arg2]; source[_arg2] = _arg1; stopTrackUpdates(_local3); startTrackUpdates(_arg1); if (_dispatchEvents == 0){ _local4 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local4.kind = CollectionEventKind.REPLACE; _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.oldValue = _local3; _local5.newValue = _arg1; _local4.location = _arg2; _local4.items.push(_local5); dispatchEvent(_local4); }; return (_local3); } protected function stopTrackUpdates(_arg1:Object):void{ XMLNotifier.getInstance().unwatchXML(_arg1, this); } protected function enableEvents():void{ _dispatchEvents++; if (_dispatchEvents > 0){ _dispatchEvents = 0; }; } public function removeAll():void{ var _local1:int; var _local2:CollectionEvent; if (length > 0){ _local1 = (length - 1); while (_local1 >= 0) { stopTrackUpdates(source[_local1]); delete source[_local1]; _local1--; }; if (_dispatchEvents == 0){ _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.RESET; dispatchEvent(_local2); }; }; } private static function loadResources():void{ resourceOutOfBounds = packageResources.getString("outOfBounds"); resourceInvalidType = packageResources.getString("invalidType"); } loadResources(); } }//package mx.collections
Section 67
//XMLListCollection (mx.collections.XMLListCollection) package mx.collections { public class XMLListCollection extends ListCollectionView { mx_internal static const VERSION:String = "2.0.1.0"; public function XMLListCollection(_arg1:XMLList=null){ this.source = _arg1; } private function execXMLListFunction(_arg1:Function):XMLList{ var _local2:int; var _local3:XMLList; var _local4:int; var _local5:Object; if (!localIndex){ return (_arg1(source)); }; _local2 = localIndex.length; _local3 = new XMLList(""); _local4 = 0; while (_local4 < _local2) { _local5 = localIndex[_local4]; _local3 = (_local3 + _arg1(_local5)); _local4++; }; return (_local3); } override public function toString():String{ var _local1:String; var _local2:int; if (!localIndex){ return (source.toString()); }; _local1 = ""; _local2 = 0; while (_local2 < localIndex.length) { if (_local2 > 0){ _local1 = (_local1 + "\n"); }; _local1 = (_local1 + localIndex[_local2].toString()); _local2++; }; return (_local1); } public function attributes():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.attributes()); })); } public function get source():XMLList{ return ((list) ? XMLListAdapter(list).source : null); } public function descendants(_arg1:Object="*"):XMLList{ var name = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.descendants(name)); })); } public function attribute(_arg1:Object):XMLList{ var attributeName = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.attribute(attributeName)); })); } public function child(_arg1:Object):XMLList{ var propertyName = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.child(propertyName)); })); } public function set source(_arg1:XMLList):void{ list = new XMLListAdapter(_arg1); } public function text():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.text()); })); } public function toXMLString():String{ var _local1:String; var _local2:int; if (!localIndex){ return (source.toXMLString()); }; _local1 = ""; _local2 = 0; while (_local2 < localIndex.length) { if (_local2 > 0){ _local1 = (_local1 + "\n"); }; _local1 = (_local1 + localIndex[_local2].toXMLString()); _local2++; }; return (_local1); } public function copy():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (XMLList(_arg1.copy())); })); } public function elements(_arg1:String="*"):XMLList{ var name = _arg1; return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.elements(name)); })); } public function children():XMLList{ return (execXMLListFunction(function (_arg1:Object):XMLList{ return (_arg1.children()); })); } } }//package mx.collections
Section 68
//AccordionHeader (mx.containers.accordionClasses.AccordionHeader) package mx.containers.accordionClasses { import mx.core.*; import flash.events.*; import flash.display.*; import mx.styles.*; import mx.controls.*; import mx.containers.*; public class AccordionHeader extends Button implements IDataRenderer { private var _data:Object; private var focusObj:DisplayObject; private var focusSkin:IFlexDisplayObject; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function AccordionHeader(){ toggleChanged = false; mouseFocusEnabled = false; tabEnabled = false; } override mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ super.layoutContents(_arg1, _arg2, _arg3); if (focusObj){ setChildIndex(focusObj, (numChildren - 1)); }; } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; invalidateDisplayList(); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Class; var _local3:ISimpleStyleClient; if (((_arg1) && (!(isEffectStarted)))){ if (!focusObj){ _local2 = getStyle("focusSkin"); focusObj = new (_local2); _local3 = (focusObj as ISimpleStyleClient); if (_local3){ _local3.styleName = this; }; addChild(focusObj); focusSkin = (focusObj as IFlexDisplayObject); }; if (focusSkin){ focusSkin.move(0, 0); focusSkin.setActualSize(unscaledWidth, unscaledHeight); }; focusObj.visible = true; dispatchEvent(new Event("focusDraw")); } else { if (focusObj){ focusObj.visible = false; }; }; } override protected function createChildren():void{ var _local1:CSSStyleDeclaration; var _local2:Number; super.createChildren(); _local1 = StyleManager.getStyleDeclaration(className); if (_local1){ _local2 = _local1.getStyle("paddingLeft"); if (!isNaN(_local2)){ setStyle("paddingLeft", _local2); }; _local2 = _local1.getStyle("paddingRight"); if (!isNaN(_local2)){ setStyle("paddingRight", _local2); }; }; } override protected function rollOverHandler(_arg1:MouseEvent):void{ var _local2:Accordion; super.rollOverHandler(_arg1); _local2 = Accordion(parent); if (_local2.enabled){ _local2.rawChildren.setChildIndex(this, (_local2.rawChildren.numChildren - 1)); }; } override public function set data(_arg1:Object):void{ _data = _arg1; } override protected function initializeAccessibility():void{ if (AccordionHeader.createAccessibilityImplementation != null){ AccordionHeader.createAccessibilityImplementation(this); }; } override public function get data():Object{ return (_data); } } }//package mx.containers.accordionClasses
Section 69
//GridColumnInfo (mx.containers.gridClasses.GridColumnInfo) package mx.containers.gridClasses { import mx.core.*; import mx.containers.utilityClasses.*; public class GridColumnInfo extends FlexChildInfo { public var x:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function GridColumnInfo(){ min = 0; preferred = 0; max = UIComponent.DEFAULT_MAX_WIDTH; flex = 0; percent = 0; } } }//package mx.containers.gridClasses
Section 70
//GridRowInfo (mx.containers.gridClasses.GridRowInfo) package mx.containers.gridClasses { import mx.core.*; public class GridRowInfo { public var y:Number; public var max:Number; public var min:Number; public var preferred:Number; public var height:Number; public var flex:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function GridRowInfo(){ min = 0; preferred = 0; max = UIComponent.DEFAULT_MAX_HEIGHT; flex = 0; } } }//package mx.containers.gridClasses
Section 71
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout) package mx.containers.utilityClasses { import mx.core.*; public class ApplicationLayout extends BoxLayout { mx_internal static const VERSION:String = "2.0.1.0"; override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:int; var _local10:IFlexDisplayObject; super.updateDisplayList(_arg1, _arg2); _local3 = super.target; if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){ _local4 = _local3.getStyle("paddingLeft"); _local5 = _local3.getStyle("paddingTop"); _local6 = 0; _local7 = 0; _local8 = _local3.numChildren; _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); if (_local10.x < _local4){ _local6 = Math.max(_local6, (_local4 - _local10.x)); }; if (_local10.y < _local5){ _local7 = Math.max(_local7, (_local5 - _local10.y)); }; _local9++; }; if (((!((_local6 == 0))) || (!((_local7 == 0))))){ _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7)); _local9++; }; }; }; } } }//package mx.containers.utilityClasses
Section 72
//BoxLayout (mx.containers.utilityClasses.BoxLayout) package mx.containers.utilityClasses { import mx.core.*; import mx.controls.scrollClasses.*; import mx.containers.*; public class BoxLayout extends Layout { public var direction:String;// = "vertical" mx_internal static const VERSION:String = "2.0.1.0"; public function BoxLayout(){ direction = BoxDirection.VERTICAL; super(); } private function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } override public function measure():void{ var _local1:Container; var _local2:Boolean; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:IUIComponent; var _local13:Number; var _local14:Number; _local1 = super.target; _local2 = isVertical(); _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = _local1.numChildren; _local8 = _local7; _local9 = 0; while (_local9 < _local7) { _local12 = IUIComponent(_local1.getChildAt(_local9)); if (!_local12.includeInLayout){ _local8--; } else { _local13 = _local12.getExplicitOrMeasuredWidth(); _local14 = _local12.getExplicitOrMeasuredHeight(); if (_local2){ _local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3); _local5 = Math.max(_local13, _local5); _local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight); _local6 = (_local6 + _local14); } else { _local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth); _local5 = (_local5 + _local13); _local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4); _local6 = Math.max(_local14, _local6); }; }; _local9++; }; _local10 = widthPadding(_local8); _local11 = heightPadding(_local8); _local1.measuredMinWidth = (_local3 + _local10); _local1.measuredMinHeight = (_local4 + _local11); _local1.measuredWidth = (_local5 + _local10); _local1.measuredHeight = (_local6 + _local11); } mx_internal function getHorizontalAlignValue():Number{ var _local1:String; _local1 = target.getStyle("horizontalAlign"); if (_local1 == "center"){ return (0.5); }; if (_local1 == "right"){ return (1); }; return (0); } mx_internal function heightPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = target.viewMetricsAndPadding; _local3 = (_local2.top + _local2.bottom); if ((((_arg1 > 1)) && (isVertical()))){ _local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1))); }; return (_local3); } mx_internal function widthPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = target.viewMetricsAndPadding; _local3 = (_local2.left + _local2.right); if ((((_arg1 > 1)) && ((isVertical() == false)))){ _local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1))); }; return (_local3); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:int; var _local5:EdgeMetrics; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:ScrollBar; var _local15:ScrollBar; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:int; var _local22:IUIComponent; var _local23:IUIComponent; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; _local3 = super.target; _local4 = _local3.numChildren; if (_local4 == 0){ return; }; _local5 = _local3.viewMetricsAndPadding; _local6 = _local3.getStyle("paddingLeft"); _local7 = _local3.getStyle("paddingTop"); _local8 = getHorizontalAlignValue(); _local9 = getVerticalAlignValue(); _local10 = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth; _local11 = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight; _local12 = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left); _local13 = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top); _local14 = _local3.horizontalScrollBar; _local15 = _local3.verticalScrollBar; if (_local4 == 1){ _local23 = IUIComponent(_local3.getChildAt(0)); _local24 = _local23.percentWidth; _local25 = _local23.percentHeight; if (_local24){ _local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100))); } else { _local26 = _local23.getExplicitOrMeasuredWidth(); }; if (_local25){ _local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100))); } else { _local27 = _local23.getExplicitOrMeasuredHeight(); }; if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){ _local23.setActualSize(Math.floor(_local26), Math.floor(_local27)); } else { _local23.setActualSize(_local26, _local27); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; _local20 = (((_local12 - _local23.width) * _local8) + _local6); _local19 = (((_local13 - _local23.height) * _local9) + _local7); _local23.move(Math.floor(_local20), Math.floor(_local19)); } else { if (isVertical()){ _local16 = _local3.getStyle("verticalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; _local19 = (_local7 + (_local18 * _local9)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local20 = (((_local12 - _local22.width) * _local8) + _local6); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local19 = (_local19 + (_local22.height + _local16)); }; _local21++; }; } else { _local16 = _local3.getStyle("horizontalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local15.minWidth); }; _local20 = (_local6 + (_local18 * _local8)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local19 = (((_local13 - _local22.height) * _local9) + _local7); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local20 = (_local20 + (_local22.width + _local16)); }; _local21++; }; }; }; } mx_internal function getVerticalAlignValue():Number{ var _local1:String; _local1 = target.getStyle("verticalAlign"); if (_local1 == "middle"){ return (0.5); }; if (_local1 == "bottom"){ return (1); }; return (0); } } }//package mx.containers.utilityClasses
Section 73
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout) package mx.containers.utilityClasses { import mx.core.*; import mx.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; public class CanvasLayout extends Layout { private var _contentArea:Rectangle; mx_internal static const VERSION:String = "2.0.1.0"; private static var r:Rectangle = new Rectangle(); private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent):void{ var _local4:IStyleClient; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Boolean; var _local16:Boolean; _local4 = (_arg3 as IStyleClient); if (!_local4){ return; }; _local5 = _local4.getStyle("left"); _local6 = _local4.getStyle("right"); _local7 = _local4.getStyle("horizontalCenter"); _local8 = _local4.getStyle("top"); _local9 = _local4.getStyle("bottom"); _local10 = _local4.getStyle("verticalCenter"); _local15 = false; _local16 = false; if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){ _local11 = ((_arg1 - _local5) - _local6); if (_local11 < _arg3.minWidth){ _local11 = _arg3.minWidth; }; } else { if (!isNaN(_arg3.percentWidth)){ _local11 = ((_arg3.percentWidth / 100) * _arg1); _local11 = bound(_local11, _arg3.minWidth, _arg3.maxWidth); _local15 = true; } else { _local11 = _arg3.getExplicitOrMeasuredWidth(); }; }; if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){ _local12 = ((_arg2 - _local8) - _local9); if (_local12 < _arg3.minHeight){ _local12 = _arg3.minHeight; }; } else { if (!isNaN(_arg3.percentHeight)){ _local12 = ((_arg3.percentHeight / 100) * _arg2); _local12 = bound(_local12, _arg3.minHeight, _arg3.maxHeight); _local16 = true; } else { _local12 = _arg3.getExplicitOrMeasuredHeight(); }; }; if (!isNaN(_local7)){ _local13 = Math.round((((_arg1 - _local11) / 2) + _local7)); } else { if (!isNaN(_local5)){ _local13 = _local5; } else { if (!isNaN(_local6)){ _local13 = ((_arg1 - _local6) - _local11); }; }; }; if (!isNaN(_local10)){ _local14 = Math.round((((_arg2 - _local12) / 2) + _local10)); } else { if (!isNaN(_local8)){ _local14 = _local8; } else { if (!isNaN(_local9)){ _local14 = ((_arg2 - _local9) - _local12); }; }; }; _local13 = (isNaN(_local13)) ? _arg3.x : _local13; _local14 = (isNaN(_local14)) ? _arg3.y : _local14; _arg3.move(_local13, _local14); if (_local15){ if ((_local13 + _local11) > _arg1){ _local11 = Math.max((_arg1 - _local13), _arg3.minWidth); }; }; if (_local16){ if ((_local14 + _local12) > _arg2){ _local12 = Math.max((_arg2 - _local14), _arg3.minHeight); }; }; if (((!(isNaN(_local11))) && (!(isNaN(_local12))))){ _arg3.setActualSize(_local11, _local12); }; } override public function set target(_arg1:Container):void{ var _local2:Container; var _local3:int; var _local4:int; _local2 = super.target; if (_arg1 != _local2){ if (_local2){ _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _local2.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; if (_arg1){ _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _arg1.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; super.target = _arg1; }; } override public function measure():void{ var _local1:Container; var _local2:Number; var _local3:Number; var _local4:EdgeMetrics; var _local5:Rectangle; _local1 = super.target; _local2 = 0; _local3 = 0; _local4 = _local1.viewMetrics; _contentArea = null; _local5 = measureContentArea(); _local1.measuredWidth = ((_local5.width + _local4.left) + _local4.right); _local1.measuredHeight = ((_local5.height + _local4.top) + _local4.bottom); } private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler); } private function measureContentArea():Rectangle{ var _local1:int; var _local2:int; var _local3:IUIComponent; var _local4:IStyleClient; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; if (_contentArea){ return (_contentArea); }; _contentArea = new Rectangle(); _local1 = target.numChildren; _local2 = 0; while (_local2 < _local1) { _local3 = (target.getChildAt(_local2) as IUIComponent); _local4 = (_local3 as IStyleClient); if (!_local3.includeInLayout){ } else { _local5 = _local3.x; _local6 = _local3.y; _local7 = _local3.getExplicitOrMeasuredWidth(); _local8 = _local3.getExplicitOrMeasuredHeight(); if (((!(isNaN(_local3.percentWidth))) || (((((_local4) && (!(isNaN(_local4.getStyle("left")))))) && (!(isNaN(_local4.getStyle("right")))))))){ _local7 = _local3.minWidth; }; if (((!(isNaN(_local3.percentHeight))) || (((((_local4) && (!(isNaN(_local4.getStyle("top")))))) && (!(isNaN(_local4.getStyle("bottom")))))))){ _local8 = _local3.minHeight; }; r.x = _local5; r.y = _local6; r.width = _local7; r.height = _local8; applyAnchorStylesDuringMeasure(_local3, r); _local5 = r.x; _local6 = r.y; _local7 = r.width; _local8 = r.height; if (isNaN(_local5)){ _local5 = _local3.x; }; if (isNaN(_local6)){ _local6 = _local3.y; }; _local9 = _local5; _local10 = _local6; if (isNaN(_local7)){ _local7 = _local3.width; }; if (isNaN(_local8)){ _local8 = _local3.height; }; _local9 = (_local9 + _local7); _local10 = (_local10 + _local8); _contentArea.right = Math.max(_contentArea.right, _local9); _contentArea.bottom = Math.max(_contentArea.bottom, _local10); }; _local2++; }; return (_contentArea); } private function child_moveHandler(_arg1:MoveEvent):void{ var _local2:Container; if ((_arg1.target is IUIComponent)){ if (!IUIComponent(_arg1.target).includeInLayout){ return; }; }; _local2 = super.target; if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); _contentArea = null; }; } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:EdgeMetrics; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; var _local9:IUIComponent; _local3 = super.target; _local3.mx_internal::doingLayout = false; _local4 = _local3.viewMetrics; _local3.mx_internal::doingLayout = true; _local5 = ((_arg1 - _local4.left) - _local4.right); _local6 = ((_arg2 - _local4.top) - _local4.bottom); _local7 = _local3.numChildren; _local8 = 0; while (_local8 < _local7) { _local9 = (_local3.getChildAt(_local8) as IUIComponent); applyAnchorStylesDuringUpdateDisplayList(_local5, _local6, _local9); _local8++; }; } private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{ var _local3:IStyleClient; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local3 = (_arg1 as IStyleClient); if (!_local3){ return; }; _local4 = _local3.getStyle("left"); _local5 = _local3.getStyle("right"); _local6 = _local3.getStyle("horizontalCenter"); if (!isNaN(_local6)){ _arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local6)); } else { if (((!(isNaN(_local4))) && (!(isNaN(_local5))))){ _arg2.x = _local4; _arg2.width = (_arg2.width + _local5); } else { if (!isNaN(_local4)){ _arg2.x = _local4; } else { if (!isNaN(_local5)){ _arg2.x = 0; _arg2.width = (_arg2.width + _local5); }; }; }; }; _local7 = _local3.getStyle("top"); _local8 = _local3.getStyle("bottom"); _local9 = _local3.getStyle("verticalCenter"); if (!isNaN(_local9)){ _arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local9)); } else { if (((!(isNaN(_local7))) && (!(isNaN(_local8))))){ _arg2.y = _local7; _arg2.height = (_arg2.height + _local8); } else { if (!isNaN(_local7)){ _arg2.y = _local7; } else { if (!isNaN(_local8)){ _arg2.y = 0; _arg2.height = (_arg2.height + _local8); }; }; }; }; } private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 < _arg2){ _arg1 = _arg2; } else { if (_arg1 > _arg3){ _arg1 = _arg3; } else { _arg1 = Math.floor(_arg1); }; }; return (_arg1); } private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler); } } }//package mx.containers.utilityClasses
Section 74
//Flex (mx.containers.utilityClasses.Flex) package mx.containers.utilityClasses { import mx.core.*; public class Flex { mx_internal static const VERSION:String = "2.0.1.0"; public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local4:Number; var _local5:Number; var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local4 = _arg2; _local5 = 0; _local6 = []; _local10 = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredHeight(); }; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local11); _local7 = new FlexChildInfo(); _local7.percent = _local11; _local7.min = _local8.minWidth; _local7.max = _local8.maxWidth; _local7.height = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredWidth(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local14), Math.floor(_local13)); } else { _local8.setActualSize(_local14, _local13); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.width); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height)); } else { _local8.setActualSize(_local7.size, _local7.height); }; _local9++; }; }; return (_local4); } public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local4:Number; var _local5:Number; var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local4 = _arg2; _local5 = 0; _local6 = []; _local10 = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredWidth(); }; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local12); _local7 = new FlexChildInfo(); _local7.percent = _local12; _local7.min = _local8.minHeight; _local7.max = _local8.maxHeight; _local7.width = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredHeight(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local13), Math.floor(_local14)); } else { _local8.setActualSize(_local13, _local14); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.height); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size)); } else { _local8.setActualSize(_local7.width, _local7.size); }; _local9++; }; }; return (_local4); } public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{ var _local5:int; var _local6:Number; var _local7:Boolean; var _local8:Number; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; _local5 = _arg4.length; _local8 = (_arg2 - ((_arg1 * _arg3) / 100)); if (_local8 > 0){ _arg2 = (_arg2 - _local8); }; do { _local6 = 0; _local7 = true; _local9 = (_arg2 / _arg3); _local10 = 0; while (_local10 < _local5) { _local11 = _arg4[_local10]; _local12 = (_local11.percent * _local9); if (_local12 < _local11.min){ _local13 = _local11.min; _local11.size = _local13; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local13); _local7 = false; break; } else { if (_local12 > _local11.max){ _local14 = _local11.max; _local11.size = _local14; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local14); _local7 = false; break; } else { _local11.size = _local12; _local6 = (_local6 + _local12); }; }; _local10++; }; } while (!(_local7)); return (Math.max(0, Math.floor((_arg2 - _local6)))); } } }//package mx.containers.utilityClasses
Section 75
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo) package mx.containers.utilityClasses { import mx.core.*; public class FlexChildInfo { public var size:Number;// = 0 public var percent:Number; public var width:Number; public var max:Number; public var height:Number; public var preferred:Number;// = 0 public var min:Number; public var flex:Number;// = 0 public var child:IUIComponent; mx_internal static const VERSION:String = "2.0.1.0"; public function FlexChildInfo(){ size = 0; preferred = 0; flex = 0; super(); } } }//package mx.containers.utilityClasses
Section 76
//Layout (mx.containers.utilityClasses.Layout) package mx.containers.utilityClasses { import mx.core.*; public class Layout { private var _target:Container; mx_internal static const VERSION:String = "2.0.1.0"; public function set target(_arg1:Container):void{ _target = _arg1; } public function measure():void{ } public function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function get target():Container{ return (_target); } } }//package mx.containers.utilityClasses
Section 77
//Accordion (mx.containers.Accordion) package mx.containers { import mx.core.*; import mx.events.*; import mx.automation.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; import mx.graphics.*; import mx.controls.*; import mx.containers.accordionClasses.*; import flash.ui.*; public class Accordion extends Container implements IHistoryManagerClient, IFocusManagerComponent { private var historyManagementEnabledChanged:Boolean;// = false private var layoutStyleChanged:Boolean;// = false private var _headerRenderer:IFactory; private var tweenOldSelectedIndex:int; private var showFocusIndicator:Boolean;// = false private var accPreferredWidth:Number; private var _resizeToContent:Boolean;// = false private var _selectedIndex:int;// = -1 private var proposedSelectedIndex:int;// = -1 private var _focusedIndex:int;// = -1 private var firstTime:Boolean;// = true private var bInLoadState:Boolean;// = false private var tweenNewSelectedIndex:int; private var initialSelectedIndex:int;// = -1 private var accMinWidth:Number; private var overlayTargetArea:RoundedRectangle; private var tween:Tween; private var tweenContentHeight:Number; private var accPreferredHeight:Number; private var accMinHeight:Number; private var overlayChild:IUIComponent; private var _historyManagementEnabled:Boolean;// = true private var bSaveState:Boolean;// = false private var tweenContentWidth:Number; private var tweenViewMetrics:EdgeMetrics; private var currentDissolveEffect:Effect; private var bSliding:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; private static const HEADER_NAME_BASE:String = "_header"; public function Accordion(){ bSliding = false; initialSelectedIndex = -1; bSaveState = false; bInLoadState = false; firstTime = true; showFocusIndicator = false; layoutStyleChanged = false; _focusedIndex = -1; _historyManagementEnabled = true; historyManagementEnabledChanged = false; _resizeToContent = false; _selectedIndex = -1; proposedSelectedIndex = -1; super(); headerRenderer = new ClassFactory(AccordionHeader); tabEnabled = true; super.clipContent = false; addEventListener(Event.ADDED, addedHandler); addEventListener(Event.REMOVED, removedHandler); addEventListener(ChildExistenceChangedEvent.CHILD_ADD, childAddHandler); addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, childRemoveHandler); showInAutomationHierarchy = true; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; if (_arg1.target != this){ return; }; _local2 = selectedIndex; switch (_arg1.keyCode){ case Keyboard.PAGE_DOWN: drawHeaderFocus(_focusedIndex, false); _focusedIndex = (selectedIndex = ((selectedIndex < (numChildren - 1))) ? (selectedIndex + 1) : 0); drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); dispatchChangeEvent(_local2, selectedIndex, _arg1); break; case Keyboard.PAGE_UP: drawHeaderFocus(_focusedIndex, false); _focusedIndex = (selectedIndex = ((selectedIndex > 0)) ? (selectedIndex - 1) : (numChildren - 1)); drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); dispatchChangeEvent(_local2, selectedIndex, _arg1); break; case Keyboard.HOME: drawHeaderFocus(_focusedIndex, false); _focusedIndex = (selectedIndex = 0); drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); dispatchChangeEvent(_local2, selectedIndex, _arg1); break; case Keyboard.END: drawHeaderFocus(_focusedIndex, false); _focusedIndex = (selectedIndex = (numChildren - 1)); drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); dispatchChangeEvent(_local2, selectedIndex, _arg1); break; case Keyboard.DOWN: case Keyboard.RIGHT: drawHeaderFocus(_focusedIndex, false); _focusedIndex = ((_focusedIndex < (numChildren - 1))) ? (_focusedIndex + 1) : 0; drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); break; case Keyboard.UP: case Keyboard.LEFT: drawHeaderFocus(_focusedIndex, false); _focusedIndex = ((_focusedIndex > 0)) ? (_focusedIndex - 1) : (numChildren - 1); drawHeaderFocus(_focusedIndex, true); _arg1.stopPropagation(); break; case Keyboard.SPACE: case Keyboard.ENTER: _arg1.stopPropagation(); if (_focusedIndex != selectedIndex){ selectedIndex = _focusedIndex; dispatchChangeEvent(_local2, selectedIndex, _arg1); }; break; }; } override mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{ if (overlayChild){ removeOverlay(); }; overlayChild = (selectedChild as IUIComponent); if (!overlayChild){ return; }; overlayColor = _arg1; overlayTargetArea = _arg2; if (((selectedChild) && ((selectedChild.numChildrenCreated == -1)))){ selectedChild.addEventListener(FlexEvent.INITIALIZE, initializeHandler); } else { initializeHandler(null); }; } private function instantiateSelectedChild():void{ if (!selectedChild){ return; }; if (((selectedChild) && ((selectedChild.numChildrenCreated == -1)))){ selectedChild.createComponentsFromDescriptors(); }; invalidateSize(); invalidateDisplayList(); if ((selectedChild is IInvalidating)){ IInvalidating(selectedChild).invalidateSize(); }; } override protected function focusInHandler(_arg1:FocusEvent):void{ super.focusInHandler(_arg1); showFocusIndicator = focusManager.showFocusIndicator; if (_arg1.target == this){ focusManager.defaultButtonEnabled = false; }; } override public function get horizontalScrollPolicy():String{ return (ScrollPolicy.OFF); } protected function get contentWidth():Number{ var _local1:Number; var _local2:EdgeMetrics; _local1 = unscaledWidth; _local2 = viewMetricsAndPadding; _local1 = (_local1 - (_local2.left + _local2.right)); _local1 = (_local1 - (getStyle("paddingLeft") + getStyle("paddingRight"))); return (_local1); } public function set headerRenderer(_arg1:IFactory):void{ _headerRenderer = _arg1; dispatchEvent(new Event("headerRendererChanged")); } private function getHeaderHeight():Number{ var _local1:Number; _local1 = getStyle("headerHeight"); if (isNaN(_local1)){ _local1 = 0; if (numChildren > 0){ _local1 = getHeaderAt(0).measuredHeight; }; }; return (_local1); } override public function get verticalScrollPolicy():String{ return (ScrollPolicy.OFF); } public function saveState():Object{ var _local1:int; _local1 = ((_selectedIndex == -1)) ? 0 : _selectedIndex; return ({selectedIndex:_local1}); } override public function set horizontalScrollPolicy(_arg1:String):void{ } override public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:ComponentDescriptor; if (actualCreationPolicy == ContainerCreationPolicy.ALL){ super.createComponentsFromDescriptors(); return; }; _local2 = numChildren; if (childDescriptors){ _local3 = childDescriptors.length; _local4 = 0; while (_local4 < _local3) { _local5 = ComponentDescriptor(childDescriptors[_local4]); createComponentFromDescriptor(_local5, false); _local4++; }; }; numChildrenCreated = (numChildren - _local2); processedDescriptors = true; } public function getHeaderAt(_arg1:int):Button{ return (Button(rawChildren.getChildByName((HEADER_NAME_BASE + _arg1)))); } override protected function measure():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:int; var _local10:EdgeMetrics; var _local11:Number; var _local12:Number; var _local13:Button; var _local14:IUIComponent; super.measure(); _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = getStyle("paddingLeft"); _local6 = getStyle("paddingRight"); _local7 = getHeaderHeight(); if (((((accPreferredWidth) && (!(_resizeToContent)))) && (!(layoutStyleChanged)))){ measuredMinWidth = accMinWidth; measuredMinHeight = accMinHeight; measuredWidth = accPreferredWidth; measuredHeight = accPreferredHeight; return; }; layoutStyleChanged = false; _local8 = numChildren; _local9 = 0; while (_local9 < _local8) { _local13 = getHeaderAt(_local9); _local14 = IUIComponent(getChildAt(_local9)); _local1 = Math.max(_local1, _local13.minWidth); _local2 = (_local2 + _local7); _local3 = Math.max(_local3, _local1); _local4 = (_local4 + _local7); if (_local9 == selectedIndex){ _local3 = Math.max(_local3, _local14.getExplicitOrMeasuredWidth()); _local4 = (_local4 + _local14.getExplicitOrMeasuredHeight()); _local1 = Math.max(_local1, _local14.minWidth); _local2 = (_local2 + _local14.minHeight); }; _local9++; }; _local10 = viewMetricsAndPadding; _local11 = (_local10.left + _local10.right); _local12 = (_local10.top + _local10.bottom); if (_local5 < 0){ _local11 = (_local11 - _local5); }; if (_local6 < 0){ _local11 = (_local11 - _local6); }; _local1 = (_local1 + _local11); _local3 = (_local3 + _local11); _local2 = (_local2 + _local12); _local4 = (_local4 + _local12); measuredMinWidth = _local1; measuredMinHeight = _local2; measuredWidth = _local3; measuredHeight = _local4; if (((selectedChild) && ((Container(selectedChild).numChildrenCreated == -1)))){ return; }; if (numChildren == 0){ return; }; accMinWidth = _local1; accMinHeight = _local2; accPreferredWidth = _local3; accPreferredHeight = _local4; } mx_internal function onTweenEnd(_arg1:Number):void{ var _local2:int; var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Container; var _local10:int; var _local11:int; var _local12:Button; bSliding = false; _local2 = tweenOldSelectedIndex; _local3 = tweenViewMetrics; _local4 = getStyle("verticalGap"); _local5 = getHeaderHeight(); _local6 = calcContentWidth(); _local7 = calcContentHeight(); _local8 = _local3.top; _local10 = numChildren; _local11 = 0; while (_local11 < _local10) { _local12 = getHeaderAt(_local11); _local12.$y = _local8; _local8 = (_local8 + _local5); if (_local11 == selectedIndex){ _local9 = Container(getChildAt(_local11)); _local9.cacheAsBitmap = false; _local9.scrollRect = null; _local9.visible = true; _local8 = (_local8 + _local7); }; _local8 = (_local8 + _local4); _local11++; }; if (_local2 != -1){ _local9 = Container(getChildAt(_local2)); _local9.cacheAsBitmap = false; _local9.scrollRect = null; _local9.visible = false; _local9.tweeningProperties = null; }; tweenViewMetrics = null; tweenContentWidth = NaN; tweenContentHeight = NaN; tweenOldSelectedIndex = 0; tweenNewSelectedIndex = 0; tween = null; UIComponent.resumeBackgroundProcessing(); Container(getChildAt(selectedIndex)).tweeningProperties = null; if (currentDissolveEffect){ if (currentDissolveEffect.target != null){ currentDissolveEffect.play(); } else { currentDissolveEffect.play([this]); }; }; callLater(instantiateSelectedChild); } private function initializeHandler(_arg1:FlexEvent):void{ UIComponent(overlayChild).addOverlay(overlayColor, overlayTargetArea); } override public function get autoLayout():Boolean{ return (true); } private function childAddHandler(_arg1:ChildExistenceChangedEvent):void{ var _local2:DisplayObject; var _local3:Button; _local2 = _arg1.relatedObject; _local2.visible = false; createHeader(_local2, getChildIndex(_local2)); _local2.addEventListener("labelChanged", labelChangedHandler); _local2.addEventListener("iconChanged", iconChangedHandler); if ((((numChildren == 1)) && ((proposedSelectedIndex == -1)))){ selectedIndex = 0; _local3 = getHeaderAt(0); _local3.selected = true; _focusedIndex = 0; drawHeaderFocus(_focusedIndex, showFocusIndicator); }; if ((_local2 as IAutomationObject)){ }; IAutomationObject(_local2).showInAutomationHierarchy = true; } override protected function commitProperties():void{ super.commitProperties(); if (historyManagementEnabledChanged){ if (historyManagementEnabled){ HistoryManager.register(this); } else { HistoryManager.unregister(this); }; historyManagementEnabledChanged = false; }; commitSelectedIndex(); if (firstTime){ firstTime = false; systemManager.addEventListener(Event.REMOVED, systemManager_removedHandler); }; } override public function set verticalScrollPolicy(_arg1:String):void{ } public function set selectedIndex(_arg1:int):void{ if (_arg1 == -1){ return; }; if (_arg1 == _selectedIndex){ return; }; proposedSelectedIndex = _arg1; invalidateProperties(); if (((((historyManagementEnabled) && (!((_selectedIndex == -1))))) && (!(bInLoadState)))){ bSaveState = true; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } override public function drawFocus(_arg1:Boolean):void{ drawHeaderFocus(_focusedIndex, _arg1); } override mx_internal function setActualCreationPolicies(_arg1:String):void{ var _local2:int; var _local3:int; super.setActualCreationPolicies(_arg1); if ((((_arg1 == ContainerCreationPolicy.ALL)) && ((numChildren > 0)))){ _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { Container(getChildAt(_local3)).createComponentsFromDescriptors(); _local3++; }; }; } private function labelChangedHandler(_arg1:Event):void{ var _local2:DisplayObject; var _local3:int; var _local4:Button; _local2 = DisplayObject(_arg1.target); _local3 = getChildIndex(_local2); _local4 = getHeaderAt(_local3); _local4.label = Container(_arg1.target).label; } override public function set clipContent(_arg1:Boolean):void{ } private function addedHandler(_arg1:Event):void{ if (_arg1.target != this){ return; }; if (historyManagementEnabled){ HistoryManager.register(this); }; } public function set resizeToContent(_arg1:Boolean):void{ if (_arg1 != _resizeToContent){ _resizeToContent = _arg1; if (_arg1){ invalidateSize(); }; }; } private function shuffleHeaders(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:Button; _local4 = getHeaderAt(_arg1); if (_arg2 < _arg1){ _local3 = _arg1; while (_local3 > _arg2) { getHeaderAt((_local3 - 1)).name = (HEADER_NAME_BASE + _local3); _local3--; }; } else { _local3 = _arg1; while (_local3 < _arg2) { getHeaderAt((_local3 + 1)).name = (HEADER_NAME_BASE + _local3); _local3++; }; }; _local4.name = (HEADER_NAME_BASE + _arg2); } private function drawHeaderFocus(_arg1:int, _arg2:Boolean):void{ if (_arg1 != -1){ getHeaderAt(_arg1).drawFocus(_arg2); }; } public function get headerRenderer():IFactory{ return (_headerRenderer); } private function childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{ var _local2:DisplayObject; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Button; if (numChildren == 0){ return; }; _local2 = _arg1.relatedObject; _local3 = selectedIndex; _local5 = getChildIndex(_local2); _local6 = (numChildren - 1); rawChildren.removeChild(getHeaderAt(_local5)); _local7 = _local5; while (_local7 < _local6) { getHeaderAt((_local7 + 1)).name = (HEADER_NAME_BASE + _local7); _local7++; }; if (_local6 == 0){ _local4 = (_focusedIndex = -1); } else { if (_local5 > selectedIndex){ return; }; if (_local5 < selectedIndex){ _local4 = (_local3 - 1); } else { if (_local5 == selectedIndex){ if (_local5 == _local6){ _local4 = (_local3 - 1); } else { _local4 = _local3; }; _local8 = getHeaderAt(_local4); _local8.selected = true; }; }; }; if (_focusedIndex > _local5){ _focusedIndex--; drawHeaderFocus(_focusedIndex, showFocusIndicator); } else { if (_focusedIndex == _local5){ if (_local5 == _local6){ _focusedIndex--; }; drawHeaderFocus(_focusedIndex, showFocusIndicator); }; }; _selectedIndex = _local4; instantiateSelectedChild(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } private function calcContentHeight():Number{ var _local1:Number; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; _local1 = unscaledHeight; _local2 = viewMetricsAndPadding; _local1 = (_local1 - (_local2.top + _local2.bottom)); _local3 = getStyle("verticalGap"); _local4 = getHeaderHeight(); _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local1 = (_local1 - _local4); if (_local6 > 0){ _local1 = (_local1 - _local3); }; _local6++; }; return (_local1); } public function set selectedChild(_arg1:Container):void{ var _local2:int; _local2 = getChildIndex(DisplayObject(_arg1)); if ((((_local2 >= 0)) && ((_local2 < numChildren)))){ selectedIndex = _local2; }; } public function set historyManagementEnabled(_arg1:Boolean):void{ if (_arg1 != _historyManagementEnabled){ _historyManagementEnabled = _arg1; historyManagementEnabledChanged = true; invalidateProperties(); }; } private function removedHandler(_arg1:Event):void{ if (_arg1.target != this){ return; }; HistoryManager.unregister(this); } private function systemManager_removedHandler(_arg1:Event):void{ if (_arg1.target == systemManager){ HistoryManager.unregister(this); }; } private function iconChangedHandler(_arg1:Event):void{ var _local2:DisplayObject; var _local3:int; var _local4:Button; _local2 = DisplayObject(_arg1.target); _local3 = getChildIndex(_local2); _local4 = getHeaderAt(_local3); _local4.setStyle("icon", Container(_arg1.target).icon); } private function createHeader(_arg1:DisplayObject, _arg2:int):void{ var _local3:Button; var _local4:String; var _local5:CSSStyleDeclaration; var _local6:Container; var _local7:String; if (((!((selectedIndex == -1))) && (getHeaderAt(selectedIndex)))){ getHeaderAt(selectedIndex).selected = false; }; _local3 = Button(headerRenderer.newInstance()); _local3.name = (HEADER_NAME_BASE + (numChildren - 1)); _local3.styleName = this; _local4 = getStyle("headerStyleName"); if (_local4){ _local5 = StyleManager.getStyleDeclaration(("." + _local4)); if (_local5){ _local3.styleDeclaration = _local5; }; }; _local3.addEventListener(MouseEvent.CLICK, headerClickHandler); IDataRenderer(_local3).data = _arg1; if ((_arg1 is Container)){ _local6 = Container(_arg1); _local3.label = _local6.label; if (_local6.icon){ _local3.setStyle("icon", _local6.icon); }; _local7 = _local6.toolTip; if (((_local7) && (!((_local7 == ""))))){ _local3.toolTip = _local7; _local6.toolTip = null; }; }; rawChildren.addChild(_local3); if (_arg2 != (numChildren - 1)){ shuffleHeaders((numChildren - 1), _arg2); }; if (((!((selectedIndex == -1))) && (getHeaderAt(selectedIndex)))){ getHeaderAt(selectedIndex).selected = true; }; } protected function get contentHeight():Number{ var _local1:Number; var _local2:EdgeMetrics; var _local3:Number; var _local4:int; var _local5:int; _local1 = unscaledHeight; _local2 = viewMetricsAndPadding; _local1 = (_local1 - (_local2.top + _local2.bottom)); _local3 = getStyle("verticalGap"); _local4 = numChildren; _local5 = 0; while (_local5 < _local4) { _local1 = (_local1 - getHeaderAt(_local5).height); if (_local5 > 0){ _local1 = (_local1 - _local3); }; _local5++; }; return (_local1); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); showFocusIndicator = false; if (((focusManager) && ((_arg1.target == this)))){ focusManager.defaultButtonEnabled = true; }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:Button; var _local6:Button; _local3 = getChildIndex(_arg1); if ((((_local3 == -1)) || ((_arg2 < 0)))){ return; }; _local4 = numChildren; if (_arg2 >= _local4){ _arg2 = (_local4 - 1); }; if (_arg2 == _local3){ return; }; _local5 = getHeaderAt(selectedIndex); if (_local5){ _local5.selected = false; drawHeaderFocus(_focusedIndex, false); }; super.setChildIndex(_arg1, _arg2); shuffleHeaders(_local3, _arg2); _local6 = getHeaderAt(selectedIndex); if (_local6){ _local6.selected = true; drawHeaderFocus(_focusedIndex, showFocusIndicator); }; instantiateSelectedChild(); } private function startTween(_arg1:int, _arg2:int):void{ var _local3:Number; var _local4:Function; var _local5:Container; var _local6:Number; var _local7:Number; bSliding = true; tweenViewMetrics = viewMetricsAndPadding; tweenContentWidth = calcContentWidth(); tweenContentHeight = calcContentHeight(); tweenOldSelectedIndex = _arg1; tweenNewSelectedIndex = _arg2; _local3 = getStyle("openDuration"); tween = new Tween(this, 0, tweenContentHeight, _local3); _local4 = (getStyle("openEasingFunction") as Function); if (_local4 != null){ tween.easingFunction = _local4; }; if (_arg1 != -1){ Container(getChildAt(_arg1)).tweeningProperties = ["x", "y", "width", "height"]; }; Container(getChildAt(_arg2)).tweeningProperties = ["x", "y", "width", "height"]; _local5 = Container(getChildAt(_arg2)); if (_local5.numChildren == 0){ _local6 = getStyle("paddingLeft"); _local7 = (borderMetrics.left + ((_local6 > 0)) ? _local6 : 0); _local5.move(_local7, _local5.y); _local5.setActualSize(tweenContentWidth, tweenContentHeight); }; UIComponent.suspendBackgroundProcessing(); } public function get resizeToContent():Boolean{ return (_resizeToContent); } override public function get clipContent():Boolean{ return (true); } private function commitSelectedIndex():void{ var _local1:int; var _local2:int; var _local3:Class; var _local4:int; if (proposedSelectedIndex == -1){ return; }; _local1 = proposedSelectedIndex; proposedSelectedIndex = -1; if (numChildren == 0){ _selectedIndex = -1; return; }; if (_local1 < 0){ _local1 = 0; } else { if (_local1 > (numChildren - 1)){ _local1 = (numChildren - 1); }; }; _local2 = _selectedIndex; if (_local1 == _local2){ return; }; currentDissolveEffect = null; if (isEffectStarted){ _local3 = Class(systemManager.getDefinitionByName("mx.effects.effectClasses.DissolveInstance")); _local4 = 0; while (_local4 < _effectsStarted.length) { if (((_local3) && ((_effectsStarted[_local4] is _local3)))){ currentDissolveEffect = _effectsStarted[_local4].effect; _effectsStarted[_local4].end(); break; }; _local4++; }; }; if (_focusedIndex != _local1){ drawHeaderFocus(_focusedIndex, false); }; if (_local2 != -1){ getHeaderAt(_local2).selected = false; }; _selectedIndex = _local1; if (initialSelectedIndex == -1){ initialSelectedIndex = _selectedIndex; }; getHeaderAt(_local1).selected = true; if (_focusedIndex != _local1){ _focusedIndex = _local1; drawHeaderFocus(_focusedIndex, showFocusIndicator); }; if (bSaveState){ HistoryManager.save(); bSaveState = false; }; if ((((getStyle("openDuration") == 0)) || ((_local2 == -1)))){ Container(getChildAt(_local1)).setVisible(true); Container(getChildAt(_local1)).setVisible(false, true); if (_local2 != -1){ Container(getChildAt(_local2)).setVisible(false); }; instantiateSelectedChild(); } else { if (tween){ tween.endTween(); }; startTween(_local2, _local1); }; } override mx_internal function removeOverlay():void{ if (overlayChild){ UIComponent(overlayChild).removeOverlay(); overlayChild = null; }; } public function get selectedIndex():int{ if (proposedSelectedIndex != -1){ return (proposedSelectedIndex); }; return (_selectedIndex); } public function loadState(_arg1:Object):void{ var _local2:int; _local2 = (_arg1) ? int(_arg1.selectedIndex) : 0; if (_local2 == -1){ _local2 = initialSelectedIndex; }; if (_local2 == -1){ _local2 = 0; }; if (_local2 != _selectedIndex){ bInLoadState = true; selectedIndex = _local2; bInLoadState = false; }; } public function get historyManagementEnabled():Boolean{ return (_historyManagementEnabled); } public function get selectedChild():Container{ if (selectedIndex == -1){ return (null); }; return (Container(getChildAt(selectedIndex))); } override public function set autoLayout(_arg1:Boolean):void{ } mx_internal function get focusedIndex():int{ return (_focusedIndex); } private function calcContentWidth():Number{ var _local1:Number; var _local2:EdgeMetrics; _local1 = unscaledWidth; _local2 = viewMetricsAndPadding; _local1 = (_local1 - (_local2.left + _local2.right)); return (_local1); } private function headerClickHandler(_arg1:Event):void{ var _local2:Button; var _local3:int; var _local4:int; _local2 = Button(_arg1.currentTarget); _local3 = selectedIndex; selectedChild = Container(IDataRenderer(_local2).data); _local4 = selectedIndex; if (_local3 != _local4){ dispatchChangeEvent(_local3, _local4, _arg1); }; } override public function styleChanged(_arg1:String):void{ var _local2:Object; var _local3:CSSStyleDeclaration; var _local4:int; var _local5:Button; super.styleChanged(_arg1); if (((((!(_arg1)) || ((_arg1 == "headerStyleName")))) || ((_arg1 == "styleName")))){ _local2 = getStyle("headerStyleName"); if (_local2){ _local3 = StyleManager.getStyleDeclaration(("." + _local2)); if (_local3){ _local4 = 0; while (_local4 < numChildren) { _local5 = getHeaderAt(_local4); if (_local5){ _local5.styleDeclaration = _local3; _local5.regenerateStyleCache(true); _local5.styleChanged(null); }; _local4++; }; }; }; } else { if (StyleManager.isSizeInvalidatingStyle(_arg1)){ layoutStyleChanged = true; }; }; } mx_internal function onTweenUpdate(_arg1:Number):void{ var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:int; var _local14:int; var _local15:Button; var _local16:Container; _local2 = tweenViewMetrics; _local3 = tweenContentWidth; _local4 = tweenContentHeight; _local5 = tweenOldSelectedIndex; _local6 = tweenNewSelectedIndex; _local7 = _arg1; _local8 = (_local4 - _arg1); _local9 = ((_local5 < _local6)) ? -(_local7) : _local7; _local10 = ((_local6 > _local5)) ? _local8 : -(_local8); _local11 = _local2.top; _local12 = getStyle("verticalGap"); _local13 = numChildren; _local14 = 0; while (_local14 < _local13) { _local15 = getHeaderAt(_local14); _local16 = Container(getChildAt(_local14)); _local15.$y = _local11; _local11 = (_local11 + _local15.height); if (_local14 == _local5){ _local16.cacheAsBitmap = true; _local16.scrollRect = new Rectangle(0, -(_local9), _local3, _local4); _local16.visible = true; _local11 = (_local11 + _local8); } else { if (_local14 == _local6){ _local16.cacheAsBitmap = true; _local16.scrollRect = new Rectangle(0, -(_local10), _local3, _local4); _local16.visible = true; _local11 = (_local11 + _local7); }; }; _local11 = (_local11 + _local12); _local14++; }; } private function dispatchChangeEvent(_arg1:int, _arg2:int, _arg3:Event=null):void{ var _local4:IndexChangedEvent; _local4 = new IndexChangedEvent(IndexChangedEvent.CHANGE); _local4.oldIndex = _arg1; _local4.newIndex = _arg2; _local4.relatedObject = getChildAt(_arg2); _local4.triggerEvent = _arg3; dispatchEvent(_local4); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:int; var _local16:int; var _local17:Button; var _local18:IUIComponent; var _local19:Number; var _local20:Number; super.updateDisplayList(_arg1, _arg2); if (tween){ return; }; _local3 = borderMetrics; _local4 = getStyle("paddingLeft"); _local5 = getStyle("paddingRight"); _local6 = getStyle("paddingTop"); _local7 = getStyle("verticalGap"); _local8 = calcContentWidth(); _local9 = calcContentHeight(); _local10 = (_local3.left + _local4); _local11 = (_local3.top + _local6); _local12 = _local10; _local13 = _local8; _local14 = getHeaderHeight(); if (_local4 < 0){ _local12 = (_local12 - _local4); _local13 = (_local13 + _local4); }; if (_local5 < 0){ _local13 = (_local13 + _local5); }; _local15 = numChildren; _local16 = 0; while (_local16 < _local15) { _local17 = getHeaderAt(_local16); _local18 = IUIComponent(getChildAt(_local16)); _local17.move(_local10, _local11); _local17.setActualSize(_local8, _local14); _local11 = (_local11 + _local14); if (_local16 == selectedIndex){ _local18.move(_local12, _local11); _local18.visible = true; _local19 = _local13; _local20 = _local9; if (!isNaN(_local18.percentWidth)){ if (_local19 > _local18.maxWidth){ _local19 = _local18.maxWidth; }; } else { if (_local19 > _local18.getExplicitOrMeasuredWidth()){ _local19 = _local18.getExplicitOrMeasuredWidth(); }; }; if (!isNaN(_local18.percentHeight)){ if (_local20 > _local18.maxHeight){ _local20 = _local18.maxHeight; }; } else { if (_local20 > _local18.getExplicitOrMeasuredHeight()){ _local20 = _local18.getExplicitOrMeasuredHeight(); }; }; if (((!((_local18.width == _local19))) || (!((_local18.height == _local20))))){ _local18.setActualSize(_local19, _local20); }; _local11 = (_local11 + _local9); } else { _local18.move(_local12, ((_local16 < selectedIndex)) ? _local11 : (_local11 - _local9)); _local18.visible = false; }; _local11 = (_local11 + _local7); _local16++; }; if (blocker){ rawChildren.setChildIndex(blocker, (numChildren - 1)); }; drawHeaderFocus(_focusedIndex, showFocusIndicator); } } }//package mx.containers
Section 78
//Box (mx.containers.Box) package mx.containers { import mx.core.*; import flash.events.*; import mx.containers.utilityClasses.*; public class Box extends Container { mx_internal var layoutObject:BoxLayout; mx_internal static const VERSION:String = "2.0.1.0"; public function Box(){ layoutObject = new BoxLayout(); super(); layoutObject.target = this; } public function pixelsToPercent(_arg1:Number):Number{ var _local2:Boolean; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:Number; var _local8:IUIComponent; var _local9:Number; var _local10:Number; _local2 = isVertical(); _local3 = 0; _local4 = 0; _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local8 = IUIComponent(getChildAt(_local6)); _local9 = (_local2) ? _local8.height : _local8.width; _local10 = (_local2) ? _local8.percentHeight : _local8.percentWidth; if (!isNaN(_local10)){ _local3 = (_local3 + _local10); _local4 = (_local4 + _local9); }; _local6++; }; _local7 = 100; if (_local4 != _arg1){ _local7 = (((_local4 * _local3) / (_local4 - _arg1)) - _local3); }; return (_local7); } override protected function measure():void{ super.measure(); layoutObject.measure(); } mx_internal function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } public function set direction(_arg1:String):void{ layoutObject.direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function get direction():String{ return (layoutObject.direction); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); } } }//package mx.containers
Section 79
//BoxDirection (mx.containers.BoxDirection) package mx.containers { public final class BoxDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.containers
Section 80
//Canvas (mx.containers.Canvas) package mx.containers { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.containers.utilityClasses.*; public class Canvas extends Container { private var layoutObject:CanvasLayout; mx_internal static const VERSION:String = "2.0.1.0"; public function Canvas(){ layoutObject = new CanvasLayout(); super(); layoutObject.target = this; } override mx_internal function get usePadding():Boolean{ return (false); } override mx_internal function getScrollableRect():Rectangle{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:EdgeMetrics; var _local8:Rectangle; var _local9:DisplayObject; var _local10:Number; var _local11:Number; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local9 = getChildAt(_local6); _local10 = 0; _local11 = 0; if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){ } else { _local1 = Math.min(_local1, _local9.x); _local2 = Math.min(_local2, _local9.y); if ((_local9 is IStyleClient)){ _local10 = IStyleClient(_local9).getStyle("right"); _local11 = IStyleClient(_local9).getStyle("bottom"); if (isNaN(_local10)){ _local10 = 0; }; if (isNaN(_local11)){ _local11 = 0; }; }; if (!isNaN(_local9.width)){ _local3 = Math.max(_local3, ((_local9.x + _local9.width) + _local10)); }; if (!isNaN(_local9.height)){ _local4 = Math.max(_local4, ((_local9.y + _local9.height) + _local11)); }; }; _local6++; }; _local7 = viewMetrics; _local8 = new Rectangle(); _local8.left = _local1; _local8.top = _local2; _local8.right = _local3; _local8.bottom = _local4; if (usePadding){ _local8.right = (_local8.right + getStyle("paddingRight")); _local8.bottom = (_local8.bottom + getStyle("paddingBottom")); }; return (_local8); } override protected function measure():void{ super.measure(); layoutObject.measure(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); } } }//package mx.containers
Section 81
//Grid (mx.containers.Grid) package mx.containers { import mx.core.*; import mx.containers.gridClasses.*; public class Grid extends Box { private var needToRemeasure:Boolean;// = true private var rowHeights:Array; private var columnWidths:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function Grid(){ needToRemeasure = true; super(); } override protected function measure():void{ var _local1:int; var _local2:int; var _local3:Array; var _local4:GridRow; var _local5:GridItem; var _local6:int; var _local7:int; var _local8:int; var _local9:Array; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:EdgeMetrics; var _local21:Number; var _local22:GridRow; var _local23:EdgeMetrics; var _local24:Number; var _local25:int; var _local26:int; var _local27:int; var _local28:*; var _local29:*; var _local30:GridRowInfo; var _local31:GridColumnInfo; var _local32:Number; _local1 = 0; _local2 = 0; _local3 = []; _local9 = []; _local10 = 0; while (_local10 < numChildren) { _local4 = GridRow(getChildAt(_local10)); if (_local4.includeInLayout){ _local9.push(_local4); _local1++; }; _local10++; }; _local6 = 0; while (_local6 < _local1) { _local8 = 0; _local4 = _local9[_local6]; _local9[_local6].numGridItems = _local4.numChildren; _local4.rowIndex = _local6; _local7 = 0; while (_local7 < _local4.numGridItems) { if (_local6 > 0){ _local25 = _local3[_local8]; while (((!(isNaN(_local25))) && ((_local25 >= _local6)))) { _local8++; _local25 = _local3[_local8]; }; }; _local5 = GridItem(_local4.getChildAt(_local7)); _local5.colIndex = _local8; if (_local5.rowSpan > 1){ _local26 = ((_local6 + _local5.rowSpan) - 1); _local27 = 0; while (_local27 < _local5.colSpan) { _local3[(_local8 + _local27)] = _local26; _local27++; }; }; _local8 = (_local8 + _local5.colSpan); _local7++; }; if (_local8 > _local2){ _local2 = _local8; }; _local6++; }; rowHeights = new Array(_local1); columnWidths = new Array(_local2); _local6 = 0; while (_local6 < _local1) { rowHeights[_local6] = new GridRowInfo(); _local6++; }; _local6 = 0; while (_local6 < _local2) { columnWidths[_local6] = new GridColumnInfo(); _local6++; }; _local11 = int.MAX_VALUE; _local13 = 1; _local14 = getStyle("horizontalGap"); _local15 = getStyle("verticalGap"); do { _local12 = _local13; _local13 = _local11; _local6 = 0; while (_local6 < _local1) { _local4 = _local9[_local6]; _local4.columnWidths = columnWidths; _local4.rowHeights = rowHeights; _local7 = 0; while (_local7 < _local4.numGridItems) { _local5 = GridItem(_local4.getChildAt(_local7)); _local28 = _local5.rowSpan; _local29 = _local5.colSpan; if (_local28 == _local12){ distributeItemHeight(_local5, _local6, _local15, rowHeights); } else { if ((((_local28 > _local12)) && ((_local28 < _local13)))){ _local13 = _local28; }; }; if (_local29 == _local12){ distributeItemWidth(_local5, _local5.colIndex, _local14, columnWidths); } else { if ((((_local29 > _local12)) && ((_local29 < _local13)))){ _local13 = _local29; }; }; _local7++; }; _local6++; }; } while (_local13 < _local11); _local16 = 0; _local17 = 0; _local18 = 0; _local19 = 0; _local6 = 0; while (_local6 < _local1) { _local30 = rowHeights[_local6]; if (_local30.min > _local30.preferred){ _local30.min = _local30.preferred; }; if (_local30.max < _local30.preferred){ _local30.max = _local30.preferred; }; _local17 = (_local17 + _local30.min); _local19 = (_local19 + _local30.preferred); _local6++; }; _local6 = 0; while (_local6 < _local2) { _local31 = columnWidths[_local6]; if (_local31.min > _local31.preferred){ _local31.min = _local31.preferred; }; if (_local31.max < _local31.preferred){ _local31.max = _local31.preferred; }; _local16 = (_local16 + _local31.min); _local18 = (_local18 + _local31.preferred); _local6++; }; _local20 = viewMetricsAndPadding; _local21 = (_local20.left + _local20.right); _local24 = 0; if (_local2 > 1){ _local21 = (_local21 + (getStyle("horizontalGap") * (_local2 - 1))); }; _local6 = 0; while (_local6 < _local1) { _local22 = _local9[_local6]; _local23 = _local22.viewMetricsAndPadding; _local32 = (_local23.left + _local23.right); if (_local32 > _local24){ _local24 = _local32; }; _local6++; }; _local21 = (_local21 + _local24); _local16 = (_local16 + _local21); _local18 = (_local18 + _local21); _local21 = (_local20.top + _local20.bottom); if (_local1 > 1){ _local21 = (_local21 + (getStyle("verticalGap") * (_local1 - 1))); }; _local6 = 0; while (_local6 < _local1) { _local22 = _local9[_local6]; _local23 = _local22.viewMetricsAndPadding; _local21 = (_local21 + (_local23.top + _local23.bottom)); _local6++; }; _local17 = (_local17 + _local21); _local19 = (_local19 + _local21); _local6 = 0; while (_local6 < _local1) { _local22 = _local9[_local6]; _local22.updateRowMeasurements(); _local6++; }; super.measure(); measuredMinWidth = Math.max(measuredMinWidth, _local16); measuredMinHeight = Math.max(measuredMinHeight, _local17); measuredWidth = Math.max(measuredWidth, _local18); measuredHeight = Math.max(measuredHeight, _local19); needToRemeasure = false; } private function distributeItemWidth(_arg1:GridItem, _arg2:int, _arg3:Number, _arg4:Array):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Boolean; var _local12:int; var _local13:GridColumnInfo; var _local14:Number; var _local15:Number; _local5 = _arg1.maxWidth; _local6 = _arg1.getExplicitOrMeasuredWidth(); _local7 = _arg1.minWidth; _local8 = _arg1.colSpan; _local9 = _arg1.percentWidth; _local10 = 0; _local11 = false; _local12 = _arg2; while (_local12 < (_arg2 + _local8)) { _local13 = _arg4[_local12]; _local6 = (_local6 - _local13.preferred); _local7 = (_local7 - _local13.min); _local10 = (_local10 + _local13.flex); _local12++; }; if (_local8 > 1){ _local14 = (_arg3 * (_local8 - 1)); _local6 = (_local6 - _local14); _local7 = (_local7 - _local14); }; if (_local10 == 0){ _local10 = _local8; _local11 = true; }; _local6 = ((_local6 > 0)) ? Math.ceil((_local6 / _local10)) : 0; _local7 = ((_local7 > 0)) ? Math.ceil((_local7 / _local10)) : 0; _local12 = _arg2; while (_local12 < (_arg2 + _local8)) { _local13 = _arg4[_local12]; _local15 = (_local11) ? 1 : _local13.flex; _local13.preferred = (_local13.preferred + (_local6 * _local15)); _local13.min = (_local13.min + (_local7 * _local15)); if (_local9){ _local13.percent = Math.max(_local13.percent, (_local9 / _local8)); }; _local12++; }; if ((((_local8 == 1)) && ((_local5 < _local13.max)))){ _local13.max = _local5; }; } private function distributeItemHeight(_arg1:GridItem, _arg2:Number, _arg3:Number, _arg4:Array):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Boolean; var _local11:int; var _local12:GridRowInfo; var _local13:Number; var _local14:Number; _local5 = _arg1.maxHeight; _local6 = _arg1.getExplicitOrMeasuredHeight(); _local7 = _arg1.minHeight; _local8 = _arg1.rowSpan; _local9 = 0; _local10 = false; _local11 = _arg2; while (_local11 < (_arg2 + _local8)) { _local12 = _arg4[_local11]; _local6 = (_local6 - _local12.preferred); _local7 = (_local7 - _local12.min); _local9 = (_local9 + _local12.flex); _local11++; }; if (_local8 > 1){ _local13 = (_arg3 * (_local8 - 1)); _local6 = (_local6 - _local13); _local7 = (_local7 - _local13); }; if (_local9 == 0){ _local9 = _local8; _local10 = true; }; _local6 = ((_local6 > 0)) ? Math.ceil((_local6 / _local9)) : 0; _local7 = ((_local7 > 0)) ? Math.ceil((_local7 / _local9)) : 0; _local11 = _arg2; while (_local11 < (_arg2 + _local8)) { _local12 = _arg4[_local11]; _local14 = (_local10) ? 1 : _local12.flex; _local12.preferred = (_local12.preferred + (_local6 * _local14)); _local12.min = (_local12.min + (_local7 * _local14)); _local11++; }; if ((((_local8 == 1)) && ((_local5 < _local12.max)))){ _local12.max = _local5; }; } override public function invalidateSize():void{ if (((!(isNaN(explicitWidth))) && (!(isNaN(explicitHeight))))){ needToRemeasure = true; }; super.invalidateSize(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:int; var _local5:GridRow; var _local6:Array; var _local7:int; if (needToRemeasure){ measure(); }; super.updateDisplayList(_arg1, _arg2); _local3 = 0; _local6 = []; _local7 = 0; while (_local7 < numChildren) { _local5 = GridRow(getChildAt(_local7)); if (_local5.includeInLayout){ _local6.push(_local5); _local3++; }; _local7++; }; _local4 = 0; while (_local4 < _local3) { _local5 = _local6[_local4]; rowHeights[_local4].y = _local5.y; rowHeights[_local4].height = _local5.height; _local4++; }; _local4 = 0; while (_local4 < _local3) { _local5 = _local6[_local4]; _local6[_local4].doRowLayout((_local5.width * _local5.scaleX), (_local5.height * _local5.scaleY)); _local4++; }; } } }//package mx.containers
Section 82
//GridItem (mx.containers.GridItem) package mx.containers { public class GridItem extends HBox { private var _rowSpan:int;// = 1 var colIndex:int;// = 0 private var _colSpan:int;// = 1 mx_internal static const VERSION:String = "2.0.1.0"; public function GridItem(){ colIndex = 0; _colSpan = 1; _rowSpan = 1; super(); } public function get rowSpan():int{ return (_rowSpan); } public function set rowSpan(_arg1:int):void{ _rowSpan = _arg1; invalidateSize(); } public function get colSpan():int{ return (_colSpan); } public function set colSpan(_arg1:int):void{ _colSpan = _arg1; invalidateSize(); } } }//package mx.containers
Section 83
//GridRow (mx.containers.GridRow) package mx.containers { import mx.core.*; import flash.display.*; import mx.containers.utilityClasses.*; import mx.containers.gridClasses.*; public class GridRow extends HBox { var rowHeights:Array; var columnWidths:Array; var numGridItems:int; var rowIndex:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function GridRow(){ rowIndex = 0; super(); super.clipContent = false; } override public function getStyle(_arg1:String){ return (((((_arg1 == "horizontalGap")) && (parent))) ? Grid(parent).getStyle("horizontalGap") : super.getStyle(_arg1)); } override public function invalidateDisplayList():void{ super.invalidateDisplayList(); if (parent){ Grid(parent).invalidateDisplayList(); }; } override public function get horizontalScrollPolicy():String{ return (ScrollPolicy.OFF); } override public function get verticalScrollPolicy():String{ return (ScrollPolicy.OFF); } private function calculateColumnWidths():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:int; var _local4:Number; var _local5:Number; var _local6:GridColumnInfo; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Array; var _local11:Number; var _local12:Number; var _local13:int; _local1 = viewMetricsAndPadding; _local2 = getStyle("horizontalGap"); _local3 = columnWidths.length; _local4 = (((unscaledWidth - _local1.left) - _local1.right) - ((_local3 - 1) * _local2)); _local9 = 0; _local10 = []; _local5 = _local4; _local8 = 0; while (_local8 < _local3) { _local6 = columnWidths[_local8]; _local11 = _local6.percent; if (_local11){ _local9 = (_local9 + _local11); _local10.push(_local6); } else { _local12 = (_local6.width = _local6.preferred); _local5 = (_local5 - _local12); }; _local8++; }; if (_local9){ _local5 = Flex.flexChildrenProportionally(_local4, _local5, _local9, _local10); _local13 = _local10.length; _local8 = 0; while (_local8 < _local13) { _local6 = _local10[_local8]; _local10[_local8].width = _local6.size; _local8++; }; }; _local7 = (_local1.left + (_local5 * layoutObject.getHorizontalAlignValue())); _local8 = 0; while (_local8 < _local3) { _local6 = columnWidths[_local8]; _local6.x = _local7; _local7 = (_local7 + (_local6.width + _local2)); _local8++; }; } override public function set horizontalScrollPolicy(_arg1:String):void{ } function doRowLayout(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Boolean; var _local5:Boolean; var _local6:EdgeMetrics; var _local7:int; var _local8:GridItem; var _local9:int; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:int; var _local14:GridColumnInfo; var _local15:Number; var _local16:int; var _local17:GridRowInfo; var _local18:Number; var _local19:Number; layoutChrome(_arg1, _arg2); _local3 = numChildren; if (_local3 == 0){ return; }; _local4 = invalidateSizeFlag; _local5 = invalidateDisplayListFlag; invalidateSizeFlag = true; invalidateDisplayListFlag = true; if ((((((((((((((((((((((parent.getChildIndex(this) == 0)) || (isNaN(columnWidths[0].x)))) || (!((columnWidths.minWidth == minWidth))))) || (!((columnWidths.maxWidth == maxWidth))))) || (!((columnWidths.preferredWidth == getExplicitOrMeasuredWidth()))))) || (!((columnWidths.percentWidth == percentWidth))))) || (!((columnWidths.width == _arg1))))) || (!((columnWidths.paddingLeft == getStyle("paddingLeft")))))) || (!((columnWidths.paddingRight == getStyle("paddingRight")))))) || (!((columnWidths.horizontalAlign == getStyle("horizontalAlign")))))) || (!((columnWidths.borderStyle == getStyle("borderStyle")))))){ calculateColumnWidths(); columnWidths.minWidth = minWidth; columnWidths.maxWidth = maxWidth; columnWidths.preferredWidth = getExplicitOrMeasuredWidth(); columnWidths.percentWidth = percentWidth; columnWidths.width = _arg1; columnWidths.paddingLeft = getStyle("paddingLeft"); columnWidths.paddingRight = getStyle("paddingRight"); columnWidths.horizontalAlign = getStyle("horizontalAlign"); columnWidths.borderStyle = getStyle("borderStyle"); }; _local6 = viewMetricsAndPadding; _local7 = 0; while (_local7 < _local3) { _local8 = GridItem(getChildAt(_local7)); _local9 = _local8.colIndex; _local10 = columnWidths[_local9].x; _local11 = _local6.top; _local12 = _local8.percentHeight; _local13 = Math.min((_local9 + _local8.colSpan), columnWidths.length); _local14 = columnWidths[(_local13 - 1)]; _local15 = ((_local14.x + _local14.width) - _local10); _local16 = Math.min((rowIndex + _local8.rowSpan), rowHeights.length); _local17 = rowHeights[(_local16 - 1)]; _local18 = ((((_local17.y + _local17.height) - rowHeights[rowIndex].y) - _local6.top) - _local6.bottom); _local19 = (_local15 - _local8.maxWidth); if (_local19 > 0){ _local10 = (_local10 + (_local19 * layoutObject.getHorizontalAlignValue())); _local15 = (_local15 - _local19); }; _local19 = (_local18 - _local8.maxHeight); if (((_local12) && ((_local12 < 100)))){ _local19 = Math.max(_local19, (_local18 * (100 - _local12))); }; if (_local19 > 0){ _local11 = (_local19 * layoutObject.getVerticalAlignValue()); _local18 = (_local18 - _local19); }; _local15 = Math.ceil(_local15); _local18 = Math.ceil(_local18); _local8.move(_local10, _local11); _local8.setActualSize(_local15, _local18); _local7++; }; invalidateSizeFlag = _local4; invalidateDisplayListFlag = _local5; } override public function set verticalScrollPolicy(_arg1:String):void{ } override public function set clipContent(_arg1:Boolean):void{ } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, _arg2); Grid(parent).invalidateSize(); Grid(parent).invalidateDisplayList(); } override public function get clipContent():Boolean{ return (false); } function updateRowMeasurements():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:int; var _local5:Number; var _local6:Number; var _local7:GridRowInfo; var _local8:GridColumnInfo; _local1 = columnWidths.length; _local2 = 0; _local3 = 0; _local4 = 0; while (_local4 < _local1) { _local8 = columnWidths[_local4]; _local2 = (_local2 + _local8.min); _local3 = (_local3 + _local8.preferred); _local4++; }; _local5 = layoutObject.widthPadding(_local1); _local6 = layoutObject.heightPadding(0); _local7 = rowHeights[rowIndex]; measuredMinWidth = (_local2 + _local5); measuredMinHeight = (_local7.min + _local6); measuredWidth = (_local3 + _local5); measuredHeight = (_local7.preferred + _local6); } override public function invalidateSize():void{ super.invalidateSize(); if (parent){ Grid(parent).invalidateSize(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } } }//package mx.containers
Section 84
//HBox (mx.containers.HBox) package mx.containers { import mx.core.*; public class HBox extends Box { mx_internal static const VERSION:String = "2.0.1.0"; public function HBox(){ mx_internal::layoutObject.direction = BoxDirection.HORIZONTAL; } override public function set direction(_arg1:String):void{ } } }//package mx.containers
Section 85
//Tile (mx.containers.Tile) package mx.containers { import mx.core.*; import flash.events.*; public class Tile extends Container { mx_internal var cellHeight:Number; mx_internal var cellWidth:Number; private var _direction:String;// = "horizontal" private var _tileWidth:Number; private var _tileHeight:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function Tile(){ _direction = TileDirection.HORIZONTAL; super(); } private function setChildSize(_arg1:IUIComponent):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if (_arg1.percentWidth > 0){ _local2 = Math.min(cellWidth, ((cellWidth * _arg1.percentWidth) / 100)); } else { _local2 = _arg1.getExplicitOrMeasuredWidth(); if (_local2 > cellWidth){ _local4 = (isNaN(_arg1.explicitWidth)) ? 0 : _arg1.explicitWidth; _local5 = (isNaN(_arg1.explicitMinWidth)) ? 0 : _arg1.explicitMinWidth; _local2 = ((((_local4 > cellWidth)) || ((_local5 > cellWidth)))) ? Math.max(_local5, _local4) : cellWidth; }; }; if (_arg1.percentHeight > 0){ _local3 = Math.min(cellHeight, ((cellHeight * _arg1.percentHeight) / 100)); } else { _local3 = _arg1.getExplicitOrMeasuredHeight(); if (_local3 > cellHeight){ _local4 = (isNaN(_arg1.explicitHeight)) ? 0 : _arg1.explicitHeight; _local5 = (isNaN(_arg1.explicitMinHeight)) ? 0 : _arg1.explicitMinHeight; _local3 = ((((_local4 > cellHeight)) || ((_local5 > cellHeight)))) ? Math.max(_local5, _local4) : cellHeight; }; }; _arg1.setActualSize(_local2, _local3); } mx_internal function findCellSize():void{ var _local1:Boolean; var _local2:Boolean; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:IUIComponent; var _local8:Number; var _local9:Number; _local1 = !(isNaN(tileWidth)); _local2 = !(isNaN(tileHeight)); if (((_local1) && (_local2))){ cellWidth = tileWidth; cellHeight = tileHeight; return; }; _local3 = 0; _local4 = 0; _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local7 = IUIComponent(getChildAt(_local6)); if (!_local7.includeInLayout){ } else { _local8 = _local7.getExplicitOrMeasuredWidth(); if (_local8 > _local3){ _local3 = _local8; }; _local9 = _local7.getExplicitOrMeasuredHeight(); if (_local9 > _local4){ _local4 = _local9; }; }; _local6++; }; cellWidth = (_local1) ? tileWidth : _local3; cellHeight = (_local2) ? tileHeight : _local4; } override protected function measure():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; var _local8:EdgeMetrics; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; super.measure(); findCellSize(); _local3 = cellWidth; _local4 = cellHeight; _local5 = numChildren; _local6 = _local5; _local7 = 0; while (_local7 < _local5) { if (!IUIComponent(getChildAt(_local7)).includeInLayout){ _local6--; }; _local7++; }; _local5 = _local6; if (_local5 > 0){ _local11 = getStyle("horizontalGap"); _local12 = getStyle("verticalGap"); if (direction == TileDirection.HORIZONTAL){ _local15 = (explicitWidth / Math.abs(scaleX)); if (!isNaN(_local15)){ _local13 = Math.floor((_local15 / (cellWidth + _local11))); }; } else { _local16 = (explicitHeight / Math.abs(scaleY)); if (!isNaN(_local16)){ _local13 = Math.floor((_local16 / (cellHeight + _local12))); }; }; if (isNaN(_local13)){ _local13 = Math.ceil(Math.sqrt(_local5)); }; if (_local13 < 1){ _local13 = 1; }; _local14 = Math.ceil((_local5 / _local13)); if (direction == TileDirection.HORIZONTAL){ _local1 = ((_local13 * cellWidth) + ((_local13 - 1) * _local11)); _local2 = ((_local14 * cellHeight) + ((_local14 - 1) * _local12)); } else { _local1 = ((_local14 * cellWidth) + ((_local14 - 1) * _local11)); _local2 = ((_local13 * cellHeight) + ((_local13 - 1) * _local12)); }; } else { _local1 = _local3; _local2 = _local4; }; _local8 = viewMetricsAndPadding; _local9 = (_local8.left + _local8.right); _local10 = (_local8.top + _local8.bottom); _local3 = (_local3 + _local9); _local1 = (_local1 + _local9); _local4 = (_local4 + _local10); _local2 = (_local2 + _local10); measuredMinWidth = Math.ceil(_local3); measuredMinHeight = Math.ceil(_local4); measuredWidth = Math.ceil(_local1); measuredHeight = Math.ceil(_local2); } public function get tileHeight():Number{ return (_tileHeight); } mx_internal function calcVerticalOffset(_arg1:Number, _arg2:String):Number{ var _local3:Number; if (_arg2 == "top"){ _local3 = 0; } else { if (_arg2 == "middle"){ _local3 = ((cellHeight - _arg1) / 2); } else { if (_arg2 == "bottom"){ _local3 = (cellHeight - _arg1); }; }; }; return (_local3); } mx_internal function calcHorizontalOffset(_arg1:Number, _arg2:String):Number{ var _local3:Number; if (_arg2 == "left"){ _local3 = 0; } else { if (_arg2 == "center"){ _local3 = ((cellWidth - _arg1) / 2); } else { if (_arg2 == "right"){ _local3 = (cellWidth - _arg1); }; }; }; return (_local3); } public function set tileHeight(_arg1:Number):void{ _tileHeight = _arg1; invalidateSize(); } public function set direction(_arg1:String):void{ _direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function set tileWidth(_arg1:Number):void{ _tileWidth = _arg1; invalidateSize(); } public function get direction():String{ return (_direction); } public function get tileWidth():Number{ return (_tileWidth); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; var _local9:String; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:int; var _local15:int; var _local16:IUIComponent; var _local17:Number; var _local18:Number; super.updateDisplayList(_arg1, _arg2); if (((isNaN(cellWidth)) || (isNaN(cellHeight)))){ findCellSize(); }; _local3 = viewMetricsAndPadding; _local4 = getStyle("paddingLeft"); _local5 = getStyle("paddingTop"); _local6 = getStyle("horizontalGap"); _local7 = getStyle("verticalGap"); _local8 = getStyle("horizontalAlign"); _local9 = getStyle("verticalAlign"); _local10 = _local4; _local11 = _local5; _local14 = numChildren; if (direction == TileDirection.HORIZONTAL){ _local17 = (Math.ceil(_arg1) - _local3.right); _local15 = 0; while (_local15 < _local14) { _local16 = IUIComponent(getChildAt(_local15)); if (!_local16.includeInLayout){ } else { if ((_local10 + cellWidth) > _local17){ if (_local10 != _local4){ _local11 = (_local11 + (cellHeight + _local7)); _local10 = _local4; }; }; setChildSize(_local16); _local12 = Math.floor(calcHorizontalOffset(_local16.width, _local8)); _local13 = Math.floor(calcVerticalOffset(_local16.height, _local9)); _local16.move((_local10 + _local12), (_local11 + _local13)); _local10 = (_local10 + (cellWidth + _local6)); }; _local15++; }; } else { _local18 = (Math.ceil(_arg2) - _local3.bottom); _local15 = 0; while (_local15 < _local14) { _local16 = IUIComponent(getChildAt(_local15)); if (!_local16.includeInLayout){ } else { if ((_local11 + cellHeight) > _local18){ if (_local11 != _local5){ _local10 = (_local10 + (cellWidth + _local6)); _local11 = _local5; }; }; setChildSize(_local16); _local12 = Math.floor(calcHorizontalOffset(_local16.width, _local8)); _local13 = Math.floor(calcVerticalOffset(_local16.height, _local9)); _local16.move((_local10 + _local12), (_local11 + _local13)); _local11 = (_local11 + (cellHeight + _local7)); }; _local15++; }; }; cellWidth = NaN; cellHeight = NaN; } } }//package mx.containers
Section 86
//TileDirection (mx.containers.TileDirection) package mx.containers { public final class TileDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.containers
Section 87
//DataGridBase (mx.controls.dataGridClasses.DataGridBase) package mx.controls.dataGridClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.collections.*; import mx.controls.listClasses.*; import flash.utils.*; import mx.collections.errors.*; import flash.ui.*; public class DataGridBase extends ListBase { private var bSelectItem:Boolean;// = false mx_internal var _explicitHeaderHeight:Boolean; protected var columnMap:Object; mx_internal var visibleColumns:Array; private var lockedRowCountResetShowHeaders:Boolean;// = false private var lastKey:uint;// = 0 mx_internal var _headerHeight:Number;// = 22 private var _showHeaders:Boolean;// = true private var bShiftKey:Boolean;// = false private var bCtrlKey:Boolean;// = false protected var freeItemRenderersTable:Dictionary; mx_internal var columnsInvalid:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function DataGridBase(){ columnsInvalid = true; bShiftKey = false; bCtrlKey = false; lastKey = 0; bSelectItem = false; lockedRowCountResetShowHeaders = false; _headerHeight = 22; _showHeaders = true; super(); listType = "vertical"; lockedRowCount = 1; defaultRowCount = 7; columnMap = {}; freeItemRenderersTable = new Dictionary(false); } mx_internal function columnWordWrap(_arg1:DataGridColumn):Boolean{ if (_arg1.wordWrap == true){ return (true); }; if (_arg1.wordWrap == false){ return (false); }; return (wordWrap); } override public function set lockedRowCount(_arg1:int):void{ if (((showHeaders) && ((_arg1 == 0)))){ showHeaders = false; lockedRowCountResetShowHeaders = true; }; if (((((!(showHeaders)) && ((_arg1 > 0)))) && (lockedRowCountResetShowHeaders))){ showHeaders = true; lockedRowCountResetShowHeaders = false; }; super.lockedRowCount = _arg1; } mx_internal function columnHeaderWordWrap(_arg1:DataGridColumn):Boolean{ if (_arg1.headerWordWrap == true){ return (true); }; if (_arg1.headerWordWrap == false){ return (false); }; return (wordWrap); } override public function itemRendererToIndex(_arg1:IListItemRenderer):int{ var _local2:int; _local2 = super.itemRendererToIndex(_arg1); return (((_local2 == int.MIN_VALUE)) ? _local2 : (headerVisible) ? (_local2 - 1) : _local2); } protected function makeListData(_arg1:Object, _arg2:String, _arg3:int, _arg4:int, _arg5:DataGridColumn):BaseListData{ if ((_arg1 is DataGridColumn)){ return (new DataGridListData(((_arg5.headerText)!=null) ? _arg5.headerText : _arg5.dataField, _arg5.dataField, _arg4, _arg2, this, _arg3)); //unresolved jump }; return (new DataGridListData(_arg5.itemToLabel(_arg1), _arg5.dataField, _arg4, _arg2, this, _arg3)); } public function get headerHeight():Number{ return (_headerHeight); } override protected function finishKeySelection():void{ var _local1:String; var _local2:int; var _local3:int; var _local4:int; var _local5:IListItemRenderer; var _local6:Boolean; var _local7:ListEvent; var _local8:Point; _local2 = listItems.length; _local3 = (((rowInfo[(_local2 - 1)].y + rowInfo[(_local2 - 1)].height))>listContent.height) ? 1 : 0; _local4 = (headerVisible) ? 1 : 0; if (lastKey == Keyboard.PAGE_DOWN){ if (lockedRowCount >= ((_local2 - _local3) - 1)){ caretIndex = Math.min(((verticalScrollPosition + lockedRowCount) - _local4), (collection.length - 1)); } else { caretIndex = Math.min(((((verticalScrollPosition + _local2) - _local4) - _local3) - 1), (collection.length - 1)); }; }; _local6 = false; if (((bSelectItem) && (((caretIndex - verticalScrollPosition) >= 0)))){ if (((caretIndex - verticalScrollPosition) + _local4) > (listItems.length - 1)){ caretIndex = (((listItems.length - 1) + verticalScrollPosition) - _local4); }; _local5 = listItems[((caretIndex - verticalScrollPosition) + _local4)][0]; if (_local5){ _local1 = itemToUID(_local5.data); _local5 = visibleData[_local1]; if (!bCtrlKey){ selectItem(_local5, bShiftKey, bCtrlKey); _local6 = true; }; if (bCtrlKey){ drawItem(_local5, !((selectedData[_local1] == null)), (_local1 == highlightUID), true); }; }; }; if (_local6){ _local7 = new ListEvent(ListEvent.CHANGE); _local7.itemRenderer = _local5; _local8 = itemRendererToIndices(_local5); if (_local8){ _local7.rowIndex = _local8.y; _local7.columnIndex = _local8.x; }; dispatchEvent(_local7); }; } override protected function makeRowsAndColumns(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:uint=0):Point{ var xx:Number; var yy:Number; var ww:Number; var hh:Number; var rh:Number; var bSelected:Boolean; var bHighlight:Boolean; var bCaret:Boolean; var rowData:DataGridListData; var i:int; var j:int; var colNum:int; var rowNum:int; var rowsMade:int; var item:IListItemRenderer; var extraItem:IListItemRenderer; var data:Object; var uid:String; var c:DataGridColumn; var more:Boolean; var valid:Boolean; var numLocked:int; var maxHeaderHeight:Number; var bookmark:CursorBookmark; var oldHeader:DisplayObject; var rr:Array; var left = _arg1; var top = _arg2; var right = _arg3; var bottom = _arg4; var firstCol = _arg5; var firstRow = _arg6; var byCount = _arg7; var rowsNeeded = _arg8; bSelected = false; bHighlight = false; bCaret = false; colNum = lockedColumnCount; rowNum = lockedRowCount; rowsMade = 0; if (((!(visibleColumns)) || ((visibleColumns.length == 0)))){ while (listItems.length) { rowNum = (listItems.length - 1); while (listItems[rowNum].length) { item = listItems[rowNum].pop(); addToFreeItemRenderers(item); }; listItems.pop(); }; visibleData = {}; return (new Point(0, 0)); }; invalidateSizeFlag = true; more = true; valid = true; yy = top; numLocked = lockedRowCount; if ((((lockedRowCount > 0)) && (((((!(listItems[(lockedRowCount - 1)])) || (!(listItems[(lockedRowCount - 1)][0])))) || ((top < (listItems[(lockedRowCount - 1)][0].y + listItems[(lockedRowCount - 1)][0].height))))))){ rowNum = 0; maxHeaderHeight = 0; if (headerVisible){ xx = left; hh = 0; colNum = 0; while ((((xx < right)) && ((colNum < visibleColumns.length)))) { c = visibleColumns[colNum]; item = columnItemRenderer(c, true); rowData = DataGridListData(makeListData(c, uid, rowNum, c.colNum, c)); rowMap[item.name] = rowData; if ((item is IDropInListItemRenderer)){ IDropInListItemRenderer(item).listData = rowData; }; item.data = c; item.styleName = c; listContent.addChild(DisplayObject(item)); if (!listItems[rowNum]){ listItems[rowNum] = []; }; oldHeader = listItems[rowNum][colNum]; if (oldHeader){ delete rowMap[oldHeader.name]; listContent.removeChild(oldHeader); }; listItems[rowNum][colNum] = item; var _local10 = c.width; ww = _local10; item.explicitWidth = _local10; UIComponentGlobals.layoutManager.validateClient(item, true); rh = item.getExplicitOrMeasuredHeight(); item.setActualSize(ww, (_explicitHeaderHeight) ? ((_headerHeight - cachedPaddingTop) - cachedPaddingBottom) : rh); item.move(xx, (yy + cachedPaddingTop)); xx = (xx + ww); colNum = (colNum + 1); hh = Math.ceil(Math.max(hh, (_explicitHeaderHeight) ? _headerHeight : ((rh + cachedPaddingBottom) + cachedPaddingTop))); maxHeaderHeight = Math.max(maxHeaderHeight, (_explicitHeaderHeight) ? ((_headerHeight - cachedPaddingTop) - cachedPaddingBottom) : rh); }; if (listItems[rowNum]){ i = 0; while (i < listItems[rowNum].length) { listItems[rowNum][i].setActualSize(listItems[rowNum][i].width, maxHeaderHeight); i = (i + 1); }; while (listItems[rowNum].length > colNum) { extraItem = listItems[rowNum].pop(); delete rowMap[DisplayObject(extraItem).name]; listContent.removeChild(DisplayObject(extraItem)); }; }; rowInfo[rowNum] = new ListRowInfo(yy, hh, uid); yy = (yy + (item) ? hh : 0); if (!_explicitHeaderHeight){ _headerHeight = (item) ? hh : 0; }; numLocked = (numLocked - 1); rowNum = (rowNum + 1); rowsMade = (rowsMade + 1); }; if (((numLocked) && (iterator))){ bookmark = iterator.bookmark; try { iterator.seek(CursorBookmark.FIRST); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; more = ((((!((iterator == null))) && (!(iterator.afterLast)))) && (iteratorValid)); i = 0; while (i < numLocked) { valid = more; data = (more) ? iterator.current : null; if (((iterator) && (more))){ try { more = iterator.moveNext(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); more = false; iteratorValid = false; }; }; xx = left; hh = 0; colNum = 0; uid = null; if (!listItems[rowNum]){ listItems[rowNum] = []; }; if (valid){ while ((((xx < right)) && ((colNum < visibleColumns.length)))) { c = visibleColumns[colNum]; item = listItems[rowNum][colNum]; uid = itemToUID(data); if (((((!(item)) || (!((itemToUID(item.data) == uid))))) || (!((columnMap[item.name] == c))))){ if (((freeItemRenderersTable[c]) && (freeItemRenderersTable[c].length))){ item = freeItemRenderersTable[c].pop(); } else { item = columnItemRenderer(c, false); item.styleName = c; listContent.addChild(DisplayObject(item)); }; rowData = DataGridListData(makeListData(data, uid, rowNum, c.colNum, c)); rowMap[item.name] = rowData; columnMap[item.name] = c; if ((item is IDropInListItemRenderer)){ IDropInListItemRenderer(item).listData = (data) ? rowData : null; }; item.data = data; if (listItems[rowNum][colNum]){ addToFreeItemRenderers(listItems[rowNum][colNum]); }; listItems[rowNum][colNum] = item; }; item.visible = true; if (((uid) && ((colNum == 0)))){ visibleData[uid] = item; }; _local10 = getWidthOfItem(item, c); ww = _local10; item.explicitWidth = _local10; UIComponentGlobals.layoutManager.validateClient(item, true); rh = item.getExplicitOrMeasuredHeight(); item.setActualSize(ww, (variableRowHeight) ? rh : ((rowHeight - cachedPaddingTop) - cachedPaddingBottom)); item.move(xx, (yy + cachedPaddingTop)); xx = (xx + ww); colNum = (colNum + 1); hh = Math.ceil(Math.max(hh, (variableRowHeight) ? ((rh + cachedPaddingTop) + cachedPaddingBottom) : rowHeight)); }; } else { hh = ((rowNum > 1)) ? rowInfo[(rowNum - 1)].height : rowHeight; }; while (listItems[rowNum].length > colNum) { extraItem = listItems[rowNum].pop(); addToFreeItemRenderers(extraItem); }; if (((valid) && (variableRowHeight))){ hh = Math.ceil(calculateRowHeight(data, hh, true)); }; if (listItems[rowNum]){ j = 0; while (j < listItems[rowNum].length) { listItems[rowNum][j].setActualSize(listItems[rowNum][j].width, ((hh - cachedPaddingTop) - cachedPaddingBottom)); j = (j + 1); }; }; if (cachedVerticalAlign != "top"){ if (cachedVerticalAlign == "bottom"){ j = 0; while (j < colNum) { item = listItems[rowNum][j]; item.move(item.x, (((yy + hh) - cachedPaddingBottom) - item.getExplicitOrMeasuredHeight())); j = (j + 1); }; } else { j = 0; while (j < colNum) { item = listItems[rowNum][j]; item.move(item.x, ((yy + cachedPaddingTop) + ((((hh - cachedPaddingBottom) - cachedPaddingTop) - item.getExplicitOrMeasuredHeight()) / 2))); j = (j + 1); }; }; }; bSelected = !((selectedData[uid] == null)); bHighlight = (highlightUID == uid); bCaret = (caretUID == uid); rowInfo[rowNum] = new ListRowInfo(yy, hh, uid); if (((valid) && (visibleData[uid]))){ drawItem(visibleData[uid], bSelected, bHighlight, bCaret); }; yy = (yy + hh); rowNum = (rowNum + 1); rowsMade = (rowsMade + 1); i = (i + 1); }; if (bookmark){ try { iterator.seek(bookmark, numLocked); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; } else { rowNum = firstRow; }; more = ((((!((iterator == null))) && (!(iterator.afterLast)))) && (iteratorValid)); while (((((!(byCount)) && ((yy < bottom)))) || (((byCount) && ((rowsNeeded > 0)))))) { if (byCount){ rowsNeeded = (rowsNeeded - 1); }; valid = more; data = (more) ? iterator.current : null; if (((iterator) && (more))){ try { more = iterator.moveNext(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); more = false; iteratorValid = false; }; }; xx = left; hh = 0; colNum = 0; uid = null; if (!listItems[rowNum]){ listItems[rowNum] = []; }; if (valid){ while ((((xx < right)) && ((colNum < visibleColumns.length)))) { c = visibleColumns[colNum]; item = listItems[rowNum][colNum]; uid = itemToUID(data); if (((((!(item)) || (!((itemToUID(item.data) == uid))))) || (!((columnMap[item.name] == c))))){ if (((freeItemRenderersTable[c]) && (freeItemRenderersTable[c].length))){ item = freeItemRenderersTable[c].pop(); } else { item = columnItemRenderer(c, false); item.styleName = c; listContent.addChild(DisplayObject(item)); }; columnMap[item.name] = c; if (listItems[rowNum][colNum]){ addToFreeItemRenderers(listItems[rowNum][colNum]); }; listItems[rowNum][colNum] = item; }; rowData = DataGridListData(makeListData(data, uid, rowNum, c.colNum, c)); rowMap[item.name] = rowData; if ((item is IDropInListItemRenderer)){ IDropInListItemRenderer(item).listData = (data) ? rowData : null; }; item.data = data; item.visible = true; if (((uid) && ((colNum == 0)))){ visibleData[uid] = item; }; _local10 = getWidthOfItem(item, c); ww = _local10; item.explicitWidth = _local10; UIComponentGlobals.layoutManager.validateClient(item, true); rh = item.getExplicitOrMeasuredHeight(); item.setActualSize(ww, (variableRowHeight) ? item.getExplicitOrMeasuredHeight() : ((rowHeight - cachedPaddingTop) - cachedPaddingBottom)); item.move(xx, (yy + cachedPaddingTop)); xx = (xx + ww); colNum = (colNum + 1); hh = Math.ceil(Math.max(hh, (variableRowHeight) ? ((rh + cachedPaddingTop) + cachedPaddingBottom) : rowHeight)); }; } else { hh = ((rowNum > 1)) ? rowInfo[(rowNum - 1)].height : rowHeight; }; while (listItems[rowNum].length > colNum) { extraItem = listItems[rowNum].pop(); addToFreeItemRenderers(extraItem); }; if (((valid) && (variableRowHeight))){ hh = Math.ceil(calculateRowHeight(data, hh, true)); }; if (listItems[rowNum]){ j = 0; while (j < listItems[rowNum].length) { listItems[rowNum][j].setActualSize(listItems[rowNum][j].width, ((hh - cachedPaddingTop) - cachedPaddingBottom)); j = (j + 1); }; }; if (cachedVerticalAlign != "top"){ if (cachedVerticalAlign == "bottom"){ j = 0; while (j < colNum) { item = listItems[rowNum][j]; item.move(item.x, (((yy + hh) - cachedPaddingBottom) - item.getExplicitOrMeasuredHeight())); j = (j + 1); }; } else { j = 0; while (j < colNum) { item = listItems[rowNum][j]; item.move(item.x, ((yy + cachedPaddingTop) + ((((hh - cachedPaddingBottom) - cachedPaddingTop) - item.getExplicitOrMeasuredHeight()) / 2))); j = (j + 1); }; }; }; bSelected = !((selectedData[uid] == null)); bHighlight = (highlightUID == uid); bCaret = (caretUID == uid); rowInfo[rowNum] = new ListRowInfo(yy, hh, uid); if (((valid) && (visibleData[uid]))){ drawItem(visibleData[uid], bSelected, bHighlight, bCaret); }; if (hh == 0){ hh = rowHeight; }; yy = (yy + hh); rowNum = (rowNum + 1); rowsMade = (rowsMade + 1); }; if (!byCount){ while (rowNum < listItems.length) { rr = listItems.pop(); rowInfo.pop(); while (rr.length) { item = rr.pop(); addToFreeItemRenderers(item); }; }; }; invalidateSizeFlag = false; return (new Point(colNum, rowsMade)); } override protected function drawSelectionIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawSelectionIndicator(_arg1, _arg2, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } override protected function drawItem(_arg1:IListItemRenderer, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false):void{ var _local6:int; var _local7:int; var _local8:IListItemRenderer; var _local9:IInvalidating; if (!_arg1){ return; }; super.drawItem(_arg1, _arg2, _arg3, _arg4, _arg5); _local6 = rowMap[_arg1.name].rowIndex; _local7 = 0; while (_local7 < visibleColumns.length) { _local8 = listItems[_local6][_local7]; if ((_local8 is IInvalidating)){ _local9 = IInvalidating(_local8); _local9.invalidateDisplayList(); _local9.validateNow(); }; _local7++; }; } override mx_internal function mouseEventToItemRendererOrEditor(_arg1:MouseEvent):IListItemRenderer{ var _local2:DisplayObject; var _local3:Point; var _local4:Number; var _local5:int; var _local6:int; var _local7:Number; var _local8:int; var _local9:int; _local2 = DisplayObject(_arg1.target); if (_local2 == listContent){ _local3 = new Point(_arg1.stageX, _arg1.stageY); _local3 = listContent.globalToLocal(_local3); _local4 = 0; _local5 = listItems.length; _local6 = 0; while (_local6 < _local5) { if (listItems[_local6].length){ if (_local3.y < (_local4 + rowInfo[_local6].height)){ _local7 = 0; _local8 = listItems[_local6].length; _local9 = 0; while (_local9 < _local8) { if (_local3.x < (_local7 + visibleColumns[_local9].width)){ return (listItems[_local6][_local9]); }; _local7 = (_local7 + visibleColumns[_local9].width); _local9++; }; }; }; _local4 = (_local4 + rowInfo[_local6].height); _local6++; }; } else { if (_local2 == highlightIndicator){ return (lastHighlightItemRenderer); }; }; while (((_local2) && (!((_local2 == this))))) { if ((((_local2 is IListItemRenderer)) && ((_local2.parent == listContent)))){ if (_local2.visible){ return (IListItemRenderer(_local2)); }; break; }; _local2 = _local2.parent; }; return (null); } protected function calculateRowHeight(_arg1:Object, _arg2:Number, _arg3:Boolean=false):Number{ return (NaN); } override protected function addToFreeItemRenderers(_arg1:IListItemRenderer):void{ var _local2:DataGridColumn; DisplayObject(_arg1).visible = false; delete rowMap[_arg1.name]; if (columnMap[_arg1.name]){ _local2 = columnMap[_arg1.name]; if (freeItemRenderersTable[_local2] == undefined){ freeItemRenderersTable[_local2] = []; }; freeItemRenderersTable[_local2].push(_arg1); delete columnMap[_arg1.name]; }; } mx_internal function columnItemRenderer(_arg1:DataGridColumn, _arg2:Boolean):IListItemRenderer{ var _local3:IListItemRenderer; if (_arg2){ if (_arg1.headerRenderer){ _local3 = _arg1.headerRenderer.newInstance(); }; } else { if (_arg1.itemRenderer){ _local3 = _arg1.itemRenderer.newInstance(); }; }; if (!_local3){ _local3 = itemRenderer.newInstance(); }; _local3.owner = this; return (_local3); } public function set showHeaders(_arg1:Boolean):void{ if (_arg1 != _showHeaders){ _showHeaders = _arg1; _lockedRowCount = (_lockedRowCount + (_arg1) ? 1 : -1); }; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("showHeadersChanged")); } override protected function drawHighlightIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawHighlightIndicator(_arg1, _arg2, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } public function set headerHeight(_arg1:Number):void{ _headerHeight = _arg1; _explicitHeaderHeight = true; itemsSizeChanged = true; invalidateDisplayList(); } override protected function drawCaretIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawCaretIndicator(_arg1, _arg2, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } override public function get lockedRowCount():int{ var _local1:int; _local1 = super.lockedRowCount; if (((showHeaders) && ((headerHeight == 0)))){ _local1--; }; return (_local1); } mx_internal function get headerVisible():Boolean{ return (((showHeaders) && ((headerHeight > 0)))); } mx_internal function get gridColumnMap():Object{ return (columnMap); } mx_internal function getWidthOfItem(_arg1:IListItemRenderer, _arg2:DataGridColumn):Number{ return (_arg2.width); } public function get showHeaders():Boolean{ return (_showHeaders); } override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:Number; var _local5:IListItemRenderer; var _local6:String; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:Boolean; var _local12:ScrollEvent; showCaret = true; _local8 = listItems.length; _local9 = 0; if ((rowInfo[(_local8 - 1)].y + rowInfo[(_local8 - 1)].height) > listContent.height){ _local9++; }; _local10 = (headerVisible) ? 1 : 0; _local11 = false; bSelectItem = false; switch (_arg1){ case Keyboard.UP: if (caretIndex > 0){ caretIndex--; _local11 = true; bSelectItem = true; }; break; case Keyboard.DOWN: if (caretIndex < (collection.length - 1)){ caretIndex++; _local11 = true; bSelectItem = true; } else { if ((((caretIndex == (collection.length - 1))) && (_local9))){ if (verticalScrollPosition < maxVerticalScrollPosition){ _local4 = (verticalScrollPosition + 1); }; }; }; break; case Keyboard.PAGE_UP: if (caretIndex < (lockedRowCount - _local10)){ _local4 = 0; caretIndex = 0; } else { if ((((caretIndex > ((verticalScrollPosition + lockedRowCount) - _local10))) && ((caretIndex < ((verticalScrollPosition + _local8) - _local10))))){ caretIndex = ((verticalScrollPosition + lockedRowCount) - _local10); } else { caretIndex = Math.max(((caretIndex - _local8) + lockedRowCount), 0); _local4 = Math.max(((caretIndex - lockedRowCount) + _local10), 0); }; }; bSelectItem = true; break; case Keyboard.PAGE_DOWN: if (caretIndex < (lockedRowCount - _local10)){ _local4 = 0; } else { if ((((caretIndex >= ((verticalScrollPosition + lockedRowCount) - _local10))) && ((caretIndex < ((((verticalScrollPosition + _local8) - _local10) - _local9) - 1))))){ } else { if (lockedRowCount >= ((_local8 - _local9) - 1)){ _local4 = Math.min((verticalScrollPosition + 1), maxVerticalScrollPosition); } else { _local4 = Math.min(((caretIndex - lockedRowCount) + _local10), maxVerticalScrollPosition); }; }; }; bSelectItem = true; break; case Keyboard.HOME: if (caretIndex > 0){ caretIndex = 0; _local4 = 0; bSelectItem = true; }; break; case Keyboard.END: if (caretIndex < (collection.length - 1)){ caretIndex = (collection.length - 1); _local4 = maxVerticalScrollPosition; bSelectItem = true; }; break; }; if (_local11){ if (caretIndex < (lockedRowCount - _local10)){ _local4 = 0; } else { if (caretIndex < ((verticalScrollPosition + lockedRowCount) - _local10)){ _local4 = ((caretIndex - lockedRowCount) + _local10); } else { if (caretIndex >= (((verticalScrollPosition + _local8) - _local9) - _local10)){ _local4 = Math.min(maxVerticalScrollPosition, ((((caretIndex - _local8) + _local9) + _local10) + 1)); }; }; }; }; if (!isNaN(_local4)){ if (verticalScrollPosition != _local4){ _local12 = new ScrollEvent(ScrollEvent.SCROLL); _local12.detail = ScrollEventDetail.THUMB_POSITION; _local12.direction = ScrollEventDirection.VERTICAL; _local12.delta = (_local4 - verticalScrollPosition); _local12.position = _local4; verticalScrollPosition = _local4; dispatchEvent(_local12); }; if (!iteratorValid){ keySelectionPending = true; return; }; }; bShiftKey = _arg2; bCtrlKey = _arg3; lastKey = _arg1; finishKeySelection(); } } }//package mx.controls.dataGridClasses
Section 88
//DataGridColumn (mx.controls.dataGridClasses.DataGridColumn) package mx.controls.dataGridClasses { import mx.core.*; import flash.events.*; import flash.display.*; import mx.styles.*; import mx.controls.*; import mx.controls.listClasses.*; public class DataGridColumn extends CSSStyleDeclaration implements IIMESupport { private var _headerText:String; private var _showDataTips; public var rendererIsEditor:Boolean;// = false public var sortDescending:Boolean;// = false private var _visible:Boolean;// = true public var editorYOffset:Number;// = 0 private var _headerWordWrap; public var editorWidthOffset:Number;// = 0 private var _dataTipFunction:Function; public var itemEditor:IFactory; public var editorUsesEnterKey:Boolean;// = false public var editable:Boolean;// = true public var dataField:String; public var editorDataField:String;// = "text" private var _headerRenderer:IFactory; private var _sortCompareFunction:Function; public var editorHeightOffset:Number;// = 0 public var resizable:Boolean;// = true mx_internal var owner:DataGrid; private var _imeMode:String; private var _dataTipField:String; private var _width:Number;// = 100 private var _wordWrap; mx_internal var preferredWidth:Number;// = 100 private var _itemRenderer:IFactory; mx_internal var colNum:Number; private var _labelFunction:Function; public var sortable:Boolean;// = true mx_internal var explicitWidth:Number; private var _minWidth:Number;// = 20 public var editorXOffset:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function DataGridColumn(_arg1:String=null){ sortDescending = false; editable = true; itemEditor = new ClassFactory(TextInput); editorDataField = "text"; editorHeightOffset = 0; editorWidthOffset = 0; editorXOffset = 0; editorYOffset = 0; editorUsesEnterKey = false; rendererIsEditor = false; _minWidth = 20; resizable = true; sortable = true; _visible = true; _width = 100; preferredWidth = 100; super(); if (_arg1){ dataField = _arg1; headerText = _arg1; }; } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get imeMode():String{ return (_imeMode); } public function set dataTipFunction(_arg1:Function):void{ _dataTipFunction = _arg1; if (owner){ owner.invalidateList(); }; dispatchEvent(new Event("labelFunctionChanged")); } public function get showDataTips(){ return (_showDataTips); } public function get headerWordWrap(){ return (_headerWordWrap); } public function set minWidth(_arg1:Number):void{ _minWidth = _arg1; if (owner){ owner.invalidateList(); }; if (_width < _arg1){ _width = _arg1; }; dispatchEvent(new Event("minWidthChanged")); } public function set showDataTips(_arg1):void{ _showDataTips = _arg1; if (owner){ owner.invalidateList(); }; } public function set headerWordWrap(_arg1):void{ _headerWordWrap = _arg1; if (owner){ owner.invalidateList(); }; } override mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject):Object{ var _local3:DataGrid; var _local4:IListItemRenderer; var _local5:Object; var _local6:Object; var _local7:Object; _local3 = owner; _local4 = IListItemRenderer(_arg2); if (((_local4.data) && ((_local4.data is DataGridColumn)))){ _local7 = _local3.getStyle("headerStyleName"); if (_local7){ if ((_local7 is String)){ _local7 = StyleManager.getStyleDeclaration(("." + _local7)); }; if ((_local7 is CSSStyleDeclaration)){ _arg1 = _local7.addStyleToProtoChain(_arg1, _arg2); }; }; _local7 = getStyle("headerStyleName"); if (_local7){ if ((_local7 is String)){ _local7 = StyleManager.getStyleDeclaration(("." + _local7)); }; if ((_local7 is CSSStyleDeclaration)){ _arg1 = _local7.addStyleToProtoChain(_arg1, _arg2); }; }; }; if (_local5){ if ((_local5 is String)){ _local5 = StyleManager.getStyleDeclaration(("." + _local5)); }; if ((_local5 is CSSStyleDeclaration)){ _arg1 = _local5.addStyleToProtoChain(_arg1, _arg2); }; }; return (super.addStyleToProtoChain(_arg1, _arg2)); } public function get headerText():String{ return (((_headerText)!=null) ? _headerText : dataField); } public function get sortCompareFunction():Function{ return (_sortCompareFunction); } override public function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:Boolean; _local3 = getStyle(_arg1); _local4 = false; if ((((((((factory == null)) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){ _local4 = true; }; super.setStyle(_arg1, _arg2); if (_arg1 == "headerStyleName"){ if (owner){ owner.regenerateStyleCache(true); owner.notifyStyleChangeInChildren("headerStyleName", true); }; return; }; if (owner){ if (_local4){ owner.regenerateStyleCache(true); }; owner.invalidateList(); }; } public function get visible():Boolean{ return (_visible); } public function get wordWrap(){ return (_wordWrap); } public function get headerRenderer():IFactory{ return (_headerRenderer); } mx_internal function setWidth(_arg1:Number):void{ _width = _arg1; } public function set width(_arg1:Number):void{ var _local2:Boolean; explicitWidth = _arg1; preferredWidth = _arg1; if (owner != null){ _local2 = resizable; resizable = false; owner.resizeColumn(colNum, _arg1); resizable = _local2; } else { _width = _arg1; }; dispatchEvent(new Event("widthChanged")); } public function get dataTipFunction():Function{ return (_dataTipFunction); } public function get minWidth():Number{ return (_minWidth); } public function itemToLabel(_arg1:Object):String{ var data = _arg1; if (!data){ return (" "); }; if (labelFunction != null){ return (labelFunction(data, this)); }; if (owner.labelFunction != null){ return (owner.labelFunction(data, this)); }; if ((((typeof(data) == "object")) || ((typeof(data) == "xml")))){ try { data = data[dataField]; } catch(e:Error) { data = null; }; }; if ((data is String)){ return (String(data)); }; try { return (data.toString()); } catch(e:Error) { }; return (" "); } public function set headerText(_arg1:String):void{ _headerText = _arg1; if (owner){ owner.invalidateList(); }; dispatchEvent(new Event("headerTextChanged")); } public function set sortCompareFunction(_arg1:Function):void{ _sortCompareFunction = _arg1; dispatchEvent(new Event("sortCompareFunctionChanged")); } public function itemToDataTip(_arg1:Object):String{ var field:String; var data = _arg1; if (dataTipFunction != null){ return (dataTipFunction(data)); }; if (owner.dataTipFunction != null){ return (owner.dataTipFunction(data)); }; if (typeof(data) == "object"){ field = dataTipField; if (!field){ field = owner.dataTipField; }; if (data[field] != null){ data = data[field]; } else { if (data[dataField] != null){ data = data[dataField]; }; }; }; if ((data is String)){ return (String(data)); }; try { return (data.toString()); } catch(e:Error) { }; return (" "); } public function get width():Number{ return (_width); } public function set dataTipField(_arg1:String):void{ _dataTipField = _arg1; if (owner){ owner.invalidateList(); }; dispatchEvent(new Event("dataTipChanged")); } public function set labelFunction(_arg1:Function):void{ _labelFunction = _arg1; if (owner){ owner.invalidateList(); }; dispatchEvent(new Event("labelFunctionChanged")); } public function set headerRenderer(_arg1:IFactory):void{ _headerRenderer = _arg1; if (owner){ owner.invalidateList(); owner.columnRendererChanged(this); }; dispatchEvent(new Event("headerRendererChanged")); } public function set wordWrap(_arg1):void{ _wordWrap = _arg1; if (owner){ owner.invalidateList(); }; } public function get dataTipField():String{ return (_dataTipField); } public function set visible(_arg1:Boolean):void{ if (_visible != _arg1){ _visible = _arg1; if (owner){ owner.columnsInvalid = true; owner.invalidateSize(); owner.invalidateList(); }; }; } public function get labelFunction():Function{ return (_labelFunction); } public function set itemRenderer(_arg1:IFactory):void{ _itemRenderer = _arg1; if (owner){ owner.invalidateList(); owner.columnRendererChanged(this); }; dispatchEvent(new Event("itemRendererChanged")); } public function get itemRenderer():IFactory{ return (_itemRenderer); } } }//package mx.controls.dataGridClasses
Section 89
//DataGridDragProxy (mx.controls.dataGridClasses.DataGridDragProxy) package mx.controls.dataGridClasses { import mx.core.*; import flash.display.*; import mx.controls.*; import mx.controls.listClasses.*; public class DataGridDragProxy extends UIComponent { mx_internal static const VERSION:String = "2.0.1.0"; override protected function createChildren():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:IListItemRenderer; var _local5:UIComponent; var _local6:Object; var _local7:Number; var _local8:int; var _local9:int; var _local10:DataGridColumn; var _local11:IListItemRenderer; var _local12:DataGridListData; super.createChildren(); _local1 = DataGrid(owner).selectedItems; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local4 = DataGrid(owner).itemToItemRenderer(_local1[_local3]); if (!_local4){ } else { _local6 = _local1[_local3]; _local5 = new UIComponent(); addChild(DisplayObject(_local5)); _local7 = 0; _local8 = DataGrid(owner).visibleColumns.length; _local9 = 0; while (_local9 < _local8) { _local10 = DataGrid(owner).visibleColumns[_local9]; _local11 = DataGrid(owner).columnItemRenderer(_local10, false); _local12 = new DataGridListData(_local10.itemToLabel(_local6), _local10.dataField, _local10.colNum, "", DataGrid(owner)); if ((_local11 is IDropInListItemRenderer)){ IDropInListItemRenderer(_local11).listData = (_local6) ? _local12 : null; }; _local11.data = _local6; _local11.styleName = DataGrid(owner); _local5.addChild(DisplayObject(_local11)); _local11.setActualSize(_local10.width, _local4.height); _local11.move(_local7, 0); _local7 = (_local7 + _local10.width); _local9++; }; _local5.setActualSize(_local7, _local4.height); _local5.y = _local4.y; measuredHeight = (_local5.y + _local5.height); measuredWidth = _local7; }; _local3++; }; invalidateDisplayList(); } } }//package mx.controls.dataGridClasses
Section 90
//DataGridItemRenderer (mx.controls.dataGridClasses.DataGridItemRenderer) package mx.controls.dataGridClasses { import mx.core.*; import mx.events.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.controls.*; import mx.controls.listClasses.*; import flash.utils.*; public class DataGridItemRenderer extends UITextField implements IDataRenderer, IDropInListItemRenderer, ILayoutManagerClient, IListItemRenderer, IStyleClient { private var _data:Object; private var invalidatePropertiesFlag:Boolean;// = false private var invalidateSizeFlag:Boolean;// = false private var _styleDeclaration:CSSStyleDeclaration; private var _listData:DataGridListData; mx_internal static const VERSION:String = "2.0.1.0"; public function DataGridItemRenderer(){ invalidatePropertiesFlag = false; invalidateSizeFlag = false; super(); tabEnabled = false; ignorePadding = false; addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler); inheritingStyles = (nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED); } override public function set nestLevel(_arg1:int):void{ super.nestLevel = _arg1; UIComponentGlobals.layoutManager.invalidateProperties(this); invalidatePropertiesFlag = true; UIComponentGlobals.layoutManager.invalidateSize(this); invalidateSizeFlag = true; } public function registerEffects(_arg1:Array):void{ } public function get listData():BaseListData{ return (_listData); } public function validateDisplayList():void{ validateNow(); } protected function toolTipShowHandler(_arg1:ToolTipEvent):void{ var _local2:IToolTip; var _local3:Point; var _local4:Rectangle; var _local5:Number; _local2 = _arg1.toolTip; _local3 = new Point(0, 0); _local3 = localToGlobal(_local3); _local3 = stage.globalToLocal(_local3); _local2.move(_local3.x, (_local3.y + ((height - _local2.height) / 2))); _local4 = systemManager.screen; _local5 = (_local4.x + _local4.width); if ((_local2.x + _local2.width) > _local5){ _local2.move((_local5 - _local2.width), _local2.y); }; } override public function validateNow():void{ var _local1:Number; if (((data) && (parent))){ if (DataGrid(_listData.owner).isItemHighlighted(_listData.uid)){ _local1 = getStyle("textRollOverColor"); } else { if (DataGrid(_listData.owner).isItemSelected(_listData.uid)){ _local1 = getStyle("textSelectedColor"); } else { _local1 = getStyle("color"); }; }; if (_local1 != explicitColor){ styleChangedFlag = true; explicitColor = _local1; invalidateDisplayList(); }; }; super.validateNow(); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ _styleDeclaration = _arg1; } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function validateSize(_arg1:Boolean=false):void{ invalidateSizeFlag = false; validateNow(); } override public function setStyle(_arg1:String, _arg2):void{ var _local3:Boolean; var _local4:Boolean; if (_arg1 == "styleName"){ styleName = _arg2; return; }; _local3 = StyleManager.isInheritingStyle(_arg1); _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED)); if (_local3){ if ((((getStyle(_arg1) == _arg2)) && (_local4))){ return; }; if (!styleDeclaration){ styleDeclaration = new CSSStyleDeclaration(); styleDeclaration.setStyle(_arg1, _arg2); if (_local4){ regenerateStyleCache(true); }; } else { styleDeclaration.setStyle(_arg1, _arg2); }; } else { if ((((getStyle(_arg1) == _arg2)) && (_local4))){ return; }; if (!styleDeclaration){ styleDeclaration = new CSSStyleDeclaration(); styleDeclaration.setStyle(_arg1, _arg2); if (_local4){ regenerateStyleCache(false); }; } else { styleDeclaration.setStyle(_arg1, _arg2); }; }; if (_local4){ styleChanged(_arg1); notifyStyleChangeInChildren(_arg1, _local3); }; } public function set listData(_arg1:BaseListData):void{ _listData = DataGridListData(_arg1); if (((nestLevel) && (!(invalidatePropertiesFlag)))){ UIComponentGlobals.layoutManager.invalidateProperties(this); invalidatePropertiesFlag = true; UIComponentGlobals.layoutManager.invalidateSize(this); invalidateSizeFlag = true; }; } public function validateProperties():void{ var _local1:DataGrid; var _local2:DataGridColumn; var _local3:Boolean; invalidatePropertiesFlag = false; if (_listData){ _local1 = DataGrid(_listData.owner); _local2 = _local1.columns[_listData.columnIndex]; text = _listData.label; if ((_data is DataGridColumn)){ wordWrap = _local1.columnHeaderWordWrap(_local2); } else { wordWrap = _local1.columnWordWrap(_local2); }; if (DataGrid(_listData.owner).variableRowHeight){ multiline = true; }; _local3 = _local1.showDataTips; if (_local2.showDataTips == true){ _local3 = true; }; if (_local2.showDataTips == false){ _local3 = false; }; if (_local3){ if (((!((_data is DataGridColumn))) && ((((((((((textWidth > width)) || (_local2.dataTipFunction))) || (_local2.dataTipField))) || (_local1.dataTipFunction))) || (_local1.dataTipField))))){ toolTip = _local2.itemToDataTip(_data); } else { toolTip = null; }; } else { toolTip = null; }; } else { text = " "; toolTip = null; }; } public function getClassStyleDeclarations():Array{ var className:String; var decls:Array; var s:CSSStyleDeclaration; className = getQualifiedClassName(this); className = className.replace("::", "."); decls = []; while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) { s = StyleManager.getStyleDeclaration(className); if (s){ decls.unshift(s); }; try { className = getQualifiedSuperclassName(getDefinitionByName(className)); className = className.replace("::", "."); } catch(e:ReferenceError) { className = null; }; }; return (decls); } public function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local2:Object; var _local3:IStyleClient; var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:CSSStyleDeclaration; styleChangedFlag = true; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((styleName is IFlexDisplayObject)){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; _local2 = StyleManager.stylesRoot; _local3 = (parent as IStyleClient); if (_local3){ _local7 = _local3.inheritingStyles; if (_local7 == UIComponent.STYLE_UNINITIALIZED){ _local7 = _local2; }; } else { _local7 = StyleManager.stylesRoot; }; _local4 = getClassStyleDeclarations(); _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local8 = _local4[_local6]; _local7 = _local8.addStyleToProtoChain(_local7, this); _local2 = _local8.addStyleToProtoChain(_local2, this); _local6++; }; if (_local1){ _local7 = _local1.addStyleToProtoChain(_local7, this); _local2 = _local1.addStyleToProtoChain(_local2, this); }; inheritingStyles = (styleDeclaration) ? styleDeclaration.addStyleToProtoChain(_local7, this) : _local7; nonInheritingStyles = (styleDeclaration) ? styleDeclaration.addStyleToProtoChain(_local2, this) : _local2; } public function get styleDeclaration():CSSStyleDeclaration{ return (_styleDeclaration); } public function regenerateStyleCache(_arg1:Boolean):void{ initProtoChain(); } public function set data(_arg1:Object):void{ _data = _arg1; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } override public function initialize():void{ regenerateStyleCache(false); } public function get data():Object{ return (_data); } override public function getStyle(_arg1:String){ return ((StyleManager.inheritingStyles[_arg1]) ? inheritingStyles[_arg1] : nonInheritingStyles[_arg1]); } } }//package mx.controls.dataGridClasses
Section 91
//DataGridListData (mx.controls.dataGridClasses.DataGridListData) package mx.controls.dataGridClasses { import mx.core.*; import mx.controls.listClasses.*; public class DataGridListData extends BaseListData { public var dataField:String; mx_internal static const VERSION:String = "2.0.1.0"; public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){ super(_arg1, _arg4, _arg5, _arg6, _arg3); this.dataField = _arg2; } } }//package mx.controls.dataGridClasses
Section 92
//BaseListData (mx.controls.listClasses.BaseListData) package mx.controls.listClasses { import mx.core.*; public class BaseListData { private var _uid:String; public var label:String; public var rowIndex:int; public var owner:IUIComponent; public var columnIndex:int; mx_internal static const VERSION:String = "2.0.1.0"; public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){ this.label = _arg1; this.uid = _arg2; this.owner = _arg3; this.rowIndex = _arg4; this.columnIndex = _arg5; } public function set uid(_arg1:String):void{ _uid = _arg1; } public function get uid():String{ return (_uid); } } }//package mx.controls.listClasses
Section 93
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer) package mx.controls.listClasses { public interface IDropInListItemRenderer { function set listData(_arg1:BaseListData):void; function get listData():BaseListData; } }//package mx.controls.listClasses
Section 94
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer) package mx.controls.listClasses { import mx.core.*; import flash.events.*; import mx.managers.*; import mx.styles.*; public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent { } }//package mx.controls.listClasses
Section 95
//ListBase (mx.controls.listClasses.ListBase) package mx.controls.listClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; import mx.controls.dataGridClasses.*; import mx.collections.*; import flash.utils.*; import mx.utils.*; import mx.skins.halo.*; import mx.collections.errors.*; import flash.ui.*; public class ListBase extends ScrollControlBase implements IDataRenderer, IFocusManagerComponent, IListItemRenderer, IDropInListItemRenderer { private var _labelField:String;// = "label" private var bSelectItem:Boolean;// = false protected var iterator:IViewCursor; protected var rendererChanged:Boolean;// = false private var _data:Object; private var bSelectedItemsChanged:Boolean;// = false private var columnWidthChanged:Boolean;// = false protected var defaultRowCount:int;// = 4 private var _rowCount:int;// = -1 protected var selectedData:Object; mx_internal var _selectedIndex:int;// = -1 private var cachedPaddingBottomInvalid:Boolean;// = true protected var explicitColumnWidth:Number; private var columnCountChanged:Boolean;// = true protected var itemsNeedMeasurement:Boolean;// = true private var _columnCount:int;// = -1 private var rowCountChanged:Boolean;// = true protected var wordWrapChanged:Boolean;// = false private var _dragEnabled:Boolean;// = false protected var caretIndicator:Sprite; protected var listItems:Array; public var allowDragSelection:Boolean;// = false private var _selectable:Boolean;// = true private var _dragMoveEnabled:Boolean;// = false mx_internal var cachedPaddingTop:Number; private var _selectedIndices:Array; protected var defaultColumnCount:int;// = 4 protected var showCaret:Boolean; private var _iconField:String;// = "icon" private var firstSelectionData:ListBaseSelectionData; mx_internal var _lockedRowCount:int;// = 0 private var bSelectedItemChanged:Boolean;// = false protected var selectionIndicators:Object; private var mouseDownPoint:Point; private var approximate:Boolean;// = false protected var caretIndex:int;// = -1 protected var selectionLayer:Sprite; protected var freeItemRenderers:Array; protected var visibleData:Object; mx_internal var isPressed:Boolean;// = false protected var highlightIndicator:Sprite; private var verticalScrollPositionPending:Number; mx_internal var dropIndicator:IFlexDisplayObject; private var lastKey:uint;// = 0 mx_internal var bSelectionChanged:Boolean;// = false protected var selectionTweens:Object; protected var caretItemRenderer:IListItemRenderer; protected var iteratorValid:Boolean;// = true private var _allowMultipleSelection:Boolean;// = false protected var explicitColumnCount:int;// = -1 private var _dataTipField:String;// = "label" private var cachedPaddingTopInvalid:Boolean;// = true private var _labelFunction:Function; private var bShiftKey:Boolean;// = false mx_internal var listType:String;// = "grid" protected var rowMap:Object; mx_internal var collectionIterator:IViewCursor; protected var lastDropIndex:int; private var bCtrlKey:Boolean;// = false private var oldUnscaledHeight:Number; private var _dataTipFunction:Function; private var _iconFunction:Function; protected var explicitRowCount:int;// = -1 protected var rowInfo:Array; private var bSortItemPending:Boolean;// = false protected var caretUID:String; protected var caretBookmark:CursorBookmark; protected var listContent:ListBaseContentHolder; private var _variableRowHeight:Boolean;// = false private var cachedVerticalAlignInvalid:Boolean;// = true private var _showDataTips:Boolean;// = false private var _rowHeight:Number; private var _selectedItem:Object; public var menuSelectionMode:Boolean;// = false private var _columnWidth:Number; private var oldUnscaledWidth:Number; mx_internal var bColumnScrolling:Boolean;// = true private var mouseDownItem:IListItemRenderer; protected var collection:ICollectionView; private var _listData:BaseListData; mx_internal var bSelectOnRelease:Boolean; private var _itemRenderer:IFactory; mx_internal var lastHighlightItemRenderer:IListItemRenderer; protected var keySelectionPending:Boolean;// = false private var itemMaskFreeList:Array; protected var highlightUID:String; private var dragScrollingInterval:int;// = 0 protected var anchorBookmark:CursorBookmark; protected var anchorIndex:int;// = -1 mx_internal var cachedVerticalAlign:String; mx_internal var bSelectedIndexChanged:Boolean;// = false mx_internal var _lockedColumnCount:int;// = 0 protected var lastSeekPending:ListBaseSeekPending; private var bSelectedIndicesChanged:Boolean;// = false private var _dropEnabled:Boolean;// = false private var IS_ITEM_STYLE:Object; mx_internal var cachedPaddingBottom:Number; protected var itemsSizeChanged:Boolean;// = false protected var highlightItemRenderer:IListItemRenderer; private var rowHeightChanged:Boolean;// = false private var _wordWrap:Boolean;// = false private var horizontalScrollPositionPending:Number; protected var explicitRowHeight:Number; private var _selectedItems:Array; mx_internal static const DRAG_THRESHOLD:int = 4; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function ListBase(){ IS_ITEM_STYLE = {alternatingItemColors:true, backgroundColor:true, backgroundDisabledColor:true, color:true, rollOverColor:true, selectionColor:true, selectionDisabledColor:true, styleName:true, textColor:true, textRollOverColor:true, textSelectedColor:true}; iteratorValid = true; visibleData = {}; listItems = []; rowInfo = []; rowMap = {}; freeItemRenderers = []; selectedData = {}; selectionIndicators = {}; selectionTweens = {}; itemsNeedMeasurement = true; itemsSizeChanged = false; rendererChanged = false; wordWrapChanged = false; keySelectionPending = false; bSortItemPending = false; bShiftKey = false; bCtrlKey = false; lastKey = 0; bSelectItem = false; approximate = false; bColumnScrolling = true; listType = "grid"; bSelectionChanged = false; bSelectedIndexChanged = false; bSelectedItemChanged = false; bSelectedItemsChanged = false; bSelectedIndicesChanged = false; cachedPaddingTopInvalid = true; cachedPaddingBottomInvalid = true; cachedVerticalAlignInvalid = true; dragScrollingInterval = 0; isPressed = false; allowDragSelection = false; _allowMultipleSelection = false; anchorIndex = -1; caretIndex = -1; _columnCount = -1; columnCountChanged = true; columnWidthChanged = false; _dataTipField = "label"; defaultColumnCount = 4; defaultRowCount = 4; _dragEnabled = false; _dragMoveEnabled = false; _dropEnabled = false; explicitColumnCount = -1; explicitRowCount = -1; _iconField = "icon"; _labelField = "label"; _lockedColumnCount = 0; _lockedRowCount = 0; menuSelectionMode = false; _rowCount = -1; rowCountChanged = true; rowHeightChanged = false; _selectable = true; _selectedIndex = -1; _showDataTips = false; _variableRowHeight = false; _wordWrap = false; super(); tabEnabled = true; addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); addEventListener(MouseEvent.CLICK, mouseClickHandler); addEventListener(MouseEvent.DOUBLE_CLICK, mouseDoubleClickHandler); invalidateProperties(); } public function get iconField():String{ return (_iconField); } public function set iconField(_arg1:String):void{ _iconField = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("iconFieldChanged")); } protected function clearSelected(_arg1:Boolean=false):void{ var _local2:String; var _local3:Object; var _local4:IListItemRenderer; for (_local2 in selectedData) { _local3 = selectedData[_local2].data; removeSelectionData(_local2); _local4 = visibleData[itemToUID(_local3)]; if (_local4){ drawItem(_local4, false, (_local2 == highlightUID), false, _arg1); }; }; clearSelectionData(); _selectedIndex = -1; _selectedItem = null; caretIndex = -1; anchorIndex = -1; caretBookmark = null; anchorBookmark = null; } public function get columnWidth():Number{ return (_columnWidth); } protected function scrollHorizontally(_arg1:int, _arg2:int, _arg3:Boolean):void{ } public function set columnWidth(_arg1:Number):void{ explicitColumnWidth = _arg1; if (_columnWidth != _arg1){ setColumnWidth(_arg1); invalidateSize(); itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("columnWidthChanged")); }; } public function set showDataTips(_arg1:Boolean):void{ _showDataTips = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("showDataTipsChanged")); } public function measureHeightOfItems(_arg1:int=-1, _arg2:int=0):Number{ return (NaN); } override public function set verticalScrollPosition(_arg1:Number):void{ var oldValue:int; var deltaPos:int; var direction:Boolean; var index:int; var cursorPos:CursorBookmark; var value = _arg1; if ((((((listItems.length == 0)) || (!(dataProvider)))) || (!(isNaN(verticalScrollPositionPending))))){ verticalScrollPositionPending = value; if (dataProvider){ invalidateDisplayList(); }; return; }; verticalScrollPositionPending = NaN; oldValue = super.verticalScrollPosition; super.verticalScrollPosition = value; removeClipMask(); if (oldValue != value){ deltaPos = (value - oldValue); direction = (deltaPos > 0); deltaPos = Math.abs(deltaPos); if ((((deltaPos >= (rowInfo.length - lockedRowCount))) || (!(iteratorValid)))){ index = scrollPositionToIndex(horizontalScrollPosition, verticalScrollPosition); try { iterator.seek(CursorBookmark.FIRST, index); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, index); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; cursorPos = iterator.bookmark; clearIndicators(); visibleData = {}; makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); if (iteratorValid){ iterator.seek(cursorPos, 0); }; } else { scrollVertically(value, deltaPos, direction); }; if (variableRowHeight){ configureScrollBars(); }; drawRowBackgrounds(); }; addClipMask(false); } override public function get horizontalScrollPosition():Number{ if (!isNaN(horizontalScrollPositionPending)){ return (horizontalScrollPositionPending); }; return (super.horizontalScrollPosition); } protected function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:IListItemRenderer; var _local4:DragEvent; if (((!(enabled)) || (!(selectable)))){ return; }; _local2 = new Point(_arg1.localX, _arg1.localY); _local2 = DisplayObject(_arg1.target).localToGlobal(_local2); _local2 = globalToLocal(_local2); if (((((isPressed) && (mouseDownPoint))) && ((((Math.abs((mouseDownPoint.x - _local2.x)) > DRAG_THRESHOLD)) || ((Math.abs((mouseDownPoint.y - _local2.y)) > DRAG_THRESHOLD)))))){ if (((((dragEnabled) && (!(DragManager.isDragging)))) && (mouseDownPoint))){ _local4 = new DragEvent(DragEvent.DRAG_START); _local4.dragInitiator = this; _local4.localX = mouseDownPoint.x; _local4.localY = mouseDownPoint.y; _local4.buttonDown = true; dispatchEvent(_local4); }; }; _local3 = mouseEventToItemRenderer(_arg1); if (((highlightItemRenderer) && (!((_local3 == highlightItemRenderer))))){ if (!isPressed){ if (((getStyle("useRollOver")) && (highlightItemRenderer.data))){ clearHighlight(highlightItemRenderer); }; }; }; if (((_local3) && (!(highlightItemRenderer)))){ mouseOverHandler(_arg1); }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:IListItemRenderer; var _local3:Point; var _local4:ListEvent; if (!selectable){ return; }; if (!iteratorValid){ return; }; if (!collection){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: moveSelectionVertically(_arg1.keyCode, _arg1.shiftKey, _arg1.ctrlKey); _arg1.stopPropagation(); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, _arg1.shiftKey, _arg1.ctrlKey); _arg1.stopPropagation(); break; case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, _arg1.shiftKey, _arg1.ctrlKey); _arg1.stopPropagation(); break; case Keyboard.SPACE: if (((((!((caretIndex == -1))) && ((((caretIndex - verticalScrollPosition) + lockedRowCount) >= 0)))) && ((((caretIndex - verticalScrollPosition) + lockedRowCount) < listItems.length)))){ _local2 = listItems[((caretIndex - verticalScrollPosition) + lockedRowCount)][0]; if (selectItem(_local2, _arg1.shiftKey, _arg1.ctrlKey)){ _local3 = itemRendererToIndices(_local2); _local4 = new ListEvent(ListEvent.CHANGE); if (_local3){ _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; }; _local4.itemRenderer = _local2; dispatchEvent(_local4); }; }; break; default: if (findKey(_arg1.keyCode)){ _arg1.stopPropagation(); }; }; } public function invalidateList():void{ itemsSizeChanged = true; invalidateDisplayList(); } protected function mouseDoubleClickHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Point; var _local4:ListEvent; _local2 = mouseEventToItemRenderer(_arg1); if (!_local2){ return; }; _local3 = itemRendererToIndices(_local2); if (_local3){ _local4 = new ListEvent(ListEvent.ITEM_DOUBLE_CLICK); _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; _local4.itemRenderer = _local2; dispatchEvent(_local4); }; } public function set selectedItem(_arg1:Object):void{ if (((!(collection)) || ((collection.length == 0)))){ _selectedItem = _arg1; bSelectedItemChanged = true; bSelectionChanged = true; invalidateDisplayList(); return; }; commitSelectedItem(_arg1); } protected function dragEnterHandler(_arg1:DragEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; if (_arg1.dragSource.hasFormat("items")){ DragManager.acceptDragDrop(this); DragManager.showFeedback((_arg1.ctrlKey) ? DragManager.COPY : DragManager.MOVE); showDropFeedback(_arg1); return; }; hideDropFeedback(_arg1); DragManager.showFeedback(DragManager.NONE); } public function set selectable(_arg1:Boolean):void{ _selectable = _arg1; } override public function set horizontalScrollPosition(_arg1:Number):void{ var oldValue:int; var deltaPos:int; var direction:Boolean; var index:int; var cursorPos:CursorBookmark; var value = _arg1; if ((((((listItems.length == 0)) || (!(dataProvider)))) || (!(isNaN(horizontalScrollPositionPending))))){ horizontalScrollPositionPending = value; if (dataProvider){ invalidateDisplayList(); }; return; }; horizontalScrollPositionPending = NaN; oldValue = super.horizontalScrollPosition; super.horizontalScrollPosition = value; removeClipMask(); if (oldValue != value){ if (itemsSizeChanged){ return; }; deltaPos = (value - oldValue); direction = (deltaPos > 0); deltaPos = Math.abs(deltaPos); if (((bColumnScrolling) && ((deltaPos >= (columnCount - lockedColumnCount))))){ index = scrollPositionToIndex(horizontalScrollPosition, verticalScrollPosition); try { iterator.seek(CursorBookmark.FIRST, index); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, index); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; cursorPos = iterator.bookmark; clearIndicators(); visibleData = {}; makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); iterator.seek(cursorPos, 0); drawRowBackgrounds(); } else { scrollHorizontally(value, deltaPos, direction); }; }; addClipMask(false); } public function isItemHighlighted(_arg1:Object):Boolean{ var _local2:Boolean; if (!_arg1){ return (false); }; _local2 = ((highlightIndicator) && (!((selectionLayer.getChildIndex(highlightIndicator) == (selectionLayer.numChildren - 1))))); if ((_arg1 is String)){ return ((((_arg1 == highlightUID)) && (!(_local2)))); }; return ((((itemToUID(_arg1) == highlightUID)) && (!(_local2)))); } public function set dragMoveEnabled(_arg1:Boolean):void{ _dragMoveEnabled = _arg1; } protected function indexToColumn(_arg1:int):int{ return (0); } override protected function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:Number; var _local3:int; var _local4:ScrollEvent; if (verticalScrollBar){ _arg1.stopPropagation(); _local2 = verticalScrollPosition; _local3 = verticalScrollPosition; _local3 = (_local3 - (_arg1.delta * verticalScrollBar.lineScrollSize)); _local3 = Math.max(0, Math.min(_local3, verticalScrollBar.maxScrollPosition)); verticalScrollPosition = _local3; if (_local2 != verticalScrollPosition){ _local4 = new ScrollEvent(ScrollEvent.SCROLL); _local4.direction = ScrollEventDirection.VERTICAL; _local4.position = verticalScrollPosition; _local4.delta = (verticalScrollPosition - _local2); dispatchEvent(_local4); }; }; } private function findStringLoop(_arg1:String, _arg2:CursorBookmark, _arg3:int, _arg4:int):Boolean{ var itmStr:String; var item:IListItemRenderer; var pt:Point; var evt:ListEvent; var more:Boolean; var str = _arg1; var cursorPos = _arg2; var i = _arg3; var stopIndex = _arg4; while (i != stopIndex) { itmStr = itemToLabel(iterator.current); itmStr = itmStr.substring(0, str.length); if ((((str == itmStr)) || ((str.toUpperCase() == itmStr.toUpperCase())))){ iterator.seek(cursorPos, 0); scrollToIndex(i); commitSelectedIndex(i); item = indexToItemRenderer(i); pt = itemRendererToIndices(item); evt = new ListEvent(ListEvent.CHANGE); evt.itemRenderer = item; if (pt){ evt.columnIndex = pt.x; evt.rowIndex = pt.y; }; dispatchEvent(evt); return (true); }; try { more = iterator.moveNext(); } catch(e1:ItemPendingError) { e1.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, CursorBookmark.CURRENT, 1, (i + 1), stopIndex))); iteratorValid = false; return (false); }; if (((!(more)) && (!((stopIndex == collection.length))))){ i = -1; try { iterator.seek(CursorBookmark.FIRST, 0); } catch(e2:ItemPendingError) { e2.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, CursorBookmark.FIRST, 0, 0, stopIndex))); iteratorValid = false; return (false); }; }; i = (i + 1); }; iterator.seek(cursorPos, 0); iteratorValid = true; return (false); } protected function updateList():void{ var _local1:CursorBookmark; removeClipMask(); _local1 = (iterator) ? iterator.bookmark : null; clearIndicators(); visibleData = {}; makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); if (iterator){ iterator.seek(_local1, 0); }; drawRowBackgrounds(); configureScrollBars(); addClipMask(true); } public function itemToItemRenderer(_arg1:Object):IListItemRenderer{ return (visibleData[itemToUID(_arg1)]); } public function set lockedRowCount(_arg1:int):void{ _lockedRowCount = _arg1; invalidateDisplayList(); } public function set selectedIndices(_arg1:Array):void{ if (((!(collection)) || ((collection.length == 0)))){ _selectedIndices = _arg1; bSelectedIndicesChanged = true; bSelectionChanged = true; invalidateDisplayList(); return; }; commitSelectedIndices(_arg1); } public function set variableRowHeight(_arg1:Boolean):void{ _variableRowHeight = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("variableRowHeightChanged")); } public function isItemSelected(_arg1:Object):Boolean{ if (!_arg1){ return (false); }; if ((_arg1 is String)){ return (!((selectedData[_arg1] == undefined))); }; return (!((selectedData[itemToUID(_arg1)] == undefined))); } protected function applySelectionEffect(_arg1:Sprite, _arg2:String, _arg3:IListItemRenderer):void{ var _local4:Number; var _local5:Function; _local4 = getStyle("selectionDuration"); if (_local4 != 0){ _arg1.alpha = 0; selectionTweens[_arg2] = new Tween(_arg1, 0, 1, _local4, 5); selectionTweens[_arg2].addEventListener(TweenEvent.TWEEN_UPDATE, selectionTween_updateHandler); selectionTweens[_arg2].addEventListener(TweenEvent.TWEEN_END, selectionTween_endHandler); selectionTweens[_arg2].setTweenHandlers(onSelectionTweenUpdate, onSelectionTweenUpdate); _local5 = (getStyle("selectionEasingFunction") as Function); if (_local5 != null){ selectionTweens[_arg2].easingFunction = _local5; }; }; } protected function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Point; var _local4:ListEvent; mouseDownPoint = null; _local2 = mouseEventToItemRenderer(_arg1); _local3 = itemRendererToIndices(_local2); mouseIsUp(); if (((!(enabled)) || (!(selectable)))){ return; }; if (((!(_local2)) || (!(hitTestPoint(_arg1.stageX, _arg1.stageY))))){ isPressed = false; return; }; if (bSelectOnRelease){ bSelectOnRelease = false; if (selectItem(_local2, _arg1.shiftKey, _arg1.ctrlKey)){ _local4 = new ListEvent(ListEvent.CHANGE); _local4.itemRenderer = _local2; if (_local3){ _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; }; dispatchEvent(_local4); }; }; if (mouseDownItem){ _local4 = new ListEvent(ListEvent.CHANGE); _local4.itemRenderer = _local2; if (_local3){ _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; }; dispatchEvent(_local4); mouseDownItem = null; }; isPressed = false; } protected function dragScroll():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:ScrollEvent; var _local6:Number; _local1 = 0; _local6 = 30; if (DragManager.isDragging){ _local1 = (viewMetrics.top + (variableRowHeight) ? (getStyle("fontSize") / 4) : rowHeight); }; clearInterval(dragScrollingInterval); if (mouseY < _local1){ _local3 = verticalScrollPosition; verticalScrollPosition = Math.max(0, (_local3 - 1)); if (DragManager.isDragging){ _local2 = 100; } else { _local4 = Math.min(((0 - mouseY) - 30), 0); _local2 = ((((0.593 * _local4) * _local4) + 1) + _local6); }; dragScrollingInterval = setInterval(dragScroll, _local2); if (_local3 != verticalScrollPosition){ _local5 = new ScrollEvent(ScrollEvent.SCROLL); _local5.detail = ScrollEventDetail.THUMB_POSITION; _local5.direction = ScrollEventDirection.VERTICAL; _local5.position = verticalScrollPosition; _local5.delta = (verticalScrollPosition - _local3); dispatchEvent(_local5); }; } else { if (mouseY > (unscaledHeight - _local1)){ _local3 = verticalScrollPosition; verticalScrollPosition = Math.min(maxVerticalScrollPosition, (verticalScrollPosition + 1)); if (DragManager.isDragging){ _local2 = 100; } else { _local4 = Math.min(((mouseY - unscaledHeight) - 30), 0); _local2 = ((((0.593 * _local4) * _local4) + 1) + _local6); }; dragScrollingInterval = setInterval(dragScroll, _local2); if (_local3 != verticalScrollPosition){ _local5 = new ScrollEvent(ScrollEvent.SCROLL); _local5.detail = ScrollEventDetail.THUMB_POSITION; _local5.direction = ScrollEventDirection.VERTICAL; _local5.position = verticalScrollPosition; _local5.delta = (verticalScrollPosition - _local3); dispatchEvent(_local5); }; } else { dragScrollingInterval = setInterval(dragScroll, 15); }; }; } public function itemRendererContains(_arg1:IListItemRenderer, _arg2:DisplayObject):Boolean{ if (!_arg2){ return (false); }; if (!_arg1){ return (false); }; return (_arg1.owns(_arg2)); } public function itemRendererToIndex(_arg1:IListItemRenderer):int{ var _local2:int; if ((_arg1.name in rowMap)){ _local2 = rowMap[_arg1.name].rowIndex; return (((_local2 < lockedRowCount)) ? _local2 : (_local2 + verticalScrollPosition)); //unresolved jump }; return (int.MIN_VALUE); } override public function set horizontalScrollPolicy(_arg1:String):void{ super.horizontalScrollPolicy = _arg1; itemsSizeChanged = true; invalidateDisplayList(); } public function get dropEnabled():Boolean{ return (_dropEnabled); } public function indicesToIndex(_arg1:int, _arg2:int):int{ return (((_arg1 * columnCount) + _arg2)); } public function get value():Object{ var _local1:Object; _local1 = selectedItem; if (!_local1){ return (null); }; if (typeof(_local1) != "object"){ return (_local1); }; return (((_local1.data)!=null) ? _local1.data : _local1.label); } mx_internal function getRowInfo():Array{ return (rowInfo); } private function hasOnlyTextRenderers():Boolean{ var _local1:Array; var _local2:int; var _local3:int; if (listItems.length == 0){ return (true); }; _local1 = listItems[(listItems.length - 1)]; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { if (!(_local1[_local3] is UITextField)){ return (false); }; _local3++; }; return (true); } override protected function commitProperties():void{ super.commitProperties(); if (cachedPaddingTopInvalid){ cachedPaddingTopInvalid = false; cachedPaddingTop = getStyle("paddingTop"); itemsSizeChanged = true; invalidateDisplayList(); }; if (cachedPaddingBottomInvalid){ cachedPaddingBottomInvalid = false; cachedPaddingBottom = getStyle("paddingBottom"); itemsSizeChanged = true; invalidateDisplayList(); }; if (cachedVerticalAlignInvalid){ cachedVerticalAlignInvalid = false; cachedVerticalAlign = getStyle("verticalAlign"); itemsSizeChanged = true; invalidateDisplayList(); }; if (columnCountChanged){ if (_columnCount < 1){ _columnCount = defaultColumnCount; }; if (((((!(isNaN(explicitWidth))) && (isNaN(explicitColumnWidth)))) && ((explicitColumnCount > 0)))){ setColumnWidth((((explicitWidth - viewMetrics.left) - viewMetrics.right) / columnCount)); }; columnCountChanged = false; }; if (rowCountChanged){ if (_rowCount < 1){ _rowCount = defaultRowCount; }; if (((((!(isNaN(explicitHeight))) && (isNaN(explicitRowHeight)))) && ((explicitRowCount > 0)))){ setRowHeight((((explicitHeight - viewMetrics.top) - viewMetrics.bottom) / rowCount)); }; rowCountChanged = false; }; } override public function set verticalScrollPolicy(_arg1:String):void{ super.verticalScrollPolicy = _arg1; itemsSizeChanged = true; invalidateDisplayList(); } protected function findKey(_arg1:int):Boolean{ var _local2:int; _local2 = _arg1; return ((((((_local2 >= 33)) && ((_local2 <= 126)))) && (findString(String.fromCharCode(_local2))))); } protected function mouseClickHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Point; var _local4:ListEvent; _local2 = mouseEventToItemRenderer(_arg1); if (!_local2){ return; }; _local3 = itemRendererToIndices(_local2); if (_local3){ _local4 = new ListEvent(ListEvent.ITEM_CLICK); _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; _local4.itemRenderer = _local2; dispatchEvent(_local4); }; } public function set itemRenderer(_arg1:IFactory):void{ _itemRenderer = _arg1; invalidateSize(); invalidateDisplayList(); itemsSizeChanged = true; rendererChanged = true; dispatchEvent(new Event("itemRendererChanged")); } mx_internal function resetDragScrolling():void{ if (dragScrollingInterval != 0){ clearInterval(dragScrollingInterval); dragScrollingInterval = 0; }; } protected function finishKeySelection():void{ var _local1:String; var _local2:int; var _local3:int; var _local4:IListItemRenderer; var _local5:Boolean; var _local6:Point; var _local7:ListEvent; _local2 = listItems.length; _local3 = (((rowInfo[(_local2 - 1)].y + rowInfo[(_local2 - 1)].height))>listContent.height) ? 1 : 0; if (lastKey == Keyboard.PAGE_DOWN){ caretIndex = Math.min((((verticalScrollPosition + _local2) - _local3) - 1), (collection.length - 1)); }; _local5 = false; if (((bSelectItem) && (((caretIndex - verticalScrollPosition) >= 0)))){ if ((caretIndex - verticalScrollPosition) > (listItems.length - 1)){ caretIndex = ((listItems.length - 1) + verticalScrollPosition); }; _local4 = listItems[(caretIndex - verticalScrollPosition)][0]; if (_local4){ _local1 = itemToUID(_local4.data); _local4 = visibleData[_local1]; if (!bCtrlKey){ selectItem(_local4, bShiftKey, bCtrlKey); _local5 = true; }; if (bCtrlKey){ drawItem(_local4, !((selectedData[_local1] == null)), (_local1 == highlightUID), true); }; }; }; if (_local5){ _local6 = itemRendererToIndices(_local4); _local7 = new ListEvent(ListEvent.CHANGE); if (_local6){ _local7.columnIndex = _local6.x; _local7.rowIndex = _local6.y; }; _local7.itemRenderer = _local4; dispatchEvent(_local7); }; } private function selectionDataPendingFailureHandler(_arg1:Object, _arg2:ListBaseSelectionDataPending):void{ } mx_internal function addClipMask(_arg1:Boolean):void{ var _local2:int; var _local3:ListRowInfo; var _local4:Array; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:DisplayObject; var _local11:Number; if (_arg1){ if (((horizontalScrollBar) || (hasOnlyTextRenderers()))){ listContent.mask = maskShape; selectionLayer.mask = null; } else { listContent.mask = null; selectionLayer.mask = maskShape; }; }; if (listContent.mask){ return; }; _local2 = (listItems.length - 1); _local3 = rowInfo[_local2]; _local4 = listItems[_local2]; if ((_local3.y + _local3.height) <= listContent.height){ return; }; _local5 = _local4.length; _local6 = _local3.y; _local7 = listContent.width; _local8 = (listContent.height - _local3.y); _local9 = 0; while (_local9 < _local5) { _local10 = _local4[_local9]; _local11 = (_local10.y - _local6); if ((_local10 is UITextField)){ _local10.height = (_local8 - _local11); } else { _local10.mask = createItemMask(0, (_local6 + _local11), _local7, (_local8 - _local11)); }; _local9++; }; } public function set allowMultipleSelection(_arg1:Boolean):void{ _allowMultipleSelection = _arg1; } protected function drawSelectionIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ var _local8:Graphics; _local8 = Sprite(_arg1).graphics; _local8.clear(); _local8.beginFill(_arg6); _local8.drawRect(0, 0, _arg4, _arg5); _local8.endFill(); _arg1.x = _arg2; _arg1.y = _arg3; } mx_internal function setColumnWidth(_arg1:Number):void{ _columnWidth = _arg1; } protected function makeRowsAndColumns(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:uint=0):Point{ return (new Point(0, 0)); } public function get labelField():String{ return (_labelField); } private function onSelectionTweenUpdate(_arg1:Number):void{ } protected function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Point; if (((!(enabled)) || (!(selectable)))){ return; }; isPressed = true; _local2 = mouseEventToItemRenderer(_arg1); if (!_local2){ return; }; bSelectOnRelease = false; _local3 = new Point(_arg1.localX, _arg1.localY); _local3 = DisplayObject(_arg1.target).localToGlobal(_local3); mouseDownPoint = globalToLocal(_local3); systemManager.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler); if (!dragEnabled){ dragScrollingInterval = setInterval(dragScroll, 15); }; if (((dragEnabled) && (selectedData[rowMap[_local2.name].uid]))){ bSelectOnRelease = true; } else { if (selectItem(_local2, _arg1.shiftKey, _arg1.ctrlKey)){ mouseDownItem = _local2; }; }; } protected function clearIndicators():void{ var _local1:String; for (_local1 in selectionTweens) { removeIndicators(_local1); }; while (selectionLayer.numChildren > 0) { selectionLayer.removeChildAt(0); }; selectionTweens = {}; selectionIndicators = {}; highlightIndicator = null; highlightUID = null; caretIndicator = null; caretUID = null; } protected function drawItem(_arg1:IListItemRenderer, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false):void{ var _local6:Sprite; var _local7:Graphics; var _local8:BaseListData; if (!_arg1){ return; }; _local8 = rowMap[_arg1.name]; if (((_arg3) && (((!(highlightItemRenderer)) || (!((highlightUID == _local8.uid))))))){ if (!highlightIndicator){ _local6 = new SpriteAsset(); selectionLayer.addChild(DisplayObject(_local6)); highlightIndicator = _local6; } else { selectionLayer.setChildIndex(DisplayObject(highlightIndicator), (selectionLayer.numChildren - 1)); }; _local6 = highlightIndicator; drawHighlightIndicator(_local6, _arg1.x, rowInfo[_local8.rowIndex].y, _arg1.width, rowInfo[_local8.rowIndex].height, getStyle("rollOverColor"), _arg1); lastHighlightItemRenderer = (highlightItemRenderer = _arg1); highlightUID = _local8.uid; } else { if (((((!(_arg3)) && (highlightItemRenderer))) && (((_local8) && ((highlightUID == _local8.uid)))))){ if (highlightIndicator){ Sprite(highlightIndicator).graphics.clear(); }; highlightItemRenderer = null; highlightUID = ""; }; }; if (_arg2){ if (!selectionIndicators[_local8.uid]){ _local6 = new SpriteAsset(); _local6.mouseEnabled = false; selectionLayer.addChild(DisplayObject(_local6)); selectionIndicators[_local8.uid] = _local6; drawSelectionIndicator(_local6, _arg1.x, rowInfo[_local8.rowIndex].y, _arg1.width, rowInfo[_local8.rowIndex].height, (enabled) ? getStyle("selectionColor") : getStyle("selectionDisabledColor"), _arg1); if (_arg5){ applySelectionEffect(_local6, _local8.uid, _arg1); }; } else { _local6 = selectionIndicators[_local8.uid]; drawSelectionIndicator(_local6, _arg1.x, rowInfo[_local8.rowIndex].y, _arg1.width, rowInfo[_local8.rowIndex].height, (enabled) ? getStyle("selectionColor") : getStyle("selectionDisabledColor"), _arg1); }; } else { if (!_arg2){ if (((_local8) && (selectionIndicators[_local8.uid]))){ if (selectionTweens[_local8.uid]){ selectionTweens[_local8.uid].removeEventListener(TweenEvent.TWEEN_UPDATE, selectionTween_updateHandler); selectionTweens[_local8.uid].removeEventListener(TweenEvent.TWEEN_END, selectionTween_endHandler); if (selectionIndicators[_local8.uid].alpha < 1){ Tween.removeTween(selectionTweens[_local8.uid]); }; delete selectionTweens[_local8.uid]; }; selectionLayer.removeChild(selectionIndicators[_local8.uid]); delete selectionIndicators[_local8.uid]; }; }; }; if (_arg4){ if (showCaret){ if (!caretIndicator){ _local6 = new SpriteAsset(); _local6.mouseEnabled = false; selectionLayer.addChild(DisplayObject(_local6)); caretIndicator = _local6; } else { selectionLayer.setChildIndex(DisplayObject(caretIndicator), (selectionLayer.numChildren - 1)); }; _local6 = caretIndicator; drawCaretIndicator(_local6, _arg1.x, rowInfo[_local8.rowIndex].y, _arg1.width, rowInfo[_local8.rowIndex].height, getStyle("selectionColor"), _arg1); caretItemRenderer = _arg1; caretUID = _local8.uid; }; } else { if (((((!(_arg4)) && (caretItemRenderer))) && ((caretUID == _local8.uid)))){ if (caretIndicator){ Sprite(caretIndicator).graphics.clear(); }; caretItemRenderer = null; caretUID = ""; }; }; if ((_arg1 is IFlexDisplayObject)){ if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).invalidateDisplayList(); IInvalidating(_arg1).validateNow(); }; } else { if ((_arg1 is UITextField)){ UITextField(_arg1).validateNow(); }; }; } protected function dragExitHandler(_arg1:DragEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; hideDropFeedback(_arg1); DragManager.showFeedback(DragManager.NONE); } protected function mouseOutHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; if (((!(enabled)) || (!(selectable)))){ return; }; isPressed = _arg1.buttonDown; _local2 = mouseEventToItemRenderer(_arg1); if (!_local2){ return; }; if (!isPressed){ if (((((((itemRendererContains(_local2, _arg1.relatedObject)) || ((_arg1.relatedObject == listContent)))) || ((_arg1.relatedObject == highlightIndicator)))) || (!(highlightItemRenderer)))){ return; }; if (((getStyle("useRollOver")) && (_local2.data))){ clearHighlight(_local2); }; }; } protected function addDragData(_arg1:Object):void{ _arg1.addHandler(copySelectedItems, "items"); } protected function configureScrollBars():void{ } mx_internal function mouseEventToItemRendererOrEditor(_arg1:MouseEvent):IListItemRenderer{ var _local2:DisplayObject; var _local3:Point; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; var _local8:int; _local2 = DisplayObject(_arg1.target); if (_local2 == listContent){ _local3 = new Point(_arg1.stageX, _arg1.stageY); _local3 = listContent.globalToLocal(_local3); _local4 = 0; _local5 = listItems.length; _local6 = 0; while (_local6 < _local5) { if (listItems[_local6].length){ if (_local3.y < (_local4 + rowInfo[_local6].height)){ _local7 = listItems[_local6].length; if (_local7 == 1){ return (listItems[_local6][0]); }; _local8 = Math.floor((_local3.x / columnWidth)); return (listItems[_local6][_local8]); }; }; _local4 = (_local4 + rowInfo[_local6].height); _local6++; }; } else { if (_local2 == highlightIndicator){ return (lastHighlightItemRenderer); }; }; while (((_local2) && (!((_local2 == this))))) { if ((((_local2 is IListItemRenderer)) && ((_local2.parent == listContent)))){ if (_local2.visible){ return (IListItemRenderer(_local2)); }; break; }; _local2 = _local2.parent; }; return (null); } public function set dropEnabled(_arg1:Boolean):void{ if (((_dropEnabled) && (!(_arg1)))){ removeEventListener(DragEvent.DRAG_ENTER, dragEnterHandler, false); removeEventListener(DragEvent.DRAG_EXIT, dragExitHandler, false); removeEventListener(DragEvent.DRAG_OVER, dragOverHandler, false); removeEventListener(DragEvent.DRAG_DROP, dragDropHandler, false); }; _dropEnabled = _arg1; if (_arg1){ addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DragEvent.DRAG_EXIT, dragExitHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DragEvent.DRAG_OVER, dragOverHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DragEvent.DRAG_DROP, dragDropHandler, false, EventPriority.DEFAULT_HANDLER); }; } private function adjustAfterSort():void{ var i:int; var p:String; var index:int; var newVerticalScrollPosition:int; var newHorizontalScrollPosition:int; var pos:int; var data:ListBaseSelectionData; i = 0; for (p in selectedData) { i = (i + 1); }; index = (anchorBookmark) ? anchorBookmark.getViewIndex() : -1; if (index >= 0){ if (i == 1){ _selectedIndex = (anchorIndex = (caretIndex = index)); data = selectedData[p]; data.index = index; }; newVerticalScrollPosition = indexToRow(index); newVerticalScrollPosition = Math.min(maxVerticalScrollPosition, newVerticalScrollPosition); newHorizontalScrollPosition = indexToColumn(index); newHorizontalScrollPosition = Math.min(maxHorizontalScrollPosition, newHorizontalScrollPosition); pos = scrollPositionToIndex(newHorizontalScrollPosition, newVerticalScrollPosition); try { iterator.seek(CursorBookmark.CURRENT, (pos - index)); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, (pos - index)); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; return; }; super.verticalScrollPosition = newVerticalScrollPosition; if (listType != "vertical"){ super.horizontalScrollPosition = newHorizontalScrollPosition; }; } else { try { iterator.seek(CursorBookmark.FIRST, verticalScrollPosition); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, verticalScrollPosition); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; return; }; }; if (i > 1){ commitSelectedItems(selectedItems); }; } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } private function setSelectionDataLoop(_arg1:Array, _arg2:int, _arg3:Boolean=true):void{ var uid:String; var item:Object; var bookmark:CursorBookmark; var len:int; var data:Object; var i:int; var items = _arg1; var index = _arg2; var useFind = _arg3; if (useFind){ while (items.length) { item = items.pop(); uid = itemToUID(item); try { collectionIterator.findAny(item); } catch(e1:ItemPendingError) { items.push(item); e1.addResponder(new ItemResponder(selectionDataPendingResultHandler, selectionDataPendingFailureHandler, new ListBaseSelectionDataPending(useFind, 0, items, null, 0))); return; }; bookmark = collectionIterator.bookmark; index = bookmark.getViewIndex(); if (index >= 0){ addSelectionData(uid, new ListBaseSelectionData(item, index, true)); } else { try { collectionIterator.seek(CursorBookmark.FIRST, 0); } catch(e2:ItemPendingError) { e2.addResponder(new ItemResponder(selectionDataPendingResultHandler, selectionDataPendingFailureHandler, new ListBaseSelectionDataPending(false, 0, items, CursorBookmark.FIRST, 0))); return; }; setSelectionDataLoop(items, 0, false); return; }; if (items.length == 0){ _selectedIndex = index; }; }; } else { while (((items.length) && (!(collectionIterator.afterLast)))) { len = items.length; data = collectionIterator.current; i = 0; while (i < len) { if (data == items[i]){ uid = itemToUID(data); addSelectionData(uid, new ListBaseSelectionData(data, index, false)); items.splice(i, 1); if (items.length == 0){ _selectedIndex = index; _selectedItem = data; }; break; }; i = (i + 1); }; try { collectionIterator.moveNext(); index = (index + 1); } catch(e2:ItemPendingError) { e2.addResponder(new ItemResponder(selectionDataPendingResultHandler, selectionDataPendingFailureHandler, new ListBaseSelectionDataPending(false, index, items, CursorBookmark.CURRENT, 1))); return; }; }; }; if (initialized){ updateList(); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function get labelFunction():Function{ return (_labelFunction); } public function get dataTipField():String{ return (_dataTipField); } mx_internal function getCaretIndex():int{ return (caretIndex); } public function findString(_arg1:String):Boolean{ var cursorPos:CursorBookmark; var stopIndex:int; var i:int; var bMovedNext:Boolean; var str = _arg1; if (((!(collection)) || ((collection.length == 0)))){ return (false); }; cursorPos = iterator.bookmark; stopIndex = selectedIndex; i = (stopIndex + 1); if (selectedIndex == -1){ try { iterator.seek(CursorBookmark.FIRST, 0); } catch(e1:ItemPendingError) { e1.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, CursorBookmark.FIRST, 0, 0, collection.length))); iteratorValid = false; return (false); }; stopIndex = collection.length; i = 0; } else { try { iterator.seek(CursorBookmark.FIRST, stopIndex); } catch(e2:ItemPendingError) { if (anchorIndex == (collection.length - 1)){ e2.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, CursorBookmark.FIRST, 0, 0, collection.length))); } else { e2.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, anchorBookmark, 1, (anchorIndex + 1), anchorIndex))); }; iteratorValid = false; return (false); }; bMovedNext = false; try { bMovedNext = iterator.moveNext(); } catch(e3:ItemPendingError) { e3.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, anchorBookmark, 1, (anchorIndex + 1), anchorIndex))); iteratorValid = false; return (false); }; if (!bMovedNext){ try { iterator.seek(CursorBookmark.FIRST, 0); } catch(e4:ItemPendingError) { e4.addResponder(new ItemResponder(findPendingResultHandler, findPendingFailureHandler, new ListBaseFindPending(str, cursorPos, CursorBookmark.FIRST, 0, 0, collection.length))); iteratorValid = false; return (false); }; stopIndex = collection.length; i = 0; }; }; return (findStringLoop(str, cursorPos, i, stopIndex)); } protected function scrollPositionToIndex(_arg1:int, _arg2:int):int{ return ((iterator) ? _arg2 : -1); } private function calculateSelectedIndexAndItem():void{ var _local1:int; var _local2:String; _local1 = 0; for (_local2 in selectedData) { _local1 = 1; break; }; if (!_local1){ _selectedIndex = -1; _selectedItem = null; return; }; _selectedIndex = selectedData[_local2].index; _selectedItem = selectedData[_local2].data; } public function showDropFeedback(_arg1:DragEvent):void{ var _local2:Number; var _local3:Number; var _local4:Class; var _local5:EdgeMetrics; if (!dropIndicator){ _local4 = getStyle("dropIndicatorSkin"); if (!_local4){ _local4 = ListDropIndicator; }; dropIndicator = IFlexDisplayObject(new (_local4)); _local5 = viewMetrics; drawFocus(true); dropIndicator.x = 2; dropIndicator.setActualSize((listContent.width - 4), 4); dropIndicator.visible = true; listContent.addChild(DisplayObject(dropIndicator)); if (collection){ dragScroll(); }; }; _local2 = calculateDropIndex(_arg1); if (_local2 >= lockedRowCount){ _local2 = (_local2 - verticalScrollPosition); }; _local3 = listItems.length; if (_local2 >= _local3){ _local2 = (_local3 - 1); }; if (_local2 < 0){ _local2 = 0; }; dropIndicator.y = calculateDropIndicatorY(_local3, _local2); } mx_internal function get rendererArray():Array{ return (listItems); } public function get columnCount():int{ return (_columnCount); } public function get dragEnabled():Boolean{ return (_dragEnabled); } public function get iconFunction():Function{ return (_iconFunction); } private function findPendingResultHandler(_arg1:Object, _arg2:ListBaseFindPending):void{ iterator.seek(_arg2.bookmark, _arg2.offset); findStringLoop(_arg2.searchString, _arg2.startingBookmark, _arg2.currentIndex, _arg2.stopIndex); } protected function addToFreeItemRenderers(_arg1:IListItemRenderer):void{ DisplayObject(_arg1).visible = false; freeItemRenderers.push(_arg1); delete rowMap[_arg1.name]; } public function get rowHeight():Number{ return (_rowHeight); } private function mouseIsUp():void{ systemManager.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler); if (((!(dragEnabled)) && (!((dragScrollingInterval == 0))))){ clearInterval(dragScrollingInterval); dragScrollingInterval = 0; }; } protected function get dragImageOffsets():Point{ var _local1:Point; var _local2:int; var _local3:int; _local1 = new Point(); _local2 = listItems.length; _local3 = lockedRowCount; while (_local3 < _local2) { if (selectedData[rowInfo[_local3].uid]){ _local1.x = listItems[_local3][0].x; _local1.y = listItems[_local3][0].y; }; _local3++; }; return (_local1); } override public function styleChanged(_arg1:String):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; if (IS_ITEM_STYLE[_arg1]){ itemsSizeChanged = true; invalidateDisplayList(); } else { if (_arg1 == "paddingTop"){ cachedPaddingTopInvalid = true; invalidateProperties(); } else { if (_arg1 == "paddingBottom"){ cachedPaddingBottomInvalid = true; invalidateProperties(); } else { if (_arg1 == "verticalAlign"){ cachedVerticalAlignInvalid = true; invalidateProperties(); } else { if (listItems){ _local2 = listItems.length; _local3 = 0; while (_local3 < _local2) { _local4 = listItems[_local3].length; _local5 = 0; while (_local5 < _local4) { if (listItems[_local3][_local5]){ listItems[_local3][_local5].styleChanged(_arg1); }; _local5++; }; _local3++; }; }; }; }; }; }; super.styleChanged(_arg1); if (invalidateSizeFlag){ itemsNeedMeasurement = true; invalidateProperties(); }; if (StyleManager.isSizeInvalidatingStyle(_arg1)){ scrollAreaChanged = true; }; } public function itemToDataTip(_arg1:Object):String{ var data = _arg1; if (dataTipFunction != null){ return (dataTipFunction(data)); }; if (typeof(data) == "object"){ try { if (data[dataTipField] != null){ data = data[dataTipField]; } else { if (data.label != null){ data = data.label; }; }; } catch(e:Error) { }; }; if (typeof(data) == "string"){ return (String(data)); }; try { return (data.toString()); } catch(e:Error) { }; return (" "); } public function set selectedItems(_arg1:Array):void{ if (((!(collection)) || ((collection.length == 0)))){ _selectedItems = _arg1; bSelectedItemsChanged = true; bSelectionChanged = true; invalidateDisplayList(); return; }; commitSelectedItems(_arg1); } public function set lockedColumnCount(_arg1:int):void{ _lockedColumnCount = _arg1; invalidateDisplayList(); } protected function removeIndicators(_arg1:String):void{ if (selectionTweens[_arg1]){ selectionTweens[_arg1].removeEventListener(TweenEvent.TWEEN_UPDATE, selectionTween_updateHandler); selectionTweens[_arg1].removeEventListener(TweenEvent.TWEEN_END, selectionTween_endHandler); if (selectionIndicators[_arg1].alpha < 1){ Tween.removeTween(selectionTweens[_arg1]); }; delete selectionTweens[_arg1]; }; if (selectionIndicators[_arg1]){ selectionLayer.removeChild(selectionIndicators[_arg1]); selectionIndicators[_arg1] = null; }; if (_arg1 == highlightUID){ highlightItemRenderer = null; highlightUID = null; if (highlightIndicator){ Sprite(highlightIndicator).graphics.clear(); }; }; if (_arg1 == caretUID){ caretItemRenderer = null; caretUID = null; if (caretIndicator){ Sprite(caretIndicator).graphics.clear(); }; }; } protected function dragStartHandler(_arg1:DragEvent):void{ var _local2:DragSource; if (_arg1.isDefaultPrevented()){ return; }; _local2 = new DragSource(); addDragData(_local2); DragManager.doDrag(this, _local2, _arg1, dragImage, 0, 0, 0.5, dragMoveEnabled); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var cursorPos:CursorBookmark; var collectionHasItems:Boolean; var g:Graphics; var hPos:Number; var vPos:Number; var row:Array; var rowIndex:int; var colLen:int; var j:int; var uid:String; var curY:Number; var pt:Point; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if ((((((((((oldUnscaledWidth == unscaledWidth)) && ((oldUnscaledHeight == unscaledHeight)))) && (!(itemsSizeChanged)))) && (!(bSelectionChanged)))) && (!(scrollAreaChanged)))){ return; }; if (oldUnscaledWidth != unscaledWidth){ itemsSizeChanged = true; }; super.updateDisplayList(unscaledWidth, unscaledHeight); listContent.move(viewMetrics.left, viewMetrics.top); if ((((horizontalScrollPolicy == ScrollPolicy.ON)) && ((listType == "vertical")))){ if (isNaN(_maxHorizontalScrollPosition)){ listContent.setActualSize((((unscaledWidth - viewMetrics.left) - viewMetrics.right) * 2), ((unscaledHeight - viewMetrics.top) - viewMetrics.bottom)); } else { listContent.setActualSize((((unscaledWidth - viewMetrics.left) - viewMetrics.right) + _maxHorizontalScrollPosition), ((unscaledHeight - viewMetrics.top) - viewMetrics.bottom)); }; } else { listContent.setActualSize(((unscaledWidth - viewMetrics.left) - viewMetrics.right), ((unscaledHeight - viewMetrics.top) - viewMetrics.bottom)); }; collectionHasItems = ((collection) && ((collection.length > 0))); if (collectionHasItems){ if (!isNaN(horizontalScrollPositionPending)){ hPos = Math.min(horizontalScrollPositionPending, maxHorizontalScrollPosition); horizontalScrollPositionPending = NaN; super.horizontalScrollPosition = hPos; }; if (!isNaN(verticalScrollPositionPending)){ vPos = Math.min(verticalScrollPositionPending, maxVerticalScrollPosition); verticalScrollPositionPending = NaN; super.verticalScrollPosition = vPos; }; }; removeClipMask(); g = selectionLayer.graphics; g.clear(); if ((((listContent.width > 0)) && ((listContent.height > 0)))){ g.beginFill(0x808080, 0); g.drawRect(0, 0, listContent.width, listContent.height); g.endFill(); }; if (rendererChanged){ rendererChanged = false; while (listItems.length) { row = listItems.pop(); while (row.length) { listContent.removeChild(row.pop()); }; }; while (freeItemRenderers.length) { listContent.removeChild(freeItemRenderers.pop()); }; rowMap = {}; }; if ((((((((((((oldUnscaledWidth == unscaledWidth)) && (!(scrollAreaChanged)))) && (!(itemsSizeChanged)))) && ((listItems.length > 0)))) && (iterator))) && ((columnCount == 1)))){ rowIndex = (listItems.length - 1); if (oldUnscaledHeight > unscaledHeight){ while (rowIndex >= 0) { if (rowInfo[rowIndex].y >= listContent.height){ colLen = listItems[rowIndex].length; j = 0; while (j < colLen) { addToFreeItemRenderers(listItems[rowIndex][j]); j = (j + 1); }; uid = rowInfo[rowIndex].uid; delete visibleData[uid]; removeIndicators(uid); listItems.pop(); rowInfo.pop(); rowIndex = (rowIndex - 1); } else { break; }; }; } else { if (iterator){ cursorPos = iterator.bookmark; try { iterator.seek(CursorBookmark.CURRENT, (listItems.length - lockedRowCount)); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, (listItems.length - lockedRowCount)); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; curY = (rowInfo[rowIndex].y + rowInfo[rowIndex].height); makeRowsAndColumns(0, curY, listContent.width, listContent.height, 0, (rowIndex + 1)); if (iterator){ try { iterator.seek(cursorPos, 0); } catch(e:ItemPendingError) { }; }; }; } else { if (iterator){ cursorPos = iterator.bookmark; }; clearIndicators(); visibleData = {}; pt = makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); if (iterator){ try { iterator.seek(cursorPos, 0); } catch(e:ItemPendingError) { }; }; }; oldUnscaledWidth = unscaledWidth; oldUnscaledHeight = unscaledHeight; configureScrollBars(); addClipMask(true); itemsSizeChanged = false; wordWrapChanged = false; if (bSelectionChanged){ bSelectionChanged = false; if (((bSelectedIndicesChanged) && (((collectionHasItems) || ((_selectedIndices == null)))))){ bSelectedIndicesChanged = false; bSelectedIndexChanged = false; commitSelectedIndices(_selectedIndices); }; if (((bSelectedItemChanged) && (((collectionHasItems) || ((_selectedItem == null)))))){ bSelectedItemChanged = false; bSelectedIndexChanged = false; commitSelectedItem(_selectedItem); }; if (((bSelectedItemsChanged) && (((collectionHasItems) || ((_selectedItems == null)))))){ bSelectedItemsChanged = false; bSelectedIndexChanged = false; commitSelectedItems(_selectedItems); }; if (((bSelectedIndexChanged) && (((collectionHasItems) || ((_selectedIndex == -1)))))){ commitSelectedIndex(_selectedIndex); bSelectedIndexChanged = false; }; }; if (((keySelectionPending) && (iteratorValid))){ keySelectionPending = false; finishKeySelection(); }; } public function measureWidthOfItems(_arg1:int=-1, _arg2:int=0):Number{ return (NaN); } mx_internal function getItemUID(_arg1:Object):String{ return (itemToUID(_arg1)); } public function get showDataTips():Boolean{ return (_showDataTips); } protected function drawHighlightIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ var _local8:Graphics; _local8 = Sprite(_arg1).graphics; _local8.clear(); _local8.beginFill(_arg6); _local8.drawRect(0, 0, _arg4, _arg5); _local8.endFill(); _arg1.x = _arg2; _arg1.y = _arg3; } protected function drawCaretIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ var _local8:Graphics; _local8 = Sprite(_arg1).graphics; _local8.clear(); _local8.lineStyle(1, _arg6, 1); _local8.drawRect(0, 0, (_arg4 - 1), (_arg5 - 1)); _arg1.x = _arg2; _arg1.y = _arg3; } override public function get verticalScrollPosition():Number{ if (!isNaN(verticalScrollPositionPending)){ return (verticalScrollPositionPending); }; return (super.verticalScrollPosition); } private function addSelectionData(_arg1:String, _arg2:ListBaseSelectionData):void{ if (firstSelectionData != null){ firstSelectionData.prevSelectionData = _arg2; }; _arg2.nextSelectionData = firstSelectionData; firstSelectionData = _arg2; selectedData[_arg1] = _arg2; } protected function seekPendingFailureHandler(_arg1:Object, _arg2:ListBaseSeekPending):void{ } public function get selectedItem():Object{ return (_selectedItem); } public function get selectable():Boolean{ return (_selectable); } public function get dragMoveEnabled():Boolean{ return (_dragMoveEnabled); } protected function itemRendererToIndices(_arg1:IListItemRenderer):Point{ var _local2:int; var _local3:int; var _local4:int; if (!_arg1){ return (null); }; if ((_arg1.name in rowMap)){ _local2 = rowMap[_arg1.name].rowIndex; _local3 = listItems[_local2].length; _local4 = 0; while (_local4 < _local3) { if (listItems[_local2][_local4] == _arg1){ break; }; _local4++; }; return (new Point(((_local4 < lockedColumnCount)) ? _local4 : (_local4 + horizontalScrollPosition), ((_local2 < lockedRowCount)) ? _local2 : (_local2 + verticalScrollPosition))); //unresolved jump }; return (null); } protected function copySelectedItems(_arg1:Boolean=true):Array{ var _local2:Array; var _local3:ListBaseSelectionData; _local2 = []; _local3 = firstSelectionData; while (_local3 != null) { if (_arg1){ _local2.push(_local3.data); } else { _local2.push(_local3.index); }; _local3 = _local3.nextSelectionData; }; return (_local2); } public function get lockedRowCount():int{ return (_lockedRowCount); } public function indexToItemRenderer(_arg1:int):IListItemRenderer{ if ((((_arg1 < verticalScrollPosition)) || ((_arg1 >= (verticalScrollPosition + listItems.length))))){ return (null); }; return (listItems[(_arg1 - verticalScrollPosition)][0]); } protected function get dragImage():IUIComponent{ var _local1:ListItemDragProxy; _local1 = new ListItemDragProxy(); _local1.owner = this; return (_local1); } protected function itemToUID(_arg1:Object):String{ if (!_arg1){ return ("null"); }; return (UIDUtil.getUID(_arg1)); } public function get selectedIndices():Array{ if (bSelectedIndicesChanged){ return (_selectedIndices); }; return (copySelectedItems(false)); } public function get variableRowHeight():Boolean{ return (_variableRowHeight); } private function selectionDataPendingResultHandler(_arg1:Object, _arg2:ListBaseSelectionDataPending):void{ if (_arg2.bookmark){ iterator.seek(_arg2.bookmark, _arg2.offset); }; setSelectionDataLoop(_arg2.items, _arg2.index, _arg2.useFind); } public function set labelField(_arg1:String):void{ _labelField = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("labelFieldChanged")); } mx_internal function clearHighlight(_arg1:IListItemRenderer):void{ var _local2:String; var _local3:Point; var _local4:ListEvent; _local2 = itemToUID(_arg1.data); drawItem(visibleData[_local2], isItemSelected(_arg1.data), false, (_local2 == caretUID)); _local3 = itemRendererToIndices(_arg1); if (_local3){ _local4 = new ListEvent(ListEvent.ITEM_ROLL_OUT); _local4.columnIndex = _local3.x; _local4.rowIndex = _local3.y; _local4.itemRenderer = _arg1; dispatchEvent(_local4); }; } public function set wordWrap(_arg1:Boolean):void{ if (_arg1 == _wordWrap){ return; }; _wordWrap = _arg1; wordWrapChanged = true; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("wordWrapChanged")); } public function get itemRenderer():IFactory{ return (_itemRenderer); } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } private function shiftSelectionLoop(_arg1:Boolean, _arg2:int, _arg3:Object, _arg4:Boolean, _arg5:CursorBookmark):void{ var data:Object; var uid:String; var incr = _arg1; var index = _arg2; var stopData = _arg3; var transition = _arg4; var placeHolder = _arg5; try { do { data = iterator.current; uid = itemToUID(data); addSelectionData(uid, new ListBaseSelectionData(data, index, approximate)); if (visibleData[uid]){ drawItem(visibleData[uid], true, (uid == highlightUID), false, transition); }; } while (data != stopData); } catch(e:ItemPendingError) { e.addResponder(new ItemResponder(selectionPendingResultHandler, selectionPendingFailureHandler, new ListBaseSelectionPending(incr, index, stopData, transition, placeHolder, CursorBookmark.CURRENT, 0))); iteratorValid = false; }; try { iterator.seek(placeHolder, 0); iteratorValid = true; } catch(e2:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(placeHolder, 0); e2.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); }; } public function get allowMultipleSelection():Boolean{ return (_allowMultipleSelection); } protected function drawRowBackgrounds():void{ } private function selectionIndicesPendingResultHandler(_arg1:Object, _arg2:ListBaseSelectionDataPending):void{ if (_arg2.bookmark){ iterator.seek(_arg2.bookmark, _arg2.offset); }; setSelectionIndicesLoop(_arg2.index, _arg2.items, _arg2.useFind); } protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } private function setSelectionIndicesLoop(_arg1:int, _arg2:Array, _arg3:Boolean=false):void{ var data:Object; var index = _arg1; var indices = _arg2; var firstTime = _arg3; while (indices.length) { if (index != indices[0]){ try { collectionIterator.seek(CursorBookmark.CURRENT, (indices[0] - index)); } catch(e:ItemPendingError) { e.addResponder(new ItemResponder(selectionIndicesPendingResultHandler, selectionIndicesPendingFailureHandler, new ListBaseSelectionDataPending(firstTime, index, indices, CursorBookmark.CURRENT, (indices[0] - index)))); return; }; }; index = indices[0]; indices.shift(); data = collectionIterator.current; if (firstTime){ _selectedIndex = index; _selectedItem = data; firstTime = false; }; addSelectionData(itemToUID(data), new ListBaseSelectionData(data, index, false)); }; if (initialized){ updateList(); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } private function removeSelectionData(_arg1:String):void{ var _local2:ListBaseSelectionData; _local2 = selectedData[_arg1]; if (firstSelectionData == _local2){ firstSelectionData = _local2.nextSelectionData; }; if (_local2.prevSelectionData != null){ _local2.prevSelectionData.nextSelectionData = _local2.nextSelectionData; }; if (_local2.nextSelectionData != null){ _local2.nextSelectionData.prevSelectionData = _local2.prevSelectionData; }; delete selectedData[_arg1]; } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:int; var _local3:int; super.measure(); _local1 = viewMetrics; _local2 = ((explicitColumnCount < 1)) ? defaultColumnCount : explicitColumnCount; _local3 = ((explicitRowCount < 1)) ? defaultRowCount : explicitRowCount; if (!isNaN(explicitRowHeight)){ measuredHeight = (((explicitRowHeight * _local3) + _local1.top) + _local1.bottom); measuredMinHeight = (((explicitRowHeight * Math.min(_local3, 2)) + _local1.top) + _local1.bottom); } else { measuredHeight = (((rowHeight * _local3) + _local1.top) + _local1.bottom); measuredMinHeight = (((rowHeight * Math.min(_local3, 2)) + _local1.top) + _local1.bottom); }; if (!isNaN(explicitColumnWidth)){ measuredWidth = (((explicitColumnWidth * _local2) + _local1.left) + _local1.right); measuredMinWidth = (((explicitColumnWidth * Math.min(_local2, 1)) + _local1.left) + _local1.right); } else { measuredWidth = (((columnWidth * _local2) + _local1.left) + _local1.right); measuredMinWidth = (((columnWidth * Math.min(_local2, 1)) + _local1.left) + _local1.right); }; if ((((verticalScrollPolicy == ScrollPolicy.AUTO)) && (verticalScrollBar))){ measuredWidth = (measuredWidth - verticalScrollBar.minWidth); measuredMinWidth = (measuredMinWidth - verticalScrollBar.minWidth); }; if ((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && (horizontalScrollBar))){ measuredHeight = (measuredHeight - horizontalScrollBar.minHeight); measuredMinHeight = (measuredMinHeight - horizontalScrollBar.minHeight); }; } protected function setRowHeight(_arg1:Number):void{ _rowHeight = _arg1; } public function get listData():BaseListData{ return (_listData); } protected function calculateDropIndicatorY(_arg1:Number, _arg2:int):Number{ var _local3:int; var _local4:Number; _local4 = 0; if (((((_arg1) && (listItems[_arg2].length))) && (listItems[_arg2][0]))){ return ((listItems[_arg2][0].y - 1)); }; _local3 = 0; while (_local3 < _arg1) { if (listItems[_local3].length){ _local4 = (_local4 + rowInfo[_local3].height); } else { break; }; _local3++; }; return (_local4); } mx_internal function getListVisibleData():Object{ return (visibleData); } mx_internal function setColumnCount(_arg1:int):void{ _columnCount = _arg1; } private function selectionPendingFailureHandler(_arg1:Object, _arg2:ListBaseSelectionPending):void{ } mx_internal function convertIndexToColumn(_arg1:int):int{ return (indexToColumn(_arg1)); } private function createItemMask(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):DisplayObject{ var _local5:Shape; var _local6:Graphics; if (!itemMaskFreeList){ itemMaskFreeList = []; }; if (itemMaskFreeList.length > 0){ _local5 = itemMaskFreeList.pop(); if (_local5.width != _arg3){ _local5.width = _arg3; }; if (_local5.height != _arg4){ _local5.height = _arg4; }; } else { _local5 = new FlexShape(); _local5.name = "mask"; _local6 = _local5.graphics; _local6.beginFill(0xFFFFFF); _local6.drawRect(0, 0, _arg3, _arg4); _local6.endFill(); _local5.visible = false; listContent.addChild(_local5); }; if (_local5.x != _arg1){ _local5.x = _arg1; }; if (_local5.y != _arg2){ _local5.y = _arg2; }; return (_local5); } mx_internal function convertIndexToRow(_arg1:int):int{ return (indexToRow(_arg1)); } protected function setRowCount(_arg1:int):void{ _rowCount = _arg1; } mx_internal function getIterator():IViewCursor{ return (iterator); } public function get selectedItems():Array{ return ((bSelectedItemsChanged) ? _selectedItems : copySelectedItems()); } public function set labelFunction(_arg1:Function):void{ _labelFunction = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("labelFunctionChanged")); } public function set dataTipField(_arg1:String):void{ _dataTipField = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("dataTipFieldChanged")); } public function set selectedIndex(_arg1:int):void{ if (((!(collection)) || ((collection.length == 0)))){ _selectedIndex = _arg1; bSelectionChanged = true; bSelectedIndexChanged = true; invalidateDisplayList(); return; }; commitSelectedIndex(_arg1); } public function get lockedColumnCount():int{ return (_lockedColumnCount); } private function mouseLeaveHandler(_arg1:Event):void{ mouseIsUp(); isPressed = false; } protected function mouseOverHandler(_arg1:MouseEvent):void{ var _local2:ListEvent; var _local3:IListItemRenderer; var _local4:Point; var _local5:String; if (((!(enabled)) || (!(selectable)))){ return; }; if (((!((dragScrollingInterval == 0))) && (!(_arg1.buttonDown)))){ mouseIsUp(); }; isPressed = _arg1.buttonDown; _local3 = mouseEventToItemRenderer(_arg1); _local4 = itemRendererToIndices(_local3); if (!_local3){ return; }; if (((!(isPressed)) || (allowDragSelection))){ if (_arg1.relatedObject){ if (((((itemRendererContains(_local3, _arg1.relatedObject)) || ((_local3 == lastHighlightItemRenderer)))) || ((_arg1.relatedObject == highlightIndicator)))){ return; }; }; if (((getStyle("useRollOver")) && (!((_local3.data == null))))){ if (allowDragSelection){ bSelectOnRelease = true; }; _local5 = itemToUID(_local3.data); drawItem(visibleData[_local5], isItemSelected(_local3.data), true, (_local5 == caretUID)); if (_local4){ _local2 = new ListEvent(ListEvent.ITEM_ROLL_OVER); _local2.columnIndex = _local4.x; _local2.rowIndex = _local4.y; _local2.itemRenderer = _local3; dispatchEvent(_local2); }; }; } else { if (DragManager.isDragging){ return; }; if (((((!((dragScrollingInterval == 0))) && (allowDragSelection))) || (menuSelectionMode))){ if (selectItem(_local3, _arg1.shiftKey, _arg1.ctrlKey)){ _local2 = new ListEvent(ListEvent.CHANGE); _local2.itemRenderer = _local3; if (_local4){ _local2.columnIndex = _local4.x; _local2.rowIndex = _local4.y; }; dispatchEvent(_local2); }; }; }; } private function commitSelectedItems(_arg1:Array):void{ var useFind:Boolean; var items = _arg1; clearSelected(); useFind = !((collection.sort == null)); try { collectionIterator.seek(CursorBookmark.FIRST, 0); } catch(e:ItemPendingError) { e.addResponder(new ItemResponder(selectionDataPendingResultHandler, selectionDataPendingFailureHandler, new ListBaseSelectionDataPending(useFind, 0, items, null, 0))); return; }; setSelectionDataLoop(items, 0, useFind); } public function hideDropFeedback(_arg1:DragEvent):void{ if (dropIndicator){ listContent.removeChild(DisplayObject(dropIndicator)); dropIndicator = null; drawFocus(false); if (dragScrollingInterval != 0){ clearInterval(dragScrollingInterval); dragScrollingInterval = 0; }; }; } private function selectionTween_endHandler(_arg1:TweenEvent):void{ selectionTween_updateHandler(_arg1); } private function clearSelectionData():void{ selectedData = {}; firstSelectionData = null; } protected function dragOverHandler(_arg1:DragEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; if (_arg1.dragSource.hasFormat("items")){ DragManager.showFeedback((_arg1.ctrlKey) ? DragManager.COPY : DragManager.MOVE); showDropFeedback(_arg1); return; }; hideDropFeedback(_arg1); DragManager.showFeedback(DragManager.NONE); } private function selectionIndicesPendingFailureHandler(_arg1:Object, _arg2:ListBaseSelectionDataPending):void{ } protected function selectItem(_arg1:IListItemRenderer, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean=true):Boolean{ var selectionChange:Boolean; var placeHolder:CursorBookmark; var index:int; var data:Object; var uid:String; var numSelected:int; var curSelectionData:ListBaseSelectionData; var oldAnchorBookmark:CursorBookmark; var oldAnchorIndex:int; var incr:Boolean; var item = _arg1; var shiftKey = _arg2; var ctrlKey = _arg3; var transition = _arg4; if (!selectable){ return (false); }; selectionChange = false; placeHolder = iterator.bookmark; index = itemRendererToIndex(item); uid = itemToUID(item.data); if (((!(allowMultipleSelection)) || (((!(shiftKey)) && (!(ctrlKey)))))){ numSelected = 0; if (allowMultipleSelection){ curSelectionData = firstSelectionData; if (curSelectionData != null){ numSelected = (numSelected + 1); if (curSelectionData.nextSelectionData){ numSelected = (numSelected + 1); }; }; }; if (((ctrlKey) && (selectedData[uid]))){ selectionChange = true; clearSelected(transition); } else { if (((((!((_selectedIndex == index))) || (bSelectedIndexChanged))) || (((allowMultipleSelection) && (!((numSelected == 1))))))){ selectionChange = true; clearSelected(transition); addSelectionData(uid, new ListBaseSelectionData(item.data, index, approximate)); drawItem(visibleData[uid], true, (uid == highlightUID), true, transition); _selectedIndex = index; _selectedItem = item.data; iterator.seek(CursorBookmark.CURRENT, (_selectedIndex - verticalScrollPosition)); caretIndex = _selectedIndex; caretBookmark = iterator.bookmark; anchorIndex = _selectedIndex; anchorBookmark = iterator.bookmark; iterator.seek(placeHolder, 0); }; }; } else { if (((shiftKey) && (allowMultipleSelection))){ if (anchorBookmark){ oldAnchorBookmark = anchorBookmark; oldAnchorIndex = anchorIndex; incr = (anchorIndex < index); clearSelected(false); caretIndex = index; caretBookmark = iterator.bookmark; anchorIndex = oldAnchorIndex; anchorBookmark = oldAnchorBookmark; try { iterator.seek(anchorBookmark, 0); } catch(e:ItemPendingError) { e.addResponder(new ItemResponder(selectionPendingResultHandler, selectionPendingFailureHandler, new ListBaseSelectionPending(incr, index, item.data, transition, placeHolder, CursorBookmark.CURRENT, 0))); iteratorValid = false; }; shiftSelectionLoop(incr, anchorIndex, item.data, transition, placeHolder); }; selectionChange = true; } else { if (((ctrlKey) && (allowMultipleSelection))){ if (selectedData[uid]){ removeSelectionData(uid); drawItem(visibleData[uid], false, (uid == highlightUID), true, transition); if (item.data == selectedItem){ calculateSelectedIndexAndItem(); }; } else { addSelectionData(uid, new ListBaseSelectionData(item.data, index, approximate)); drawItem(visibleData[uid], true, (uid == highlightUID), true, transition); _selectedIndex = index; _selectedItem = item.data; }; iterator.seek(CursorBookmark.CURRENT, (index - verticalScrollPosition)); caretIndex = index; caretBookmark = iterator.bookmark; anchorIndex = index; anchorBookmark = iterator.bookmark; iterator.seek(placeHolder, 0); selectionChange = true; }; }; }; return (selectionChange); } protected function scrollVertically(_arg1:int, _arg2:int, _arg3:Boolean):void{ var i:int; var j:int; var r:IListItemRenderer; var item:IListItemRenderer; var numRows:int; var numCols:int; var uid:String; var visibleY:Number; var curY:Number; var rowCount:int; var columnCount:int; var cursorPos:CursorBookmark; var moveBlockDistance:Number; var startRow:int; var bVisible:Boolean; var actual:Point; var row:Array; var rowData:Object; var deltaY:Number; var deleteRow:Boolean; var oldRow:Array; var pos = _arg1; var deltaPos = _arg2; var scrollUp = _arg3; rowCount = rowInfo.length; columnCount = listItems[0].length; moveBlockDistance = 0; visibleY = ((lockedRowCount)>0) ? (rowInfo[(lockedRowCount - 1)].y + rowInfo[(lockedRowCount - 1)].height) : 0; if (scrollUp){ i = lockedRowCount; while (i < rowCount) { if (rowInfo[i].y >= visibleY){ break; }; i = (i + 1); }; startRow = i; while (i < (deltaPos + startRow)) { moveBlockDistance = (moveBlockDistance + rowInfo[i].height); try { iterator.moveNext(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, pos); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; return; }; i = (i + 1); }; deltaPos = 0; i = lockedRowCount; while (i < rowCount) { numCols = listItems[i].length; bVisible = false; j = 0; while ((((j < columnCount)) && ((j < numCols)))) { r = listItems[i][j]; r.move(r.x, (r.y - moveBlockDistance)); if (((r.data) && ((r is IDropInListItemRenderer)))){ IDropInListItemRenderer(r).listData.rowIndex = i; }; rowMap[r.name].rowIndex = i; j = (j + 1); }; rowInfo[i].y = (rowInfo[i].y - moveBlockDistance); if ((rowInfo[i].y + rowInfo[i].height) > visibleY){ bVisible = true; }; uid = rowInfo[i].uid; if (!bVisible){ removeIndicators(uid); j = 0; while ((((j < columnCount)) && ((j < numCols)))) { r = listItems[i][j]; if (r.data){ delete visibleData[rowMap[r.name].uid]; }; addToFreeItemRenderers(r); j = (j + 1); }; deltaPos = (deltaPos + 1); } else { if (uid){ if (selectionIndicators[uid]){ selectionIndicators[uid].y = (selectionIndicators[uid].y - moveBlockDistance); }; if (highlightUID == uid){ highlightIndicator.y = (highlightIndicator.y - moveBlockDistance); }; if (caretUID == uid){ caretIndicator.y = (caretIndicator.y - moveBlockDistance); }; }; }; i = (i + 1); }; if (deltaPos){ i = (lockedRowCount + deltaPos); while (i < rowCount) { numCols = listItems[i].length; j = 0; while ((((j < columnCount)) && ((j < numCols)))) { r = listItems[i][j]; if (((r.data) && ((r is IDropInListItemRenderer)))){ IDropInListItemRenderer(r).listData.rowIndex = (i - deltaPos); }; rowMap[r.name].rowIndex = (i - deltaPos); listItems[(i - deltaPos)][j] = r; j = (j + 1); }; if (!numCols){ listItems[(i - deltaPos)].splice(0); }; rowInfo[(i - deltaPos)] = rowInfo[i]; i = (i + 1); }; listItems.splice((rowCount - deltaPos)); rowInfo.splice((rowCount - deltaPos)); }; curY = (rowInfo[((rowCount - deltaPos) - 1)].y + rowInfo[((rowCount - deltaPos) - 1)].height); cursorPos = iterator.bookmark; try { iterator.seek(CursorBookmark.CURRENT, ((rowCount - lockedRowCount) - deltaPos)); } catch(e1:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(cursorPos, 0); e1.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; makeRowsAndColumns(0, curY, listContent.width, listContent.height, 0, (rowCount - deltaPos)); iterator.seek(cursorPos, 0); } else { curY = 0; if (lockedRowCount > 0){ curY = (rowInfo[(lockedRowCount - 1)].y + rowInfo[(lockedRowCount - 1)].height); }; i = 0; while (i < deltaPos) { listItems.splice(lockedRowCount, 0, null); rowInfo.splice(lockedRowCount, 0, null); i = (i + 1); }; try { iterator.seek(CursorBookmark.CURRENT, -(deltaPos)); } catch(e2:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, -(deltaPos)); e2.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; cursorPos = iterator.bookmark; actual = makeRowsAndColumns(0, curY, listContent.width, listContent.height, 0, lockedRowCount, true, deltaPos); iterator.seek(cursorPos, 0); if (actual.y == 0){ verticalScrollPosition = 0; rowInfo.splice(lockedRowCount, deltaPos); listItems.splice(lockedRowCount, deltaPos); }; i = 0; while (i < actual.y) { moveBlockDistance = (moveBlockDistance + rowInfo[(lockedRowCount + i)].height); i = (i + 1); }; curY = (curY + moveBlockDistance); i = (lockedRowCount + actual.y); while (i < listItems.length) { row = listItems[i]; rowData = rowInfo[i]; deleteRow = false; deltaY = (curY - rowData.y); rowData.y = curY; if (row.length){ j = 0; while (j < row.length) { item = row[j]; item.move(item.x, (item.y + deltaY)); if (item.y >= listContent.height){ deleteRow = true; }; if (!deleteRow){ rowMap[item.name].rowIndex = (rowMap[item.name].rowIndex + deltaPos); }; j = (j + 1); }; } else { if (rowData.y >= listContent.height){ deleteRow = true; }; }; uid = rowInfo[i].uid; if (deleteRow){ oldRow = listItems[i]; if (((oldRow.length) && (oldRow[0].data))){ removeIndicators(uid); }; j = 0; while (j < oldRow.length) { if (oldRow[j].data){ delete visibleData[uid]; }; addToFreeItemRenderers(oldRow[j]); j = (j + 1); }; listItems.splice(i, 1); rowInfo.splice(i, 1); i = (i - 1); }; if (uid){ if (selectionIndicators[uid]){ selectionIndicators[uid].y = curY; }; if (highlightUID == uid){ highlightIndicator.y = curY; }; if (caretUID == uid){ caretIndicator.y = curY; }; }; curY = (curY + rowData.height); i = (i + 1); }; rowCount = listItems.length; }; } private function selectionTween_updateHandler(_arg1:TweenEvent):void{ Sprite(_arg1.target.listener).alpha = Number(_arg1.value); } public function isItemVisible(_arg1:Object):Boolean{ return (!((itemToItemRenderer(_arg1) == null))); } public function calculateDropIndex(_arg1:DragEvent=null):int{ var _local2:IListItemRenderer; var _local3:Point; var _local4:int; var _local5:int; if (_arg1){ _local3 = new Point(_arg1.localX, _arg1.localY); _local3 = DisplayObject(_arg1.target).localToGlobal(_local3); _local3 = listContent.globalToLocal(_local3); _local4 = listItems.length; _local5 = 0; while (_local5 < _local4) { if ((((rowInfo[_local5].y <= _local3.y)) && ((_local3.y <= (rowInfo[_local5].y + rowInfo[_local5].height))))){ _local2 = listItems[_local5][0]; break; }; _local5++; }; if (_local2){ lastDropIndex = itemRendererToIndex(_local2); } else { lastDropIndex = (collection) ? collection.length : 0; }; }; return (lastDropIndex); } mx_internal function commitSelectedIndices(_arg1:Array):void{ var indices = _arg1; clearSelected(); try { collectionIterator.seek(CursorBookmark.FIRST, 0); } catch(e:ItemPendingError) { e.addResponder(new ItemResponder(selectionIndicesPendingResultHandler, selectionIndicesPendingFailureHandler, new ListBaseSelectionDataPending(true, 0, indices, CursorBookmark.FIRST, 0))); return; }; setSelectionIndicesLoop(0, indices, true); } protected function adjustAfterRemove(_arg1:Array, _arg2:int, _arg3:Boolean):Boolean{ var _local4:ListBaseSelectionData; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:String; _local5 = _arg3; _local6 = 0; _local7 = _arg1.length; for (_local8 in selectedData) { _local6++; _local4 = selectedData[_local8]; if (_local4.index > _arg2){ _local4.index = (_local4.index - _local7); }; }; if (_selectedIndex > _arg2){ _selectedIndex = (_selectedIndex - _local7); _local5 = true; }; if ((((_local6 > 0)) && ((_selectedIndex == -1)))){ _selectedIndex = _local4.index; _selectedItem = _local4.data; _local5 = true; }; if (_local6 == 0){ _selectedIndex = -1; bSelectionChanged = true; bSelectedIndexChanged = true; invalidateDisplayList(); }; return (_local5); } public function get wordWrap():Boolean{ return (_wordWrap); } override public function set enabled(_arg1:Boolean):void{ var _local2:IFlexDisplayObject; super.enabled = _arg1; _local2 = (border as IFlexDisplayObject); if (_local2){ if ((_local2 is IUIComponent)){ IUIComponent(_local2).enabled = _arg1; }; if ((_local2 is IInvalidating)){ IInvalidating(_local2).invalidateDisplayList(); }; }; itemsSizeChanged = true; invalidateDisplayList(); } public function itemToIcon(_arg1:Object):Class{ var iconClass:Class; var icon:*; var data = _arg1; if (data == null){ return (null); }; if (iconFunction != null){ return (iconFunction(data)); }; if ((data is XML)){ try { if (data[iconField].length() != 0){ icon = String(data[iconField]); if (icon != null){ iconClass = Class(systemManager.getDefinitionByName(icon)); if (iconClass){ return (iconClass); }; return (document[icon]); }; }; } catch(e:Error) { }; } else { if ((data is Object)){ try { if (data[iconField] != null){ if ((data[iconField] is Class)){ return (data[iconField]); }; if ((data[iconField] is String)){ iconClass = Class(systemManager.getDefinitionByName(data[iconField])); if (iconClass){ return (iconClass); }; return (document[data[iconField]]); }; }; } catch(e:Error) { }; }; }; return (null); } mx_internal function indicesToItemRenderer(_arg1:int, _arg2:int):IListItemRenderer{ return (listItems[_arg1][_arg2]); } mx_internal function getItemRendererForMouseEvent(_arg1:MouseEvent):IListItemRenderer{ return (mouseEventToItemRenderer(_arg1)); } protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:Number; var _local5:IListItemRenderer; var _local6:String; var _local7:int; var _local8:Boolean; var _local9:int; var _local10:int; var _local11:Boolean; var _local12:ScrollEvent; _local8 = false; showCaret = true; _local9 = listItems.length; _local10 = (((rowInfo[(_local9 - 1)].y + rowInfo[(_local9 - 1)].height))>listContent.height) ? 1 : 0; _local11 = false; bSelectItem = false; switch (_arg1){ case Keyboard.UP: if (caretIndex > 0){ caretIndex--; _local11 = true; bSelectItem = true; }; break; case Keyboard.DOWN: if (caretIndex < (collection.length - 1)){ caretIndex++; _local11 = true; bSelectItem = true; } else { if ((((caretIndex == (collection.length - 1))) && (_local10))){ if (verticalScrollPosition < maxVerticalScrollPosition){ _local4 = (verticalScrollPosition + 1); }; }; }; break; case Keyboard.PAGE_UP: if (caretIndex < lockedRowCount){ _local4 = 0; caretIndex = 0; } else { if ((((caretIndex > (verticalScrollPosition + lockedRowCount))) && ((caretIndex < (verticalScrollPosition + _local9))))){ caretIndex = (verticalScrollPosition + lockedRowCount); } else { caretIndex = Math.max(((caretIndex - _local9) + lockedRowCount), 0); _local4 = Math.max((caretIndex - lockedRowCount), 0); }; }; bSelectItem = true; break; case Keyboard.PAGE_DOWN: if (caretIndex < lockedRowCount){ _local4 = 0; } else { if ((((caretIndex >= (verticalScrollPosition + lockedRowCount))) && ((caretIndex < (((verticalScrollPosition + _local9) - _local10) - 1))))){ } else { _local4 = Math.min((caretIndex - lockedRowCount), maxVerticalScrollPosition); }; }; bSelectItem = true; break; case Keyboard.HOME: if (caretIndex > 0){ caretIndex = 0; bSelectItem = true; _local4 = 0; }; break; case Keyboard.END: if (caretIndex < (collection.length - 1)){ caretIndex = (collection.length - 1); bSelectItem = true; _local4 = maxVerticalScrollPosition; }; break; }; if (_local11){ if (caretIndex < lockedRowCount){ _local4 = 0; } else { if (caretIndex < (verticalScrollPosition + lockedRowCount)){ _local4 = (caretIndex - lockedRowCount); } else { if (caretIndex >= ((verticalScrollPosition + _local9) - _local10)){ _local4 = Math.min(maxVerticalScrollPosition, (((caretIndex - _local9) + _local10) + 1)); }; }; }; }; if (!isNaN(_local4)){ if (verticalScrollPosition != _local4){ _local12 = new ScrollEvent(ScrollEvent.SCROLL); _local12.detail = ScrollEventDetail.THUMB_POSITION; _local12.direction = ScrollEventDirection.VERTICAL; _local12.delta = (_local4 - verticalScrollPosition); _local12.position = _local4; verticalScrollPosition = _local4; dispatchEvent(_local12); }; if (!iteratorValid){ keySelectionPending = true; return; }; }; bShiftKey = _arg2; bCtrlKey = _arg3; lastKey = _arg1; finishKeySelection(); } public function itemToLabel(_arg1:Object):String{ var data = _arg1; if (data == null){ return (" "); }; if (labelFunction != null){ return (labelFunction(data)); }; if ((data is XML)){ try { if (data[labelField].length() != 0){ data = data[labelField]; }; } catch(e:Error) { }; } else { if ((data is Object)){ try { if (data[labelField] != null){ data = data[labelField]; }; } catch(e:Error) { }; }; }; if ((data is String)){ return (String(data)); }; try { return (data.toString()); } catch(e:Error) { }; return (" "); } protected function seekPendingResultHandler(_arg1:Object, _arg2:ListBaseSeekPending):void{ var data = _arg1; var info = _arg2; if (info != lastSeekPending){ return; }; lastSeekPending = null; iteratorValid = true; try { iterator.seek(info.bookmark, info.offset); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(info.bookmark, info.offset); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; if (bSortItemPending){ bSortItemPending = false; adjustAfterSort(); }; itemsSizeChanged = true; invalidateDisplayList(); } public function set columnCount(_arg1:int):void{ explicitColumnCount = _arg1; if (_columnCount != _arg1){ setColumnCount(_arg1); columnCountChanged = true; invalidateProperties(); invalidateSize(); itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("columnCountChanged")); }; } public function set rowCount(_arg1:int):void{ explicitRowCount = _arg1; if (_rowCount != _arg1){ setRowCount(_arg1); rowCountChanged = true; invalidateProperties(); invalidateSize(); itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("rowCountChanged")); }; } mx_internal function getListContentHolder():ListBaseContentHolder{ return (listContent); } public function set dragEnabled(_arg1:Boolean):void{ if (((_dragEnabled) && (!(_arg1)))){ removeEventListener(DragEvent.DRAG_START, dragStartHandler, false); removeEventListener(DragEvent.DRAG_COMPLETE, dragCompleteHandler, false); }; _dragEnabled = _arg1; if (_arg1){ addEventListener(DragEvent.DRAG_START, dragStartHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DragEvent.DRAG_COMPLETE, dragCompleteHandler, false, EventPriority.DEFAULT_HANDLER); }; } public function set iconFunction(_arg1:Function):void{ _iconFunction = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("iconFunctionChanged")); } public function get selectedIndex():int{ return (_selectedIndex); } mx_internal function removeClipMask():void{ var _local1:int; var _local2:Number; var _local3:ListRowInfo; var _local4:Array; var _local5:int; var _local6:int; var _local7:DisplayObject; if (((listContent) && (listContent.mask))){ return; }; _local1 = (listItems.length - 1); if (_local1 < 0){ return; }; _local2 = rowInfo[_local1].height; _local3 = rowInfo[_local1]; _local4 = listItems[_local1]; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local7 = _local4[_local6]; if ((_local7 is UITextField)){ if (_local7.height != (_local2 - (_local7.y - _local3.y))){ _local7.height = (_local2 - (_local7.y - _local3.y)); }; } else { if (((_local7) && (_local7.mask))){ itemMaskFreeList.push(_local7.mask); _local7.mask = null; }; }; _local6++; }; } mx_internal function commitSelectedIndex(_arg1:int):void{ var bookmark:CursorBookmark; var len:int; var data:Object; var selectedBookmark:CursorBookmark; var uid:String; var value = _arg1; if (value != -1){ value = Math.min(value, (collection.length - 1)); bookmark = iterator.bookmark; len = (value - scrollPositionToIndex(horizontalScrollPosition, verticalScrollPosition)); try { iterator.seek(CursorBookmark.CURRENT, len); } catch(e:ItemPendingError) { iterator.seek(bookmark, 0); bSelectedIndexChanged = true; _selectedIndex = value; return; }; data = iterator.current; selectedBookmark = iterator.bookmark; uid = itemToUID(data); iterator.seek(bookmark, 0); if (!selectedData[uid]){ if (visibleData[uid]){ selectItem(visibleData[uid], false, false); } else { clearSelected(); addSelectionData(uid, new ListBaseSelectionData(data, value, approximate)); _selectedIndex = value; caretIndex = value; caretBookmark = selectedBookmark; anchorIndex = value; anchorBookmark = selectedBookmark; _selectedItem = data; }; }; } else { clearSelected(); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function set dataTipFunction(_arg1:Function):void{ _dataTipFunction = _arg1; itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("dataTipFunctionChanged")); } override protected function createChildren():void{ var _local1:Graphics; super.createChildren(); if (!listContent){ listContent = new ListBaseContentHolder(this); listContent.styleName = this; addChild(listContent); }; if (!selectionLayer){ selectionLayer = new FlexSprite(); selectionLayer.name = "selectionLayer"; selectionLayer.mouseEnabled = false; listContent.addChild(selectionLayer); _local1 = selectionLayer.graphics; _local1.beginFill(0, 0); _local1.drawRect(0, 0, 10, 10); _local1.endFill(); }; } private function commitSelectedItem(_arg1:Object, _arg2:Boolean=true):void{ if (_arg2){ clearSelected(); }; if (_arg1){ commitSelectedItems([_arg1]); }; } public function set rowHeight(_arg1:Number):void{ explicitRowHeight = _arg1; if (_rowHeight != _arg1){ setRowHeight(_arg1); invalidateSize(); itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("rowHeightChanged")); }; } public function get rowCount():int{ return (_rowCount); } public function set data(_arg1:Object):void{ _data = _arg1; if (((_listData) && ((_listData is DataGridListData)))){ selectedItem = _data[DataGridListData(_listData).dataField]; } else { if ((((_listData is ListData)) && ((ListData(_listData).labelField in _data)))){ selectedItem = _data[ListData(_listData).labelField]; } else { selectedItem = _data; }; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } protected function mouseEventToItemRenderer(_arg1:MouseEvent):IListItemRenderer{ return (mouseEventToItemRendererOrEditor(_arg1)); } protected function collectionChangeHandler(_arg1:Event):void{ var len:int; var i:int; var data:ListBaseSelectionData; var p:String; var selectedUID:String; var ce:CollectionEvent; var oldUID:String; var sd:ListBaseSelectionData; var requiresValueCommit:Boolean; var firstUID:String; var emitEvent:Boolean; var uid:String; var event = _arg1; if ((event is CollectionEvent)){ ce = CollectionEvent(event); if (ce.kind == CollectionEventKind.ADD){ if ((((ce.location == 0)) && ((verticalScrollPosition == 0)))){ try { iterator.seek(CursorBookmark.FIRST); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; } else { if ((((listType == "vertical")) && ((verticalScrollPosition >= ce.location)))){ super.verticalScrollPosition = (super.verticalScrollPosition + ce.items.length); }; }; len = ce.items.length; for (p in selectedData) { data = selectedData[p]; if (data.index > ce.location){ data.index = (data.index + len); }; }; if (_selectedIndex >= ce.location){ _selectedIndex = (_selectedIndex + len); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } else { if (ce.kind == CollectionEventKind.REPLACE){ selectedUID = (selectedItem) ? itemToUID(selectedItem) : null; len = ce.items.length; i = 0; while (i < len) { oldUID = itemToUID(ce.items[i].oldValue); sd = selectedData[oldUID]; if (sd){ sd.data = ce.items[i].newValue; delete selectedData[oldUID]; selectedData[itemToUID(sd.data)] = sd; if (selectedUID == oldUID){ _selectedItem = sd.data; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; i = (i + 1); }; } else { if (ce.kind == CollectionEventKind.REMOVE){ requiresValueCommit = false; if (((listItems.length) && (listItems[lockedRowCount].length))){ firstUID = rowMap[listItems[lockedRowCount][0].name].uid; selectedUID = (selectedItem) ? itemToUID(selectedItem) : null; i = 0; while (i < ce.items.length) { uid = itemToUID(ce.items[i]); if ((((uid == firstUID)) && ((verticalScrollPosition == 0)))){ try { iterator.seek(CursorBookmark.FIRST); } catch(e1:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e1.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; if (selectedData[uid]){ removeSelectionData(uid); }; if (selectedUID == uid){ _selectedItem = null; _selectedIndex = -1; requiresValueCommit = true; }; removeIndicators(uid); i = (i + 1); }; if ((((listType == "vertical")) && ((verticalScrollPosition >= ce.location)))){ if (verticalScrollPosition > ce.location){ super.verticalScrollPosition = (verticalScrollPosition - Math.min(ce.items.length, (verticalScrollPosition - ce.location))); } else { if (verticalScrollPosition >= collection.length){ super.verticalScrollPosition = Math.max((collection.length - 1), 0); }; }; try { iterator.seek(CursorBookmark.FIRST, verticalScrollPosition); } catch(e2:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, verticalScrollPosition); e2.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; emitEvent = adjustAfterRemove(ce.items, ce.location, requiresValueCommit); if (emitEvent){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; } else { if (ce.kind == CollectionEventKind.MOVE){ if (ce.oldLocation < ce.location){ for (p in selectedData) { data = selectedData[p]; if ((((data.index > ce.oldLocation)) && ((data.index < ce.location)))){ data.index--; } else { if (data.index == ce.oldLocation){ data.index = ce.location; }; }; }; if ((((_selectedIndex > ce.oldLocation)) && ((_selectedIndex < ce.location)))){ _selectedIndex--; } else { if (_selectedIndex == ce.oldLocation){ _selectedIndex = ce.location; }; }; } else { if (ce.location < ce.oldLocation){ for (p in selectedData) { data = selectedData[p]; if ((((data.index > ce.location)) && ((data.index < ce.oldLocation)))){ data.index++; } else { if (data.index == ce.oldLocation){ data.index = ce.location; }; }; }; if ((((_selectedIndex > ce.location)) && ((_selectedIndex < ce.oldLocation)))){ _selectedIndex++; } else { if (_selectedIndex == ce.oldLocation){ _selectedIndex = ce.location; }; }; }; }; if (ce.oldLocation == verticalScrollPosition){ if (ce.location > maxVerticalScrollPosition){ iterator.seek(CursorBookmark.CURRENT, (maxVerticalScrollPosition - ce.location)); }; super.verticalScrollPosition = Math.min(ce.location, maxVerticalScrollPosition); } else { if ((((ce.location >= verticalScrollPosition)) && ((ce.oldLocation < verticalScrollPosition)))){ try { iterator.moveNext(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, verticalScrollPosition); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; } else { if ((((ce.location <= verticalScrollPosition)) && ((ce.oldLocation > verticalScrollPosition)))){ try { iterator.movePrevious(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, verticalScrollPosition); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; }; }; }; } else { if (ce.kind == CollectionEventKind.REFRESH){ if (anchorBookmark){ try { iterator.seek(anchorBookmark, 0); } catch(e:ItemPendingError) { bSortItemPending = true; e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, new ListBaseSeekPending(anchorBookmark, 0))); iteratorValid = false; } catch(cursorError:CursorError) { clearSelected(); }; adjustAfterSort(); } else { try { iterator.seek(CursorBookmark.FIRST, verticalScrollPosition); } catch(e:ItemPendingError) { bSortItemPending = true; e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, new ListBaseSeekPending(CursorBookmark.FIRST, verticalScrollPosition))); iteratorValid = false; }; }; } else { if (ce.kind == CollectionEventKind.RESET){ try { iterator.seek(CursorBookmark.FIRST); collectionIterator.seek(CursorBookmark.FIRST); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; if (((((((bSelectedIndexChanged) || (bSelectedItemChanged))) || (bSelectedIndicesChanged))) || (bSelectedItemsChanged))){ bSelectionChanged = true; } else { commitSelectedIndex(-1); }; if (isNaN(verticalScrollPositionPending)){ verticalScrollPositionPending = 0; super.verticalScrollPosition = 0; }; if (isNaN(horizontalScrollPositionPending)){ horizontalScrollPositionPending = 0; super.horizontalScrollPosition = 0; }; invalidateSize(); }; }; }; }; }; }; }; itemsSizeChanged = true; invalidateDisplayList(); } public function set dataProvider(_arg1:Object):void{ var _local2:CollectionEvent; var _local3:XMLList; var _local4:Array; if (collection){ collection.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler); }; if ((_arg1 is Array)){ collection = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ collection = ICollectionView(_arg1); } else { if ((_arg1 is IList)){ collection = new ListCollectionView(IList(_arg1)); } else { if ((_arg1 is XMLList)){ collection = new XMLListCollection((_arg1 as XMLList)); } else { if ((_arg1 is XML)){ _local3 = new XMLList(); _local3 = (_local3 + _arg1); collection = new XMLListCollection(_local3); } else { _local4 = []; if (_arg1 != null){ _local4.push(_arg1); }; collection = new ArrayCollection(_local4); }; }; }; }; }; iterator = collection.createCursor(); collectionIterator = collection.createCursor(); collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true); clearSelectionData(); _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.RESET; collectionChangeHandler(_local2); dispatchEvent(_local2); itemsNeedMeasurement = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } protected function dragDropHandler(_arg1:DragEvent):void{ var _local2:Array; var _local3:int; var _local4:Array; var _local5:int; var _local6:int; if (_arg1.isDefaultPrevented()){ return; }; hideDropFeedback(_arg1); if (_arg1.dragSource.hasFormat("items")){ if (!dataProvider){ dataProvider = []; }; _local2 = (_arg1.dragSource.dataForFormat("items") as Array); _local3 = calculateDropIndex(_arg1); if ((((_arg1.action == DragManager.MOVE)) && (dragMoveEnabled))){ if (_arg1.dragInitiator == this){ _local4 = selectedIndices; _local4.sort(Array.NUMERIC); _local5 = _local4.length; _local6 = (_local5 - 1); while (_local6 >= 0) { collectionIterator.seek(CursorBookmark.FIRST, _local4[_local6]); if (_local4[_local6] < _local3){ _local3--; }; collectionIterator.remove(); _local6--; }; clearSelected(false); }; }; collectionIterator.seek(CursorBookmark.FIRST, _local3); _local6 = (_local2.length - 1); while (_local6 >= 0) { collectionIterator.insert(_local2[_local6]); _local6--; }; }; } public function get dataTipFunction():Function{ return (_dataTipFunction); } public function scrollToIndex(_arg1:int):Boolean{ var _local2:int; if ((((_arg1 >= ((verticalScrollPosition + listItems.length) - lockedRowCount))) || ((_arg1 < verticalScrollPosition)))){ _local2 = Math.min(_arg1, maxVerticalScrollPosition); verticalScrollPosition = _local2; return (true); }; return (false); } override protected function initializeAccessibility():void{ if (ListBase.createAccessibilityImplementation != null){ ListBase.createAccessibilityImplementation(this); }; } public function get data():Object{ return (_data); } protected function indexToRow(_arg1:int):int{ return (_arg1); } private function findPendingFailureHandler(_arg1:Object, _arg2:ListBaseFindPending):void{ } public function get dataProvider():Object{ return (collection); } private function selectionPendingResultHandler(_arg1:Object, _arg2:ListBaseSelectionPending):void{ iterator.seek(_arg2.bookmark, _arg2.offset); shiftSelectionLoop(_arg2.incrementing, _arg2.index, _arg2.stopData, _arg2.transition, _arg2.placeHolder); } protected function dragCompleteHandler(_arg1:DragEvent):void{ var _local2:Array; var _local3:int; var _local4:int; isPressed = false; if (_arg1.isDefaultPrevented()){ return; }; if ((((_arg1.action == DragManager.MOVE)) && (dragMoveEnabled))){ if (_arg1.relatedObject != this){ _local2 = selectedIndices; _local2.sort(Array.NUMERIC); _local3 = _local2.length; _local4 = (_local3 - 1); while (_local4 >= 0) { collectionIterator.seek(CursorBookmark.FIRST, _local2[_local4]); collectionIterator.remove(); _local4--; }; clearSelected(false); }; }; } } }//package mx.controls.listClasses
Section 96
//ListBaseContentHolder (mx.controls.listClasses.ListBaseContentHolder) package mx.controls.listClasses { import mx.core.*; import flash.display.*; public class ListBaseContentHolder extends UIComponent { private var maskShape:Shape; private var parentList:ListBase; mx_internal var allowItemSizeChangeNotification:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseContentHolder(_arg1:ListBase){ allowItemSizeChangeNotification = true; super(); this.parentList = _arg1; setStyle("backgroundColor", ""); setStyle("borderStyle", "none"); } mx_internal function getParentList():ListBase{ return (parentList); } override public function set focusPane(_arg1:Sprite):void{ var _local2:Graphics; if (_arg1){ if (!mask){ if (!maskShape){ maskShape = new FlexShape(); maskShape.name = "mask"; _local2 = maskShape.graphics; _local2.beginFill(0xFFFFFF); _local2.drawRect(0, 0, width, height); _local2.endFill(); addChild(maskShape); }; maskShape.visible = false; _arg1.mask = maskShape; }; } else { if (focusPane.mask == maskShape){ focusPane.mask = null; }; }; super.focusPane = _arg1; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); if (maskShape){ maskShape.width = _arg1; maskShape.height = _arg2; }; } override public function invalidateSize():void{ if (allowItemSizeChangeNotification){ parentList.invalidateList(); }; } } }//package mx.controls.listClasses
Section 97
//ListBaseFindPending (mx.controls.listClasses.ListBaseFindPending) package mx.controls.listClasses { import mx.collections.*; public class ListBaseFindPending { public var currentIndex:int; public var stopIndex:int; public var bookmark:CursorBookmark; public var searchString:String; public var offset:int; public var startingBookmark:CursorBookmark; mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseFindPending(_arg1:String, _arg2:CursorBookmark, _arg3:CursorBookmark, _arg4:int, _arg5:int, _arg6:int){ this.searchString = _arg1; this.startingBookmark = _arg2; this.bookmark = _arg3; this.offset = _arg4; this.currentIndex = _arg5; this.stopIndex = _arg6; } } }//package mx.controls.listClasses
Section 98
//ListBaseSeekPending (mx.controls.listClasses.ListBaseSeekPending) package mx.controls.listClasses { import mx.collections.*; public class ListBaseSeekPending { public var bookmark:CursorBookmark; public var offset:int; mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseSeekPending(_arg1:CursorBookmark, _arg2:int){ this.bookmark = _arg1; this.offset = _arg2; } } }//package mx.controls.listClasses
Section 99
//ListBaseSelectionData (mx.controls.listClasses.ListBaseSelectionData) package mx.controls.listClasses { public class ListBaseSelectionData { mx_internal var prevSelectionData:ListBaseSelectionData; mx_internal var nextSelectionData:ListBaseSelectionData; public var data:Object; public var index:int; public var approximate:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseSelectionData(_arg1:Object, _arg2:int, _arg3:Boolean){ this.data = _arg1; this.index = _arg2; this.approximate = _arg3; } } }//package mx.controls.listClasses
Section 100
//ListBaseSelectionDataPending (mx.controls.listClasses.ListBaseSelectionDataPending) package mx.controls.listClasses { import mx.collections.*; public class ListBaseSelectionDataPending { public var items:Array; public var index:int; public var bookmark:CursorBookmark; public var useFind:Boolean; public var offset:int; mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseSelectionDataPending(_arg1:Boolean, _arg2:int, _arg3:Array, _arg4:CursorBookmark, _arg5:int){ this.useFind = _arg1; this.index = _arg2; this.items = _arg3; this.bookmark = _arg4; this.offset = _arg5; } } }//package mx.controls.listClasses
Section 101
//ListBaseSelectionPending (mx.controls.listClasses.ListBaseSelectionPending) package mx.controls.listClasses { import mx.collections.*; public class ListBaseSelectionPending { public var offset:int; public var placeHolder:CursorBookmark; public var index:int; public var bookmark:CursorBookmark; public var incrementing:Boolean; public var stopData:Object; public var transition:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function ListBaseSelectionPending(_arg1:Boolean, _arg2:int, _arg3:Object, _arg4:Boolean, _arg5:CursorBookmark, _arg6:CursorBookmark, _arg7:int){ this.incrementing = _arg1; this.index = _arg2; this.stopData = _arg3; this.transition = _arg4; this.placeHolder = _arg5; this.bookmark = _arg6; this.offset = _arg7; } } }//package mx.controls.listClasses
Section 102
//ListData (mx.controls.listClasses.ListData) package mx.controls.listClasses { import mx.core.*; public class ListData extends BaseListData { public var labelField:String; public var icon:Class; mx_internal static const VERSION:String = "2.0.1.0"; public function ListData(_arg1:String, _arg2:Class, _arg3:String, _arg4:String, _arg5:IUIComponent, _arg6:int=0, _arg7:int=0){ super(_arg1, _arg4, _arg5, _arg6, _arg7); this.icon = _arg2; this.labelField = _arg3; } } }//package mx.controls.listClasses
Section 103
//ListItemDragProxy (mx.controls.listClasses.ListItemDragProxy) package mx.controls.listClasses { import mx.core.*; import flash.display.*; public class ListItemDragProxy extends UIComponent { mx_internal static const VERSION:String = "2.0.1.0"; override protected function createChildren():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:IListItemRenderer; var _local5:IListItemRenderer; var _local6:BaseListData; super.createChildren(); _local1 = ListBase(owner).selectedItems; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local4 = ListBase(owner).itemToItemRenderer(_local1[_local3]); if (!_local4){ } else { _local5 = ListBase(owner).itemRenderer.newInstance(); _local5.styleName = ListBase(owner); if ((_local5 is IDropInListItemRenderer)){ _local6 = IDropInListItemRenderer(_local4).listData; IDropInListItemRenderer(_local5).listData = (_local1[_local3]) ? _local6 : null; }; _local5.data = _local1[_local3]; addChild(DisplayObject(_local5)); _local5.setActualSize(_local4.width, _local4.height); _local5.x = _local4.x; _local5.y = _local4.y; measuredHeight = Math.max(measuredHeight, (_local5.y + _local5.height)); measuredWidth = Math.max(measuredWidth, (_local5.x + _local5.width)); }; _local3++; }; invalidateDisplayList(); } } }//package mx.controls.listClasses
Section 104
//ListItemRenderer (mx.controls.listClasses.ListItemRenderer) package mx.controls.listClasses { import mx.core.*; import mx.events.*; import flash.display.*; import flash.geom.*; public class ListItemRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer { protected var icon:IFlexDisplayObject; private var _data:Object; private var listOwner:ListBase; private var _listData:ListData; protected var label:UITextField; mx_internal static const VERSION:String = "2.0.1.0"; public function ListItemRenderer(){ mouseEnabled = false; addEventListener(ToolTipEvent.TOOL_TIP_SHOW, toolTipShowHandler); } mx_internal function getLabel():UITextField{ return (label); } override protected function measure():void{ var _local1:Number; super.measure(); _local1 = 0; if (icon){ _local1 = icon.measuredWidth; }; if ((((label.width < 4)) || ((label.height < 4)))){ label.width = 4; label.height = 16; }; if (isNaN(explicitWidth)){ _local1 = (_local1 + label.getExplicitOrMeasuredWidth()); measuredWidth = _local1; measuredHeight = label.getExplicitOrMeasuredHeight(); } else { measuredWidth = explicitWidth; label.setActualSize(Math.max((explicitWidth - _local1), 4), label.height); measuredHeight = label.getExplicitOrMeasuredHeight(); if (((icon) && ((icon.measuredHeight > measuredHeight)))){ measuredHeight = icon.measuredHeight; }; }; } public function get listData():BaseListData{ return (_listData); } protected function toolTipShowHandler(_arg1:ToolTipEvent):void{ var _local2:IToolTip; var _local3:Point; var _local4:Rectangle; var _local5:Number; _local2 = _arg1.toolTip; _local3 = new Point(0, 0); _local3 = label.localToGlobal(_local3); _local3 = stage.globalToLocal(_local3); _local2.move(_local3.x, (_local3.y + ((height - _local2.height) / 2))); _local4 = systemManager.screen; _local5 = (_local4.x + _local4.width); if ((_local2.x + _local2.width) > _local5){ _local2.move((_local5 - _local2.width), _local2.y); }; } override protected function commitProperties():void{ var _local1:Class; super.commitProperties(); if (icon){ removeChild(DisplayObject(icon)); icon = null; }; if (_data != null){ listOwner = ListBase(_listData.owner); if (_listData.icon){ _local1 = _listData.icon; icon = new (_local1); addChild(DisplayObject(icon)); }; label.text = (_listData.label) ? _listData.label : " "; label.multiline = listOwner.variableRowHeight; label.wordWrap = listOwner.wordWrap; if (listOwner.showDataTips){ if ((((label.textWidth > label.width)) || (!((listOwner.dataTipFunction == null))))){ toolTip = listOwner.itemToDataTip(_data); } else { toolTip = null; }; } else { toolTip = null; }; } else { label.text = " "; toolTip = null; }; } override public function get baselinePosition():Number{ return (label.baselinePosition); } public function set listData(_arg1:BaseListData):void{ _listData = ListData(_arg1); invalidateProperties(); } override protected function createChildren():void{ super.createChildren(); if (!label){ label = new UITextField(); label.styleName = this; addChild(label); }; } public function set data(_arg1:Object):void{ _data = _arg1; invalidateProperties(); dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function get data():Object{ return (_data); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:String; var _local5:Number; super.updateDisplayList(_arg1, _arg2); _local3 = 0; if (icon){ icon.x = _local3; _local3 = (icon.x + icon.measuredWidth); icon.setActualSize(icon.measuredWidth, icon.measuredHeight); }; label.x = _local3; label.setActualSize((_arg1 - _local3), measuredHeight); _local4 = getStyle("verticalAlign"); if (_local4 == "top"){ label.y = 0; if (icon){ icon.y = 0; }; } else { if (_local4 == "bottom"){ label.y = ((_arg2 - label.height) + 2); if (icon){ icon.y = (_arg2 - icon.height); }; } else { label.y = ((_arg2 - label.height) / 2); if (icon){ icon.y = ((_arg2 - icon.height) / 2); }; }; }; if (((data) && (parent))){ if (!enabled){ _local5 = getStyle("disabledColor"); } else { if (listOwner.isItemHighlighted(listData.uid)){ _local5 = getStyle("textRollOverColor"); } else { if (listOwner.isItemSelected(listData.uid)){ _local5 = getStyle("textSelectedColor"); } else { _local5 = getStyle("color"); }; }; }; label.setColor(_local5); }; } } }//package mx.controls.listClasses
Section 105
//ListRowInfo (mx.controls.listClasses.ListRowInfo) package mx.controls.listClasses { public class ListRowInfo { public var itemOldY:Number; public var uid:String; public var data:Object; public var oldY:Number; public var height:Number; public var y:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function ListRowInfo(_arg1:Number, _arg2:Number, _arg3:String, _arg4:Object=null){ this.y = _arg1; this.height = _arg2; this.uid = _arg3; this.data = _arg4; } } }//package mx.controls.listClasses
Section 106
//ScrollBar (mx.controls.scrollClasses.ScrollBar) package mx.controls.scrollClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.controls.*; import flash.utils.*; import flash.ui.*; public class ScrollBar extends UIComponent { mx_internal var isScrolling:Boolean; mx_internal var oldPosition:Number; mx_internal var downArrow:Button; private var _pageSize:Number;// = 0 mx_internal var _minHeight:Number;// = 32 private var trackScrolling:Boolean;// = false private var trackScrollRepeatDirection:int; private var _scrollPosition:Number;// = 0 private var _lineScrollSize:Number;// = 1 private var _direction:String;// = "vertical" mx_internal var upArrow:Button; private var trackScrollTimer:Timer; mx_internal var scrollTrack:DisplayObject; private var _pageScrollSize:Number;// = 0 private var _maxScrollPosition:Number;// = 0 mx_internal var scrollThumb:ScrollThumb; private var _minScrollPosition:Number;// = 0 private var trackPosition:Number; mx_internal var _minWidth:Number;// = 16 mx_internal static const VERSION:String = "2.0.1.0"; public static const THICKNESS:Number = 16; public function ScrollBar(){ _minWidth = 16; _minHeight = 32; trackScrolling = false; _direction = ScrollBarDirection.VERTICAL; _lineScrollSize = 1; _maxScrollPosition = 0; _minScrollPosition = 0; _pageSize = 0; _pageScrollSize = 0; _scrollPosition = 0; super(); } private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(1); } public function set minScrollPosition(_arg1:Number):void{ _minScrollPosition = _arg1; } mx_internal function get virtualHeight():Number{ return (unscaledHeight); } mx_internal function get lineMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT); } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number; this.pageSize = _arg1; _pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1; this.minScrollPosition = Math.max(_arg2, 0); this.maxScrollPosition = Math.max(_arg3, 0); _scrollPosition = Math.max(this.minScrollPosition, _scrollPosition); _scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition); if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){ upArrow.enabled = true; downArrow.enabled = true; addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler); addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler); if (!scrollThumb){ scrollThumb = new ScrollThumb(); scrollThumb.focusEnabled = false; addChildAt(scrollThumb, getChildIndex(downArrow)); scrollThumb.styleName = this; scrollThumb.upSkinName = "thumbUpSkin"; scrollThumb.overSkinName = "thumbOverSkin"; scrollThumb.downSkinName = "thumbDownSkin"; scrollThumb.iconName = "thumbIcon"; }; _local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight)); if (_local5 < scrollThumb.minHeight){ if (trackHeight < scrollThumb.minHeight){ scrollThumb.visible = false; } else { _local5 = scrollThumb.minHeight; scrollThumb.visible = true; scrollThumb.setActualSize(_minWidth, scrollThumb.minHeight); }; } else { scrollThumb.visible = true; scrollThumb.setActualSize(_minWidth, _local5); }; scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition); scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition); } else { upArrow.enabled = false; downArrow.enabled = false; if (scrollThumb){ scrollThumb.visible = false; }; }; } public function get pageScrollSize():Number{ return (_pageScrollSize); } private function get trackY():Number{ return (upArrow.getExplicitOrMeasuredHeight()); } public function set pageScrollSize(_arg1:Number):void{ _pageScrollSize = _arg1; } mx_internal function isScrollBarKey(_arg1:uint):Boolean{ var _local2:Number; if (_arg1 == Keyboard.HOME){ if (scrollPosition != 0){ _local2 = scrollPosition; scrollPosition = 0; dispatchScrollEvent(_local2, minDetail); }; return (true); } else { if (_arg1 == Keyboard.END){ if (scrollPosition < maxScrollPosition){ _local2 = scrollPosition; scrollPosition = maxScrollPosition; dispatchScrollEvent(_local2, maxDetail); }; return (true); }; }; return (false); } private function trackScrollTimerHandler(_arg1:Event):void{ if (trackScrollRepeatDirection == 1){ if ((scrollThumb.y + scrollThumb.height) > trackPosition){ return; }; }; if (trackScrollRepeatDirection == -1){ if (scrollThumb.y < trackPosition){ return; }; }; pageScroll(trackScrollRepeatDirection); if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){ trackScrollTimer.delay = getStyle("repeatInterval"); trackScrollTimer.repeatCount = 0; }; } private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{ scrollTrack_mouseLeaveHandler(_arg1); } private function get minDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT); } override protected function measure():void{ super.measure(); upArrow.validateSize(); downArrow.validateSize(); _minWidth = upArrow.getExplicitOrMeasuredWidth(); _minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } mx_internal function get linePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT); } private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; scrollTrack_mouseMoveHandler(_arg1); } private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(-1); } private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{ if (_arg1.target != this){ return; }; if (trackScrolling){ trackScrollTimer.start(); }; } private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.target != this){ return; }; trackScrolling = true; systemManager.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); trackPosition = _arg1.localY; if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _arg1.localY)) ? 1 : ((scrollThumb.y > _arg1.localY)) ? -1 : 0; pageScroll(trackScrollRepeatDirection); if (!trackScrollTimer){ trackScrollTimer = new Timer(getStyle("repeatDelay"), 1); trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler); }; trackScrollTimer.start(); } public function get minScrollPosition():Number{ return (_minScrollPosition); } override public function set doubleClickEnabled(_arg1:Boolean):void{ } public function set scrollPosition(_arg1:Number):void{ var _local2:Number; var _local3:Number; _scrollPosition = _arg1; if (scrollThumb){ if (!cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = true); }; if (!isScrolling){ _arg1 = Math.min(_arg1, maxScrollPosition); _arg1 = Math.max(_arg1, minScrollPosition); _local2 = (maxScrollPosition - minScrollPosition); _local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY); scrollThumb.move(0, Math.round(_local3)); }; }; } mx_internal function pageScroll(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:String; _local2 = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize; _local3 = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(_local4, _local5); }; } private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{ var _local2:String; trackScrolling = false; systemManager.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); if (trackScrollTimer){ trackScrollTimer.reset(); }; if (_arg1.target != this){ return; }; _local2 = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(oldPosition, _local2); oldPosition = NaN; } private function get trackHeight():Number{ return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()))); } public function set pageSize(_arg1:Number):void{ _pageSize = _arg1; } mx_internal function get pagePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; invalidateDisplayList(); } mx_internal function get pageMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT); } private function get maxDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT); } private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{ if (trackScrolling){ trackScrollTimer.stop(); }; } mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{ var _local3:ScrollEvent; _local3 = new ScrollEvent(ScrollEvent.SCROLL); _local3.detail = _arg2; _local3.position = scrollPosition; _local3.delta = (scrollPosition - _arg1); _local3.direction = direction; dispatchEvent(_local3); } public function set lineScrollSize(_arg1:Number):void{ _lineScrollSize = _arg1; } public function set direction(_arg1:String):void{ _direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function get scrollPosition():Number{ return (_scrollPosition); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!scrollTrack){ _local1 = getStyle("trackSkin"); scrollTrack = new (_local1); if ((scrollTrack is ISimpleStyleClient)){ ISimpleStyleClient(scrollTrack).styleName = this; }; addChild(scrollTrack); }; if (!upArrow){ upArrow = new Button(); upArrow.enabled = false; upArrow.autoRepeat = true; upArrow.focusEnabled = false; upArrow.upSkinName = "upArrowUpSkin"; upArrow.overSkinName = "upArrowOverSkin"; upArrow.downSkinName = "upArrowDownSkin"; upArrow.disabledSkinName = "upArrowDisabledSkin"; upArrow.upIconName = ""; upArrow.overIconName = ""; upArrow.downIconName = ""; upArrow.disabledIconName = ""; addChild(upArrow); upArrow.styleName = this; upArrow.validateProperties(); upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler); }; if (!downArrow){ downArrow = new Button(); downArrow.enabled = false; downArrow.autoRepeat = true; downArrow.focusEnabled = false; downArrow.upSkinName = "downArrowUpSkin"; downArrow.overSkinName = "downArrowOverSkin"; downArrow.downSkinName = "downArrowDownSkin"; downArrow.disabledSkinName = "downArrowDisabledSkin"; downArrow.upIconName = ""; downArrow.overIconName = ""; downArrow.downIconName = ""; downArrow.disabledIconName = ""; addChild(downArrow); downArrow.styleName = this; downArrow.validateProperties(); downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler); }; } public function set maxScrollPosition(_arg1:Number):void{ _maxScrollPosition = _arg1; } public function get pageSize():Number{ return (_pageSize); } public function get direction():String{ return (_direction); } public function get lineScrollSize():Number{ return (_lineScrollSize); } mx_internal function lineScroll(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:String; _local2 = _lineScrollSize; _local3 = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail; dispatchScrollEvent(_local4, _local5); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if ($height == 1){ return; }; if (!upArrow){ return; }; super.updateDisplayList(_arg1, _arg2); if (cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = false); }; upArrow.move(0, 0); upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight()); scrollTrack.y = 0; scrollTrack.height = virtualHeight; downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight()); setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize); scrollPosition = _scrollPosition; } private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; if (trackScrolling){ _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); trackPosition = _local2.y; }; } } }//package mx.controls.scrollClasses
Section 107
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection) package mx.controls.scrollClasses { public final class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.controls.scrollClasses
Section 108
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb) package mx.controls.scrollClasses { import mx.events.*; import flash.events.*; import flash.geom.*; import mx.controls.*; public class ScrollThumb extends Button { private var lastY:Number; private var datamax:Number; private var datamin:Number; private var ymax:Number; private var ymin:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function ScrollThumb(){ explicitMinHeight = 10; stickyHighlighting = true; } private function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:ScrollBar; var _local5:Number; var _local6:Number; if (ymin == ymax){ return; }; _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); _local3 = (_local2.y - lastY); _local3 = (_local3 + y); if (_local3 < ymin){ _local3 = ymin; } else { if (_local3 > ymax){ _local3 = ymax; }; }; _local4 = ScrollBar(parent); _local4.isScrolling = true; $y = _local3; _local5 = _local4.scrollPosition; _local6 = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin); _local4.scrollPosition = _local6; _local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK); } override protected function measure():void{ super.measure(); measuredWidth = 14; measuredHeight = 10; } mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{ this.ymin = _arg1; this.ymax = _arg2; this.datamin = _arg3; this.datamax = _arg4; } override protected function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:ScrollBar; super.mouseDownHandler(_arg1); _local2 = ScrollBar(parent); _local2.oldPosition = _local2.scrollPosition; lastY = _arg1.localY; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } override mx_internal function buttonReleased():void{ super.buttonReleased(); stopDragThumb(); } private function stopDragThumb():void{ var _local1:ScrollBar; _local1 = ScrollBar(parent); _local1.isScrolling = false; _local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION); _local1.oldPosition = NaN; systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } private function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } } }//package mx.controls.scrollClasses
Section 109
//Button (mx.controls.Button) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import flash.text.*; import mx.controls.dataGridClasses.*; import mx.controls.listClasses.*; import flash.utils.*; import mx.skins.*; import flash.ui.*; public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer { private var enabledChanged:Boolean;// = false private var skinMeasuredWidth:Number; mx_internal var disabledSkinName:String;// = "disabledSkin" mx_internal var downSkinName:String;// = "downSkin" mx_internal var _labelPlacement:String;// = "right" private var _data:Object; private var _phase:String;// = "up" mx_internal var _toggle:Boolean;// = false mx_internal var selectedOverSkinName:String;// = "selectedOverSkin" mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin" private var labelSet:Boolean; mx_internal var toggleChanged:Boolean;// = false private var labelChanged:Boolean;// = false private var autoRepeatTimer:Timer; mx_internal var disabledIconName:String;// = "disabledIcon" mx_internal var upSkinName:String;// = "upSkin" private var toolTipSet:Boolean;// = false mx_internal var downIconName:String;// = "downIcon" mx_internal var currentIcon:IFlexDisplayObject; private var styleChangedFlag:Boolean;// = true private var _autoRepeat:Boolean;// = false mx_internal var selectedOverIconName:String;// = "selectedOverIcon" private var _label:String;// = "" mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon" mx_internal var extraSpacing:Number; mx_internal var selectedUpSkinName:String;// = "selectedUpSkin" mx_internal var upIconName:String;// = "upIcon" mx_internal var buttonOffset:Number;// = 0 private var skinMeasuredHeight:Number; mx_internal var centerContent:Boolean;// = true private var oldUnscaledWidth:Number; private var skins:Array; mx_internal var overSkinName:String;// = "overSkin" mx_internal var currentSkin:IFlexDisplayObject; mx_internal var selectedDownSkinName:String;// = "selectedDownSkin" private var _listData:BaseListData; mx_internal var iconName:String;// = "icon" mx_internal var _emphasized:Boolean;// = false public var selectedField:String;// = null private var icons:Array; public var stickyHighlighting:Boolean;// = false mx_internal var selectedUpIconName:String;// = "selectedUpIcon" mx_internal var selectedDownIconName:String;// = "selectedDownIcon" mx_internal var overIconName:String;// = "overIcon" private var selectedSet:Boolean; protected var textField:UITextField; mx_internal var _selected:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function Button(){ skins = []; icons = []; buttonOffset = 0; centerContent = true; extraSpacing = (10 + 10); styleChangedFlag = true; upSkinName = "upSkin"; overSkinName = "overSkin"; downSkinName = "downSkin"; disabledSkinName = "disabledSkin"; selectedUpSkinName = "selectedUpSkin"; selectedOverSkinName = "selectedOverSkin"; selectedDownSkinName = "selectedDownSkin"; selectedDisabledSkinName = "selectedDisabledSkin"; iconName = "icon"; upIconName = "upIcon"; overIconName = "overIcon"; downIconName = "downIcon"; disabledIconName = "disabledIcon"; selectedUpIconName = "selectedUpIcon"; selectedOverIconName = "selectedOverIcon"; selectedDownIconName = "selectedDownIcon"; selectedDisabledIconName = "selectedDisabledIcon"; enabledChanged = false; toolTipSet = false; _autoRepeat = false; _emphasized = false; _label = ""; labelChanged = false; _labelPlacement = ButtonLabelPlacement.RIGHT; _phase = ButtonPhase.UP; _selected = false; selectedField = null; stickyHighlighting = false; _toggle = false; toggleChanged = false; super(); mouseChildren = false; addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); addEventListener(MouseEvent.ROLL_OUT, rollOutHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); addEventListener(MouseEvent.CLICK, clickHandler); } override protected function adjustFocusRect(_arg1:DisplayObject=null):void{ super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon)); } mx_internal function getCurrentIcon():IFlexDisplayObject{ var _local1:String; var _local2:IFlexDisplayObject; var _local3:Class; _local1 = getCurrentIconName(); if (!_local1){ return (null); }; _local2 = IFlexDisplayObject(getChildByName(_local1)); if (_local2 == null){ _local3 = Class(getStyle(_local1)); if (_local3 == null){ _local3 = Class(getStyle(iconName)); }; if (_local3 != null){ _local2 = IFlexDisplayObject(new (_local3)); _local2.name = _local1; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addChild(DisplayObject(_local2)); icons.push(_local2); }; }; return (_local2); } mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:TextLineMetrics; var _local21:Number; var _local22:String; var _local23:EdgeMetrics; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = 0; _local12 = 2; _local13 = 2; _local14 = getStyle("paddingLeft"); _local15 = getStyle("paddingRight"); _local16 = getStyle("paddingTop"); _local17 = getStyle("paddingBottom"); _local18 = 0; _local19 = 0; if (label){ _local20 = measureText(label); if (_local20.width > 0){ _local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width); }; _local19 = _local20.height; } else { _local20 = measureText("Wj"); _local19 = _local20.height; }; _local21 = (_arg3) ? buttonOffset : 0; _local22 = getStyle("textAlign"); _local23 = (((currentSkin) && ((currentSkin is RectangularBorder)))) ? RectangularBorder(currentSkin).borderMetrics : null; _local24 = _arg1; _local25 = ((_arg2 - _local16) - _local17); if (_local23){ _local24 = (_local24 - (_local23.left + _local23.right)); _local25 = (_local25 - (_local23.top + _local23.bottom)); }; if (currentIcon){ _local8 = currentIcon.width; _local9 = currentIcon.height; }; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local12 = getStyle("horizontalGap"); if ((((_local8 == 0)) || ((_local18 == 0)))){ _local12 = 0; }; if (_local18 > 0){ _local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0); textField.width = _local4; } else { _local4 = 0; textField.width = _local4; }; _local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING)); textField.height = _local5; if (labelPlacement == ButtonLabelPlacement.RIGHT){ _local6 = (_local8 + _local12); if (centerContent){ if (_local22 == "left"){ _local6 = (_local6 + _local14); } else { if (_local22 == "right"){ _local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14)); } else { _local28 = ((((_local24 - _local4) - _local8) - _local12) / 2); _local6 = (_local6 + Math.max(_local28, _local14)); }; }; }; _local10 = (_local6 - (_local8 + _local12)); if (!centerContent){ _local6 = (_local6 + _local14); }; } else { _local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15); if (centerContent){ if (_local22 == "left"){ _local6 = 2; } else { if (_local22 == "right"){ _local6--; } else { if (_local6 > 0){ _local6 = (_local6 / 2); }; }; }; }; _local10 = ((_local6 + _local4) + _local12); }; _local7 = 0; _local11 = _local7; if (centerContent){ _local11 = (Math.round(((_local25 - _local9) / 2)) + _local16); _local7 = (Math.round(((_local25 - _local5) / 2)) + _local16); } else { _local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16)); _local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16)); }; } else { _local13 = getStyle("verticalGap"); if ((((_local9 == 0)) || ((_local19 == 0)))){ _local13 = 0; }; if (_local18 > 0){ _local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING)); textField.width = _local4; _local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5)); textField.height = _local5; } else { _local4 = 0; textField.width = _local4; _local5 = 0; textField.height = _local5; }; _local6 = ((_local24 - _local4) / 2); _local10 = ((_local24 - _local8) / 2); if (labelPlacement == ButtonLabelPlacement.TOP){ _local7 = (((_local25 - _local5) - _local9) - _local13); if (((centerContent) && ((_local7 > 0)))){ _local7 = (_local7 / 2); }; _local7 = (_local7 + _local16); _local11 = (((_local7 + _local5) + _local13) - 3); } else { _local7 = ((_local9 + _local13) + _local16); if (centerContent){ _local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1)); }; _local11 = (((_local7 - _local9) - _local13) + 3); }; }; _local26 = _local21; _local27 = _local21; if (_local23){ _local26 = (_local26 + _local23.left); _local27 = (_local27 + _local23.top); }; textField.x = (_local6 + _local26); textField.y = (_local7 + _local27); if (currentIcon){ _local10 = (_local10 + _local26); _local11 = (_local11 + _local27); currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(textField, (numChildren - 1)); }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonPressed(); }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } protected function rollOutHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.OVER){ phase = ButtonPhase.UP; _arg1.updateAfterEvent(); } else { if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){ phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.stop(); }; }; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonReleased(); if (phase == ButtonPhase.DOWN){ dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; phase = ButtonPhase.UP; }; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; if (_arg1){ autoRepeatTimer = new Timer(1); } else { autoRepeatTimer = null; }; } mx_internal function buttonPressed():void{ phase = ButtonPhase.DOWN; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.delay = getStyle("repeatDelay"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.start(); }; } mx_internal function viewIcon():void{ var _local1:String; _local1 = getCurrentIconName(); viewIconForPhase(_local1); } mx_internal function changeSkins():void{ var _local1:int; var _local2:int; _local1 = skins.length; _local2 = 0; while (_local2 < _local1) { removeChild(skins[_local2]); _local2++; }; skins = []; } private function autoRepeatTimer_timerHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); } private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{ if (contains(DisplayObject(_arg1.target))){ return; }; phase = ButtonPhase.UP; buttonReleased(); _arg1.updateAfterEvent(); } protected function mouseUpHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; phase = ButtonPhase.OVER; buttonReleased(); _arg1.updateAfterEvent(); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelPlacementChanged")); } mx_internal function viewIconForPhase(_arg1:String):void{ var _local2:IFlexDisplayObject; var _local3:Class; _local2 = IFlexDisplayObject(getChildByName(_arg1)); if (_local2 == null){ _local3 = Class(getStyle(_arg1)); if (_local3 == null){ _local3 = Class(getStyle(iconName)); }; if (_local3 != null){ _local2 = IFlexDisplayObject(new (_local3)); _local2.name = _arg1; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addChild(DisplayObject(_local2)); icons.push(_local2); }; }; if (currentIcon != null){ currentIcon.visible = false; }; currentIcon = _local2; if (currentIcon != null){ currentIcon.visible = true; }; } mx_internal function getTextField():UITextField{ return (textField); } mx_internal function setSelected(_arg1:Boolean):void{ if (_selected != _arg1){ _selected = _arg1; invalidateDisplayList(); if (toggle){ dispatchEvent(new Event(Event.CHANGE)); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } protected function clickHandler(_arg1:MouseEvent):void{ if (!enabled){ _arg1.stopImmediatePropagation(); return; }; if (toggle){ setSelected(!(selected)); }; } mx_internal function getCurrentIconName():String{ var _local1:String; if (!enabled){ _local1 = (selected) ? selectedDisabledIconName : disabledIconName; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpIconName : upIconName; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverIconName : overIconName; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownIconName : downIconName; }; }; }; }; return (_local1); } public function get emphasized():Boolean{ return (_emphasized); } override protected function measure():void{ var textWidth:Number; var textHeight:Number; var bm:EdgeMetrics; var tempCurrentIcon:IFlexDisplayObject; var iconWidth:Number; var iconHeight:Number; var w:Number; var h:Number; var lineMetrics:TextLineMetrics; super.measure(); textWidth = 0; textHeight = 0; if (label){ lineMetrics = measureText(label); textWidth = lineMetrics.width; textHeight = lineMetrics.height; textWidth = (textWidth + ((getStyle("paddingLeft") + getStyle("paddingRight")) + getStyle("textIndent"))); textHeight = (textHeight + (getStyle("paddingTop") + getStyle("paddingBottom"))); }; try { bm = currentSkin["borderMetrics"]; } catch(e:Error) { bm = new EdgeMetrics(3, 3, 3, 3); }; tempCurrentIcon = getCurrentIcon(); iconWidth = (tempCurrentIcon) ? tempCurrentIcon.width : 0; iconHeight = (tempCurrentIcon) ? tempCurrentIcon.height : 0; w = 0; h = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ w = (textWidth + iconWidth); if (iconWidth != 0){ w = (w + (getStyle("horizontalGap") - 2)); }; h = Math.max(textHeight, (iconHeight + 6)); } else { w = Math.max(textWidth, iconWidth); h = (textHeight + iconHeight); if (iconHeight != 0){ h = (h + getStyle("verticalGap")); }; }; if (bm){ w = (w + (bm.left + bm.right)); h = (h + (bm.top + bm.bottom)); }; if (((label) && (!((label.length == 0))))){ w = (w + extraSpacing); } else { w = (w + 6); }; if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){ skinMeasuredWidth = currentSkin.measuredWidth; skinMeasuredHeight = currentSkin.measuredHeight; }; if (!isNaN(skinMeasuredWidth)){ w = Math.max(skinMeasuredWidth, w); }; if (!isNaN(skinMeasuredHeight)){ h = Math.max(skinMeasuredHeight, h); }; measuredMinWidth = (measuredWidth = w); measuredMinHeight = (measuredHeight = h); } mx_internal function get phase():String{ return (_phase); } public function set selected(_arg1:Boolean):void{ selectedSet = true; setSelected(_arg1); } mx_internal function changeIcons():void{ var _local1:int; var _local2:int; _local1 = icons.length; _local2 = 0; while (_local2 < _local1) { removeChild(icons[_local2]); _local2++; }; icons = []; } override protected function commitProperties():void{ super.commitProperties(); if (!initialized){ viewSkin(); viewIcon(); }; if (enabledChanged){ textField.enabled = enabled; enabledChanged = false; }; if (toggleChanged){ if (!toggle){ selected = false; }; toggleChanged = false; }; } public function get listData():BaseListData{ return (_listData); } mx_internal function viewSkin():void{ var _local1:String; if (!enabled){ _local1 = (selected) ? selectedDisabledSkinName : disabledSkinName; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpSkinName : upSkinName; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverSkinName : overSkinName; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownSkinName : downSkinName; }; }; }; }; viewSkinForPhase(_local1); } public function set label(_arg1:String):void{ labelSet = true; if (_label != _arg1){ _label = _arg1; labelChanged = true; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelChanged")); }; } mx_internal function viewSkinForPhase(_arg1:String):void{ var _local2:IFlexDisplayObject; var _local3:Number; var _local4:Class; var _local5:ISimpleStyleClient; _local2 = IFlexDisplayObject(getChildByName(_arg1)); if (!_local2){ _local4 = Class(getStyle(_arg1)); if (_local4){ _local2 = IFlexDisplayObject(new (_local4)); _local2.name = _arg1; _local5 = (_local2 as ISimpleStyleClient); if (_local5){ _local5.styleName = this; }; addChild(DisplayObject(_local2)); _local2.setActualSize(unscaledWidth, unscaledHeight); if ((((_local2 is IInvalidating)) && (initialized))){ IInvalidating(_local2).validateNow(); } else { if ((((_local2 is ProgrammaticSkin)) && (initialized))){ ProgrammaticSkin(_local2).validateDisplayList(); }; }; skins.push(_local2); }; }; if (currentSkin){ currentSkin.visible = false; }; currentSkin = _local2; if (currentSkin){ currentSkin.visible = true; }; if (enabled){ if (phase == ButtonPhase.OVER){ _local3 = textField.getStyle("textRollOverColor"); } else { if (phase == ButtonPhase.DOWN){ _local3 = textField.getStyle("textSelectedColor"); } else { _local3 = textField.getStyle("color"); }; }; textField.setColor(_local3); }; } private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.reset(); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.delay = getStyle("repeatInterval"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.start(); }; } protected function mouseDownHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); buttonPressed(); _arg1.updateAfterEvent(); } override public function set enabled(_arg1:Boolean):void{ if (super.enabled == _arg1){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); invalidateDisplayList(); } public function get labelPlacement():String{ return (_labelPlacement); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; _local1 = label; if (!_local1){ _local1 = "Wj"; }; validateNow(); if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){ _local2 = measureText(_local1); return ((((measuredHeight - _local2.height) / 2) + _local2.ascent)); }; return ((textField.y + measureText(_local1).ascent)); } public function set toggle(_arg1:Boolean):void{ _toggle = _arg1; toggleChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("toggleChanged")); } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; changeSkins(); invalidateDisplayList(); } public function get selected():Boolean{ return (_selected); } mx_internal function buttonReleased():void{ systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); if (autoRepeatTimer){ autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.reset(); }; } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } mx_internal function set phase(_arg1:String):void{ _phase = _arg1; invalidateSize(); invalidateDisplayList(); } private function stage_mouseLeaveHandler(_arg1:Event):void{ phase = ButtonPhase.UP; buttonReleased(); } public function get label():String{ return (_label); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (phase != ButtonPhase.UP){ phase = ButtonPhase.UP; }; } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = new UITextField(); textField.styleName = this; addChild(textField); }; } protected function rollOverHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.UP){ if (_arg1.buttonDown){ return; }; phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); } else { if (phase == ButtonPhase.OVER){ phase = ButtonPhase.DOWN; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.start(); }; }; }; } public function set data(_arg1:Object):void{ var _local2:*; var _local3:*; _data = _arg1; if (((_listData) && ((_listData is DataGridListData)))){ _local2 = _data[DataGridListData(_listData).dataField]; _local3 = ""; } else { if (_listData){ if (selectedField){ _local2 = _data[selectedField]; }; _local3 = _listData.label; } else { _local2 = _data; }; }; if (((!((_local2 === undefined))) && (!(selectedSet)))){ selected = (_local2 as Boolean); selectedSet = false; }; if (((!((_local3 === undefined))) && (!(labelSet)))){ label = _local3; labelSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } public function get data():Object{ if (!_data){ _data = {}; }; return (_data); } public function get toggle():Boolean{ return (_toggle); } override public function styleChanged(_arg1:String):void{ styleChangedFlag = true; super.styleChanged(_arg1); if (((!(_arg1)) || ((_arg1 == "styleName")))){ changeSkins(); changeIcons(); } else { if (_arg1.toLowerCase().indexOf("skin") != -1){ changeSkins(); } else { if (_arg1.toLowerCase().indexOf("icon") != -1){ changeIcons(); invalidateSize(); }; }; }; } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; if (_arg1){ toolTipSet = true; } else { toolTipSet = false; invalidateDisplayList(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:int; var _local5:IFlexDisplayObject; var _local6:Boolean; super.updateDisplayList(_arg1, _arg2); _local3 = skins.length; _local4 = 0; while (_local4 < _local3) { _local5 = IFlexDisplayObject(skins[_local4]); _local5.setActualSize(_arg1, _arg2); _local4++; }; viewSkin(); viewIcon(); if (((currentIcon) && ((currentIcon is IUIComponent)))){ IUIComponent(currentIcon).enabled = enabled; }; layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN)); if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){ textField.text = label; _local6 = textField.truncateToFit(); if (!toolTipSet){ if (_local6){ super.toolTip = label; } else { super.toolTip = null; }; }; styleChangedFlag = false; labelChanged = false; }; oldUnscaledWidth = _arg1; } } }//package mx.controls
Section 110
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement) package mx.controls { public final class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; mx_internal static const VERSION:String = "2.0.1.0"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package mx.controls
Section 111
//ButtonPhase (mx.controls.ButtonPhase) package mx.controls { public final class ButtonPhase { public static const DOWN:String = "down"; public static const OVER:String = "over"; mx_internal static const VERSION:String = "2.0.1.0"; public static const UP:String = "up"; } }//package mx.controls
Section 112
//ComboBase (mx.controls.ComboBase) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import mx.collections.*; import mx.utils.*; import mx.skins.*; public class ComboBase extends UIComponent implements IIMESupport, IFocusManagerComponent { private var _restrict:String; mx_internal var border:IFlexDisplayObject; private var enabledChanged:Boolean;// = false protected var iterator:IViewCursor; mx_internal var textChanged:Boolean; mx_internal var useFullDropdownSkin:Boolean;// = false mx_internal var wrapDownArrowButton:Boolean;// = true private var _selectedIndex:int;// = -1 mx_internal var collectionIterator:IViewCursor; private var _enabled:Boolean;// = false private var _text:String;// = "" private var _selectedItem:Object; mx_internal var selectedItemChanged:Boolean;// = false protected var collection:ICollectionView; protected var textInput:TextInput; mx_internal var downArrowButton:Button; mx_internal var selectionChanged:Boolean;// = false mx_internal var editableChanged:Boolean;// = true private var selectedUID:String; private var _imeMode:String;// = null mx_internal var selectedIndexChanged:Boolean;// = false private var _editable:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function ComboBase(){ wrapDownArrowButton = true; useFullDropdownSkin = false; selectionChanged = false; selectedIndexChanged = false; selectedItemChanged = false; _enabled = false; enabledChanged = false; _editable = false; editableChanged = true; _imeMode = null; _selectedIndex = -1; _text = ""; super(); tabEnabled = true; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textInput)) || (super.isOurFocus(_arg1)))); } public function get selectedItem():Object{ return (_selectedItem); } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; super.focusInHandler(_arg1); _local2 = focusManager; if (_local2){ _local2.defaultButtonEnabled = false; }; } protected function itemToUID(_arg1:Object):String{ if (!_arg1){ return ("null"); }; return (UIDUtil.getUID(_arg1)); } public function set selectedItem(_arg1:Object):void{ setSelectedItem(_arg1); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; editableChanged = true; invalidateDisplayList(); dispatchEvent(new Event("editableChanged")); } protected function calculatePreferredSizeFromData(_arg1:int):Object{ return (null); } public function get imeMode():String{ return (_imeMode); } public function get text():String{ return (_text); } private function textInput_valueCommitHandler(_arg1:FlexEvent):void{ _text = textInput.text; dispatchEvent(_arg1); } public function get value():Object{ var _local1:Object; if (_editable){ return (text); }; _local1 = selectedItem; if ((((_local1 == null)) || (!((typeof(_local1) == "object"))))){ return (_local1); }; return (((_local1.data)!=null) ? _local1.data : _local1.label); } override protected function measure():void{ var _local1:Number; var _local2:Number; var _local3:Object; var _local4:EdgeMetrics; var _local5:Number; var _local6:Number; super.measure(); _local1 = getStyle("arrowButtonWidth"); _local2 = downArrowButton.getExplicitOrMeasuredHeight(); if (((collection) && ((collection.length > 0)))){ _local3 = calculatePreferredSizeFromData(collection.length); _local4 = borderMetrics; _local5 = (((_local3.width + _local4.left) + _local4.right) + 8); _local6 = (((_local3.height + _local4.top) + _local4.bottom) + UITextField.TEXT_HEIGHT_PADDING); measuredMinWidth = (measuredWidth = (_local5 + _local1)); measuredMinHeight = (measuredHeight = Math.max(_local6, _local2)); } else { measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; measuredWidth = DEFAULT_MEASURED_WIDTH; measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT; measuredHeight = DEFAULT_MEASURED_HEIGHT; }; } public function set restrict(_arg1:String):void{ _restrict = _arg1; invalidateProperties(); dispatchEvent(new Event("restrictChanged")); } protected function downArrowButton_buttonDownHandler(_arg1:FlexEvent):void{ } override public function setFocus():void{ if (((textInput) && (_editable))){ textInput.setFocus(); } else { super.setFocus(); }; } override protected function commitProperties():void{ super.commitProperties(); textInput.restrict = _restrict; if (textChanged){ textInput.text = _text; textChanged = false; }; if (enabledChanged){ textInput.enabled = _enabled; downArrowButton.enabled = _enabled; enabledChanged = false; }; } public function set selectedIndex(_arg1:int):void{ var _local2:CursorBookmark; var _local3:int; var _local4:Object; var _local5:String; _selectedIndex = _arg1; if (_arg1 == -1){ _selectedItem = null; selectedUID = null; }; if (((!(collection)) || ((collection.length == 0)))){ selectedIndexChanged = true; } else { if (_arg1 != -1){ _arg1 = Math.min(_arg1, (collection.length - 1)); _local2 = iterator.bookmark; _local3 = _arg1; iterator.seek(CursorBookmark.FIRST, _local3); _local4 = iterator.current; _local5 = itemToUID(_local4); iterator.seek(_local2, 0); _selectedIndex = _arg1; _selectedItem = _local4; selectedUID = _local5; }; }; selectionChanged = true; invalidateDisplayList(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; if (textInput){ textInput.imeMode = _imeMode; }; } private function setSelectedItem(_arg1:Object, _arg2:Boolean=true):void{ var _local3:IViewCursor; var _local4:int; if (((!(collection)) || ((collection.length == 0)))){ _selectedItem = value; selectedItemChanged = true; invalidateDisplayList(); return; }; _local3 = collection.createCursor(); _local4 = 0; do { } while (_arg1 != _local3.current); invalidateDisplayList(); } public function set text(_arg1:String):void{ _text = _arg1; textChanged = true; invalidateProperties(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function get editable():Boolean{ return (_editable); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; _enabled = _arg1; enabledChanged = true; invalidateProperties(); } override public function get baselinePosition():Number{ return ((textInput.y + textInput.baselinePosition)); } public function get restrict():String{ return (_restrict); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; super.focusOutHandler(_arg1); _local2 = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; if (_editable){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!border){ _local1 = getStyle("borderSkin"); if (_local1){ border = new (_local1); if ((border is IFocusManagerComponent)){ IFocusManagerComponent(border).focusEnabled = false; }; if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChild(DisplayObject(border)); }; }; if (!downArrowButton){ downArrowButton = new Button(); downArrowButton.styleName = this; downArrowButton.focusEnabled = false; addChild(downArrowButton); downArrowButton.addEventListener(FlexEvent.BUTTON_DOWN, downArrowButton_buttonDownHandler); }; if (!textInput){ textInput = new TextInput(); textInput.editable = _editable; textInput.restrict = "^\x1B"; textInput.focusEnabled = false; textInput.imeMode = _imeMode; textInput.styleName = this; textInput.addEventListener(Event.CHANGE, textInput_changeHandler); textInput.addEventListener(FlexEvent.ENTER, textInput_enterHandler); textInput.addEventListener(FocusEvent.FOCUS_IN, focusInHandler); textInput.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); textInput.addEventListener(FlexEvent.VALUE_COMMIT, textInput_valueCommitHandler); addChild(textInput); textInput.move(0, 0); textInput.parentDrawsFocus = true; }; } protected function get borderMetrics():EdgeMetrics{ if (((border) && ((border is RectangularBorder)))){ return (RectangularBorder(border).borderMetrics); }; return (EdgeMetrics.EMPTY); } public function get selectedIndex():int{ return (_selectedIndex); } mx_internal function get ComboDownArrowButton():Button{ return (downArrowButton); } protected function textInput_changeHandler(_arg1:Event):void{ _text = textInput.text; if (_selectedIndex != -1){ _selectedIndex = -1; _selectedItem = null; selectedUID = null; }; } public function set dataProvider(_arg1:Object):void{ var _local2:CollectionEvent; var _local3:Array; if ((_arg1 is Array)){ collection = new ArrayCollection((_arg1 as Array)); } else { if ((_arg1 is ICollectionView)){ collection = ICollectionView(_arg1); } else { if ((_arg1 is IList)){ collection = new ListCollectionView(IList(_arg1)); } else { if ((_arg1 is XMLList)){ collection = new XMLListCollection((_arg1 as XMLList)); } else { _local3 = [_arg1]; collection = new ArrayCollection(_local3); }; }; }; }; iterator = collection.createCursor(); collectionIterator = collection.createCursor(); collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true); _local2 = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); _local2.kind = CollectionEventKind.RESET; collectionChangeHandler(_local2); dispatchEvent(_local2); invalidateSize(); invalidateDisplayList(); } protected function collectionChangeHandler(_arg1:Event):void{ var _local2:Boolean; var _local3:Number; var _local4:Object; var _local5:CollectionEvent; var _local6:int; var _local7:String; if ((_arg1 is CollectionEvent)){ _local2 = false; _local5 = CollectionEvent(_arg1); if (_local5.kind == CollectionEventKind.ADD){ if (selectedIndex >= _local5.location){ _selectedIndex++; }; }; if (_local5.kind == CollectionEventKind.REMOVE){ _local6 = 0; while (_local6 < _local5.items.length) { _local7 = itemToUID(_local5.items[_local6]); if (selectedUID == _local7){ selectionChanged = true; }; _local6++; }; if (selectionChanged){ if (_selectedIndex >= collection.length){ _selectedIndex = (collection.length - 1); }; selectedIndexChanged = true; _local2 = true; invalidateDisplayList(); } else { if (selectedIndex >= _local5.location){ _selectedIndex--; selectedIndexChanged = true; _local2 = true; invalidateDisplayList(); }; }; }; if (_local5.kind == CollectionEventKind.REFRESH){ selectedItemChanged = true; _local2 = true; }; invalidateDisplayList(); if (_local2){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; } private function textInput_mouseEventHandler(_arg1:Event):void{ downArrowButton.dispatchEvent(_arg1); } override protected function initializeAccessibility():void{ if (ComboBase.createAccessibilityImplementation != null){ ComboBase.createAccessibilityImplementation(this); }; } private function textInput_enterHandler(_arg1:FlexEvent):void{ dispatchEvent(_arg1); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function get dataProvider():Object{ return (collection); } override public function styleChanged(_arg1:String):void{ if (downArrowButton){ downArrowButton.styleChanged(_arg1); }; if (textInput){ textInput.styleChanged(_arg1); }; if (((border) && ((border is ISimpleStyleClient)))){ ISimpleStyleClient(border).styleChanged(_arg1); }; super.styleChanged(_arg1); } mx_internal function getTextInput():TextInput{ return (textInput); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:EdgeMetrics; var _local7:Number; var _local8:Boolean; super.updateDisplayList(_arg1, _arg2); _local3 = _arg1; _local4 = _arg2; _local5 = getStyle("arrowButtonWidth"); if (wrapDownArrowButton){ _local6 = borderMetrics; _local7 = ((_local4 - _local6.top) - _local6.bottom); downArrowButton.setActualSize(_local7, _local7); downArrowButton.move(((_local3 - _local5) - _local6.right), _local6.top); border.setActualSize(_local3, _local4); textInput.setActualSize((_local3 - _local5), _local4); } else { if (((!(_editable)) && (useFullDropdownSkin))){ downArrowButton.move(0, 0); border.setActualSize(_local3, _local4); textInput.setActualSize((_local3 - _local5), _local4); textInput.border.visible = false; downArrowButton.setActualSize(_arg1, _arg2); } else { downArrowButton.move((_local3 - _local5), 0); border.setActualSize((_local3 - _local5), _local4); textInput.setActualSize((_local3 - _local5), _local4); downArrowButton.setActualSize(_local5, _arg2); textInput.border.visible = true; }; }; if (editableChanged){ editableChanged = false; _local8 = _editable; if (wrapDownArrowButton == false){ if (_local8){ setStyle("borderStyle", "inset"); textInput.setStyle("borderStyle", "inset"); } else { setStyle("borderStyle", "comboNonEdit"); textInput.setStyle("borderStyle", "dropdown"); }; }; if (useFullDropdownSkin){ downArrowButton.upSkinName = (_local8) ? "editableUpSkin" : "upSkin"; downArrowButton.overSkinName = (_local8) ? "editableOverSkin" : "overSkin"; downArrowButton.downSkinName = (_local8) ? "editableDownSkin" : "downSkin"; downArrowButton.disabledSkinName = (_local8) ? "editableDisabledSkin" : "disabledSkin"; downArrowButton.changeSkins(); downArrowButton.invalidateDisplayList(); }; if (textInput){ textInput.editable = _local8; textInput.getTextField().selectable = _local8; if (_local8){ textInput.removeEventListener(MouseEvent.MOUSE_DOWN, textInput_mouseEventHandler); textInput.removeEventListener(MouseEvent.MOUSE_UP, textInput_mouseEventHandler); textInput.removeEventListener(MouseEvent.ROLL_OVER, textInput_mouseEventHandler); textInput.removeEventListener(MouseEvent.ROLL_OUT, textInput_mouseEventHandler); textInput.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); } else { textInput.addEventListener(MouseEvent.MOUSE_DOWN, textInput_mouseEventHandler); textInput.addEventListener(MouseEvent.MOUSE_UP, textInput_mouseEventHandler); textInput.addEventListener(MouseEvent.ROLL_OVER, textInput_mouseEventHandler); textInput.addEventListener(MouseEvent.ROLL_OUT, textInput_mouseEventHandler); textInput.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; }; if (selectedIndexChanged){ selectedIndex = selectedIndex; selectedIndexChanged = false; }; if (selectedItemChanged){ selectedItem = selectedItem; selectedItemChanged = false; }; } } }//package mx.controls
Section 113
//ComboBox (mx.controls.ComboBox) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.effects.*; import mx.controls.dataGridClasses.*; import mx.collections.*; import mx.controls.listClasses.*; import flash.ui.*; public class ComboBox extends ComboBase implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer { private var _labelField:String;// = "label" private var dropdownBorderStyle:String;// = "solid" private var inTween:Boolean;// = false private var _oldIndex:int; private var _data:Object; private var promptChanged:Boolean;// = false private var bInKeyDown:Boolean;// = false private var _showingDropdown:Boolean;// = false private var _rowCount:int;// = 5 private var _labelFunction:Function; private var preferredDropdownWidth:Number; private var _dropdown:ListBase; private var selectedItemSet:Boolean; private var labelFieldChanged:Boolean; private var _dropdownFactory:IFactory; private var bRemoveDropdown:Boolean;// = false private var _selectedIndexOnDropdown:int;// = -1 private var labelFunctionChanged:Boolean; private var tweenUp:Boolean;// = false private var tween:Tween;// = null private var _prompt:String; private var _listData:BaseListData; private var _itemRenderer:IFactory; private var collectionChanged:Boolean;// = false private var _dropdownWidth:Number;// = 100 private var triggerEvent:Event; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function ComboBox(){ tween = null; tweenUp = false; dropdownBorderStyle = "solid"; _showingDropdown = false; _selectedIndexOnDropdown = -1; bRemoveDropdown = false; inTween = false; bInKeyDown = false; collectionChanged = false; _dropdownFactory = new ClassFactory(List); _dropdownWidth = 100; _labelField = "label"; promptChanged = false; _rowCount = 5; super(); dataProvider = new ArrayCollection(); useFullDropdownSkin = true; wrapDownArrowButton = false; addEventListener("unload", unloadHandler); } private function dropdown_scrollHandler(_arg1:Event):void{ var _local2:ScrollEvent; if ((_arg1 is ScrollEvent)){ _local2 = ScrollEvent(_arg1); if ((((((((_local2.detail == ScrollEventDetail.THUMB_TRACK)) || ((_local2.detail == ScrollEventDetail.THUMB_POSITION)))) || ((_local2.detail == ScrollEventDetail.LINE_UP)))) || ((_local2.detail == ScrollEventDetail.LINE_DOWN)))){ dispatchEvent(_local2); }; }; } public function get dropdown():ListBase{ return (getDropdown()); } public function get dropdownWidth():Number{ return (_dropdownWidth); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; if (_arg1.target == textInput){ return; }; if (((_arg1.ctrlKey) && ((_arg1.keyCode == Keyboard.DOWN)))){ displayDropdown(true, _arg1); _arg1.stopPropagation(); } else { if (((_arg1.ctrlKey) && ((_arg1.keyCode == Keyboard.UP)))){ close(_arg1); _arg1.stopPropagation(); } else { if (_arg1.keyCode == Keyboard.ESCAPE){ if (_showingDropdown){ if (_oldIndex != _dropdown.selectedIndex){ selectedIndex = _oldIndex; }; displayDropdown(false); _arg1.stopPropagation(); }; } else { if (_arg1.keyCode == Keyboard.ENTER){ if (_showingDropdown){ close(); _arg1.stopPropagation(); }; } else { if (((((((((!(editable)) || ((_arg1.keyCode == Keyboard.UP)))) || ((_arg1.keyCode == Keyboard.DOWN)))) || ((_arg1.keyCode == Keyboard.PAGE_UP)))) || ((_arg1.keyCode == Keyboard.PAGE_DOWN)))){ _local2 = selectedIndex; bInKeyDown = _showingDropdown; dropdown.dispatchEvent(_arg1.clone()); _arg1.stopPropagation(); bInKeyDown = false; if (_local2 != _dropdown.selectedIndex){ selectedIndex = _dropdown.selectedIndex; }; }; }; }; }; }; } public function set dropdownWidth(_arg1:Number):void{ _dropdownWidth = _arg1; preferredDropdownWidth = _arg1; if (_dropdown){ _dropdown.setActualSize(_arg1, _dropdown.height); }; dispatchEvent(new Event("dropdownWidthChanged")); } private function stage_resizeHandler(_arg1:Event):void{ if (_dropdown){ _dropdown.$visible = false; _showingDropdown = false; }; } override public function set selectedItem(_arg1:Object):void{ selectedItemSet = true; super.selectedItem = _arg1; } mx_internal function hasDropdown():Boolean{ return (!((_dropdown == null))); } public function set labelField(_arg1:String):void{ _labelField = _arg1; labelFieldChanged = true; invalidateDisplayList(); dispatchEvent(new Event("labelFieldChanged")); } override protected function calculatePreferredSizeFromData(_arg1:int):Object{ var _local2:Number; var _local3:Number; var _local4:CursorBookmark; var _local5:Boolean; var _local6:TextLineMetrics; var _local7:int; var _local8:Object; var _local9:String; _local2 = 0; _local3 = 0; _local4 = (iterator) ? iterator.bookmark : null; iterator.seek(CursorBookmark.FIRST, 0); _local5 = !((iterator == null)); _local7 = 0; while (_local7 < _arg1) { if (_local5){ _local8 = (iterator) ? iterator.current : null; } else { _local8 = null; }; _local9 = itemToLabel(_local8); _local6 = measureText(_local9); _local2 = Math.max(_local2, _local6.width); _local3 = Math.max(_local3, _local6.height); if (iterator){ iterator.moveNext(); }; _local7++; }; if (prompt){ _local6 = measureText(prompt); _local2 = Math.max(_local2, _local6.width); _local3 = Math.max(_local3, _local6.height); }; _local2 = (_local2 + (getStyle("paddingLeft") + getStyle("paddingRight"))); if (iterator){ iterator.seek(_local4, 0); }; return ({width:_local2, height:_local3}); } override public function set showInAutomationHierarchy(_arg1:Boolean):void{ } public function get itemRenderer():IFactory{ return (_itemRenderer); } public function get selectedLabel():String{ var _local1:Object; _local1 = selectedItem; return (itemToLabel(_local1)); } mx_internal function get isShowingDropdown():Boolean{ return (_showingDropdown); } public function get prompt():String{ return (_prompt); } private function dropdown_itemRollOutHandler(_arg1:Event):void{ dispatchEvent(_arg1); } override protected function measure():void{ var _local1:Number; var _local2:EdgeMetrics; super.measure(); measuredMinWidth = Math.max(measuredWidth, DEFAULT_MEASURED_MIN_WIDTH); _local1 = (measureText("M").height + 6); _local2 = borderMetrics; measuredMinHeight = (measuredHeight = Math.max(((_local1 + _local2.top) + _local2.bottom), DEFAULT_MEASURED_MIN_HEIGHT)); } private function getDropdown():ListBase{ var _local1:String; var _local2:CSSStyleDeclaration; if (!initialized){ return (null); }; if (!hasDropdown()){ _local1 = getStyle("dropDownStyleName"); _dropdown = dropdownFactory.newInstance(); _dropdown.visible = false; _dropdown.focusEnabled = false; _dropdown.owner = this; if (itemRenderer){ _dropdown.itemRenderer = itemRenderer; }; _dropdown.styleName = this; if (_local1){ _local2 = StyleManager.getStyleDeclaration(("." + _local1)); if (_local2){ _dropdown.styleDeclaration = _local2; }; } else { _dropdown.setStyle("cornerRadius", 0); }; PopUpManager.addPopUp(_dropdown, this); _dropdown.setStyle("selectionDuration", 0); if (((dropdownBorderStyle) && (!((dropdownBorderStyle == ""))))){ _dropdown.setStyle("borderStyle", dropdownBorderStyle); }; if (!dataProvider){ dataProvider = new ArrayCollection(); }; _dropdown.dataProvider = dataProvider; _dropdown.rowCount = rowCount; _dropdown.width = _dropdownWidth; _dropdown.selectedIndex = selectedIndex; _oldIndex = selectedIndex; _dropdown.verticalScrollPolicy = ScrollPolicy.AUTO; _dropdown.labelField = _labelField; _dropdown.labelFunction = _labelFunction; _dropdown.allowDragSelection = true; _dropdown.addEventListener("change", dropdown_changeHandler); _dropdown.addEventListener(ScrollEvent.SCROLL, dropdown_scrollHandler); _dropdown.addEventListener(ListEvent.ITEM_ROLL_OVER, dropdown_itemRollOverHandler); _dropdown.addEventListener(ListEvent.ITEM_ROLL_OUT, dropdown_itemRollOutHandler); _dropdown.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, dropdown_mouseDownOutsideHandler); _dropdown.addEventListener(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE, dropdown_mouseWheelOutsideHandler); _dropdown.addEventListener(ListEvent.ITEM_CLICK, dropdown_itemClickHandler); UIComponentGlobals.layoutManager.validateClient(_dropdown, true); _dropdown.setActualSize(_dropdownWidth, _dropdown.getExplicitOrMeasuredHeight()); _dropdown.validateDisplayList(); _dropdown.cacheAsBitmap = true; systemManager.addEventListener(Event.RESIZE, stage_resizeHandler, false, 0, true); }; _dropdown.scaleX = scaleX; _dropdown.scaleY = scaleY; return (_dropdown); } override protected function downArrowButton_buttonDownHandler(_arg1:FlexEvent):void{ if (_showingDropdown){ close(_arg1); } else { displayDropdown(true, _arg1); }; } mx_internal function onTweenEnd(_arg1:Number):void{ var _local2:DropdownEvent; if (_dropdown){ _dropdown.scrollRect = null; inTween = false; _dropdown.enabled = true; _dropdown.visible = _showingDropdown; }; if (bRemoveDropdown){ PopUpManager.removePopUp(_dropdown); _dropdown = null; bRemoveDropdown = false; }; UIComponent.resumeBackgroundProcessing(); _local2 = new DropdownEvent((_showingDropdown) ? DropdownEvent.OPEN : DropdownEvent.CLOSE); _local2.triggerEvent = triggerEvent; dispatchEvent(_local2); } public function get listData():BaseListData{ return (_listData); } private function dropdown_mouseWheelOutsideHandler(_arg1:MouseEvent):void{ dropdown_mouseDownOutsideHandler(_arg1); } private function dropdown_itemClickHandler(_arg1:ListEvent):void{ if (_showingDropdown){ close(); }; } override protected function commitProperties():void{ super.commitProperties(); if (collectionChanged){ if ((((selectedIndex == -1)) && ((_prompt == null)))){ selectedIndex = 0; } else { selectedIndexChanged = true; }; collectionChanged = false; }; if (((((promptChanged) && (!((prompt == null))))) && ((selectedIndex == -1)))){ promptChanged = false; textInput.text = prompt; }; } private function dropdown_changeHandler(_arg1:Event):void{ var _local2:int; _local2 = selectedIndex; if (_dropdown){ selectedIndex = _dropdown.selectedIndex; }; if (!_showingDropdown){ dispatchChangeEvent(_arg1, _local2, selectedIndex); } else { if (!bInKeyDown){ close(); }; }; } override public function set selectedIndex(_arg1:int):void{ super.selectedIndex = _arg1; if (_arg1 >= 0){ selectionChanged = true; }; invalidateDisplayList(); if (((((textInput) && (!(textChanged)))) && ((_arg1 >= 0)))){ textInput.text = selectedLabel; } else { if (((textInput) && (prompt))){ textInput.text = prompt; }; }; } public function set labelFunction(_arg1:Function):void{ _labelFunction = _arg1; labelFunctionChanged = true; invalidateDisplayList(); dispatchEvent(new Event("labelFunctionChanged")); } public function close(_arg1:Event=null):void{ if (_showingDropdown){ if (_dropdown){ selectedIndex = _dropdown.selectedIndex; }; displayDropdown(false, _arg1); dispatchChangeEvent(new Event("dummy"), _selectedIndexOnDropdown, selectedIndex); }; } public function set itemRenderer(_arg1:IFactory):void{ _itemRenderer = _arg1; if (_dropdown){ _dropdown.itemRenderer = _arg1; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("itemRendererChanged")); } private function destroyDropdown():void{ if (((_dropdown) && (!(_showingDropdown)))){ if (inTween){ tween.endTween(); } else { PopUpManager.removePopUp(_dropdown); _dropdown = null; }; }; } public function open():void{ displayDropdown(true); } private function dropdown_itemRollOverHandler(_arg1:Event):void{ dispatchEvent(_arg1); } public function get labelField():String{ return (_labelField); } private function dropdown_mouseDownOutsideHandler(_arg1:MouseEvent):void{ if (_arg1.target != _dropdown){ return; }; if (!hitTestPoint(_arg1.stageX, _arg1.stageY, true)){ close(_arg1); }; } public function itemToLabel(_arg1:Object):String{ var item = _arg1; if (item == null){ return (""); }; if (labelFunction != null){ return (labelFunction(item)); }; if (typeof(item) == "object"){ try { if (item[labelField] != null){ item = item[labelField]; }; } catch(e:Error) { }; } else { if (typeof(item) == "xml"){ try { if (item[labelField].length() != 0){ item = item[labelField]; }; } catch(e:Error) { }; }; }; if (typeof(item) == "string"){ return (String(item)); }; try { return (item.toString()); } catch(e:Error) { }; return (" "); } public function set rowCount(_arg1:int):void{ _rowCount = _arg1; if (_dropdown){ _dropdown.rowCount = _arg1; }; } public function set prompt(_arg1:String):void{ _prompt = _arg1; promptChanged = true; invalidateProperties(); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } private function displayDropdown(_arg1:Boolean, _arg2:Event=null):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Function; var _local7:Point; var _local8:int; var _local9:Number; if (((!(initialized)) || ((_arg1 == _showingDropdown)))){ return; }; _local7 = new Point(0, unscaledHeight); _local7 = localToGlobal(_local7); if (_arg1){ _selectedIndexOnDropdown = selectedIndex; getDropdown(); if (_dropdown.parent == null){ PopUpManager.addPopUp(_dropdown, this); } else { PopUpManager.bringToFront(_dropdown); }; _local7 = _dropdown.parent.globalToLocal(_local7); if (((((_local7.y + _dropdown.height) > screen.height)) && ((_local7.y > _dropdown.height)))){ _local7.y = (_local7.y - (unscaledHeight + _dropdown.height)); _local3 = -(_dropdown.height); tweenUp = true; } else { _local3 = _dropdown.height; }; _local8 = _dropdown.selectedIndex; if (_local8 == -1){ _local8 = 0; }; _local9 = _dropdown.verticalScrollPosition; _local9 = (_local8 - 1); _local9 = Math.min(Math.max(_local9, 0), _dropdown.maxVerticalScrollPosition); _dropdown.verticalScrollPosition = _local9; if (((!((_dropdown.x == _local7.x))) || (!((_dropdown.y == _local7.y))))){ _dropdown.move(_local7.x, _local7.y); }; _dropdown.scrollRect = new Rectangle(0, _local3, _dropdown.width, _dropdown.height); if (!_dropdown.visible){ _dropdown.visible = true; }; bRemoveDropdown = false; _showingDropdown = _arg1; _local5 = getStyle("openDuration"); _local4 = 0; _local6 = (getStyle("openEasingFunction") as Function); } else { if (_dropdown){ _local7 = _dropdown.parent.globalToLocal(_local7); _local4 = (((((_local7.y + _dropdown.height) > screen.height)) || (tweenUp))) ? -(_dropdown.height) : _dropdown.height; _showingDropdown = _arg1; _local3 = 0; _local5 = getStyle("closeDuration"); _local6 = (getStyle("closeEasingFunction") as Function); _dropdown.resetDragScrolling(); }; }; inTween = true; UIComponentGlobals.layoutManager.validateNow(); UIComponent.suspendBackgroundProcessing(); if (_dropdown){ _dropdown.enabled = false; }; _local5 = Math.max(1, _local5); tween = new Tween(this, _local3, _local4, _local5); if (((!((_local6 == null))) && (tween))){ tween.easingFunction = _local6; }; triggerEvent = _arg2; } public function get labelFunction():Function{ return (_labelFunction); } override protected function focusOutHandler(_arg1:FocusEvent):void{ if (((_showingDropdown) && (_dropdown))){ if (((!(_arg1.relatedObject)) || (!(_dropdown.contains(_arg1.relatedObject))))){ close(); }; }; super.focusOutHandler(_arg1); } private function popup_moveHandler(_arg1:Event):void{ destroyDropdown(); } private function unloadHandler(_arg1:Event):void{ if (inTween){ UIComponent.resumeBackgroundProcessing(); inTween = false; }; if (_dropdown){ _dropdown.parent.removeChild(_dropdown); }; } public function get rowCount():int{ return (Math.max(1, Math.min(collection.length, _rowCount))); } override protected function textInput_changeHandler(_arg1:Event):void{ super.textInput_changeHandler(_arg1); dispatchChangeEvent(_arg1, -1, -2); } public function set data(_arg1:Object):void{ var _local2:*; _data = _arg1; if (((_listData) && ((_listData is DataGridListData)))){ _local2 = _data[DataGridListData(_listData).dataField]; } else { if ((((_listData is ListData)) && ((ListData(_listData).labelField in _data)))){ _local2 = _data[ListData(_listData).labelField]; } else { _local2 = _data; }; }; if (((!((_local2 === undefined))) && (!(selectedItemSet)))){ selectedItem = _local2; selectedItemSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function set dropdownFactory(_arg1:IFactory):void{ _dropdownFactory = _arg1; dispatchEvent(new Event("dropdownFactoryChanged")); } override public function set dataProvider(_arg1:Object):void{ selectionChanged = true; super.dataProvider = _arg1; destroyDropdown(); _showingDropdown = false; invalidateProperties(); invalidateSize(); } override protected function collectionChangeHandler(_arg1:Event):void{ var _local2:int; var _local3:CollectionEvent; _local2 = selectedIndex; super.collectionChangeHandler(_arg1); if ((_arg1 is CollectionEvent)){ _local3 = CollectionEvent(_arg1); if (collection.length == 0){ if (((!(selectedIndexChanged)) && (!(selectedItemChanged)))){ selectedIndex = -1; }; if (((textInput) && (!(editable)))){ textInput.text = ""; }; } else { if (_local3.kind == CollectionEventKind.ADD){ if (collection.length == _local3.items.length){ if ((((selectedIndex == -1)) && ((_prompt == null)))){ selectedIndex = 0; }; } else { return; }; } else { if (_local3.kind == CollectionEventKind.UPDATE){ if ((((_local3.location == selectedIndex)) || ((_local3.items[0].source == selectedItem)))){ selectionChanged = true; }; } else { if (_local3.kind == CollectionEventKind.REPLACE){ return; }; if (_local3.kind == CollectionEventKind.RESET){ collectionChanged = true; if (((!(selectedIndexChanged)) && (!(selectedItemChanged)))){ selectedIndex = (prompt) ? -1 : 0; }; invalidateProperties(); }; }; }; }; invalidateDisplayList(); destroyDropdown(); _showingDropdown = false; }; } override protected function initializeAccessibility():void{ if (ComboBox.createAccessibilityImplementation != null){ ComboBox.createAccessibilityImplementation(this); }; } public function get data():Object{ return (_data); } public function get dropdownFactory():IFactory{ return (_dropdownFactory); } override public function styleChanged(_arg1:String):void{ destroyDropdown(); super.styleChanged(_arg1); } mx_internal function onTweenUpdate(_arg1:Number):void{ if (_dropdown){ _dropdown.scrollRect = new Rectangle(0, _arg1, _dropdown.width, _dropdown.height); }; } private function dispatchChangeEvent(_arg1:Event, _arg2:int, _arg3:int):void{ var _local4:Event; if (_arg2 != _arg3){ _local4 = ((_arg1 is ListEvent)) ? _arg1 : new ListEvent("change"); dispatchEvent(_local4); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; super.updateDisplayList(_arg1, _arg2); if (((_dropdown) && (!(inTween)))){ destroyDropdown(); } else { if (((!(_showingDropdown)) && (inTween))){ bRemoveDropdown = true; }; }; _local3 = preferredDropdownWidth; if (isNaN(_local3)){ _local3 = (_dropdownWidth = _arg1); }; if (editableChanged){ if (editable){ if (!textChanged){ textInput.text = ""; }; } else { textChanged = false; selectionChanged = true; }; }; if (labelFieldChanged){ if (_dropdown){ _dropdown.labelField = _labelField; }; selectionChanged = true; textInput.text = selectedLabel; labelFieldChanged = false; }; if (labelFunctionChanged){ if (_dropdown){ _dropdown.labelFunction = _labelFunction; }; selectionChanged = true; textInput.text = selectedLabel; labelFunctionChanged = false; }; if (selectionChanged){ if (!textChanged){ if ((((selectedIndex == -1)) && (prompt))){ textInput.text = prompt; } else { textInput.text = selectedLabel; }; }; textInput.invalidateDisplayList(); textInput.validateNow(); if (editable){ textInput.getTextField().setSelection(0, textInput.text.length); textInput.getTextField().scrollH = 0; }; if (_dropdown){ _dropdown.selectedIndex = selectedIndex; }; selectionChanged = false; }; if (((_dropdown) && (!((_dropdown.rowCount == rowCount))))){ _dropdown.rowCount = rowCount; }; } } }//package mx.controls
Section 114
//DataGrid (mx.controls.DataGrid) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.controls.scrollClasses.*; import mx.controls.dataGridClasses.*; import mx.collections.*; import mx.controls.listClasses.*; import flash.utils.*; import mx.utils.*; import mx.skins.*; import mx.skins.halo.*; import mx.collections.errors.*; import flash.ui.*; public class DataGrid extends DataGridBase implements IIMESupport { private var startX:Number; private var _minColumnWidth:Number; private var dropColumnIndex:int;// = -1 mx_internal var sortArrow:IFlexDisplayObject; private var lastEditedItemPosition; private var _originalHeaderHeight:Number;// = 0 private var minColumnWidthInvalid:Boolean;// = false private var separators:Array; private var _headerWordWrapPresent:Boolean;// = false private var _editedItemPosition:Object; private var lastItemDown:IListItemRenderer; private var resizingColumn:DataGridColumn; private var displayableColumns:Array; private var sortDirection:String; private var resizeGraphic:IFlexDisplayObject; private var resizeCursorID:int;// = 0 private var _imeMode:String;// = null private var _draggableColumns:Boolean;// = true private var lastSortIndex:int;// = -1 mx_internal var columnDropIndicator:IFlexDisplayObject; private var minX:Number; private var separatorAffordance:Number;// = 3 private var bEditedItemPositionChanged:Boolean;// = false private var inEndEdit:Boolean;// = false public var sortableColumns:Boolean;// = true private var dontEdit:Boolean;// = false private var movingColumn:DataGridColumn; private var losingFocus:Boolean;// = false private var _proposedEditedItemPosition; private var _originalExplicitHeaderHeight:Boolean;// = false private var sortIndex:int;// = -1 private var measuringObjects:Dictionary; private var displayWidth:Number; public var editable:Boolean;// = false private var manualSort:Boolean; private var sortColumn:DataGridColumn; private var _columns:Array; public var resizableColumns:Boolean;// = true private var actualRowIndex:int; private var actualColIndex:int; private var collectionUpdatesDisabled:Boolean;// = false public var itemEditorInstance:IListItemRenderer; private var generatedColumns:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function DataGrid(){ dontEdit = false; losingFocus = false; inEndEdit = false; collectionUpdatesDisabled = false; sortIndex = -1; lastSortIndex = -1; dropColumnIndex = -1; separatorAffordance = 3; generatedColumns = true; resizeCursorID = CursorManager.NO_CURSOR; _imeMode = null; minColumnWidthInvalid = false; _draggableColumns = true; editable = false; bEditedItemPositionChanged = false; resizableColumns = true; sortableColumns = true; _headerWordWrapPresent = false; _originalExplicitHeaderHeight = false; _originalHeaderHeight = 0; super(); _columns = []; itemRenderer = new ClassFactory(DataGridItemRenderer); setRowHeight(20); addEventListener(DataGridEvent.ITEM_EDIT_BEGINNING, itemEditorItemEditBeginningHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DataGridEvent.ITEM_EDIT_BEGIN, itemEditorItemEditBeginHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DataGridEvent.ITEM_EDIT_END, itemEditorItemEditEndHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(DataGridEvent.HEADER_RELEASE, headerReleaseHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } private function itemEditorItemEditBeginningHandler(_arg1:DataGridEvent):void{ if (!_arg1.isDefaultPrevented()){ setEditedItemPosition({columnIndex:_arg1.columnIndex, rowIndex:_arg1.rowIndex}); } else { if (!itemEditorInstance){ _editedItemPosition = null; editable = false; setFocus(); editable = true; }; }; } private function setEditedItemPosition(_arg1:Object):void{ bEditedItemPositionChanged = true; _proposedEditedItemPosition = _arg1; invalidateDisplayList(); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ if ((((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))) && (findNextItemRenderer(_arg1.shiftKey)))){ _arg1.preventDefault(); }; } public function set editedItemPosition(_arg1:Object):void{ var _local2:Object; _local2 = {rowIndex:_arg1.rowIndex, columnIndex:_arg1.columnIndex}; setEditedItemPosition(_local2); } override public function measureHeightOfItems(_arg1:int=-1, _arg2:int=0):Number{ return (measureHeightOfItemsUptoMaxHeight(_arg1, _arg2)); } protected function clearSeparators():void{ var _local1:Sprite; if (!separators){ return; }; _local1 = Sprite(listContent.getChildByName("lines")); while (_local1.numChildren) { _local1.removeChildAt((_local1.numChildren - 1)); separators.pop(); }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:IListItemRenderer; var _local4:ListEvent; var _local5:Point; if (((itemEditorInstance) || (!((_arg1.target == _arg1.currentTarget))))){ return; }; if (_arg1.keyCode != Keyboard.SPACE){ super.keyDownHandler(_arg1); } else { if (caretIndex != -1){ _local2 = (caretIndex + (headerVisible) ? 1 : 0); if (_local2 >= lockedRowCount){ _local2 = (_local2 - verticalScrollPosition); }; _local3 = listItems[_local2][0]; if (selectItem(_local3, _arg1.shiftKey, _arg1.ctrlKey)){ _local4 = new ListEvent(ListEvent.CHANGE); _local4.itemRenderer = _local3; _local5 = itemRendererToIndices(_local3); if (_local5){ _local4.rowIndex = _local5.y; _local4.columnIndex = _local5.x; }; dispatchEvent(_local4); }; }; }; } public function createItemEditor(_arg1:int, _arg2:int):void{ var _local3:DataGridColumn; var _local4:IListItemRenderer; var _local5:ListRowInfo; var _local6:int; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:IFactory; if (displayableColumns.length != _columns.length){ _local6 = 0; while (_local6 < displayableColumns.length) { if (displayableColumns[_local6].colNum >= _arg1){ _arg1 = _local6; break; }; _local6++; }; if (_local6 == displayableColumns.length){ _arg1 = 0; }; }; _local3 = displayableColumns[_arg1]; if (_arg2 > (lockedRowCount - (headerVisible) ? 1 : 0)){ _arg2 = (_arg2 - verticalScrollPosition); }; if (headerVisible){ _arg2++; }; if (_arg1 > lockedColumnCount){ _arg1 = (_arg1 - horizontalScrollPosition); }; _local4 = listItems[_arg2][_arg1]; _local5 = rowInfo[_arg2]; if (!_local3.rendererIsEditor){ _local7 = 0; _local8 = -2; _local9 = 0; _local10 = 4; if (!itemEditorInstance){ _local11 = _local3.itemEditor; _local7 = _local3.editorXOffset; _local8 = _local3.editorYOffset; _local9 = _local3.editorWidthOffset; _local10 = _local3.editorHeightOffset; itemEditorInstance = _local11.newInstance(); itemEditorInstance.owner = this; itemEditorInstance.styleName = _local3; listContent.addChild(DisplayObject(itemEditorInstance)); }; listContent.setChildIndex(DisplayObject(itemEditorInstance), (listContent.numChildren - 1)); itemEditorInstance.visible = true; itemEditorInstance.move((_local4.x + _local7), (_local5.y + _local8)); itemEditorInstance.setActualSize(Math.min((_local3.width + _local9), ((listContent.width - listContent.x) - itemEditorInstance.x)), Math.min((_local5.height + _local10), ((listContent.height - listContent.y) - itemEditorInstance.y))); DisplayObject(itemEditorInstance).addEventListener(FocusEvent.FOCUS_OUT, itemEditorFocusOutHandler); _local4.visible = false; } else { itemEditorInstance = _local4; }; DisplayObject(itemEditorInstance).addEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler); stage.addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true); stage.addEventListener(Event.RESIZE, editorStageResizeHandler, true, 0, true); } private function calculateHeaderHeight():Number{ var _local1:IListItemRenderer; var _local2:DataGridColumn; var _local3:DataGridListData; var _local4:Number; var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; if (!columns.length){ return (rowHeight); }; _local4 = 0; _local7 = getStyle("paddingTop"); _local8 = getStyle("paddingBottom"); if (!measuringObjects){ measuringObjects = new Dictionary(false); }; if (headerVisible){ _local4 = 0; _local5 = columns.length; if (_headerWordWrapPresent){ _headerHeight = _originalHeaderHeight; _explicitHeaderHeight = _originalExplicitHeaderHeight; }; _local6 = 0; while (_local6 < _local5) { _local2 = columns[_local6]; if (!_local2.visible){ } else { _local1 = getMeasuringRenderer(_local2, true); _local3 = DataGridListData(makeListData(_local2, uid, 0, _local2.colNum, _local2)); rowMap[_local1.name] = _local3; if ((_local1 is IDropInListItemRenderer)){ IDropInListItemRenderer(_local1).listData = _local3; }; _local1.data = _local2; _local1.explicitWidth = _local2.width; UIComponentGlobals.layoutManager.validateClient(_local1, true); _local4 = Math.max(_local4, (_explicitHeaderHeight) ? headerHeight : ((_local1.getExplicitOrMeasuredHeight() + _local8) + _local7)); if (columnHeaderWordWrap(_local2)){ _headerWordWrapPresent = true; }; }; _local6++; }; if (_headerWordWrapPresent){ _originalHeaderHeight = _headerHeight; _originalExplicitHeaderHeight = _explicitHeaderHeight; headerHeight = _local4; }; }; return (_local4); } override public function set horizontalScrollPosition(_arg1:Number):void{ var _local2:int; var _local3:CursorBookmark; if (((!(initialized)) || ((listItems.length == 0)))){ super.horizontalScrollPosition = _arg1; return; }; _local2 = super.horizontalScrollPosition; super.horizontalScrollPosition = _arg1; scrollAreaChanged = true; columnsInvalid = true; calculateColumnSizes(); if (itemsSizeChanged){ return; }; if (_local2 != _arg1){ removeClipMask(); if (iterator){ _local3 = iterator.bookmark; }; clearIndicators(); visibleData = {}; makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); if (((iterator) && (_local3))){ iterator.seek(_local3, 0); }; invalidateDisplayList(); addClipMask(false); }; } protected function drawHorizontalLine(_arg1:Sprite, _arg2:int, _arg3:uint, _arg4:Number):void{ var _local5:Graphics; _local5 = _arg1.graphics; if ((((lockedRowCount > (headerVisible) ? 1 : 0)) && ((_arg2 == (lockedRowCount - 1))))){ _local5.lineStyle(0, 0); } else { _local5.lineStyle(0, _arg3); }; _local5.moveTo(0, _arg4); _local5.lineTo(displayWidth, _arg4); } override protected function mouseWheelHandler(_arg1:MouseEvent):void{ if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; super.mouseWheelHandler(_arg1); } protected function drawHeaderBackground(_arg1:UIComponent):void{ var _local2:Graphics; var _local3:Number; var _local4:Array; var _local5:Number; var _local6:Matrix; var _local7:Array; var _local8:Array; var _local9:EdgeMetrics; var _local10:Number; _local2 = _arg1.graphics; _local2.clear(); _local3 = displayWidth; _local4 = getStyle("headerColors"); StyleManager.getColorNames(_local4); if (((((!((verticalScrollBar == null))) && ((_horizontalScrollPolicy == ScrollPolicy.OFF)))) && (headerVisible))){ _local9 = borderMetrics; _local10 = (unscaledWidth - (_local9.left + _local9.right)); _local3 = _local10; maskShape.width = _local10; }; _local5 = (rowInfo.length) ? rowInfo[0].height : headerHeight; _local6 = new Matrix(); _local6.createGradientBox(_local3, (_local5 + 1), (Math.PI / 2), 0, 0); _local4 = [_local4[0], _local4[0], _local4[1]]; _local7 = [0, 60, 0xFF]; _local8 = [1, 1, 1]; _local2.beginGradientFill(GradientType.LINEAR, _local4, _local8, _local7, _local6); _local2.lineStyle(0, 0, 0); _local2.moveTo(0, 0); _local2.lineTo(_local3, 0); _local2.lineTo(_local3, (_local5 - 0.5)); _local2.lineStyle(0, getStyle("borderColor"), 100); _local2.lineTo(0, (_local5 - 0.5)); _local2.lineStyle(0, 0, 0); _local2.endFill(); } override protected function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:DataGridEvent; var _local3:IListItemRenderer; var _local4:Sprite; var _local5:int; var _local6:int; var _local7:Point; _local4 = Sprite(listContent.getChildByName("sortArrowHitArea")); if (_arg1.target == _local4){ _local3 = listItems[0][(sortIndex - visibleColumns[0].colNum)]; } else { _local3 = mouseEventToItemRenderer(_arg1); }; if (((((((((enabled) && (((sortableColumns) || (draggableColumns))))) && (collection))) && (headerVisible))) && (listItems.length))){ _local5 = listItems[0].length; _local6 = 0; while (_local6 < _local5) { if (_local3 == listItems[0][_local6]){ if (((((sortableColumns) && (visibleColumns[_local6].sortable))) && ((lastItemDown == _local3)))){ lastItemDown = null; _local2 = new DataGridEvent(DataGridEvent.HEADER_RELEASE, false, true); _local2.columnIndex = visibleColumns[_local6].colNum; _local2.dataField = visibleColumns[_local6].dataField; _local2.itemRenderer = _local3; dispatchEvent(_local2); }; isPressed = false; return; }; _local6++; }; }; if (movingColumn){ return; }; super.mouseUpHandler(_arg1); if (((((((_local3) && (_local3.data))) && (!((_local3 == itemEditorInstance))))) && ((lastItemDown == _local3)))){ _local7 = itemRendererToIndices(_local3); if (headerVisible){ _local7.y--; }; if ((((((((_local7.y >= 0)) && (editable))) && (displayableColumns[_local7.x].editable))) && (!(dontEdit)))){ _local2 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true); _local2.columnIndex = displayableColumns[_local7.x].colNum; _local2.dataField = displayableColumns[_local7.x].dataField; _local2.rowIndex = _local7.y; _local2.itemRenderer = _local3; dispatchEvent(_local2); }; }; lastItemDown = null; } private function mouseFocusChangeHandler(_arg1:MouseEvent):void{ if (((((itemEditorInstance) && (!(_arg1.isDefaultPrevented())))) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ _arg1.preventDefault(); }; } private function columnDraggingMouseMoveHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:DataGridColumn; var _local4:Sprite; var _local5:int; var _local6:int; var _local7:Number; var _local8:Point; var _local9:IListItemRenderer; var _local10:DataGridListData; var _local11:EdgeMetrics; var _local12:Graphics; var _local13:EdgeMetrics; var _local14:Class; if (!_arg1.buttonDown){ columnDraggingMouseUpHandler(_arg1); return; }; _local3 = movingColumn; _local5 = 0; _local6 = listItems[0].length; if (isNaN(startX)){ startX = _arg1.stageX; lastItemDown = null; _local9 = columnItemRenderer(_local3, true); _local9.name = "headerDragProxy"; _local10 = DataGridListData(makeListData(_local3, null, 0, _local3.colNum, _local3)); if ((_local9 is IDropInListItemRenderer)){ IDropInListItemRenderer(_local9).listData = _local10; }; listContent.addChild(DisplayObject(_local9)); _local9.data = _local3; _local9.styleName = getStyle("headerDragProxyStyleName"); UIComponentGlobals.layoutManager.validateClient(_local9, true); _local9.setActualSize(_local3.width, (_explicitHeaderHeight) ? headerHeight : _local9.getExplicitOrMeasuredHeight()); _local5 = 0; while (_local5 < _local6) { _local2 = listItems[0][_local5]; if (_local2.data == movingColumn){ break; }; _local5++; }; _local9.move(_local2.x, _local2.y); _local4 = new FlexSprite(); _local4.name = "columnDragOverlay"; _local4.alpha = 0.6; listContent.addChildAt(_local4, listContent.getChildIndex(selectionLayer)); _local11 = viewMetrics; _local4.x = _local2.x; _local4.y = 0; if (_local3.width > 0){ _local12 = _local4.graphics; _local12.beginFill(getStyle("disabledColor")); _local12.drawRect(0, 0, _local3.width, ((unscaledHeight - _local11.bottom) - _local4.y)); _local12.endFill(); }; _local4 = Sprite(selectionLayer.getChildByName("headerSelection")); if (_local4){ _local4.width = movingColumn.width; }; if (!listContent.mask){ _local13 = borderMetrics; listContent.scrollRect = new Rectangle(0, 0, ((unscaledWidth - _local13.left) - _local13.right), ((unscaledHeight - _local13.top) - _local13.bottom)); }; return; }; _local7 = (_arg1.stageX - startX); _local4 = Sprite(selectionLayer.getChildByName("headerSelection")); if (_local4){ _local4.x = (_local4.x + _local7); }; _local2 = IListItemRenderer(listContent.getChildByName("headerDragProxy")); if (_local2){ _local2.move((_local2.x + _local7), _local2.y); }; startX = (startX + _local7); _local8 = new Point(_arg1.localX, _arg1.localY); _local8 = DisplayObject(_arg1.target).localToGlobal(_local8); _local8 = listContent.globalToLocal(_local8); _local5 = 0; while (_local5 < _local6) { _local2 = listItems[0][_local5]; if ((((_local2.x < _local8.x)) && ((_local8.x < (_local2.x + _local2.width))))){ if (_local8.x > (_local2.x + Math.floor((_local2.width / 2)))){ _local5++; }; if (dropColumnIndex != _local5){ dropColumnIndex = _local5; if (!columnDropIndicator){ _local14 = getStyle("columnDropIndicatorSkin"); if (!_local14){ _local14 = DataGridColumnDropIndicator; }; columnDropIndicator = IFlexDisplayObject(new (_local14)); if ((columnDropIndicator is ISimpleStyleClient)){ ISimpleStyleClient(columnDropIndicator).styleName = this; }; listContent.addChild(DisplayObject(columnDropIndicator)); }; listContent.setChildIndex(DisplayObject(columnDropIndicator), (listContent.numChildren - 1)); columnDropIndicator.visible = true; if (dropColumnIndex < _local6){ _local2 = listItems[0][dropColumnIndex]; columnDropIndicator.x = (_local2.x - 2); } else { _local2 = listItems[0][(dropColumnIndex - 1)]; columnDropIndicator.x = ((_local2.x + visibleColumns[(visibleColumns.length - 1)].width) - 2); }; columnDropIndicator.y = 0; columnDropIndicator.setActualSize(3, listContent.height); }; break; }; _local5++; }; } override public function set horizontalScrollPolicy(_arg1:String):void{ super.horizontalScrollPolicy = _arg1; itemsSizeChanged = true; invalidateDisplayList(); } public function get draggableColumns():Boolean{ return (_draggableColumns); } private function columnResizeMouseOverHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; var _local3:int; var _local4:Class; if (((!(enabled)) || (!(resizableColumns)))){ return; }; _local2 = DisplayObject(_arg1.target); _local3 = _local2.parent.getChildIndex(_local2); if (!visibleColumns[_local3].resizable){ return; }; _local4 = getStyle("stretchCursor"); resizeCursorID = CursorManager.setCursor(_local4, CursorManagerPriority.HIGH); } private function commitEditedItemPosition(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:EdgeMetrics; var _local8:uint; var _local9:int; var _local10:int; var _local11:IListItemRenderer; var _local12:DataGridEvent; var _local13:String; var _local14:int; if (((!(enabled)) || (!(editable)))){ return; }; if (((((((((itemEditorInstance) && (_arg1))) && ((itemEditorInstance is IFocusManagerComponent)))) && ((_editedItemPosition.rowIndex == _arg1.rowIndex)))) && ((_editedItemPosition.columnIndex == _arg1.columnIndex)))){ IFocusManagerComponent(itemEditorInstance).setFocus(); return; }; if (itemEditorInstance){ if (!_arg1){ _local13 = DataGridEventReason.OTHER; } else { _local13 = (((!(editedItemPosition)) || ((_arg1.rowIndex == editedItemPosition.rowIndex)))) ? DataGridEventReason.NEW_COLUMN : DataGridEventReason.NEW_ROW; }; if (((!(endEdit(_local13))) && (!((_local13 == DataGridEventReason.OTHER))))){ return; }; }; _editedItemPosition = _arg1; if (!_arg1){ return; }; if (dontEdit){ return; }; _local2 = _arg1.rowIndex; _local3 = _arg1.columnIndex; if (displayableColumns.length != _columns.length){ _local14 = 0; while (_local14 < displayableColumns.length) { if (displayableColumns[_local14].colNum >= _local3){ _local3 = _local14; break; }; _local14++; }; if (_local14 == displayableColumns.length){ _local3 = 0; }; }; if (selectedIndex != _arg1.rowIndex){ commitSelectedIndex(_arg1.rowIndex); }; _local4 = (lockedRowCount - (headerVisible) ? 1 : 0); _local5 = (((verticalScrollPosition + listItems.length) - 1) - (headerVisible) ? 1 : 0); _local6 = (((rowInfo[(listItems.length - 1)].y + rowInfo[(listItems.length - 1)].height))>listContent.height) ? 1 : 0; if (_local2 > _local4){ if (_local2 < (verticalScrollPosition + _local4)){ verticalScrollPosition = (_local2 - _local4); } else { while ((((_local2 > _local5)) || ((((((_local2 == _local5)) && ((_local2 > (verticalScrollPosition + _local4))))) && (_local6))))) { if (verticalScrollPosition == maxVerticalScrollPosition){ break; }; verticalScrollPosition = Math.min((verticalScrollPosition + ((_local2 > _local5)) ? (_local2 - _local5) : _local6), maxVerticalScrollPosition); _local5 = (((verticalScrollPosition + listItems.length) - 1) - (headerVisible) ? 1 : 0); _local6 = (((rowInfo[(listItems.length - 1)].y + rowInfo[(listItems.length - 1)].height))>listContent.height) ? 1 : 0; }; }; actualRowIndex = ((_local2 - verticalScrollPosition) + (headerVisible) ? 1 : 0); } else { if (_local2 == _local4){ verticalScrollPosition = 0; }; actualRowIndex = (_local2 + (headerVisible) ? 1 : 0); }; _local7 = borderMetrics; _local8 = (((listItems) && (listItems[0]))) ? listItems[0].length : visibleColumns.length; _local9 = ((horizontalScrollPosition + _local8) - 1); _local10 = (((listItems[0][(_local8 - 1)].x + listItems[0][(_local8 - 1)].width))>listContent.width) ? 1 : 0; if (_local3 > lockedColumnCount){ if (_local3 < (horizontalScrollPosition + lockedColumnCount)){ horizontalScrollPosition = (_local3 - lockedColumnCount); } else { while ((((_local3 > _local9)) || ((((((_local3 == _local9)) && ((_local3 > (horizontalScrollPosition + lockedColumnCount))))) && (_local10))))) { if (horizontalScrollPosition == maxHorizontalScrollPosition){ break; }; horizontalScrollPosition = Math.min((horizontalScrollPosition + ((_local3 > _local9)) ? (_local3 - _local9) : _local10), maxHorizontalScrollPosition); _local8 = (((listItems) && (listItems[0]))) ? listItems[0].length : visibleColumns.length; _local9 = ((horizontalScrollPosition + _local8) - 1); _local10 = (((listItems[0][(_local8 - 1)].x + listItems[0][(_local8 - 1)].width))>listContent.width) ? 1 : 0; }; }; actualColIndex = (_local3 - horizontalScrollPosition); } else { if (_local3 == lockedColumnCount){ horizontalScrollPosition = 0; }; actualColIndex = _local3; }; _local11 = listItems[actualRowIndex][actualColIndex]; if (!_local11){ commitEditedItemPosition(null); return; }; _local12 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGIN, false, true); _local12.columnIndex = displayableColumns[_local3].colNum; _local12.rowIndex = _editedItemPosition.rowIndex; _local12.itemRenderer = _local11; dispatchEvent(_local12); lastEditedItemPosition = _editedItemPosition; if (bEditedItemPositionChanged){ bEditedItemPositionChanged = false; commitEditedItemPosition(_proposedEditedItemPosition); _proposedEditedItemPosition = undefined; }; if (!itemEditorInstance){ commitEditedItemPosition(null); }; } override protected function commitProperties():void{ var _local1:Number; var _local2:Number; var _local3:Object; var _local4:IListItemRenderer; var _local5:DataGridColumn; var _local6:Number; var _local7:int; var _local8:int; super.commitProperties(); if (itemsNeedMeasurement){ itemsNeedMeasurement = false; if (isNaN(explicitRowHeight)){ if (((iterator) && ((columns.length > 0)))){ if (!measuringObjects){ measuringObjects = new Dictionary(false); }; visibleColumns = columns; _local1 = getStyle("paddingTop"); _local2 = getStyle("paddingBottom"); _local3 = iterator.current; _local6 = 0; _local7 = columns.length; _local8 = 0; while (_local8 < _local7) { _local5 = columns[_local8]; if (!_local5.visible){ } else { _local4 = getMeasuringRenderer(_local5, false); setupRendererFromData(_local5, _local4, _local3); _local6 = Math.max(_local6, ((_local4.getExplicitOrMeasuredHeight() + _local2) + _local1)); }; _local8++; }; setRowHeight(Math.max(_local6, 20)); } else { setRowHeight(20); }; }; }; } private function adjustVerticalScrollPositionDownward(_arg1:int):Boolean{ var bookmark:CursorBookmark; var h:Number; var item:IListItemRenderer; var c:DataGridColumn; var ch:Number; var n:int; var j:int; var paddingTop:Number; var paddingBottom:Number; var numRows:int; var bMore:Boolean; var data:Object; var rowCount = _arg1; bookmark = iterator.bookmark; h = 0; ch = 0; paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); h = (rowInfo[(rowCount - 1)].y + rowInfo[(rowCount - 1)].height); h = (listContent.height - h); numRows = 0; try { if (iterator.afterLast){ iterator.seek(CursorBookmark.LAST, 0); } else { bMore = iterator.movePrevious(); }; } catch(e:ItemPendingError) { bMore = false; }; if (!bMore){ super.verticalScrollPosition = 0; try { iterator.seek(CursorBookmark.FIRST, 0); if (!iteratorValid){ iteratorValid = true; lastSeekPending = null; }; } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; invalidateList(); return (true); }; updateList(); return (true); }; while ((((h > 0)) && (bMore))) { if (bMore){ data = iterator.current; ch = 0; n = columns.length; j = 0; while (j < n) { c = columns[j]; if (!c.visible){ } else { if (variableRowHeight){ item = getMeasuringRenderer(c, false); setupRendererFromData(c, item, data); }; ch = Math.max(ch, (variableRowHeight) ? ((item.getExplicitOrMeasuredHeight() + paddingBottom) + paddingTop) : rowHeight); }; j = (j + 1); }; }; h = (h - ch); try { bMore = iterator.movePrevious(); numRows = (numRows + 1); } catch(e:ItemPendingError) { bMore = false; }; }; if (h < 0){ numRows = (numRows - 1); }; iterator.seek(bookmark, 0); verticalScrollPosition = Math.max(0, (verticalScrollPosition - numRows)); if ((((numRows > 0)) && (!(variableRowHeight)))){ configureScrollBars(); }; return ((numRows > 0)); } public function destroyItemEditor():void{ var _local1:DataGridEvent; if (itemEditorInstance){ DisplayObject(itemEditorInstance).removeEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler); stage.removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true); stage.removeEventListener(Event.RESIZE, editorStageResizeHandler, true); _local1 = new DataGridEvent(DataGridEvent.ITEM_FOCUS_OUT); _local1.columnIndex = _editedItemPosition.columnIndex; _local1.rowIndex = _editedItemPosition.rowIndex; _local1.itemRenderer = itemEditorInstance; dispatchEvent(_local1); if (!_columns[_editedItemPosition.columnIndex].rendererIsEditor){ if (((itemEditorInstance) && ((itemEditorInstance is UIComponent)))){ UIComponent(itemEditorInstance).drawFocus(false); }; listContent.removeChild(DisplayObject(itemEditorInstance)); editedItemRenderer.visible = true; }; itemEditorInstance = null; _editedItemPosition = null; }; } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } private function updateSortIndexAndDirection():void{ var _local1:ICollectionView; var _local2:Sort; var _local3:Array; var _local4:SortField; var _local5:int; var _local6:int; if (!sortableColumns){ lastSortIndex = sortIndex; sortIndex = -1; if (lastSortIndex != sortIndex){ invalidateDisplayList(); }; return; }; if (!dataProvider){ return; }; _local1 = ICollectionView(dataProvider); _local2 = _local1.sort; if (!_local2){ sortIndex = (lastSortIndex = -1); return; }; _local3 = _local2.fields; if (!_local3){ return; }; if (_local3.length != 1){ lastSortIndex = sortIndex; sortIndex = -1; if (lastSortIndex != sortIndex){ invalidateDisplayList(); }; return; }; _local4 = _local3[0]; _local5 = _columns.length; _local6 = 0; while (_local6 < _local5) { if (_columns[_local6].dataField == _local4.name){ sortIndex = (_columns[_local6].sortable) ? _local6 : -1; sortDirection = (_local4.descending) ? "DESC" : "ASC"; return; }; _local6++; }; } mx_internal function getSeparators():Array{ return (separators); } override protected function makeRowsAndColumns(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:uint=0):Point{ var _local9:Point; var _local10:Sprite; var _local11:DataGridColumn; var _local12:IListItemRenderer; var _local13:ListRowInfo; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; if (_arg1 == _arg3){ return (new Point(0, 0)); }; listContent.allowItemSizeChangeNotification = false; if (((headerVisible) && (itemsSizeChanged))){ calculateHeaderHeight(); }; _local9 = super.makeRowsAndColumns(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); if (itemEditorInstance){ listContent.setChildIndex(DisplayObject(itemEditorInstance), (listContent.numChildren - 1)); _local11 = visibleColumns[actualColIndex]; _local12 = listItems[actualRowIndex][actualColIndex]; _local13 = rowInfo[actualRowIndex]; if (((_local12) && (!(_local11.rendererIsEditor)))){ _local14 = _local11.editorXOffset; _local15 = _local11.editorYOffset; _local16 = _local11.editorWidthOffset; _local17 = _local11.editorHeightOffset; itemEditorInstance.move((_local12.x + _local14), (_local13.y + _local15)); itemEditorInstance.setActualSize(Math.min((_local11.width + _local16), ((listContent.width - listContent.x) - itemEditorInstance.x)), Math.min((_local13.height + _local17), ((listContent.height - listContent.y) - itemEditorInstance.y))); _local12.visible = false; }; }; _local10 = Sprite(listContent.getChildByName("lines")); if (_local10){ listContent.setChildIndex(_local10, (listContent.numChildren - 1)); }; listContent.allowItemSizeChangeNotification = variableRowHeight; return (_local9); } private function sortByColumn(_arg1:int):void{ var _local2:DataGridColumn; var _local3:Boolean; var _local4:Sort; var _local5:SortField; var _local6:String; var _local7:Array; var _local8:int; _local2 = columns[_arg1]; _local3 = _local2.sortDescending; if (_local2.sortable){ _local4 = collection.sort; if (_local4){ _local4.compareFunction = null; _local7 = _local4.fields; if (_local7){ _local8 = 0; while (_local8 < _local7.length) { if (_local7[_local8].name == _local2.dataField){ _local5 = _local7[_local8]; _local3 = !(_local5.descending); break; }; _local8++; }; }; } else { _local4 = new Sort(); }; if (!_local5){ _local5 = new SortField(_local2.dataField); }; _local2.sortDescending = _local3; _local6 = (_local3) ? "DESC" : "ASC"; sortDirection = _local6; lastSortIndex = sortIndex; sortIndex = _arg1; sortColumn = _local2; placeSortArrow(); _local5.name = _local2.dataField; if (_local2.sortCompareFunction != null){ _local5.compareFunction = _local2.sortCompareFunction; } else { _local5.compareFunction = null; }; _local5.descending = _local3; _local4.fields = [_local5]; }; collection.sort = _local4; collection.refresh(); } override protected function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Sprite; var _local4:Boolean; var _local5:int; var _local6:int; var _local7:Graphics; var _local8:Point; var _local9:Boolean; _local3 = Sprite(listContent.getChildByName("sortArrowHitArea")); if (_arg1.target == _local3){ _local2 = listItems[0][(sortIndex - visibleColumns[0].colNum)]; } else { _local2 = mouseEventToItemRenderer(_arg1); }; if (((((((enabled) && (((sortableColumns) || (draggableColumns))))) && (headerVisible))) && (listItems.length))){ _local5 = listItems[0].length; _local6 = 0; while (_local6 < listItems[0].length) { if (_local2 == listItems[0][_local6]){ if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; if (((sortableColumns) && (visibleColumns[_local6].sortable))){ lastItemDown = _local2; _local3 = Sprite(selectionLayer.getChildByName("headerSelection")); if (!_local3){ _local3 = new FlexSprite(); _local3.name = "headerSelection"; selectionLayer.addChild(_local3); }; _local7 = _local3.graphics; _local7.clear(); _local7.beginFill(getStyle("selectionColor")); _local7.drawRect(0, 0, visibleColumns[_local6].width, (rowInfo[0].height - 0.5)); _local7.endFill(); _local3.x = _local2.x; _local3.y = rowInfo[0].y; }; isPressed = true; if (draggableColumns){ startX = NaN; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, columnDraggingMouseMoveHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_UP, columnDraggingMouseUpHandler, true); movingColumn = visibleColumns[_local6]; }; return; }; _local6++; }; }; lastItemDown = null; _local4 = itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target)); if (!_local4){ if (((_local2) && (_local2.data))){ lastItemDown = _local2; _local8 = itemRendererToIndices(_local2); if (headerVisible){ _local8.y--; }; _local9 = true; if (itemEditorInstance){ _local9 = endEdit(((editedItemPosition.rowIndex == _local8.y)) ? DataGridEventReason.NEW_COLUMN : DataGridEventReason.NEW_ROW); }; if (!_local9){ return; }; } else { if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; }; super.mouseDownHandler(_arg1); }; } public function get minColumnWidth():Number{ return (_minColumnWidth); } override protected function mouseOutHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:int; var _local4:int; var _local5:Sprite; if (movingColumn){ return; }; if (((((((enabled) && (sortableColumns))) && (headerVisible))) && (listItems.length))){ _local5 = Sprite(listContent.getChildByName("sortArrowHitArea")); if (_arg1.target != _local5){ _local2 = mouseEventToItemRenderer(_arg1); }; _local3 = listItems[0].length; _local4 = 0; while (_local4 < _local3) { if (((((!(_local2)) && ((_local5 == _arg1.target)))) && ((visibleColumns[_local4].colNum == sortIndex)))){ _local2 = listItems[0][_local4]; }; if (_local2 == listItems[0][_local4]){ if (visibleColumns[_local4].sortable){ _local5 = Sprite(selectionLayer.getChildByName("headerSelection")); if (_local5){ selectionLayer.removeChild(_local5); }; }; return; }; _local4++; }; }; lastItemDown = null; super.mouseOutHandler(_arg1); } protected function drawColumnBackground(_arg1:Sprite, _arg2:int, _arg3:uint, _arg4:DataGridColumn):void{ var _local5:Shape; var _local6:Graphics; var _local7:Object; var _local8:Number; var _local9:Number; var _local10:Number; _local5 = Shape(_arg1.getChildByName(_arg2.toString())); if (!_local5){ _local5 = new FlexShape(); _arg1.addChild(_local5); _local5.name = _arg2.toString(); }; _local6 = _local5.graphics; _local6.clear(); _local6.beginFill(_arg3); _local7 = rowInfo[(listItems.length - 1)]; _local8 = listItems[0][_arg2].x; _local9 = rowInfo[0].y; if (headerVisible){ _local9 = (_local9 + rowInfo[0].height); }; _local10 = Math.min((_local7.y + _local7.height), (listContent.height - _local9)); _local6.drawRect(_local8, _local9, listItems[0][_arg2].width, (listContent.height - _local9)); _local6.endFill(); } override protected function configureScrollBars():void{ var _local1:Object; var _local2:Object; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local1 = horizontalScrollBar; _local2 = verticalScrollBar; _local3 = listItems.length; if (_local3 == 0){ if (((_local1) || (_local2))){ setScrollBarProperties(0, 0, 0, 0); }; return; }; if ((((_local3 > (headerVisible) ? 2 : 1)) && (((rowInfo[(_local3 - 1)].y + rowInfo[(_local3 - 1)].height) > listContent.height)))){ _local3--; }; _local4 = (verticalScrollPosition - lockedRowCount); _local5 = 0; while (((_local3) && ((listItems[(_local3 - 1)].length == 0)))) { if (((collection) && (((_local3 + _local4) >= collection.length)))){ _local3--; _local5++; } else { break; }; }; if ((((verticalScrollPosition > 0)) && ((_local5 > 0)))){ if (adjustVerticalScrollPositionDownward(Math.max(_local3, 1))){ return; }; }; _local6 = (listItems.length) ? listItems[0].length : visibleColumns.length; if ((((((_local6 > 1)) && ((visibleColumns[(_local6 - 1)] == displayableColumns[(displayableColumns.length - 1)])))) && (((listItems[0][(_local6 - 1)].x + visibleColumns[(_local6 - 1)].width) > listContent.width)))){ _local6--; }; _local7 = (headerVisible) ? 1 : 0; setScrollBarProperties((displayableColumns.length - lockedColumnCount), Math.max((_local6 - lockedColumnCount), 1), (collection) ? ((collection.length - lockedRowCount) + _local7) : 0, Math.max((_local3 - lockedRowCount), 1)); } override protected function calculateRowHeight(_arg1:Object, _arg2:Number, _arg3:Boolean=false):Number{ var _local4:IListItemRenderer; var _local5:DataGridColumn; var _local6:int; var _local7:int; var _local8:int; var _local9:Number; var _local10:Number; _local6 = columns.length; _local8 = 0; if (((_arg3) && ((visibleColumns.length == _columns.length)))){ return (_arg2); }; _local9 = getStyle("paddingTop"); _local10 = getStyle("paddingBottom"); if (!measuringObjects){ measuringObjects = new Dictionary(false); }; _local7 = 0; while (_local7 < _local6) { if (((((_arg3) && ((_local8 < visibleColumns.length)))) && ((visibleColumns[_local8].colNum == columns[_local7].colNum)))){ _local8++; } else { _local5 = columns[_local7]; if (!_local5.visible){ } else { _local4 = getMeasuringRenderer(_local5, false); setupRendererFromData(_local5, _local4, _arg1); _arg2 = Math.max(_arg2, ((_local4.getExplicitOrMeasuredHeight() + _local10) + _local9)); }; }; _local7++; }; return (_arg2); } public function set draggableColumns(_arg1:Boolean):void{ _draggableColumns = _arg1; } private function editorKeyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ESCAPE){ endEdit(DataGridEventReason.CANCELLED); } else { if (((_arg1.ctrlKey) && ((_arg1.charCode == 46)))){ endEdit(DataGridEventReason.CANCELLED); } else { if ((((_arg1.charCode == Keyboard.ENTER)) && (!((_arg1.keyCode == 229))))){ if (columns[_editedItemPosition.columnIndex].editorUsesEnterKey){ return; }; if (((endEdit(DataGridEventReason.NEW_ROW)) && (!(dontEdit)))){ findNextEnterItemRenderer(_arg1); }; }; }; }; } override public function get columnCount():int{ if (_columns){ return (_columns.length); }; return (0); } private function calculateColumnSizes():void{ var _local1:Number; var _local2:int; var _local3:int; var _local4:Number; var _local5:DataGridColumn; var _local6:DataGridColumn; var _local7:Number; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local4 = 0; if (columns.length == 0){ visibleColumns = []; return; }; if (columnsInvalid){ columnsInvalid = false; visibleColumns = []; if (minColumnWidthInvalid){ _local2 = columns.length; _local3 = 0; while (_local3 < _local2) { columns[_local3].minWidth = minColumnWidth; _local3++; }; minColumnWidthInvalid = false; }; displayableColumns = null; _local2 = _columns.length; _local3 = 0; while (_local3 < _local2) { if (((displayableColumns) && (_columns[_local3].visible))){ displayableColumns.push(_columns[_local3]); } else { if (((!(displayableColumns)) && (!(_columns[_local3].visible)))){ displayableColumns = new Array(_local3); _local8 = 0; while (_local8 < _local3) { displayableColumns[_local8] = _columns[_local8]; _local8++; }; }; }; _local3++; }; if (!displayableColumns){ displayableColumns = _columns; }; if (horizontalScrollPolicy == ScrollPolicy.OFF){ _local2 = displayableColumns.length; _local3 = 0; while (_local3 < _local2) { visibleColumns.push(displayableColumns[_local3]); _local3++; }; } else { _local2 = displayableColumns.length; _local3 = 0; while (_local3 < _local2) { if ((((_local3 >= lockedColumnCount)) && ((_local3 < (lockedColumnCount + horizontalScrollPosition))))){ } else { _local5 = displayableColumns[_local3]; if (_local4 < displayWidth){ visibleColumns.push(_local5); _local4 = (_local4 + _local5.width); } else { if (visibleColumns.length == 0){ visibleColumns.push(displayableColumns[0]); }; break; }; }; _local3++; }; }; }; if (horizontalScrollPolicy == ScrollPolicy.OFF){ _local9 = 0; _local10 = 0; _local2 = visibleColumns.length; _local3 = 0; while (_local3 < _local2) { if (visibleColumns[_local3].resizable){ if (!isNaN(visibleColumns[_local3].explicitWidth)){ _local10 = (_local10 + visibleColumns[_local3].width); } else { _local9++; _local10 = (_local10 + visibleColumns[_local3].minWidth); }; } else { _local10 = (_local10 + visibleColumns[_local3].width); }; _local4 = (_local4 + visibleColumns[_local3].width); _local3++; }; _local12 = displayWidth; if ((((displayWidth > _local10)) && (_local9))){ _local2 = visibleColumns.length; _local3 = 0; while (_local3 < _local2) { if (((visibleColumns[_local3].resizable) && (isNaN(visibleColumns[_local3].explicitWidth)))){ _local6 = visibleColumns[_local3]; if (_local4 > displayWidth){ _local11 = ((_local6.width - _local6.minWidth) / (_local4 - _local10)); } else { _local11 = (_local6.width / _local4); }; _local7 = (_local6.width - ((_local4 - displayWidth) * _local11)); _local13 = visibleColumns[_local3].minWidth; visibleColumns[_local3].setWidth(((_local7 > _local13)) ? _local7 : _local13); }; _local12 = (_local12 - visibleColumns[_local3].width); _local3++; }; if (((_local12) && (_local6))){ _local6.setWidth((_local6.width + _local12)); }; } else { _local2 = visibleColumns.length; _local3 = 0; while (_local3 < _local2) { _local6 = visibleColumns[_local3]; _local11 = (_local6.width / _local4); _local7 = (displayWidth * _local11); _local6.setWidth(_local7); _local6.explicitWidth = NaN; _local12 = (_local12 - _local7); _local3++; }; if (((_local12) && (_local6))){ _local6.setWidth((_local6.width + _local12)); }; }; } else { _local4 = 0; _local2 = visibleColumns.length; _local3 = 0; while (_local3 < _local2) { if (_local4 > displayWidth){ visibleColumns.splice(_local3); break; }; _local4 = (_local4 + visibleColumns[_local3].width); _local3++; }; _local3 = (visibleColumns[(visibleColumns.length - 1)].colNum + 1); if ((((_local4 < displayWidth)) && ((_local3 < displayableColumns.length)))){ _local2 = displayableColumns.length; while ((((_local3 < _local2)) && ((_local4 < displayWidth)))) { _local5 = displayableColumns[_local3]; visibleColumns.push(_local5); _local4 = (_local4 + _local5.width); _local3++; }; }; _local6 = visibleColumns[(visibleColumns.length - 1)]; _local7 = ((_local6.width + displayWidth) - _local4); if ((((((((((_local6 == displayableColumns[(displayableColumns.length - 1)])) && (_local6.resizable))) && ((_local7 >= _local6.minWidth)))) && ((_local7 > _local6.width)))) || ((((_local7 < _local6.width)) && ((_local7 >= (displayWidth / visibleColumns.length))))))){ _local6.setWidth(_local7); }; maxHorizontalScrollPosition = ((displayableColumns.length - visibleColumns.length) + 1); }; } public function get editedItemRenderer():IListItemRenderer{ if (!itemEditorInstance){ return (null); }; return (listItems[actualRowIndex][actualColIndex]); } protected function drawRowBackground(_arg1:Sprite, _arg2:int, _arg3:Number, _arg4:Number, _arg5:uint, _arg6:int):void{ var _local7:Shape; var _local8:Graphics; if (_arg2 < _arg1.numChildren){ _local7 = Shape(_arg1.getChildAt(_arg2)); } else { _local7 = new FlexShape(); _local7.name = "background"; _arg1.addChild(_local7); }; _local7.y = _arg3; _arg4 = Math.min(_arg4, (listContent.height - _arg3)); _local8 = _local7.graphics; _local8.clear(); _local8.beginFill(_arg5, getStyle("backgroundAlpha")); _local8.drawRect(0, 0, displayWidth, _arg4); _local8.endFill(); } mx_internal function getMeasuringRenderer(_arg1:DataGridColumn, _arg2:Boolean):IListItemRenderer{ var _local3:IFactory; var _local4:IListItemRenderer; _local3 = columnItemRendererFactory(_arg1, _arg2); _local4 = measuringObjects[_local3]; if (!_local4){ _local4 = columnItemRenderer(_arg1, _arg2); _local4.visible = false; _local4.styleName = _arg1; listContent.addChild(DisplayObject(_local4)); measuringObjects[_local3] = _local4; }; return (_local4); } protected function drawVerticalLine(_arg1:Sprite, _arg2:int, _arg3:uint, _arg4:Number):void{ var _local5:Graphics; _local5 = _arg1.graphics; if ((((lockedColumnCount > 0)) && ((_arg2 == (lockedColumnCount - 1))))){ _local5.lineStyle(1, 0, 100); } else { _local5.lineStyle(1, _arg3, 100); }; _local5.moveTo(_arg4, 1); _local5.lineTo(_arg4, listContent.height); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:UIComponent; var _local4:Number; if (displayWidth != ((_arg1 - viewMetrics.right) - viewMetrics.left)){ displayWidth = ((_arg1 - viewMetrics.right) - viewMetrics.left); columnsInvalid = true; }; calculateColumnSizes(); super.updateDisplayList(_arg1, _arg2); if (((collection) && (collection.length))){ setRowCount(listItems.length); if (listItems.length){ setColumnCount(listItems[0].length); } else { setColumnCount(0); }; }; if (_horizontalScrollPolicy == ScrollPolicy.OFF){ if (((!((verticalScrollBar == null))) && (headerVisible))){ _local4 = (rowInfo.length) ? rowInfo[0].height : headerHeight; verticalScrollBar.move(verticalScrollBar.x, (viewMetrics.top + _local4)); verticalScrollBar.setActualSize(verticalScrollBar.width, (((_arg2 - viewMetrics.top) - viewMetrics.bottom) - _local4)); verticalScrollBar.visible = (verticalScrollBar.height >= verticalScrollBar.minHeight); }; }; if (bEditedItemPositionChanged){ bEditedItemPositionChanged = false; commitEditedItemPosition(_proposedEditedItemPosition); _proposedEditedItemPosition = undefined; invalidateDisplayList(); }; _local3 = UIComponent(listContent.getChildByName("headerBG")); if (!_local3){ _local3 = new UIComponent(); _local3.name = "headerBG"; listContent.addChildAt(_local3, listContent.getChildIndex(selectionLayer)); }; if (headerVisible){ _local3.visible = true; drawHeaderBackground(_local3); } else { _local3.visible = false; }; drawRowBackgrounds(); drawLinesAndColumnBackgrounds(); placeSortArrow(); if (headerVisible){ drawSeparators(); } else { clearSeparators(); }; } override public function measureWidthOfItems(_arg1:int=-1, _arg2:int=0):Number{ var _local3:Number; var _local4:int; var _local5:int; _local3 = 0; _local4 = (columns) ? columns.length : 0; _local5 = 0; while (_local5 < _local4) { if (columns[_local5].visible){ _local3 = (_local3 + columns[_local5].width); }; _local5++; }; return (_local3); } mx_internal function columnItemRendererFactory(_arg1:DataGridColumn, _arg2:Boolean):IFactory{ if (_arg2){ if (_arg1.headerRenderer){ return (_arg1.headerRenderer); }; } else { if (_arg1.itemRenderer){ return (_arg1.itemRenderer); }; }; return (itemRenderer); } private function itemEditorItemEditEndHandler(_arg1:DataGridEvent):void{ var _local2:Boolean; var _local3:Object; var _local4:String; var _local5:Object; var _local6:String; var _local7:XML; var _local8:DataGridListData; var _local9:IFocusManager; if (!_arg1.isDefaultPrevented()){ _local2 = false; if (_arg1.reason == DataGridEventReason.NEW_COLUMN){ if (!collectionUpdatesDisabled){ collection.disableAutoUpdate(); collectionUpdatesDisabled = true; }; } else { if (collectionUpdatesDisabled){ collection.enableAutoUpdate(); collectionUpdatesDisabled = false; }; }; if (((itemEditorInstance) && (!((_arg1.reason == DataGridEventReason.CANCELLED))))){ _local3 = itemEditorInstance[_columns[_arg1.columnIndex].editorDataField]; _local4 = _columns[_arg1.columnIndex].dataField; _local5 = _arg1.itemRenderer.data; _local6 = ""; for each (_local7 in describeType(_local5).variable) { if (_local4 == _local7.@name.toString()){ _local6 = _local7.@type.toString(); break; }; }; if (_local6 == "String"){ if (!(_local3 is String)){ _local3 = _local3.toString(); }; } else { if (_local6 == "uint"){ if (!(_local3 is uint)){ _local3 = uint(_local3); }; } else { if (_local6 == "int"){ if (!(_local3 is int)){ _local3 = int(_local3); }; } else { if (_local6 == "Number"){ if (!(_local3 is int)){ _local3 = Number(_local3); }; }; }; }; }; if (_local5[_local4] != _local3){ _local2 = true; _local5[_local4] = _local3; }; if (((_local2) && (!((_local5 is IPropertyChangeNotifier))))){ collection.itemUpdated(_local5, _local4); }; if ((_arg1.itemRenderer is IDropInListItemRenderer)){ _local8 = DataGridListData(IDropInListItemRenderer(_arg1.itemRenderer).listData); _local8.label = _columns[_arg1.columnIndex].itemToLabel(_local5); IDropInListItemRenderer(_arg1.itemRenderer).listData = _local8; }; _arg1.itemRenderer.data = _local5; }; } else { if (_arg1.reason != DataGridEventReason.OTHER){ if (((itemEditorInstance) && (_editedItemPosition))){ if (selectedIndex != _editedItemPosition.rowIndex){ selectedIndex = _editedItemPosition.rowIndex; }; _local9 = focusManager; if ((itemEditorInstance is IFocusManagerComponent)){ _local9.setFocus(IFocusManagerComponent(itemEditorInstance)); }; }; }; }; if ((((_arg1.reason == DataGridEventReason.OTHER)) || (!(_arg1.isDefaultPrevented())))){ destroyItemEditor(); }; } mx_internal function measureHeightOfItemsUptoMaxHeight(_arg1:int=-1, _arg2:int=0, _arg3:Number=-1):Number{ var h:Number; var item:IListItemRenderer; var c:DataGridColumn; var ch:Number; var n:int; var j:int; var paddingTop:Number; var paddingBottom:Number; var lockedCount:int; var bookmark:CursorBookmark; var bMore:Boolean; var i:int; var data:Object; var index = _arg1; var count = _arg2; var maxHeight = _arg3; if (!columns.length){ return ((rowHeight * count)); }; h = 0; ch = 0; paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); if (!measuringObjects){ measuringObjects = new Dictionary(false); }; lockedCount = lockedRowCount; if (((((((headerVisible) && ((count > 0)))) && ((lockedCount > 0)))) && ((index == -1)))){ h = calculateHeaderHeight(); if (((!((maxHeight == -1))) && ((h > maxHeight)))){ setRowCount(0); return (0); }; count = (count - 1); lockedCount = (lockedCount - 1); }; bookmark = (iterator) ? iterator.bookmark : null; bMore = !((iterator == null)); if (((!((index == -1))) && (iterator))){ try { iterator.seek(CursorBookmark.FIRST, index); } catch(e:ItemPendingError) { bMore = false; }; }; if (lockedCount > 0){ try { collectionIterator.seek(CursorBookmark.FIRST, 0); } catch(e:ItemPendingError) { bMore = false; }; }; i = 0; while (i < count) { if (bMore){ data = ((lockedCount)>0) ? collectionIterator.current : iterator.current; ch = 0; n = columns.length; j = 0; while (j < n) { c = columns[j]; if (!c.visible){ } else { item = getMeasuringRenderer(c, false); setupRendererFromData(c, item, data); ch = Math.max(ch, (variableRowHeight) ? ((item.getExplicitOrMeasuredHeight() + paddingBottom) + paddingTop) : rowHeight); }; j = (j + 1); }; }; if (((!((maxHeight == -1))) && (((((h + ch) > maxHeight)) || (!(bMore)))))){ try { iterator.seek(bookmark, 0); } catch(e:ItemPendingError) { }; count = (headerVisible) ? (i + 1) : i; setRowCount(count); return (h); }; h = (h + ch); if (iterator){ try { bMore = iterator.moveNext(); if (lockedCount > 0){ collectionIterator.moveNext(); lockedCount = (lockedCount - 1); }; } catch(e:ItemPendingError) { bMore = false; }; }; i = (i + 1); }; if (iterator){ try { iterator.seek(bookmark, 0); } catch(e:ItemPendingError) { }; }; return (h); } public function get editedItemPosition():Object{ if (_editedItemPosition){ return ({rowIndex:_editedItemPosition.rowIndex, columnIndex:_editedItemPosition.columnIndex}); }; return (_editedItemPosition); } private function deactivateHandler(_arg1:Event):void{ if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); losingFocus = true; setFocus(); }; } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:Boolean; var _local3:Array; if (_arg1.target != this){ return; }; if (losingFocus){ losingFocus = false; return; }; super.focusInHandler(_arg1); if (((editable) && (!(isPressed)))){ _editedItemPosition = lastEditedItemPosition; _local2 = !((editedItemPosition == null)); if (!_editedItemPosition){ _editedItemPosition = {rowIndex:0, columnIndex:0}; while (_editedItemPosition.columnIndex != _columns.length) { if (((_columns[_editedItemPosition.columnIndex].editable) && (_columns[_editedItemPosition.columnIndex].visible))){ _local3 = listItems[(_editedItemPosition.rowIndex + (headerVisible) ? 1 : 0)]; if (((_local3) && (_local3[_editedItemPosition.columnIndex]))){ _local2 = true; break; }; }; _editedItemPosition.columnIndex++; }; }; if (_local2){ setEditedItemPosition(_editedItemPosition); }; }; if (editable){ addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler); }; } override protected function get dragImage():IUIComponent{ var _local1:DataGridDragProxy; _local1 = new DataGridDragProxy(); _local1.owner = this; return (_local1); } private function itemEditorFocusOutHandler(_arg1:FocusEvent):void{ if (((_arg1.relatedObject) && (contains(_arg1.relatedObject)))){ return; }; if (!_arg1.relatedObject){ return; }; if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; } public function set minColumnWidth(_arg1:Number):void{ _minColumnWidth = _arg1; minColumnWidthInvalid = true; itemsSizeChanged = true; columnsInvalid = true; invalidateDisplayList(); } private function generateColumnsPendingResultHandler(_arg1:Object, _arg2:ListBaseSeekPending):void{ if (columns.length == 0){ generateCols(); }; seekPendingResultHandler(_arg1, _arg2); } mx_internal function shiftColumns(_arg1:int, _arg2:int, _arg3:Event=null):void{ var _local4:int; var _local5:int; var _local6:IndexChangedEvent; var _local7:int; var _local8:DataGridColumn; if ((((_arg2 >= 0)) && (!((_arg1 == _arg2))))){ _local4 = ((_arg1 < _arg2)) ? 1 : -1; _local5 = _arg1; while (_local5 != _arg2) { _local7 = (_local5 + _local4); _local8 = _columns[_local5]; _columns[_local5] = _columns[_local7]; _columns[_local7] = _local8; _columns[_local5].colNum = _local5; _columns[_local7].colNum = _local7; _local5 = (_local5 + _local4); }; if (sortIndex == _arg1){ sortIndex = (sortIndex + (_arg2 - _arg1)); } else { if ((((((_arg1 < sortIndex)) && ((sortIndex <= _arg2)))) || ((((_arg2 <= sortIndex)) && ((sortIndex < _arg1)))))){ sortIndex = (sortIndex - _local4); }; }; if (lastSortIndex == _arg1){ lastSortIndex = (lastSortIndex + (_arg2 - _arg1)); } else { if ((((((_arg1 < lastSortIndex)) && ((lastSortIndex <= _arg2)))) || ((((_arg2 <= lastSortIndex)) && ((lastSortIndex < _arg1)))))){ lastSortIndex = (lastSortIndex - _local4); }; }; columnsInvalid = true; itemsSizeChanged = true; invalidateDisplayList(); _local6 = new IndexChangedEvent(IndexChangedEvent.HEADER_SHIFT); _local6.oldIndex = _arg1; _local6.newIndex = _arg2; _local6.triggerEvent = _arg3; dispatchEvent(_local6); }; } private function findNextEnterItemRenderer(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:DataGridEvent; if (_proposedEditedItemPosition !== undefined){ return; }; _editedItemPosition = lastEditedItemPosition; _local2 = _editedItemPosition.rowIndex; _local3 = _editedItemPosition.columnIndex; _local4 = (_editedItemPosition.rowIndex + (_arg1.shiftKey) ? -1 : 1); if ((((_local4 < collection.length)) && ((_local4 >= 0)))){ _local2 = _local4; }; _local5 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true); _local5.columnIndex = _local3; _local5.dataField = _columns[_local3].dataField; _local5.rowIndex = _local2; dispatchEvent(_local5); } public function get imeMode():String{ return (_imeMode); } mx_internal function setupRendererFromData(_arg1:DataGridColumn, _arg2:IListItemRenderer, _arg3:Object):void{ var _local4:DataGridListData; _local4 = DataGridListData(makeListData(_arg3, itemToUID(_arg3), 0, _arg1.colNum, _arg1)); if ((_arg2 is IDropInListItemRenderer)){ IDropInListItemRenderer(_arg2).listData = (_arg3) ? _local4 : null; }; _arg2.data = _arg3; _arg2.explicitWidth = getWidthOfItem(_arg2, _arg1); UIComponentGlobals.layoutManager.validateClient(_arg2, true); } override protected function drawRowBackgrounds():void{ var _local1:Sprite; var _local2:Array; var _local3:int; var _local4:int; var _local5:int; var _local6:int; _local1 = Sprite(listContent.getChildByName("rowBGs")); if (!_local1){ _local1 = new FlexSprite(); _local1.mouseEnabled = false; _local1.name = "rowBGs"; listContent.addChildAt(_local1, 0); }; _local2 = getStyle("alternatingItemColors"); if (((!(_local2)) || ((_local2.length == 0)))){ return; }; StyleManager.getColorNames(_local2); _local3 = 0; if (headerVisible){ _local3++; }; _local4 = 0; _local5 = verticalScrollPosition; _local6 = listItems.length; while (_local3 < _local6) { var _temp1 = _local4; _local4 = (_local4 + 1); drawRowBackground(_local1, _temp1, rowInfo[_local3].y, rowInfo[_local3].height, _local2[(_local5 % _local2.length)], _local5); _local3++; _local5++; }; while (_local1.numChildren > _local4) { _local1.removeChildAt((_local1.numChildren - 1)); }; } private function itemEditorItemEditBeginHandler(_arg1:DataGridEvent):void{ var _local2:IFocusManager; if (stage){ stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); }; if (((!(_arg1.isDefaultPrevented())) && (!((listItems[actualRowIndex][actualColIndex].data == null))))){ createItemEditor(_arg1.columnIndex, _arg1.rowIndex); if ((((editedItemRenderer is IDropInListItemRenderer)) && ((itemEditorInstance is IDropInListItemRenderer)))){ IDropInListItemRenderer(itemEditorInstance).listData = IDropInListItemRenderer(editedItemRenderer).listData; }; if (!columns[_arg1.columnIndex].rendererIsEditor){ itemEditorInstance.data = editedItemRenderer.data; }; if ((itemEditorInstance is IInvalidating)){ IInvalidating(itemEditorInstance).validateNow(); }; if ((itemEditorInstance is IIMESupport)){ IIMESupport(itemEditorInstance).imeMode = ((columns[_arg1.columnIndex].imeMode)==null) ? _imeMode : columns[_arg1.columnIndex].imeMode; }; _local2 = focusManager; if ((itemEditorInstance is IFocusManagerComponent)){ _local2.setFocus(IFocusManagerComponent(itemEditorInstance)); }; _local2.defaultButtonEnabled = false; _arg1 = new DataGridEvent(DataGridEvent.ITEM_FOCUS_IN); _arg1.columnIndex = _editedItemPosition.columnIndex; _arg1.rowIndex = _editedItemPosition.rowIndex; _arg1.itemRenderer = itemEditorInstance; dispatchEvent(_arg1); }; } private function headerReleaseHandler(_arg1:DataGridEvent):void{ if (!_arg1.isDefaultPrevented()){ manualSort = true; sortByColumn(_arg1.columnIndex); manualSort = false; }; } mx_internal function resizeColumn(_arg1:int, _arg2:Number):void{ var _local3:Number; var _local4:int; var _local5:DataGridColumn; var _local6:int; var _local7:Number; var _local8:Number; var _local9:Number; if (((!(visibleColumns)) || ((visibleColumns.length == 0)))){ columns[_arg1].setWidth(_arg2); return; }; if (_arg2 < visibleColumns[_arg1].minWidth){ _arg2 = visibleColumns[_arg1].minWidth; }; if ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((_horizontalScrollPolicy == ScrollPolicy.AUTO)))){ visibleColumns[_arg1].setWidth(_arg2); visibleColumns[_arg1].explicitWidth = _arg2; columnsInvalid = true; } else { _local3 = 0; _local4 = visibleColumns.length; _local6 = (_arg1 + 1); while (_local6 < _local4) { if (visibleColumns[_local6].resizable){ _local3 = (_local3 + visibleColumns[_local6].width); }; _local6++; }; _local8 = ((visibleColumns[_arg1].width - _arg2) + _local3); if (_local3){ visibleColumns[_arg1].setWidth(_arg2); visibleColumns[_arg1].explicitWidth = _arg2; }; _local9 = 0; _local6 = (_arg1 + 1); while (_local6 < _local4) { if (visibleColumns[_local6].resizable){ _local7 = Math.floor(((visibleColumns[_local6].width * _local8) / _local3)); if (_local7 < visibleColumns[_local6].minWidth){ _local7 = visibleColumns[_local6].minWidth; }; visibleColumns[_local6].setWidth(_local7); _local9 = (_local9 + visibleColumns[_local6].width); _local5 = visibleColumns[_local6]; }; _local6++; }; if (_local9 > _local8){ _local7 = ((visibleColumns[_arg1].width - _local9) + _local8); if (_local7 < visibleColumns[_arg1].minWidth){ _local7 = visibleColumns[_arg1].minWidth; }; visibleColumns[_arg1].setWidth(_local7); } else { if (_local5){ _local5.setWidth(((_local5.width - _local9) + _local8)); }; }; }; itemsSizeChanged = true; invalidateDisplayList(); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:int; var _local3:Number; var _local4:Number; var _local5:int; super.measure(); _local1 = viewMetrics; _local2 = columns.length; if (_local2 == 0){ measuredWidth = DEFAULT_MEASURED_WIDTH; measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; return; }; _local3 = 0; _local4 = 0; _local5 = 0; while (_local5 < _local2) { if (columns[_local5].visible){ _local3 = (_local3 + columns[_local5].preferredWidth); if (isNaN(_minColumnWidth)){ _local4 = (_local4 + columns[_local5].minWidth); }; }; _local5++; }; if (!isNaN(_minColumnWidth)){ _local4 = (_local2 * _minColumnWidth); }; measuredWidth = ((_local3 + _local1.left) + _local1.right); measuredMinWidth = ((_local4 + _local1.left) + _local1.right); if ((((verticalScrollPolicy == ScrollPolicy.AUTO)) && (verticalScrollBar))){ measuredWidth = (measuredWidth - verticalScrollBar.minWidth); measuredMinWidth = (measuredMinWidth - verticalScrollBar.minWidth); }; if ((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && (horizontalScrollBar))){ measuredHeight = (measuredHeight - horizontalScrollBar.minHeight); measuredMinHeight = (measuredMinHeight - horizontalScrollBar.minHeight); }; } override protected function calculateDropIndicatorY(_arg1:Number, _arg2:int):Number{ if (((headerVisible) && ((_arg2 < (listItems.length - 1))))){ _arg2++; }; return (super.calculateDropIndicatorY(_arg1, _arg2)); } private function endEdit(_arg1:String):Boolean{ var _local2:DataGridEvent; if (!editedItemRenderer){ return (true); }; inEndEdit = true; _local2 = new DataGridEvent(DataGridEvent.ITEM_EDIT_END, false, true); _local2.columnIndex = editedItemPosition.columnIndex; _local2.dataField = _columns[editedItemPosition.columnIndex].dataField; _local2.rowIndex = editedItemPosition.rowIndex; _local2.itemRenderer = editedItemRenderer; _local2.reason = _arg1; dispatchEvent(_local2); dontEdit = !((itemEditorInstance == null)); if (((!(dontEdit)) && ((_arg1 == DataGridEventReason.CANCELLED)))){ losingFocus = true; setFocus(); }; inEndEdit = false; return (!(_local2.isDefaultPrevented())); } private function columnResizeMouseOutHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; var _local3:int; if (((!(enabled)) || (!(resizableColumns)))){ return; }; _local2 = DisplayObject(_arg1.target); _local3 = _local2.parent.getChildIndex(_local2); if (!visibleColumns[_local3].resizable){ return; }; CursorManager.removeCursor(resizeCursorID); } private function editorStageResizeHandler(_arg1:Event):void{ if (!owns(DisplayObject(_arg1.target))){ endEdit(DataGridEventReason.OTHER); }; } override protected function mouseOverHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:int; var _local4:int; var _local5:Sprite; var _local6:Graphics; if (movingColumn){ return; }; if (((((((((enabled) && (sortableColumns))) && (headerVisible))) && (listItems.length))) && (!(isPressed)))){ _local5 = Sprite(listContent.getChildByName("sortArrowHitArea")); if (_arg1.target != _local5){ _local2 = mouseEventToItemRenderer(_arg1); }; _local3 = listItems[0].length; _local4 = 0; while (_local4 < _local3) { if (((((!(_local2)) && ((_local5 == _arg1.target)))) && ((visibleColumns[_local4].colNum == sortIndex)))){ _local2 = listItems[0][_local4]; }; if (_local2 == listItems[0][_local4]){ if (visibleColumns[_local4].sortable){ _local5 = Sprite(selectionLayer.getChildByName("headerSelection")); if (!_local5){ _local5 = new FlexSprite(); _local5.name = "headerSelection"; selectionLayer.addChild(_local5); }; _local6 = _local5.graphics; _local6.clear(); _local6.beginFill(getStyle("rollOverColor")); _local6.drawRect(0, 0, visibleColumns[_local4].width, (rowInfo[0].height - 0.5)); _local6.endFill(); _local5.x = _local2.x; _local5.y = rowInfo[0].y; }; return; }; _local4++; }; }; lastItemDown = null; super.mouseOverHandler(_arg1); } private function editorMouseDownHandler(_arg1:MouseEvent):void{ if (!owns(DisplayObject(_arg1.target))){ endEdit(DataGridEventReason.OTHER); }; } private function generateCols():void{ var col:DataGridColumn; var newCols:Array; var cols:Array; var info:Object; var itmObj:Object; var p:String; var n:int; var colName:Object; var i:int; if (collection.length > 0){ newCols = []; if (dataProvider){ try { iterator.seek(CursorBookmark.FIRST); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(generateColumnsPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; return; }; info = ObjectUtil.getClassInfo(iterator.current, ["uid", "mx_internal_uid"]); if (info){ cols = info.properties; }; }; if (!cols){ itmObj = iterator.current; for (p in itmObj) { if (p != "uid"){ col = new DataGridColumn(); col.dataField = p; newCols.push(col); }; }; } else { n = cols.length; i = 0; while (i < n) { colName = cols[i]; if ((colName is QName)){ colName = QName(colName).localName; }; col = new DataGridColumn(); col.dataField = String(colName); newCols.push(col); i = (i + 1); }; }; columns = newCols; generatedColumns = true; }; } private function columnResizeMouseDownHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; var _local3:int; var _local4:int; var _local5:int; var _local6:Class; if (((!(enabled)) || (!(resizableColumns)))){ return; }; _local2 = DisplayObject(_arg1.target); _local3 = _local2.parent.getChildIndex(_local2); if (!visibleColumns[_local3].resizable){ return; }; if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; startX = DisplayObject(_arg1.target).x; _local4 = separators.length; _local5 = 0; while (_local5 < _local4) { if (separators[_local5] == _arg1.target){ resizingColumn = visibleColumns[_local5]; break; }; _local5++; }; if (!resizingColumn){ return; }; minX = (listItems[0][_local5].x + resizingColumn.minWidth); isPressed = true; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, columnResizingHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_UP, columnResizeMouseUpHandler, true); _local6 = getStyle("columnResizeSkin"); resizeGraphic = new (_local6); listContent.addChild(DisplayObject(resizeGraphic)); resizeGraphic.move(DisplayObject(_arg1.target).x, 0); resizeGraphic.setActualSize(resizeGraphic.measuredWidth, unscaledHeight); } override protected function scrollVertically(_arg1:int, _arg2:int, _arg3:Boolean):void{ var _local4:int; _local4 = (headerVisible) ? 1 : 0; iterator.seek(CursorBookmark.CURRENT, (lockedRowCount - _local4)); super.scrollVertically(_arg1, _arg2, _arg3); iterator.seek(CursorBookmark.CURRENT, (-(lockedRowCount) + _local4)); } mx_internal function columnRendererChanged(_arg1:DataGridColumn):void{ var _local2:IListItemRenderer; var _local3:IFactory; var _local4:Array; _local3 = columnItemRendererFactory(_arg1, true); if (measuringObjects){ _local2 = measuringObjects[_local3]; if (_local2){ listContent.removeChild(DisplayObject(_local2)); measuringObjects[_local3] = null; }; _local3 = columnItemRendererFactory(_arg1, false); _local2 = measuringObjects[_local3]; if (_local2){ listContent.removeChild(DisplayObject(_local2)); measuringObjects[_local3] = null; }; }; _local4 = (freeItemRenderersTable[_arg1] as Array); if (_local4){ while (_local4.length) { listContent.removeChild(_local4.pop()); }; }; rendererChanged = true; invalidateDisplayList(); } override public function calculateDropIndex(_arg1:DragEvent=null):int{ var _local2:IListItemRenderer; var _local3:Point; var _local4:int; var _local5:int; if (_arg1){ _local3 = new Point(_arg1.localX, _arg1.localY); _local3 = DisplayObject(_arg1.target).localToGlobal(_local3); _local3 = listContent.globalToLocal(_local3); _local4 = listItems.length; _local5 = (headerVisible) ? 1 : 0; while (_local5 < _local4) { if ((((rowInfo[_local5].y <= _local3.y)) && ((_local3.y <= (rowInfo[_local5].y + rowInfo[_local5].height))))){ _local2 = listItems[_local5][0]; break; }; _local5++; }; if (_local2){ lastDropIndex = itemRendererToIndex(_local2); } else { lastDropIndex = (collection) ? collection.length : 0; }; }; return (lastDropIndex); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; invalidateDisplayList(); } override public function itemToLabel(_arg1:Object):String{ return (displayableColumns[((sortIndex == -1)) ? 0 : sortIndex].itemToLabel(_arg1)); } override public function get baselinePosition():Number{ var _local1:Number; _local1 = 0; if (((border) && ((border is RectangularBorder)))){ _local1 = RectangularBorder(border).borderMetrics.top; }; return ((_local1 + measureText(" ").ascent)); } protected function drawSeparators():void{ var _local1:Sprite; var _local2:int; var _local3:int; var _local4:UIComponent; var _local5:IFlexDisplayObject; var _local6:Class; if (!separators){ separators = []; }; _local1 = Sprite(listContent.getChildByName("lines")); _local2 = visibleColumns.length; _local3 = 0; while (_local3 < _local2) { if (_local3 < _local1.numChildren){ _local4 = UIComponent(_local1.getChildAt(_local3)); _local5 = IFlexDisplayObject(_local4.getChildAt(0)); } else { _local6 = getStyle("headerSeparatorSkin"); _local5 = new (_local6); if ((_local5 is ISimpleStyleClient)){ ISimpleStyleClient(_local5).styleName = this; }; _local4 = new UIComponent(); _local4.addChild(DisplayObject(_local5)); _local1.addChild(_local4); DisplayObject(_local4).addEventListener(MouseEvent.MOUSE_OVER, columnResizeMouseOverHandler); DisplayObject(_local4).addEventListener(MouseEvent.MOUSE_OUT, columnResizeMouseOutHandler); DisplayObject(_local4).addEventListener(MouseEvent.MOUSE_DOWN, columnResizeMouseDownHandler); separators.push(_local4); }; if (((((!(listItems)) || (!(listItems[0])))) || (!(listItems[0][_local3])))){ _local4.visible = false; } else { _local4.visible = true; _local4.x = ((listItems[0][_local3].x + visibleColumns[_local3].width) - Math.round(((_local4.measuredWidth / 2) + 0.5))); if (_local3 > 0){ _local4.x = Math.max(_local4.x, (separators[(_local3 - 1)].x + Math.round(((_local4.measuredWidth / 2) + 0.5)))); }; _local4.y = 0; _local5.setActualSize(_local5.measuredWidth, (rowInfo.length) ? rowInfo[0].height : headerHeight); _local4.graphics.clear(); _local4.graphics.beginFill(0xFFFFFF, 0); _local4.graphics.drawRect(-(separatorAffordance), 0, (_local5.measuredWidth + separatorAffordance), headerHeight); _local4.graphics.endFill(); }; _local3++; }; while (_local1.numChildren > visibleColumns.length) { _local1.removeChildAt((_local1.numChildren - 1)); separators.pop(); }; } override protected function focusOutHandler(_arg1:FocusEvent):void{ if (_arg1.target == this){ super.focusOutHandler(_arg1); }; if ((((_arg1.relatedObject == this)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ return; }; if ((((_arg1.relatedObject == null)) && (itemRendererContains(editedItemRenderer, DisplayObject(_arg1.target))))){ return; }; if ((((_arg1.relatedObject == null)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ return; }; if (((itemEditorInstance) && (((!(_arg1.relatedObject)) || (!(itemRendererContains(itemEditorInstance, _arg1.relatedObject))))))){ endEdit(DataGridEventReason.OTHER); removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); removeEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler); }; } private function columnDraggingMouseUpHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:IListItemRenderer; var _local4:Sprite; if (!movingColumn){ return; }; _local2 = movingColumn.colNum; if (_local2 < dropColumnIndex){ dropColumnIndex--; }; if (dropColumnIndex >= 0){ dropColumnIndex = Math.min(dropColumnIndex, (listItems[0].length - 1)); dropColumnIndex = listItems[0][dropColumnIndex].data.colNum; }; shiftColumns(_local2, dropColumnIndex, _arg1); systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, columnDraggingMouseMoveHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_UP, columnDraggingMouseUpHandler, true); _local3 = IListItemRenderer(listContent.getChildByName("headerDragProxy")); if (_local3){ listContent.removeChild(DisplayObject(_local3)); }; _local4 = Sprite(selectionLayer.getChildByName("headerSelection")); if (_local4){ selectionLayer.removeChild(_local4); }; if (columnDropIndicator){ columnDropIndicator.visible = false; }; _local4 = Sprite(listContent.getChildByName("columnDragOverlay")); if (_local4){ listContent.removeChild(_local4); }; listContent.scrollRect = null; startX = NaN; movingColumn = null; dropColumnIndex = -1; } private function findNextItemRenderer(_arg1:Boolean):Boolean{ var _local2:int; var _local3:int; var _local4:Boolean; var _local5:int; var _local6:int; var _local7:String; var _local8:DataGridEvent; if (!lastEditedItemPosition){ return (false); }; if (_proposedEditedItemPosition !== undefined){ return (false); }; _editedItemPosition = lastEditedItemPosition; _local2 = _editedItemPosition.rowIndex; _local3 = _editedItemPosition.columnIndex; _local4 = false; _local5 = (_arg1) ? -1 : 1; _local6 = (headerVisible) ? collection.length : (collection.length - 1); while (!(_local4)) { _local3 = (_local3 + _local5); if ((((_local3 >= _columns.length)) || ((_local3 < 0)))){ _local3 = ((_local3)<0) ? (_columns.length - 1) : 0; _local2 = (_local2 + _local5); if ((((_local2 >= _local6)) || ((_local2 < 0)))){ setEditedItemPosition(null); losingFocus = true; setFocus(); return (false); }; }; if (((_columns[_local3].editable) && (_columns[_local3].visible))){ _local4 = true; _local7 = ((_local2 == _editedItemPosition.rowIndex)) ? DataGridEventReason.NEW_COLUMN : DataGridEventReason.NEW_ROW; if (((!(itemEditorInstance)) || (endEdit(_local7)))){ _local8 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true); _local8.columnIndex = _local3; _local8.dataField = _columns[_local3].dataField; _local8.rowIndex = _local2; dispatchEvent(_local8); }; }; }; return (_local4); } override protected function mouseEventToItemRenderer(_arg1:MouseEvent):IListItemRenderer{ var _local2:IListItemRenderer; var _local3:Point; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; var _local8:Number; var _local9:int; if ((((_arg1.target == highlightIndicator)) || ((_arg1.target == listContent)))){ _local3 = new Point(_arg1.stageX, _arg1.stageY); _local3 = listContent.globalToLocal(_local3); _local4 = 0; _local5 = listItems.length; _local6 = 0; while (_local6 < _local5) { if (listItems[_local6].length){ if (_local3.y < (_local4 + rowInfo[_local6].height)){ _local7 = listItems[_local6].length; if (_local7 == 1){ _local2 = listItems[_local6][0]; break; }; _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local8 = (_local8 + visibleColumns[_local9].width); if (_local3.x < _local8){ _local2 = listItems[_local6][_local9]; break; }; _local9++; }; if (_local2){ break; }; }; }; _local4 = (_local4 + rowInfo[_local6].height); _local6++; }; }; if (!_local2){ _local2 = super.mouseEventToItemRenderer(_arg1); }; return (((_local2 == itemEditorInstance)) ? null : _local2); } protected function drawLinesAndColumnBackgrounds():void{ var _local1:Sprite; var _local2:Number; var _local3:uint; var _local4:int; var _local5:uint; var _local6:Boolean; var _local7:Sprite; var _local8:DataGridColumn; var _local9:Object; var _local10:Shape; var _local11:Graphics; _local1 = Sprite(listContent.getChildByName("lines")); if (!_local1){ _local1 = new UIComponent(); _local1.name = "lines"; _local1.cacheAsBitmap = true; _local1.mouseEnabled = false; listContent.addChild(_local1); }; listContent.setChildIndex(_local1, (listContent.numChildren - 1)); _local1.graphics.clear(); _local2 = (unscaledHeight - 1); _local5 = (((listItems) && (listItems[0]))) ? listItems[0].length : visibleColumns.length; if (_local5 > visibleColumns.length){ _local5 = visibleColumns.length; }; _local3 = getStyle("horizontalGridLineColor"); if (getStyle("horizontalGridLines")){ _local4 = (headerVisible) ? 1 : 0; while (_local4 < listItems.length) { drawHorizontalLine(_local1, _local4, _local3, (rowInfo[_local4].y + rowInfo[_local4].height)); _local4++; }; } else { if ((((lockedRowCount > (headerVisible) ? 1 : 0)) && ((lockedRowCount < listItems.length)))){ drawHorizontalLine(_local1, (lockedRowCount - 1), _local3, (rowInfo[(lockedRowCount - 1)].y + rowInfo[(lockedRowCount - 1)].height)); }; }; _local6 = getStyle("verticalGridLines"); _local3 = getStyle("verticalGridLineColor"); if (((((listItems) && (listItems[0]))) && (listItems[0][(_local5 - 1)]))){ _local7 = Sprite(listContent.getChildByName("colBGs")); _local4 = 0; while (_local4 < _local5) { if (_local6){ drawVerticalLine(_local1, _local4, _local3, (listItems[0][_local4].x + visibleColumns[_local4].width)); }; _local8 = visibleColumns[_local4]; if (enabled){ _local9 = _local8.getStyle("backgroundColor"); } else { _local9 = _local8.getStyle("backgroundDisabledColor"); }; if (((!((_local9 === null))) && (!(isNaN(Number(_local9)))))){ if (!_local7){ _local7 = new FlexSprite(); _local7.mouseEnabled = false; _local7.name = "colBGs"; listContent.addChildAt(_local7, (listContent.getChildIndex(listContent.getChildByName("rowBGs")) + 1)); }; drawColumnBackground(_local7, _local4, Number(_local9), _local8); } else { if (_local7){ _local10 = Shape(_local7.getChildByName(_local4.toString())); if (_local10){ _local11 = _local10.graphics; _local11.clear(); _local7.removeChild(_local10); }; }; }; _local4++; }; }; if (((((!(_local6)) && ((lockedColumnCount > 0)))) && ((lockedColumnCount < _local5)))){ drawVerticalLine(_local1, (lockedColumnCount - 1), _local3, (listItems[0][(lockedColumnCount - 1)].x + visibleColumns[(lockedColumnCount - 1)].width)); }; } private function columnResizingHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:Point; if (!MouseEvent(_arg1).buttonDown){ columnResizeMouseUpHandler(_arg1); }; _local2 = (verticalScrollBar) ? verticalScrollBar.width : 0; _local3 = new Point(_arg1.stageX, _arg1.stageY); _local3 = globalToLocal(_local3); resizeGraphic.move(Math.min(Math.max(minX, _local3.x), ((unscaledWidth - separators[0].width) - _local2)), 0); } override protected function collectionChangeHandler(_arg1:Event):void{ var _local2:CollectionEvent; var _local3:Object; var _local4:CollectionEvent; if ((_arg1 is CollectionEvent)){ _local2 = CollectionEvent(_arg1); if (_local2.kind == CollectionEventKind.RESET){ if (generatedColumns){ generateCols(); }; updateSortIndexAndDirection(); } else { if ((((_local2.kind == CollectionEventKind.REFRESH)) && (!(manualSort)))){ updateSortIndexAndDirection(); } else { if (_local2.kind == CollectionEventKind.REMOVE){ if (editedItemPosition){ if (collection.length == 0){ if (itemEditorInstance){ endEdit(DataGridEventReason.CANCELLED); }; setEditedItemPosition(null); } else { if (_local2.location <= editedItemPosition.rowIndex){ _local3 = editedItemPosition; if ((((_local2.location == editedItemPosition.rowIndex)) && (itemEditorInstance))){ endEdit(DataGridEventReason.CANCELLED); }; if (inEndEdit){ _editedItemPosition = {columnIndex:editedItemPosition.columnIndex, rowIndex:Math.max(0, (editedItemPosition.rowIndex - _local2.items.length))}; } else { setEditedItemPosition({columnIndex:_local3.columnIndex, rowIndex:Math.max(0, (_local3.rowIndex - _local2.items.length))}); }; }; }; }; } else { if (_local2.kind == CollectionEventKind.REPLACE){ if (editedItemPosition){ if ((((_local2.location == editedItemPosition.rowIndex)) && (itemEditorInstance))){ endEdit(DataGridEventReason.CANCELLED); }; }; }; }; }; }; }; super.collectionChangeHandler(_arg1); if ((_arg1 is CollectionEvent)){ _local4 = CollectionEvent(_arg1); if (_local4.kind == CollectionEventKind.ADD){ if (collection.length == 1){ if (generatedColumns){ generateCols(); }; }; }; }; } override public function set dataProvider(_arg1:Object):void{ if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; super.dataProvider = _arg1; } override protected function initializeAccessibility():void{ if (DataGrid.createAccessibilityImplementation != null){ DataGrid.createAccessibilityImplementation(this); }; } private function columnResizeMouseUpHandler(_arg1:MouseEvent):void{ var _local2:DataGridColumn; var _local3:int; var _local4:int; var _local5:int; var _local6:Point; var _local7:Number; var _local8:DataGridEvent; if (((!(enabled)) || (!(resizableColumns)))){ return; }; isPressed = false; systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, columnResizingHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_UP, columnResizeMouseUpHandler, true); listContent.removeChild(DisplayObject(resizeGraphic)); CursorManager.removeCursor(resizeCursorID); _local2 = resizingColumn; resizingColumn = null; _local3 = visibleColumns.length; _local4 = 0; while (_local4 < _local3) { if (_local2 == visibleColumns[_local4]){ break; }; _local4++; }; if (_local4 >= visibleColumns.length){ return; }; _local5 = (verticalScrollBar) ? verticalScrollBar.width : 0; _local6 = new Point(_arg1.stageX, _arg1.stageY); _local6 = globalToLocal(_local6); _local7 = (Math.min(Math.max(minX, _local6.x), ((unscaledWidth - separators[0].width) - _local5)) - startX); resizeColumn(_local4, Math.floor((_local2.width + _local7))); _local8 = new DataGridEvent(DataGridEvent.COLUMN_STRETCH); _local8.columnIndex = _local2.colNum; _local8.dataField = _local2.dataField; _local8.localX = _local6.x; dispatchEvent(_local8); } public function set columns(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:DataGridColumn; freeItemRenderersTable = new Dictionary(false); columnMap = {}; _local2 = _columns.length; _local3 = 0; while (_local3 < _local2) { columnRendererChanged(_columns[_local3]); _local3++; }; _columns = _arg1.slice(0); columnsInvalid = true; generatedColumns = false; _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { _local4 = _columns[_local3]; _local4.owner = this; _local4.colNum = _local3; _local3++; }; updateSortIndexAndDirection(); itemsSizeChanged = true; invalidateDisplayList(); dispatchEvent(new Event("columnsChanged")); } override protected function scrollHandler(_arg1:Event):void{ var _local2:ScrollBar; var _local3:Number; if ((((_arg1.target == verticalScrollBar)) || ((_arg1.target == horizontalScrollBar)))){ if ((_arg1 is ScrollEvent)){ if (((!(liveScrolling)) && ((ScrollEvent(_arg1).detail == ScrollEventDetail.THUMB_TRACK)))){ return; }; if (itemEditorInstance){ endEdit(DataGridEventReason.OTHER); }; _local2 = ScrollBar(_arg1.target); _local3 = _local2.scrollPosition; if (_local2 == verticalScrollBar){ verticalScrollPosition = _local3; } else { if (_local2 == horizontalScrollBar){ horizontalScrollPosition = _local3; }; }; super.scrollHandler(_arg1); }; }; } protected function placeSortArrow():void{ var _local1:Sprite; var _local2:Number; var _local3:int; var _local4:int; var _local5:Boolean; var _local6:Number; var _local7:Class; var _local8:Graphics; var _local9:int; _local1 = Sprite(listContent.getChildByName("sortArrowHitArea")); if ((((sortIndex == -1)) && ((lastSortIndex == -1)))){ if (sortArrow){ sortArrow.visible = false; }; if (_local1){ _local1.visible = false; }; return; }; if (!headerVisible){ if (sortArrow){ sortArrow.visible = false; }; if (_local1){ _local1.visible = false; }; return; }; if (!sortArrow){ _local7 = getStyle("sortArrowSkin"); sortArrow = new (_local7); DisplayObject(sortArrow).name = "sortArrow"; listContent.addChild(DisplayObject(sortArrow)); }; if (((((listItems) && (listItems.length))) && (listItems[0]))){ _local3 = listItems[0].length; _local4 = 0; while (_local4 < _local3) { if (visibleColumns[_local4].colNum == sortIndex){ _local2 = (listItems[0][_local4].x + visibleColumns[_local4].width); listItems[0][_local4].setActualSize(((visibleColumns[_local4].width - sortArrow.measuredWidth) - 8), listItems[0][_local4].height); if (!isNaN(listItems[0][_local4].explicitWidth)){ listItems[0][_local4].explicitWidth = listItems[0][_local4].width; }; if (!_local1){ _local1 = new FlexSprite(); _local1.name = "sortArrowHitArea"; listContent.addChild(_local1); } else { _local1.visible = true; }; _local1.x = (listItems[0][_local4].x + listItems[0][_local4].width); _local1.y = listItems[0][_local4].y; _local8 = _local1.graphics; _local8.clear(); _local8.beginFill(0, 0); _local8.drawRect(0, 0, (sortArrow.measuredWidth + 8), listItems[0][_local4].height); _local8.endFill(); break; }; _local4++; }; }; if (isNaN(_local2)){ sortArrow.visible = false; return; }; sortArrow.visible = true; if ((((lastSortIndex >= 0)) && (!((lastSortIndex == sortIndex))))){ if ((((visibleColumns[0].colNum <= lastSortIndex)) && ((lastSortIndex <= visibleColumns[(visibleColumns.length - 1)].colNum)))){ _local3 = listItems[0].length; _local9 = 0; while (_local9 < _local3) { if (visibleColumns[_local9].colNum == lastSortIndex){ listItems[0][_local9].setActualSize(visibleColumns[_local9].width, listItems[0][_local9].height); break; }; _local9++; }; }; }; _local5 = (sortDirection == "ASC"); sortArrow.width = sortArrow.measuredWidth; sortArrow.height = sortArrow.measuredHeight; DisplayObject(sortArrow).scaleY = (_local5) ? -1 : 1; sortArrow.x = ((_local2 - sortArrow.measuredWidth) - 8); _local6 = (rowInfo.length) ? rowInfo[0].height : headerHeight; sortArrow.y = (((_local6 - sortArrow.measuredHeight) / 2) + (_local5) ? sortArrow.measuredHeight : 0); if (sortArrow.x < listItems[0][_local4].x){ sortArrow.visible = false; }; if (((!(sortArrow.visible)) && (_local1))){ _local1.visible = false; }; } public function get columns():Array{ return (_columns.slice(0)); } } }//package mx.controls
Section 115
//HScrollBar (mx.controls.HScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class HScrollBar extends ScrollBar { mx_internal static const VERSION:String = "2.0.1.0"; public function HScrollBar(){ super.direction = ScrollBarDirection.HORIZONTAL; scaleX = -1; rotation = -90; } override mx_internal function get virtualHeight():Number{ return (unscaledWidth); } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.LEFT){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.RIGHT){ lineScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override protected function measure():void{ super.measure(); measuredWidth = _minHeight; measuredHeight = _minWidth; } override public function get minHeight():Number{ return (_minWidth); } override public function get minWidth():Number{ return (_minHeight); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 116
//Label (mx.controls.Label) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.geom.*; import flash.text.*; import mx.controls.listClasses.*; public class Label extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer { mx_internal var htmlTextChanged:Boolean;// = false private var enabledChanged:Boolean;// = false private var _data:Object; mx_internal var textChanged:Boolean;// = false private var _htmlText:String;// = "" private var _condenseWhite:Boolean;// = false private var toolTipSet:Boolean;// = false private var selectableChanged:Boolean; private var explicitHTMLText:String;// = null private var condenseWhiteChanged:Boolean;// = false private var _selectable:Boolean;// = false public var truncateToFit:Boolean;// = true private var _text:String;// = "" private var _textHeight:Number; private var _listData:BaseListData; private var _textWidth:Number; private var _tabIndex:int;// = -1 protected var textField:UITextField; private var textSet:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function Label(){ enabledChanged = false; toolTipSet = false; _condenseWhite = false; condenseWhiteChanged = false; _htmlText = ""; htmlTextChanged = false; explicitHTMLText = null; _selectable = false; _tabIndex = -1; _text = ""; textChanged = false; truncateToFit = true; super(); } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } mx_internal function set styleSheet(_arg1:StyleSheet):void{ textField.styleSheet = _arg1; } public function get selectable():Boolean{ return (_selectable); } override public function set tabIndex(_arg1:int):void{ _tabIndex = _arg1; invalidateProperties(); } private function textField_textFieldStyleChangeHandler(_arg1:Event):void{ textFieldChanged(true); } public function set selectable(_arg1:Boolean):void{ if (_arg1 == selectable){ return; }; _selectable = _arg1; selectableChanged = true; invalidateProperties(); } public function get textHeight():Number{ return (_textHeight); } public function get textWidth():Number{ return (_textWidth); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return ((textField) ? textField.getLineMetrics(_arg1) : null); } mx_internal function getTextField():UITextField{ return (textField); } mx_internal function getMinimumText(_arg1:String):String{ if (((!(_arg1)) || ((_arg1.length < 2)))){ _arg1 = "Wj"; }; return (_arg1); } public function get text():String{ return (_text); } override protected function measure():void{ var _local1:String; var _local2:Rectangle; super.measure(); _local1 = (isHTML) ? explicitHTMLText : text; _local1 = getMinimumText(_local1); _local2 = measureTextFieldBounds(_local1); measuredMinWidth = (measuredWidth = ((_local2.width + getStyle("paddingLeft")) + getStyle("paddingRight"))); measuredMinHeight = (measuredHeight = ((_local2.height + getStyle("paddingTop")) + getStyle("paddingBottom"))); } public function get listData():BaseListData{ return (_listData); } override protected function commitProperties():void{ super.commitProperties(); if (condenseWhiteChanged){ textField.condenseWhite = _condenseWhite; condenseWhiteChanged = false; }; textField.tabIndex = tabIndex; if (enabledChanged){ textField.enabled = enabled; enabledChanged = false; }; if (selectableChanged){ textField.selectable = _selectable; selectableChanged = false; }; if (((textChanged) || (htmlTextChanged))){ if (isHTML){ textField.htmlText = explicitHTMLText; } else { textField.text = _text; }; textFieldChanged(false); textChanged = false; htmlTextChanged = false; }; } private function textFieldChanged(_arg1:Boolean):void{ var _local2:Boolean; if (!_arg1){ _local2 = !((_text == textField.text)); _text = textField.text; if (_local2){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; _local2 = !((_htmlText == textField.htmlText)); _htmlText = textField.htmlText; if (_local2){ dispatchEvent(new Event("htmlTextChanged")); }; _textWidth = textField.textWidth; _textHeight = textField.textHeight; } mx_internal function get styleSheet():StyleSheet{ return (textField.styleSheet); } override public function get tabIndex():int{ return (_tabIndex); } public function set text(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((_arg1 == _text)))){ return; }; _text = _arg1; textChanged = true; _htmlText = null; explicitHTMLText = null; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; if (!textField){ return (NaN); }; validateNow(); _local1 = (isHTML) ? explicitHTMLText : text; if (_local1 == ""){ _local1 = " "; }; _local2 = (isHTML) ? measureHTMLText(_local1) : measureText(_local1); return ((textField.y + _local2.ascent)); } public function set condenseWhite(_arg1:Boolean):void{ if (_arg1 == _condenseWhite){ return; }; _condenseWhite = _arg1; condenseWhiteChanged = true; if (isHTML){ htmlTextChanged = true; }; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("condenseWhiteChanged")); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } public function set htmlText(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((isHTML) && ((_arg1 == explicitHTMLText)))){ return; }; _htmlText = _arg1; htmlTextChanged = true; _text = null; explicitHTMLText = _arg1; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("htmlTextChanged")); } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = new UITextField(); textField.enabled = enabled; textField.ignorePadding = true; textField.selectable = selectable; textField.styleName = this; textField.addEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler); addChild(textField); }; } public function get condenseWhite():Boolean{ return (_condenseWhite); } public function set data(_arg1:Object):void{ var _local2:*; _data = _arg1; if (_listData){ _local2 = _listData.label; } else { if (_data != null){ if ((_data is String)){ _local2 = String(_data); } else { _local2 = _data.toString(); }; }; }; if (((!((_local2 === undefined))) && (!(textSet)))){ text = _local2; textSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function get htmlText():String{ return (_htmlText); } public function get data():Object{ return (_data); } private function measureTextFieldBounds(_arg1:String):Rectangle{ var _local2:TextLineMetrics; _local2 = (isHTML) ? measureHTMLText(_arg1) : measureText(_arg1); return (new Rectangle(0, 0, (_local2.width + UITextField.TEXT_WIDTH_PADDING), (_local2.height + UITextField.TEXT_HEIGHT_PADDING))); } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; toolTipSet = !((_arg1 == null)); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:String; var _local8:Rectangle; var _local9:Boolean; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("paddingLeft"); _local4 = getStyle("paddingTop"); _local5 = getStyle("paddingRight"); _local6 = getStyle("paddingBottom"); textField.setActualSize(((_arg1 - _local3) - _local5), ((_arg2 - _local4) - _local6)); textField.x = _local3; textField.y = _local4; _local7 = (isHTML) ? explicitHTMLText : text; _local8 = measureTextFieldBounds(_local7); if (truncateToFit){ if (isHTML){ _local9 = (_local8.width > textField.width); } else { textField.text = _text; _local9 = textField.truncateToFit(); }; if (!toolTipSet){ super.toolTip = (_local9) ? text : null; }; }; } } }//package mx.controls
Section 117
//List (mx.controls.List) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.controls.scrollClasses.*; import mx.collections.*; import mx.controls.listClasses.*; import mx.collections.errors.*; import flash.ui.*; public class List extends ListBase implements IIMESupport { public var editorXOffset:Number;// = 0 private var lastEditedItemPosition; public var editorWidthOffset:Number;// = 0 public var editorHeightOffset:Number;// = 0 private var _editedItemPosition:Object; private var _imeMode:String; public var editorYOffset:Number;// = 0 private var bEditedItemPositionChanged:Boolean;// = false private var inEndEdit:Boolean;// = false public var editorDataField:String;// = "text" public var rendererIsEditor:Boolean;// = false private var dontEdit:Boolean;// = false private var losingFocus:Boolean;// = false private var _proposedEditedItemPosition; public var itemEditor:IFactory; public var editable:Boolean;// = false public var editorUsesEnterKey:Boolean;// = false private var actualRowIndex:int; private var actualColIndex:int;// = 0 public var itemEditorInstance:IListItemRenderer; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function List(){ dontEdit = false; losingFocus = false; inEndEdit = false; actualColIndex = 0; editable = false; itemEditor = new ClassFactory(TextInput); editorDataField = "text"; editorHeightOffset = 0; editorWidthOffset = 0; editorXOffset = 0; editorYOffset = 0; editorUsesEnterKey = false; bEditedItemPositionChanged = false; rendererIsEditor = false; super(); listType = "vertical"; bColumnScrolling = false; itemRenderer = new ClassFactory(ListItemRenderer); _horizontalScrollPolicy = ScrollPolicy.OFF; _verticalScrollPolicy = ScrollPolicy.AUTO; defaultColumnCount = 1; defaultRowCount = 7; addEventListener(ListEvent.ITEM_EDIT_BEGINNING, itemEditorItemEditBeginningHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(ListEvent.ITEM_EDIT_BEGIN, itemEditorItemEditBeginHandler, false, EventPriority.DEFAULT_HANDLER); addEventListener(ListEvent.ITEM_EDIT_END, itemEditorItemEditEndHandler, false, EventPriority.DEFAULT_HANDLER); } private function itemEditorItemEditBeginningHandler(_arg1:ListEvent):void{ if (!_arg1.isDefaultPrevented()){ setEditedItemPosition({columnIndex:_arg1.columnIndex, rowIndex:_arg1.rowIndex}); } else { if (!itemEditorInstance){ _editedItemPosition = null; editable = false; setFocus(); editable = true; }; }; } override protected function scrollHorizontally(_arg1:int, _arg2:int, _arg3:Boolean):void{ var _local4:int; var _local5:Number; var _local6:int; _local4 = listItems.length; _local5 = getStyle("paddingLeft"); _local6 = 0; while (_local6 < _local4) { if (listItems[_local6].length){ listItems[_local6][0].x = (-(_arg1) + _local5); }; _local6++; }; } private function setEditedItemPosition(_arg1:Object):void{ bEditedItemPositionChanged = true; _proposedEditedItemPosition = _arg1; invalidateDisplayList(); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ if ((((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))) && (findNextItemRenderer(_arg1.shiftKey)))){ _arg1.preventDefault(); }; } public function set editedItemPosition(_arg1:Object):void{ var _local2:Object; _local2 = {rowIndex:_arg1.rowIndex, columnIndex:0}; setEditedItemPosition(_local2); } override public function measureHeightOfItems(_arg1:int=-1, _arg2:int=0):Number{ var paddingTop:Number; var paddingBottom:Number; var item:IListItemRenderer; var ww:Number; var h:Number; var bookmark:CursorBookmark; var rh:Number; var more:Boolean; var i:int; var data:Object; var index = _arg1; var count = _arg2; if (count == 0){ count = (collection) ? collection.length : 0; }; paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); item = getMeasuringRenderer(); ww = 200; if (listContent.width){ ww = listContent.width; }; item.explicitWidth = ww; h = 0; bookmark = (iterator) ? iterator.bookmark : null; if (((!((index == -1))) && (iterator))){ iterator.seek(CursorBookmark.FIRST, index); }; rh = rowHeight; more = !((iterator == null)); i = 0; while (i < count) { if (more){ rh = rowHeight; data = iterator.current; setupRendererFromData(item, data); if (variableRowHeight){ rh = ((item.getExplicitOrMeasuredHeight() + paddingTop) + paddingBottom); }; }; h = (h + rh); if (more){ try { more = iterator.moveNext(); } catch(e:ItemPendingError) { more = false; }; }; i = (i + 1); }; if (iterator){ iterator.seek(bookmark, 0); }; return (h); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (itemEditorInstance){ return; }; super.keyDownHandler(_arg1); } public function createItemEditor(_arg1:int, _arg2:int):void{ var _local3:IListItemRenderer; var _local4:ListRowInfo; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _arg1 = 0; if (_arg2 > lockedRowCount){ _arg2 = (_arg2 - verticalScrollPosition); }; _local3 = listItems[_arg2][_arg1]; _local4 = rowInfo[_arg2]; if (!rendererIsEditor){ _local5 = 0; _local6 = -2; _local7 = 0; _local8 = 4; if (!itemEditorInstance){ _local5 = editorXOffset; _local6 = editorYOffset; _local7 = editorWidthOffset; _local8 = editorHeightOffset; itemEditorInstance = itemEditor.newInstance(); itemEditorInstance.owner = this; itemEditorInstance.styleName = this; listContent.addChild(DisplayObject(itemEditorInstance)); }; listContent.setChildIndex(DisplayObject(itemEditorInstance), (listContent.numChildren - 1)); itemEditorInstance.visible = true; layoutEditor((_local3.x + _local5), (_local4.y + _local6), Math.min((_local3.width + _local7), ((listContent.width - listContent.x) - itemEditorInstance.x)), Math.min((_local4.height + _local8), ((listContent.height - listContent.y) - itemEditorInstance.y))); DisplayObject(itemEditorInstance).addEventListener("focusOut", itemEditorFocusOutHandler); } else { itemEditorInstance = _local3; }; DisplayObject(itemEditorInstance).addEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler); stage.addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true); } override protected function mouseWheelHandler(_arg1:MouseEvent):void{ if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; super.mouseWheelHandler(_arg1); } override protected function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:ListEvent; var _local3:IListItemRenderer; var _local4:Sprite; var _local5:int; var _local6:int; var _local7:Point; _local3 = mouseEventToItemRenderer(_arg1); super.mouseUpHandler(_arg1); if (((((_local3) && (_local3.data))) && (!((_local3 == itemEditorInstance))))){ _local7 = itemRendererToIndices(_local3); if (((editable) && (!(dontEdit)))){ _local2 = new ListEvent(ListEvent.ITEM_EDIT_BEGINNING, false, true); _local2.rowIndex = _local7.y; _local2.columnIndex = 0; _local2.itemRenderer = _local3; dispatchEvent(_local2); }; }; } private function mouseFocusChangeHandler(_arg1:MouseEvent):void{ if (((((itemEditorInstance) && (!(_arg1.isDefaultPrevented())))) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ _arg1.preventDefault(); }; } protected function layoutEditor(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ itemEditorInstance.move(_arg1, _arg2); itemEditorInstance.setActualSize(_arg3, _arg4); } mx_internal function callSetupRendererFromData(_arg1:IListItemRenderer, _arg2:Object):void{ setupRendererFromData(_arg1, _arg2); } protected function makeListData(_arg1:Object, _arg2:String, _arg3:int):BaseListData{ return (new ListData(itemToLabel(_arg1), itemToIcon(_arg1), labelField, _arg2, this, _arg3)); } private function commitEditedItemPosition(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:EdgeMetrics; var _local8:IListItemRenderer; var _local9:ListEvent; var _local10:String; if (((!(enabled)) || (!(editable)))){ return; }; if (((((((itemEditorInstance) && (_arg1))) && ((itemEditorInstance is IFocusManagerComponent)))) && ((_editedItemPosition.rowIndex == _arg1.rowIndex)))){ IFocusManagerComponent(itemEditorInstance).setFocus(); return; }; if (itemEditorInstance){ if (!_arg1){ _local10 = ListEventReason.OTHER; } else { _local10 = ListEventReason.NEW_ROW; }; if (((!(endEdit(_local10))) && (!((_local10 == ListEventReason.OTHER))))){ return; }; }; _editedItemPosition = _arg1; if (!_arg1){ return; }; if (dontEdit){ return; }; _local2 = _arg1.rowIndex; _local3 = _arg1.columnIndex; if (selectedIndex != _arg1.rowIndex){ commitSelectedIndex(_arg1.rowIndex); }; _local4 = lockedRowCount; _local5 = ((verticalScrollPosition + listItems.length) - 1); _local6 = (((rowInfo[(listItems.length - 1)].y + rowInfo[(listItems.length - 1)].height))>listContent.height) ? 1 : 0; if (_local2 > _local4){ if (_local2 < (verticalScrollPosition + _local4)){ verticalScrollPosition = (_local2 - _local4); } else { while ((((_local2 > _local5)) || ((((((_local2 == _local5)) && ((_local2 > (verticalScrollPosition + _local4))))) && (_local6))))) { if (verticalScrollPosition == maxVerticalScrollPosition){ break; }; verticalScrollPosition = Math.min((verticalScrollPosition + ((_local2 > _local5)) ? (_local2 - _local5) : _local6), maxVerticalScrollPosition); _local5 = ((verticalScrollPosition + listItems.length) - 1); _local6 = (((rowInfo[(listItems.length - 1)].y + rowInfo[(listItems.length - 1)].height))>listContent.height) ? 1 : 0; }; }; actualRowIndex = (_local2 - verticalScrollPosition); } else { if (_local2 == _local4){ verticalScrollPosition = 0; }; actualRowIndex = _local2; }; _local7 = borderMetrics; actualColIndex = _local3; _local8 = listItems[actualRowIndex][actualColIndex]; _local9 = new ListEvent(ListEvent.ITEM_EDIT_BEGIN, false, true); _local9.rowIndex = _editedItemPosition.rowIndex; _local9.itemRenderer = _local8; dispatchEvent(_local9); lastEditedItemPosition = _editedItemPosition; if (bEditedItemPositionChanged){ bEditedItemPositionChanged = false; commitEditedItemPosition(_proposedEditedItemPosition); _proposedEditedItemPosition = undefined; }; if (!itemEditorInstance){ commitEditedItemPosition(null); }; } override protected function commitProperties():void{ var _local1:Number; var _local2:Number; var _local3:IListItemRenderer; var _local4:Number; var _local5:int; super.commitProperties(); if (itemsNeedMeasurement){ itemsNeedMeasurement = false; if (isNaN(explicitRowHeight)){ if (iterator){ _local1 = getStyle("paddingTop"); _local2 = getStyle("paddingBottom"); _local3 = getMeasuringRenderer(); _local4 = 200; if (listContent.width){ _local4 = listContent.width; }; _local3.explicitWidth = _local4; setupRendererFromData(_local3, iterator.current); _local5 = ((_local3.getExplicitOrMeasuredHeight() + _local1) + _local2); setRowHeight(Math.max(_local5, 20)); } else { setRowHeight(20); }; }; if (isNaN(explicitColumnWidth)){ setColumnWidth(measureWidthOfItems(0, ((explicitRowCount)<1) ? defaultRowCount : explicitRowCount)); }; }; } private function adjustVerticalScrollPositionDownward(_arg1:int):Boolean{ var bookmark:CursorBookmark; var h:Number; var ch:Number; var n:int; var j:int; var paddingTop:Number; var paddingBottom:Number; var numRows:int; var item:IListItemRenderer; var more:Boolean; var data:Object; var rowCount = _arg1; bookmark = iterator.bookmark; h = 0; ch = 0; paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); h = (rowInfo[(rowCount - 1)].y + rowInfo[(rowCount - 1)].height); h = (listContent.height - h); numRows = 0; try { if (iterator.afterLast){ iterator.seek(CursorBookmark.LAST, 0); } else { more = iterator.movePrevious(); }; } catch(e:ItemPendingError) { more = false; }; if (!more){ super.verticalScrollPosition = 0; try { iterator.seek(CursorBookmark.FIRST, 0); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.FIRST, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; invalidateList(); return (true); }; updateList(); return (true); }; item = getMeasuringRenderer(); item.explicitWidth = listContent.width; while ((((h > 0)) && (more))) { if (more){ data = iterator.current; setupRendererFromData(item, data); ch = (variableRowHeight) ? ((item.getExplicitOrMeasuredHeight() + paddingBottom) + paddingTop) : rowHeight; }; h = (h - ch); try { more = iterator.movePrevious(); numRows = (numRows + 1); } catch(e:ItemPendingError) { more = false; }; }; if (h < 0){ numRows = (numRows - 1); }; iterator.seek(bookmark, 0); verticalScrollPosition = Math.max(0, (verticalScrollPosition - numRows)); if ((((numRows > 0)) && (!(variableRowHeight)))){ configureScrollBars(); }; return ((numRows > 0)); } override public function set itemRenderer(_arg1:IFactory):void{ var _local2:IListItemRenderer; super.itemRenderer = _arg1; if (listContent){ _local2 = IListItemRenderer(listContent.getChildByName("hiddenItem")); if (_local2){ listContent.removeChild(DisplayObject(_local2)); }; }; } public function destroyItemEditor():void{ var _local1:ListEvent; if (itemEditorInstance){ DisplayObject(itemEditorInstance).removeEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler); stage.removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true); _local1 = new ListEvent(ListEvent.ITEM_FOCUS_OUT); _local1.rowIndex = _editedItemPosition.rowIndex; _local1.itemRenderer = editedItemRenderer; dispatchEvent(_local1); if (!rendererIsEditor){ if (((itemEditorInstance) && ((itemEditorInstance is UIComponent)))){ UIComponent(itemEditorInstance).drawFocus(false); }; listContent.removeChild(DisplayObject(itemEditorInstance)); }; itemEditorInstance = null; _editedItemPosition = null; }; } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } override protected function makeRowsAndColumns(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:Boolean=false, _arg8:uint=0):Point{ var paddingLeft:Number; var paddingRight:Number; var xx:Number; var ww:Number; var yy:Number; var hh:Number; var bSelected:Boolean; var bHighlight:Boolean; var bCaret:Boolean; var i:int; var j:int; var colNum:int; var rowNum:int; var rowsMade:int; var item:IListItemRenderer; var oldItem:IListItemRenderer; var rowData:BaseListData; var data:Object; var uid:String; var more:Boolean; var valid:Boolean; var rh:Number; var rr:Array; var rowInfo:ListRowInfo; var dx:Number; var dy:Number; var dw:Number; var dh:Number; var left = _arg1; var top = _arg2; var right = _arg3; var bottom = _arg4; var firstCol = _arg5; var firstRow = _arg6; var byCount = _arg7; var rowsNeeded = _arg8; listContent.allowItemSizeChangeNotification = false; paddingLeft = getStyle("paddingLeft"); paddingRight = getStyle("paddingRight"); xx = ((left + paddingLeft) - horizontalScrollPosition); ww = ((right - paddingLeft) - paddingRight); bSelected = false; bHighlight = false; bCaret = false; colNum = lockedColumnCount; rowNum = lockedRowCount; rowsMade = 0; more = true; valid = true; yy = top; rowNum = firstRow; more = ((((!((iterator == null))) && (!(iterator.afterLast)))) && (iteratorValid)); while (((((!(byCount)) && ((yy < bottom)))) || (((byCount) && ((rowsNeeded > 0)))))) { if (byCount){ rowsNeeded = (rowsNeeded - 1); }; valid = more; data = (more) ? iterator.current : null; uid = null; if (!listItems[rowNum]){ listItems[rowNum] = []; }; if (valid){ item = listItems[rowNum][colNum]; uid = itemToUID(data); if (((!(item)) || (!((itemToUID(item.data) == uid))))){ if (freeItemRenderers.length){ item = freeItemRenderers.pop(); } else { item = itemRenderer.newInstance(); item.owner = this; item.styleName = listContent; listContent.addChild(DisplayObject(item)); }; oldItem = listItems[rowNum][colNum]; if (oldItem){ addToFreeItemRenderers(oldItem); }; listItems[rowNum][colNum] = item; }; rowData = makeListData(data, uid, rowNum); rowMap[item.name] = rowData; if ((item is IDropInListItemRenderer)){ if (data != null){ IDropInListItemRenderer(item).listData = rowData; } else { IDropInListItemRenderer(item).listData = null; }; }; item.data = data; item.enabled = enabled; item.visible = true; if (uid){ visibleData[uid] = item; }; item.explicitWidth = ww; if ((((item is IInvalidating)) && (((wordWrapChanged) || (variableRowHeight))))){ IInvalidating(item).invalidateSize(); }; UIComponentGlobals.layoutManager.validateClient(item, true); hh = Math.ceil((variableRowHeight) ? ((item.getExplicitOrMeasuredHeight() + cachedPaddingTop) + cachedPaddingBottom) : rowHeight); rh = item.getExplicitOrMeasuredHeight(); item.setActualSize(ww, (variableRowHeight) ? rh : ((rowHeight - cachedPaddingTop) - cachedPaddingBottom)); item.move(xx, (yy + cachedPaddingTop)); } else { hh = ((rowNum > 0)) ? rowInfo[(rowNum - 1)].height : rowHeight; oldItem = listItems[rowNum][colNum]; if (oldItem){ addToFreeItemRenderers(oldItem); listItems[rowNum].splice(colNum, 1); }; }; bSelected = !((selectedData[uid] == null)); bHighlight = (highlightUID == uid); bCaret = (caretUID == uid); rowInfo[rowNum] = new ListRowInfo(yy, hh, uid, data); if (valid){ drawItem(item, bSelected, bHighlight, bCaret); }; yy = (yy + hh); rowNum = (rowNum + 1); rowsMade = (rowsMade + 1); if (((iterator) && (more))){ try { more = iterator.moveNext(); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, 0); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); more = false; iteratorValid = false; }; }; }; if (!byCount){ while (rowNum < listItems.length) { rr = listItems.pop(); rowInfo.pop(); while (rr.length) { item = rr.pop(); addToFreeItemRenderers(item); }; }; }; if (itemEditorInstance){ listContent.setChildIndex(DisplayObject(itemEditorInstance), (listContent.numChildren - 1)); item = listItems[actualRowIndex][actualColIndex]; rowInfo = rowInfo[actualRowIndex]; if (((item) && (!(rendererIsEditor)))){ dx = editorXOffset; dy = editorYOffset; dw = editorWidthOffset; dh = editorHeightOffset; layoutEditor((item.x + dx), (rowInfo.y + dy), Math.min((item.width + dw), ((listContent.width - listContent.x) - itemEditorInstance.x)), Math.min((rowInfo.height + dh), ((listContent.height - listContent.y) - itemEditorInstance.y))); }; }; listContent.allowItemSizeChangeNotification = variableRowHeight; return (new Point(colNum, rowsMade)); } override protected function drawSelectionIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawSelectionIndicator(_arg1, 0, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } override protected function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:IListItemRenderer; var _local3:Sprite; var _local4:Boolean; var _local5:Point; var _local6:Boolean; _local2 = mouseEventToItemRenderer(_arg1); _local4 = itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target)); if (!_local4){ if (((_local2) && (_local2.data))){ _local5 = itemRendererToIndices(_local2); _local6 = true; if (itemEditorInstance){ _local6 = endEdit(ListEventReason.NEW_ROW); }; if (!_local6){ return; }; } else { if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; }; super.mouseDownHandler(_arg1); }; } override protected function configureScrollBars():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:Object; var _local6:Object; var _local7:int; var _local8:int; var _local9:int; _local1 = listItems.length; if (_local1 == 0){ return; }; if ((((_local1 > 1)) && (((rowInfo[(_local1 - 1)].y + rowInfo[(_local1 - 1)].height) > listContent.height)))){ _local1--; }; _local2 = ((verticalScrollPosition - lockedRowCount) - 1); _local3 = 0; while (((_local1) && ((listItems[(_local1 - 1)].length == 0)))) { if (((collection) && (((_local1 + _local2) >= collection.length)))){ _local1--; _local3++; } else { break; }; }; if ((((verticalScrollPosition > 0)) && ((_local3 > 0)))){ if (adjustVerticalScrollPositionDownward(Math.max(_local1, 1))){ return; }; }; _local4 = listItems[0].length; _local5 = horizontalScrollBar; _local6 = verticalScrollBar; _local7 = Math.round(unscaledWidth); _local8 = (collection) ? (collection.length - lockedRowCount) : 0; _local9 = (_local1 - lockedRowCount); setScrollBarProperties((isNaN(_maxHorizontalScrollPosition)) ? Math.round(listContent.width) : Math.round((_maxHorizontalScrollPosition + _local7)), _local7, _local8, _local9); maxVerticalScrollPosition = Math.max((_local8 - _local9), 0); } mx_internal function callMakeListData(_arg1:Object, _arg2:String, _arg3:int):BaseListData{ return (makeListData(_arg1, _arg2, _arg3)); } private function editorKeyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ESCAPE){ endEdit(ListEventReason.CANCELLED); } else { if (((_arg1.ctrlKey) && ((_arg1.charCode == 46)))){ endEdit(ListEventReason.CANCELLED); } else { if ((((_arg1.charCode == Keyboard.ENTER)) && (!((_arg1.keyCode == 229))))){ if (editorUsesEnterKey){ return; }; if (endEdit(ListEventReason.NEW_ROW)){ if (!dontEdit){ findNextEnterItemRenderer(_arg1); }; }; }; }; }; } override public function set maxHorizontalScrollPosition(_arg1:Number):void{ super.maxHorizontalScrollPosition = _arg1; scrollAreaChanged = true; invalidateDisplayList(); } public function get editedItemRenderer():IListItemRenderer{ if (!itemEditorInstance){ return (null); }; return (listItems[actualRowIndex][actualColIndex]); } protected function drawRowBackground(_arg1:Sprite, _arg2:int, _arg3:Number, _arg4:Number, _arg5:uint, _arg6:int):void{ var _local7:Shape; var _local8:Graphics; if (_arg2 < _arg1.numChildren){ _local7 = Shape(_arg1.getChildAt(_arg2)); } else { _local7 = new FlexShape(); _local7.name = "rowBackground"; _arg1.addChild(_local7); }; _arg4 = Math.min(rowInfo[_arg2].height, (listContent.height - rowInfo[_arg2].y)); _local7.y = rowInfo[_arg2].y; _local8 = _local7.graphics; _local8.clear(); _local8.beginFill(_arg5, getStyle("backgroundAlpha")); _local8.drawRect(0, 0, listContent.width, _arg4); _local8.endFill(); } mx_internal function getMeasuringRenderer():IListItemRenderer{ var _local1:IListItemRenderer; _local1 = IListItemRenderer(listContent.getChildByName("hiddenItem")); if (!_local1){ _local1 = itemRenderer.newInstance(); _local1.owner = this; _local1.name = "hiddenItem"; _local1.visible = false; _local1.styleName = listContent; listContent.addChild(DisplayObject(_local1)); }; return (_local1); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); setRowCount(listItems.length); if (bEditedItemPositionChanged){ bEditedItemPositionChanged = false; commitEditedItemPosition(_proposedEditedItemPosition); _proposedEditedItemPosition = undefined; }; drawRowBackgrounds(); } override public function measureWidthOfItems(_arg1:int=-1, _arg2:int=0):Number{ var item:IListItemRenderer; var w:Number; var bookmark:CursorBookmark; var rw:Number; var more:Boolean; var i:int; var paddingLeft:Number; var paddingRight:Number; var data:Object; var index = _arg1; var count = _arg2; if (count == 0){ count = (collection) ? collection.length : 0; }; if (((collection) && ((collection.length == 0)))){ count = 0; }; item = getMeasuringRenderer(); item.explicitWidth = NaN; w = 0; bookmark = (iterator) ? iterator.bookmark : null; if (((!((index == -1))) && (iterator))){ iterator.seek(CursorBookmark.FIRST, index); }; more = !((iterator == null)); i = 0; while (i < count) { if (more){ data = iterator.current; setupRendererFromData(item, data); rw = item.measuredWidth; w = Math.max(w, rw); }; if (more){ try { more = iterator.moveNext(); } catch(e:ItemPendingError) { more = false; }; }; i = (i + 1); }; if (iterator){ iterator.seek(bookmark, 0); }; if (w == 0){ if (explicitWidth){ return (explicitWidth); }; return (DEFAULT_MEASURED_WIDTH); }; paddingLeft = getStyle("paddingLeft"); paddingRight = getStyle("paddingRight"); w = (w + (paddingLeft + paddingRight)); return (w); } private function itemEditorItemEditEndHandler(_arg1:ListEvent):void{ var bChanged:Boolean; var bFieldChanged:Boolean; var newData:Object; var data:Object; var listData:BaseListData; var fm:IFocusManager; var event = _arg1; if (!event.isDefaultPrevented()){ bChanged = false; bFieldChanged = false; newData = itemEditorInstance[editorDataField]; data = event.itemRenderer.data; if ((data is String)){ if (!(newData is String)){ newData = newData.toString(); }; } else { if ((data is uint)){ if (!(newData is uint)){ newData = uint(newData); }; } else { if ((data is int)){ if (!(newData is int)){ newData = int(newData); }; } else { if ((data is Number)){ if (!(newData is int)){ newData = Number(newData); }; } else { bFieldChanged = true; try { data[labelField] = newData; if (!(data is IPropertyChangeNotifier)){ collection.itemUpdated(data, labelField); }; } catch(e:Error) { trace("attempt to write to", labelField, "failed. You may need a custom ITEM_EDIT_END handler"); }; }; }; }; }; if (!bFieldChanged){ if (data != newData){ bChanged = true; data = newData; }; if (bChanged){ if ((collection is IList)){ IList(collection).setItemAt(data, event.rowIndex); } else { trace("attempt to update collection failed. You may need a custom ITEM_EDIT_END handler"); }; }; }; if ((event.itemRenderer is IDropInListItemRenderer)){ listData = BaseListData(IDropInListItemRenderer(event.itemRenderer).listData); listData.label = itemToLabel(data); IDropInListItemRenderer(event.itemRenderer).listData = listData; }; event.itemRenderer.data = data; } else { if (event.reason != ListEventReason.OTHER){ if (((itemEditorInstance) && (_editedItemPosition))){ if (selectedIndex != _editedItemPosition.rowIndex){ selectedIndex = _editedItemPosition.rowIndex; }; fm = focusManager; if ((itemEditorInstance is IFocusManagerComponent)){ fm.setFocus(IFocusManagerComponent(itemEditorInstance)); }; }; }; }; if ((((event.reason == ListEventReason.OTHER)) || (!(event.isDefaultPrevented())))){ destroyItemEditor(); }; } public function get editedItemPosition():Object{ if (_editedItemPosition){ return ({rowIndex:_editedItemPosition.rowIndex, columnIndex:0}); }; return (_editedItemPosition); } override protected function drawHighlightIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawHighlightIndicator(_arg1, 0, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } override protected function drawCaretIndicator(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:IListItemRenderer):void{ super.drawCaretIndicator(_arg1, 0, _arg3, ((unscaledWidth - viewMetrics.left) - viewMetrics.right), _arg5, _arg6, _arg7); } private function deactivateHandler(_arg1:Event):void{ if (itemEditorInstance){ endEdit(ListEventReason.OTHER); losingFocus = true; setFocus(); }; } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:Boolean; if (_arg1.target != this){ return; }; if (losingFocus){ losingFocus = false; return; }; super.focusInHandler(_arg1); if (((editable) && (!(isPressed)))){ _editedItemPosition = lastEditedItemPosition; _local2 = !((editedItemPosition == null)); if (!_editedItemPosition){ _editedItemPosition = {rowIndex:0, columnIndex:0}; _local2 = ((listItems.length) && ((listItems[0].length > 0))); }; if (_local2){ setEditedItemPosition(_editedItemPosition); }; }; if (editable){ addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler); }; } private function itemEditorFocusOutHandler(_arg1:FocusEvent):void{ if (((_arg1.relatedObject) && (contains(_arg1.relatedObject)))){ return; }; if (!_arg1.relatedObject){ return; }; if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; } private function findNextEnterItemRenderer(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:ListEvent; if (_proposedEditedItemPosition !== undefined){ return; }; _editedItemPosition = lastEditedItemPosition; _local2 = _editedItemPosition.rowIndex; _local3 = _editedItemPosition.columnIndex; _local4 = (_editedItemPosition.rowIndex + (_arg1.shiftKey) ? -1 : 1); if ((((_local4 < collection.length)) && ((_local4 >= 0)))){ _local2 = _local4; }; _local5 = new ListEvent(ListEvent.ITEM_EDIT_BEGINNING, false, true); _local5.rowIndex = _local2; _local5.columnIndex = 0; dispatchEvent(_local5); } public function get imeMode():String{ return (_imeMode); } mx_internal function setupRendererFromData(_arg1:IListItemRenderer, _arg2:Object):void{ if ((_arg1 is IDropInListItemRenderer)){ if (_arg2 != null){ IDropInListItemRenderer(_arg1).listData = makeListData(_arg2, itemToUID(_arg2), 0); } else { IDropInListItemRenderer(_arg1).listData = null; }; }; _arg1.data = _arg2; if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).invalidateSize(); }; UIComponentGlobals.layoutManager.validateClient(_arg1, true); } override protected function drawRowBackgrounds():void{ var _local1:Sprite; var _local2:Array; var _local3:int; var _local4:int; var _local5:int; _local1 = Sprite(listContent.getChildByName("rowBGs")); if (!_local1){ _local1 = new FlexSprite(); _local1.mouseEnabled = false; _local1.name = "rowBGs"; listContent.addChildAt(_local1, 0); }; _local2 = getStyle("alternatingItemColors"); if (!_local2){ return; }; StyleManager.getColorNames(_local2); _local3 = 0; _local4 = 0; _local5 = listItems.length; while (_local3 < _local5) { var _temp1 = _local4; _local4 = (_local4 + 1); drawRowBackground(_local1, _temp1, rowInfo[_local3].y, rowInfo[_local3].height, _local2[(_local3 % _local2.length)], _local3); _local3++; }; while (_local1.numChildren > _local5) { _local1.removeChildAt((_local1.numChildren - 1)); }; } private function itemEditorItemEditBeginHandler(_arg1:ListEvent):void{ var _local2:IFocusManager; stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); if (((!(_arg1.isDefaultPrevented())) && (!((listItems[actualRowIndex][actualColIndex].data == null))))){ createItemEditor(_arg1.columnIndex, _arg1.rowIndex); if ((((editedItemRenderer is IDropInListItemRenderer)) && ((itemEditorInstance is IDropInListItemRenderer)))){ IDropInListItemRenderer(itemEditorInstance).listData = IDropInListItemRenderer(editedItemRenderer).listData; }; if (!rendererIsEditor){ itemEditorInstance.data = editedItemRenderer.data; }; if ((itemEditorInstance is IInvalidating)){ IInvalidating(itemEditorInstance).validateNow(); }; if ((itemEditorInstance is IIMESupport)){ IIMESupport(itemEditorInstance).imeMode = imeMode; }; _local2 = focusManager; if ((itemEditorInstance is IFocusManagerComponent)){ _local2.setFocus(IFocusManagerComponent(itemEditorInstance)); }; _local2.defaultButtonEnabled = false; _arg1 = new ListEvent(ListEvent.ITEM_FOCUS_IN); _arg1.rowIndex = _editedItemPosition.rowIndex; _arg1.itemRenderer = itemEditorInstance; dispatchEvent(_arg1); }; } override protected function measure():void{ var _local1:EdgeMetrics; super.measure(); _local1 = viewMetrics; measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; if (((((((initialized) && (variableRowHeight))) && ((explicitRowCount < 1)))) && (isNaN(explicitRowHeight)))){ measuredHeight = height; }; } protected function endEdit(_arg1:String):Boolean{ var _local2:ListEvent; if (!editedItemRenderer){ return (true); }; inEndEdit = true; _local2 = new ListEvent(ListEvent.ITEM_EDIT_END, false, true); _local2.rowIndex = editedItemPosition.rowIndex; _local2.itemRenderer = editedItemRenderer; _local2.reason = _arg1; dispatchEvent(_local2); dontEdit = !((itemEditorInstance == null)); if (((!(dontEdit)) && ((_arg1 == ListEventReason.CANCELLED)))){ losingFocus = true; setFocus(); }; inEndEdit = false; return (!(_local2.isDefaultPrevented())); } private function editorMouseDownHandler(_arg1:MouseEvent):void{ if (!itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))){ endEdit(ListEventReason.OTHER); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; invalidateDisplayList(); } override public function get baselinePosition():Number{ if (((listItems.length) && (listItems[0].length))){ return (((borderMetrics.top + cachedPaddingTop) + listItems[0][0].baselinePosition)); }; return (NaN); } override protected function focusOutHandler(_arg1:FocusEvent):void{ if (_arg1.target == this){ super.focusOutHandler(_arg1); }; if ((((_arg1.relatedObject == this)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ return; }; if ((((_arg1.relatedObject == null)) && (itemRendererContains(editedItemRenderer, DisplayObject(_arg1.target))))){ return; }; if ((((_arg1.relatedObject == null)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){ return; }; if (((itemEditorInstance) && (((!(_arg1.relatedObject)) || (!(itemRendererContains(itemEditorInstance, _arg1.relatedObject))))))){ endEdit(ListEventReason.OTHER); removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); removeEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler); }; } private function findNextItemRenderer(_arg1:Boolean):Boolean{ var _local2:int; var _local3:int; var _local4:int; var _local5:ListEvent; if (!lastEditedItemPosition){ return (false); }; if (_proposedEditedItemPosition !== undefined){ return (false); }; _editedItemPosition = lastEditedItemPosition; _local2 = _editedItemPosition.rowIndex; _local3 = _editedItemPosition.columnIndex; _local4 = (_editedItemPosition.rowIndex + (_arg1) ? -1 : 1); if ((((_local4 < collection.length)) && ((_local4 >= 0)))){ _local2 = _local4; } else { setEditedItemPosition(null); losingFocus = true; setFocus(); return (false); }; _local5 = new ListEvent(ListEvent.ITEM_EDIT_BEGINNING, false, true); _local5.rowIndex = _local2; _local5.columnIndex = _local3; dispatchEvent(_local5); return (true); } override protected function mouseEventToItemRenderer(_arg1:MouseEvent):IListItemRenderer{ var _local2:IListItemRenderer; _local2 = super.mouseEventToItemRenderer(_arg1); return (((_local2 == itemEditorInstance)) ? null : _local2); } override protected function collectionChangeHandler(_arg1:Event):void{ var _local2:CollectionEvent; if ((_arg1 is CollectionEvent)){ _local2 = CollectionEvent(_arg1); if (_local2.kind == CollectionEventKind.REMOVE){ if (editedItemPosition){ if (collection.length == 0){ if (itemEditorInstance){ endEdit(ListEventReason.CANCELLED); }; setEditedItemPosition(null); } else { if (_local2.location <= editedItemPosition.rowIndex){ if (inEndEdit){ _editedItemPosition = {columnIndex:editedItemPosition.columnIndex, rowIndex:Math.max(0, (editedItemPosition.rowIndex - _local2.items.length))}; } else { setEditedItemPosition({columnIndex:editedItemPosition.columnIndex, rowIndex:Math.max(0, (editedItemPosition.rowIndex - _local2.items.length))}); }; }; }; }; }; }; super.collectionChangeHandler(_arg1); } override public function set dataProvider(_arg1:Object):void{ if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; super.dataProvider = _arg1; } override protected function initializeAccessibility():void{ if (createAccessibilityImplementation != null){ createAccessibilityImplementation(this); }; } override protected function scrollHandler(_arg1:Event):void{ var scrollBar:ScrollBar; var pos:Number; var delta:int; var o:EdgeMetrics; var bookmark:CursorBookmark; var event = _arg1; if ((event is ScrollEvent)){ if (itemEditorInstance){ endEdit(ListEventReason.OTHER); }; if (((!(liveScrolling)) && ((ScrollEvent(event).detail == ScrollEventDetail.THUMB_TRACK)))){ return; }; scrollBar = ScrollBar(event.target); pos = scrollBar.scrollPosition; removeClipMask(); if (scrollBar == verticalScrollBar){ delta = (pos - verticalScrollPosition); super.scrollHandler(event); if (Math.abs(delta) >= (listItems.length - lockedRowCount)){ try { iterator.seek(CursorBookmark.CURRENT, delta); } catch(e:ItemPendingError) { lastSeekPending = new ListBaseSeekPending(CursorBookmark.CURRENT, delta); e.addResponder(new ItemResponder(seekPendingResultHandler, seekPendingFailureHandler, lastSeekPending)); iteratorValid = false; }; bookmark = iterator.bookmark; clearIndicators(); visibleData = {}; makeRowsAndColumns(0, 0, listContent.width, listContent.height, 0, 0); iterator.seek(bookmark, 0); } else { if (delta != 0){ scrollVertically(pos, Math.abs(delta), Boolean((delta > 0))); }; }; if (variableRowHeight){ configureScrollBars(); }; drawRowBackgrounds(); } else { delta = (pos - _horizontalScrollPosition); super.scrollHandler(event); scrollHorizontally(pos, Math.abs(delta), Boolean((delta > 0))); }; addClipMask(false); }; } } }//package mx.controls
Section 118
//NumericStepper (mx.controls.NumericStepper) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.text.*; import mx.controls.listClasses.*; import flash.ui.*; public class NumericStepper extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IIMESupport, IListItemRenderer { private var valueChanged:Boolean;// = false mx_internal var nextButton:Button; private var enabledChanged:Boolean;// = false private var _data:Object; private var _nextValue:Number;// = 0 private var _maximum:Number;// = 10 private var _value:Number;// = 0 private var valueSet:Boolean; private var proposedValue:Number;// = 0 private var _maxChars:int;// = 0 private var _stepSize:Number;// = 1 private var _previousValue:Number;// = 0 private var _listData:BaseListData; private var _minimum:Number;// = 0 mx_internal var prevButton:Button; mx_internal var inputField:TextInput; private var maxCharsChanged:Boolean;// = false private var _imeMode:String;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function NumericStepper(){ enabledChanged = false; _imeMode = null; _maxChars = 0; maxCharsChanged = false; _maximum = 10; _minimum = 0; _nextValue = 0; _previousValue = 0; _stepSize = 1; _value = 0; proposedValue = 0; valueChanged = false; super(); } public function get minimum():Number{ return (_minimum); } public function set minimum(_arg1:Number):void{ _minimum = _arg1; if (!valueChanged){ this.value = this.value; valueSet = false; }; dispatchEvent(new Event("minimumChanged")); } private function inputField_focusOutHandler(_arg1:FocusEvent):void{ focusOutHandler(_arg1); dispatchEvent(new FocusEvent(_arg1.type, false, false, _arg1.relatedObject, _arg1.shiftKey, _arg1.keyCode)); } private function buttonPress(_arg1:Button, _arg2:Event=null):void{ var _local3:Number; if (enabled){ takeValueFromTextField(); _local3 = value; setValue(((_arg1 == nextButton)) ? (value + stepSize) : (value - stepSize), true, _arg2); if (_local3 != value){ inputField.getTextField().setSelection(0, 0); }; }; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == inputField)) || (super.isOurFocus(_arg1)))); } public function set maximum(_arg1:Number):void{ _maximum = _arg1; if (!valueChanged){ this.value = this.value; valueSet = false; }; dispatchEvent(new Event("maximumChanged")); } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; super.focusInHandler(_arg1); _local2 = focusManager; if (_local2){ _local2.defaultButtonEnabled = false; }; } override public function set tabIndex(_arg1:int):void{ if (inputField){ inputField.tabIndex = _arg1; }; } public function get previousValue():Number{ if (checkRange((_value - stepSize))){ _previousValue = (value - stepSize); }; return (_previousValue); } public function get maxChars():int{ return (_maxChars); } public function get stepSize():Number{ return (_stepSize); } public function get imeMode():String{ return (_imeMode); } private function checkRange(_arg1:Number):Boolean{ return ((((_arg1 >= minimum)) && ((_arg1 <= maximum)))); } private function inputField_focusInHandler(_arg1:FocusEvent):void{ focusInHandler(_arg1); dispatchEvent(new FocusEvent(_arg1.type, false, false, _arg1.relatedObject, _arg1.shiftKey, _arg1.keyCode)); } private function inputField_keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = value; switch (_arg1.keyCode){ case Keyboard.DOWN: _local3 = (value - stepSize); setValue(_local3, true); break; case Keyboard.UP: _local3 = (stepSize + value); setValue(_local3, true); break; case Keyboard.HOME: inputField.text = minimum.toString(); setValue(minimum, true); break; case Keyboard.END: inputField.text = maximum.toString(); setValue(maximum, true); break; case Keyboard.ENTER: case Keyboard.TAB: _local4 = Number(inputField.text); if (((!((_local4 == value))) && ((((Math.abs((_local4 - value)) >= 1E-6)) || (isNaN(_local4)))))){ _local5 = checkValidValue(Number(inputField.text)); inputField.text = _local5.toString(); setValue(_local5, true); }; _arg1.stopImmediatePropagation(); break; }; dispatchEvent(_arg1); } private function buttonClickHandler(_arg1:MouseEvent):void{ inputField.setFocus(); inputField.getTextField().setSelection(0, 0); } public function get value():Number{ return ((valueChanged) ? proposedValue : _value); } override protected function measure():void{ var _local1:Number; var _local2:TextLineMetrics; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; super.measure(); _local1 = ((minimum.toString().length > maximum.toString().length)) ? minimum : maximum; _local1 = (_local1 + stepSize); _local2 = measureText(_local1.toString()); _local3 = inputField.getExplicitOrMeasuredHeight(); _local4 = (prevButton.getExplicitOrMeasuredHeight() + nextButton.getExplicitOrMeasuredHeight()); _local5 = Math.max(_local3, _local4); _local5 = Math.max(DEFAULT_MEASURED_MIN_HEIGHT, _local5); _local6 = (_local2.width + UITextField.TEXT_WIDTH_PADDING); _local7 = Math.max(prevButton.getExplicitOrMeasuredWidth(), nextButton.getExplicitOrMeasuredWidth()); _local8 = ((_local6 + _local7) + 20); _local8 = Math.max(DEFAULT_MEASURED_MIN_WIDTH, _local8); measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT; measuredWidth = _local8; measuredHeight = _local5; } override public function setFocus():void{ if (stage){ stage.focus = inputField.getTextField(); }; } public function get listData():BaseListData{ return (_listData); } public function set maxChars(_arg1:int):void{ if (_arg1 == _maxChars){ return; }; _maxChars = _arg1; maxCharsChanged = true; invalidateProperties(); dispatchEvent(new Event("maxCharsChanged")); } private function buttonDownHandler(_arg1:FlexEvent):void{ buttonPress(Button(_arg1.currentTarget), _arg1); } override protected function commitProperties():void{ super.commitProperties(); if (maxCharsChanged){ maxCharsChanged = false; inputField.maxChars = _maxChars; }; if (valueChanged){ valueChanged = false; setValue((isNaN(proposedValue)) ? 0 : proposedValue, false); }; if (enabledChanged){ enabledChanged = false; prevButton.enabled = enabled; nextButton.enabled = enabled; inputField.enabled = enabled; }; } public function set stepSize(_arg1:Number):void{ _stepSize = _arg1; if (!valueChanged){ this.value = this.value; valueSet = false; }; dispatchEvent(new Event("stepSizeChanged")); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; if (inputField){ inputField.imeMode = _imeMode; }; } private function checkValidValue(_arg1:Number):Number{ var _local2:Number; var _local3:Array; var _local4:Number; if (isNaN(_arg1)){ return (this.value); }; _local2 = (stepSize * Math.round((_arg1 / stepSize))); _local3 = new String((1 + stepSize)).split("."); if (_local3.length == 2){ _local4 = Math.pow(10, _local3[1].length); _local2 = (Math.round((_local2 * _local4)) / _local4); }; if (_local2 > maximum){ return (maximum); }; if (_local2 < minimum){ return (minimum); }; return (_local2); } public function get maximum():Number{ return (_maximum); } private function setValue(_arg1:Number, _arg2:Boolean=true, _arg3:Event=null):void{ var _local4:Number; var _local5:NumericStepperEvent; _local4 = checkValidValue(_arg1); if (_local4 == _value){ return; }; _value = _local4; inputField.text = _local4.toString(); if (_arg2){ _local5 = new NumericStepperEvent(NumericStepperEvent.CHANGE); _local5.value = _value; _local5.triggerEvent = _arg3; dispatchEvent(_local5); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } override public function get tabIndex():int{ return ((inputField) ? inputField.tabIndex : -1); } public function get nextValue():Number{ if (checkRange((value + stepSize))){ _nextValue = (value + stepSize); }; return (_nextValue); } private function takeValueFromTextField(_arg1:Event=null):void{ var _local2:Number; var _local3:Number; _local2 = Number(inputField.text); if (((!((_local2 == value))) && ((((Math.abs((_local2 - value)) >= 1E-6)) || (isNaN(_local2)))))){ _local3 = checkValidValue(Number(inputField.text)); inputField.text = _local3.toString(); setValue(_local3, !((_arg1 == null)), _arg1); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; enabledChanged = true; invalidateProperties(); } override public function get baselinePosition():Number{ return ((inputField) ? inputField.baselinePosition : NaN); } private function inputField_changeHandler(_arg1:Event):void{ _arg1.stopImmediatePropagation(); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } public function set value(_arg1:Number):void{ valueSet = true; proposedValue = _arg1; valueChanged = true; invalidateProperties(); invalidateSize(); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; _local2 = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; super.focusOutHandler(_arg1); takeValueFromTextField(_arg1); } override protected function createChildren():void{ super.createChildren(); if (!inputField){ inputField = new TextInput(); inputField.styleName = this; inputField.focusEnabled = false; inputField.restrict = "0-9\\-\\.\\,"; inputField.maxChars = _maxChars; inputField.text = String(_value); inputField.parentDrawsFocus = true; inputField.imeMode = _imeMode; inputField.addEventListener(FocusEvent.FOCUS_IN, inputField_focusInHandler); inputField.addEventListener(FocusEvent.FOCUS_OUT, inputField_focusOutHandler); inputField.addEventListener(KeyboardEvent.KEY_DOWN, inputField_keyDownHandler); inputField.addEventListener(Event.CHANGE, inputField_changeHandler); addChild(inputField); }; if (!nextButton){ nextButton = new Button(); nextButton.styleName = this; nextButton.upSkinName = "upArrowUpSkin"; nextButton.overSkinName = "upArrowOverSkin"; nextButton.downSkinName = "upArrowDownSkin"; nextButton.disabledSkinName = "upArrowDisabledSkin"; nextButton.upIconName = ""; nextButton.overIconName = ""; nextButton.downIconName = ""; nextButton.disabledIconName = ""; nextButton.focusEnabled = false; nextButton.autoRepeat = true; nextButton.addEventListener(MouseEvent.CLICK, buttonClickHandler); nextButton.addEventListener(FlexEvent.BUTTON_DOWN, buttonDownHandler); addChild(nextButton); }; if (!prevButton){ prevButton = new Button(); prevButton.styleName = this; prevButton.upSkinName = "downArrowUpSkin"; prevButton.overSkinName = "downArrowOverSkin"; prevButton.downSkinName = "downArrowDownSkin"; prevButton.disabledSkinName = "downArrowDisabledSkin"; prevButton.upIconName = ""; prevButton.overIconName = ""; prevButton.downIconName = ""; prevButton.disabledIconName = ""; prevButton.focusEnabled = false; prevButton.autoRepeat = true; prevButton.addEventListener(MouseEvent.CLICK, buttonClickHandler); prevButton.addEventListener(FlexEvent.BUTTON_DOWN, buttonDownHandler); addChild(prevButton); }; } override public function get enabled():Boolean{ return (super.enabled); } public function set data(_arg1:Object):void{ _data = _arg1; if (!valueSet){ this.value = (_listData) ? parseFloat(_listData.label) : Number(_data); valueSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function get data():Object{ if (!_listData){ data = this.value; }; return (_data); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; super.updateDisplayList(_arg1, _arg2); _local3 = nextButton.getExplicitOrMeasuredWidth(); _local4 = Math.round((_arg2 / 2)); _local5 = (_arg2 - _local4); nextButton.x = (_arg1 - _local3); nextButton.y = 0; nextButton.setActualSize(_local3, _local5); prevButton.x = (_arg1 - _local3); prevButton.y = (_arg2 - _local4); prevButton.setActualSize(_local3, _local4); inputField.setActualSize((_arg1 - _local3), _arg2); } } }//package mx.controls
Section 119
//RadioButton (mx.controls.RadioButton) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import mx.managers.*; import flash.ui.*; public class RadioButton extends Button implements IFocusManagerGroup { mx_internal var _groupName:String; private var _value:Object; private var _group:RadioButtonGroup; mx_internal var indexNumber:int;// = 0 private var groupChanged:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function RadioButton(){ indexNumber = 0; groupChanged = false; super(); _labelPlacement = ""; _toggle = true; centerContent = false; extraSpacing = 8; groupName = "radioGroup"; addEventListener(FlexEvent.ADD, addHandler); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.DOWN: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.UP: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.LEFT: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.RIGHT: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.SPACE: setThis(); _toggle = false; default: super.keyDownHandler(_arg1); break; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ super.keyUpHandler(_arg1); if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){ _toggle = true; }; } override protected function clickHandler(_arg1:MouseEvent):void{ var _local2:ItemClickEvent; if (((!(enabled)) || (selected))){ return; }; if (!_group){ addToGroup(); }; super.clickHandler(_arg1); group.setSelection(this); _local2 = new ItemClickEvent(ItemClickEvent.ITEM_CLICK); _local2.label = label; _local2.index = indexNumber; _local2.relatedObject = this; _local2.item = value; group.dispatchEvent(_local2); } private function addToGroup():Object{ var _local1:RadioButtonGroup; _local1 = group; if (_local1){ _local1.addInstance(this); }; return (_local1); } public function set group(_arg1:RadioButtonGroup):void{ _group = _arg1; } override public function get emphasized():Boolean{ return (false); } public function get value():Object{ return (_value); } override protected function measure():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; super.measure(); _local1 = measureText(label).height; _local2 = (currentIcon) ? currentIcon.height : 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local3 = Math.max(_local1, _local2); } else { _local3 = (_local1 + _local2); _local4 = getStyle("verticalGap"); if (((!((_local2 == 0))) && (!(isNaN(_local4))))){ _local3 = (_local3 + _local4); }; }; measuredMinHeight = (measuredHeight = Math.max(_local3, 18)); } private function setPrev(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:RadioButton; _local2 = group; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = 1; while (_local4 <= indexNumber) { _local5 = _local2.getRadioButtonAt((indexNumber - _local4)); if (((_local5) && (_local5.enabled))){ if (_arg1){ _local2.setSelection(_local5); }; _local5.setFocus(); return; }; _local4++; }; if (((_arg1) && (!((_local2.getRadioButtonAt(indexNumber) == _local2.selection))))){ _local2.setSelection(this); }; this.drawFocus(true); } public function get groupName():String{ return (_groupName); } override protected function commitProperties():void{ super.commitProperties(); if (groupChanged){ addToGroup(); groupChanged = false; }; } private function setThis():void{ var _local1:RadioButtonGroup; if (!_group){ addToGroup(); }; _local1 = group; if (_local1.selection != this){ _local1.setSelection(this); }; } override public function get labelPlacement():String{ var _local1:String; _local1 = ButtonLabelPlacement.RIGHT; if (_labelPlacement != ""){ _local1 = _labelPlacement; } else { if (((_group) && (!((_group.labelPlacement == ""))))){ _local1 = _group.labelPlacement; }; }; return (_local1); } private function setNext(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:RadioButton; _local2 = group; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = (indexNumber + 1); while (_local4 < _local2.numRadioButtons) { _local5 = _local2.getRadioButtonAt(_local4); if (((_local5) && (_local5.enabled))){ if (_arg1){ _local2.setSelection(_local5); }; _local5.setFocus(); return; }; _local4++; }; if (((_arg1) && (!((_local2.getRadioButtonAt(indexNumber) == _local2.selection))))){ _local2.setSelection(this); }; this.drawFocus(true); } public function get group():RadioButtonGroup{ var g:RadioButtonGroup; if (!document){ return (_group); }; if (!_group){ if (((groupName) && (!((groupName == ""))))){ try { g = RadioButtonGroup(document[groupName]); } catch(e:Error) { if (((document.automaticRadioButtonGroups) && (document.automaticRadioButtonGroups[groupName]))){ g = RadioButtonGroup(document.automaticRadioButtonGroups[groupName]); }; }; if (!g){ g = new RadioButtonGroup(IFlexDisplayObject(document)); if (!document.automaticRadioButtonGroups){ document.automaticRadioButtonGroups = {}; }; document.automaticRadioButtonGroups[groupName] = g; } else { if (!(g is RadioButtonGroup)){ return (null); }; }; _group = g; }; }; return (_group); } override public function set toggle(_arg1:Boolean):void{ } public function set value(_arg1:Object):void{ _value = _arg1; dispatchEvent(new Event("valueChanged")); } private function addHandler(_arg1:FlexEvent):void{ if (((!(_group)) && (initialized))){ addToGroup(); }; } override protected function initializeAccessibility():void{ if (RadioButton.createAccessibilityImplementation != null){ RadioButton.createAccessibilityImplementation(this); }; } mx_internal function deleteGroup():void{ try { if (document[groupName]){ delete document[groupName]; }; } catch(e:Error) { try { if (document.automaticRadioButtonGroups[groupName]){ delete document.automaticRadioButtonGroups[groupName]; }; } catch(e1:Error) { }; }; } override public function get toggle():Boolean{ return (super.toggle); } public function set groupName(_arg1:String):void{ if (((!(_arg1)) || ((_arg1 == "")))){ return; }; deleteGroup(); _groupName = _arg1; groupChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("groupNameChanged")); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); if (groupChanged){ addToGroup(); groupChanged = false; }; if (((((_group) && (_selected))) && (!((_group.selection == this))))){ group.setSelection(this, false); }; } } }//package mx.controls
Section 120
//RadioButtonGroup (mx.controls.RadioButtonGroup) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; public class RadioButtonGroup extends EventDispatcher implements IMXMLObject { private var indexNumber:int;// = 0 private var _selectedValue:Object; private var document:IFlexDisplayObject; private var _selection:RadioButton; private var radioButtons:Array; private var _labelPlacement:String;// = "right" mx_internal static const VERSION:String = "2.0.1.0"; public function RadioButtonGroup(_arg1:IFlexDisplayObject=null){ radioButtons = []; indexNumber = 0; _labelPlacement = "right"; super(); } public function set enabled(_arg1:Boolean):void{ var _local2:int; var _local3:int; _local2 = numRadioButtons; _local3 = 0; while (_local3 < _local2) { getRadioButtonAt(_local3).enabled = _arg1; _local3++; }; dispatchEvent(new Event("enabledChanged")); } private function radioButton_removedHandler(_arg1:Event):void{ var _local2:RadioButton; _local2 = (_arg1.target as RadioButton); if (_local2){ _local2.removeEventListener(Event.REMOVED, radioButton_removedHandler); removeInstance(RadioButton(_arg1.target)); }; } public function get numRadioButtons():int{ return (radioButtons.length); } public function get enabled():Boolean{ var _local1:Number; var _local2:int; var _local3:int; _local1 = 0; _local2 = numRadioButtons; _local3 = 0; while (_local3 < _local2) { _local1 = (_local1 + getRadioButtonAt(_local3).enabled); _local3++; }; if (_local1 == 0){ return (false); }; if (_local1 == _local2){ return (true); }; return (false); } public function get selectedValue():Object{ if (selection){ return (((selection.value)!=null) ? selection.value : selection.label); }; return (null); } public function get labelPlacement():String{ return (_labelPlacement); } public function set selectedValue(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:RadioButton; _selectedValue = _arg1; _local2 = numRadioButtons; _local3 = 0; while (_local3 < _local2) { _local4 = getRadioButtonAt(_local3); if ((((_local4.value == _arg1)) || ((_local4.label == _arg1)))){ changeSelection(_local3, false); break; }; _local3++; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } mx_internal function addInstance(_arg1:RadioButton):void{ _arg1.indexNumber = indexNumber++; _arg1.addEventListener(Event.REMOVED, radioButton_removedHandler); radioButtons.push(_arg1); if (_selectedValue){ selectedValue = _selectedValue; }; dispatchEvent(new Event("numRadioButtonsChanged")); } public function set selection(_arg1:RadioButton):void{ setSelection(_arg1, false); } public function set labelPlacement(_arg1:String):void{ var _local2:int; var _local3:int; _labelPlacement = _arg1; _local2 = numRadioButtons; _local3 = 0; while (_local3 < _local2) { getRadioButtonAt(_local3).labelPlacement = _arg1; _local3++; }; } public function initialized(_arg1:Object, _arg2:String):void{ this.document = (_arg1) ? IFlexDisplayObject(_arg1) : IFlexDisplayObject(Application.application); } public function get selection():RadioButton{ return (_selection); } public function getRadioButtonAt(_arg1:int):RadioButton{ return (RadioButton(radioButtons[_arg1])); } mx_internal function setSelection(_arg1:RadioButton, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; if ((((_arg1 == null)) && (!((_selection == null))))){ _selection.selected = false; _selection = null; if (_arg2){ dispatchEvent(new Event(Event.CHANGE)); }; } else { _local3 = numRadioButtons; _local4 = 0; while (_local4 < _local3) { if (_arg1 == getRadioButtonAt(_local4)){ changeSelection(_local4, _arg2); break; }; _local4++; }; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } mx_internal function removeInstance(_arg1:RadioButton):void{ var _local2:Boolean; var _local3:int; var _local4:RadioButton; if (_arg1){ _local2 = false; _local3 = 0; while (_local3 < numRadioButtons) { _local4 = getRadioButtonAt(_local3); if (_local2){ _local4.indexNumber--; } else { if (_local4 == _arg1){ _local4.group = null; if (_arg1 == _selection){ _selection = null; }; radioButtons.splice(_local3, 1); _local2 = true; indexNumber--; _local3--; }; }; _local3++; }; if (_local2){ dispatchEvent(new Event("numRadioButtonsChanged")); }; }; } private function changeSelection(_arg1:int, _arg2:Boolean=true):void{ if (getRadioButtonAt(_arg1)){ if (selection){ selection.selected = false; }; _selection = getRadioButtonAt(_arg1); _selection.selected = true; if (_arg2){ dispatchEvent(new Event(Event.CHANGE)); }; }; } private function getValue():String{ if (selection){ return ((((((selection.value) && ((selection.value is String)))) && (!((String(selection.value).length == 0))))) ? String(selection.value) : selection.label); //unresolved jump }; return (null); } } }//package mx.controls
Section 121
//Text (mx.controls.Text) package mx.controls { import mx.core.*; import mx.events.*; public class Text extends Label { private var lastUnscaledWidth:Number;// = NAN mx_internal static const VERSION:String = "2.0.1.0"; public function Text(){ lastUnscaledWidth = NaN; super(); selectable = true; truncateToFit = false; addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler); } override protected function measure():void{ if (isSpecialCase()){ if (!isNaN(lastUnscaledWidth)){ measureUsingWidth(lastUnscaledWidth); } else { measuredWidth = 0; measuredHeight = 0; }; return; }; measureUsingWidth(explicitWidth); } private function measureUsingWidth(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = getStyle("paddingLeft"); _local3 = getStyle("paddingTop"); _local4 = getStyle("paddingRight"); _local5 = getStyle("paddingBottom"); textField.validateNow(); textField.autoSize = "left"; if (!isNaN(_arg1)){ textField.width = ((_arg1 - _local2) - _local4); measuredWidth = (Math.ceil(textField.textWidth) + UITextField.TEXT_WIDTH_PADDING); measuredHeight = (Math.ceil(textField.textHeight) + UITextField.TEXT_HEIGHT_PADDING); } else { textField.wordWrap = false; measuredWidth = (Math.ceil(textField.textWidth) + UITextField.TEXT_WIDTH_PADDING); measuredHeight = (Math.ceil(textField.textHeight) + UITextField.TEXT_HEIGHT_PADDING); textField.wordWrap = true; }; textField.autoSize = "none"; measuredWidth = (measuredWidth + (_local2 + _local4)); measuredHeight = (measuredHeight + (_local3 + _local5)); if (isNaN(explicitWidth)){ measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT; } else { measuredMinWidth = measuredWidth; measuredMinHeight = measuredHeight; }; } private function updateCompleteHandler(_arg1:FlexEvent):void{ lastUnscaledWidth = NaN; } override protected function childrenCreated():void{ super.childrenCreated(); textField.multiline = true; textField.wordWrap = true; textField.mouseWheelEnabled = false; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Boolean; if (isSpecialCase()){ _local7 = ((isNaN(lastUnscaledWidth)) || (!((lastUnscaledWidth == _arg1)))); lastUnscaledWidth = _arg1; if (_local7){ invalidateSize(); return; }; }; _local3 = getStyle("paddingLeft"); _local4 = getStyle("paddingTop"); _local5 = getStyle("paddingRight"); _local6 = getStyle("paddingBottom"); textField.setActualSize(((_arg1 - _local3) - _local5), ((_arg2 - _local4) - _local6)); textField.x = _local3; textField.y = _local4; } private function isSpecialCase():Boolean{ var _local1:Number; var _local2:Number; _local1 = getStyle("left"); _local2 = getStyle("right"); return (((((((!(isNaN(percentWidth))) || (((!(isNaN(_local1))) && (!(isNaN(_local2))))))) && (isNaN(explicitHeight)))) && (isNaN(percentHeight)))); } } }//package mx.controls
Section 122
//TextArea (mx.controls.TextArea) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.text.*; import mx.resources.*; import mx.controls.listClasses.*; import flash.accessibility.*; import mx.utils.*; import flash.system.*; public class TextArea extends ScrollControlBase implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IIMESupport, IListItemRenderer { private var _selectionEndIndex:int;// = 0 private var _restrict:String;// = null private var htmlTextChanged:Boolean;// = false private var enabledChanged:Boolean;// = false private var _data:Object; private var restrictChanged:Boolean;// = false private var errorCaught:Boolean;// = false private var displayAsPasswordChanged:Boolean;// = false private var allowScrollEvent:Boolean;// = true private var _displayAsPassword:Boolean;// = false private var textChanged:Boolean;// = false private var _htmlText:String;// = "" private var _condenseWhite:Boolean;// = false private var selectableChanged:Boolean;// = false private var explicitHTMLText:String;// = null private var _selectionBeginIndex:int;// = 0 private var tabIndexChanged:Boolean;// = false private var wordWrapChanged:Boolean;// = false private var _accessibilityProperties:AccessibilityProperties; private var condenseWhiteChanged:Boolean;// = false private var _text:String;// = "" private var _selectable:Boolean;// = true private var _maxChars:int;// = 0 private var accessibilityPropertiesChanged:Boolean;// = false private var _textHeight:Number; private var _listData:BaseListData; private var prevMode:String;// = null private var _vScrollPosition:Number; private var _textWidth:Number; private var _hScrollPosition:Number; private var selectionChanged:Boolean;// = false private var maxCharsChanged:Boolean;// = false private var _tabIndex:int;// = -1 private var editableChanged:Boolean;// = false private var _imeMode:String;// = null private var _wordWrap:Boolean;// = true private var _editable:Boolean;// = true protected var textField:UITextField; private var _styleSheet:StyleSheet; private var textSet:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceUnsupportedMode:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("controls", ApplicationDomain.currentDomain); public function TextArea(){ allowScrollEvent = true; selectionChanged = false; prevMode = null; errorCaught = false; accessibilityPropertiesChanged = false; enabledChanged = false; _tabIndex = -1; tabIndexChanged = false; _condenseWhite = false; condenseWhiteChanged = false; _displayAsPassword = false; displayAsPasswordChanged = false; _editable = true; editableChanged = false; _htmlText = ""; htmlTextChanged = false; explicitHTMLText = null; _imeMode = null; _maxChars = 0; maxCharsChanged = false; _restrict = null; restrictChanged = false; _selectable = true; selectableChanged = false; _selectionBeginIndex = 0; _selectionEndIndex = 0; _text = ""; textChanged = false; _wordWrap = true; wordWrapChanged = false; super(); tabChildren = true; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } private function textField_textInputHandler(_arg1:TextEvent):void{ var _local2:TextEvent; _arg1.stopImmediatePropagation(); _local2 = new TextEvent(TextEvent.TEXT_INPUT, false, true); _local2.text = _arg1.text; dispatchEvent(_local2); if (_local2.isDefaultPrevented()){ _arg1.preventDefault(); }; } private function adjustScrollBars():void{ var _local1:Number; var _local2:Number; _local1 = ((textField.bottomScrollV - textField.scrollV) + 1); _local2 = textField.numLines; setScrollBarProperties((textField.width + textField.maxScrollH), textField.width, textField.numLines, _local1); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get selectionBeginIndex():int{ return ((textField) ? textField.selectionBeginIndex : _selectionBeginIndex); } public function set styleSheet(_arg1:StyleSheet):void{ textField.styleSheet = _arg1; } public function get selectable():Boolean{ return (_selectable); } override public function set verticalScrollPosition(_arg1:Number):void{ super.verticalScrollPosition = _arg1; _vScrollPosition = _arg1; if (textField){ textField.scrollV = (_arg1 + 1); textField.background = false; } else { invalidateProperties(); }; } override public function set tabIndex(_arg1:int):void{ if (_arg1 == _tabIndex){ return; }; _tabIndex = _arg1; tabIndexChanged = true; invalidateProperties(); } override protected function focusInHandler(_arg1:FocusEvent):void{ var fm:IFocusManager; var event = _arg1; if (event.target == this){ systemManager.stage.focus = textField; }; fm = focusManager; if (((editable) && (fm))){ fm.showFocusIndicator = true; }; if (fm){ fm.defaultButtonEnabled = false; }; super.focusInHandler(event); if (((!((_imeMode == null))) && (_editable))){ IME.enabled = true; prevMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(StringUtil.substitute(resourceUnsupportedMode, _imeMode))); }; }; } private function textField_changeHandler(_arg1:Event):void{ textFieldChanged(false, false); adjustScrollBars(); textChanged = false; htmlTextChanged = false; _arg1.stopImmediatePropagation(); dispatchEvent(new Event(Event.CHANGE)); } public function set selectable(_arg1:Boolean):void{ if (_arg1 == selectable){ return; }; _selectable = _arg1; selectableChanged = true; invalidateProperties(); } private function textField_textFieldStyleChangeHandler(_arg1:Event):void{ textFieldChanged(true, false); } public function set selectionBeginIndex(_arg1:int):void{ _selectionBeginIndex = _arg1; selectionChanged = true; invalidateProperties(); } override public function get horizontalScrollPolicy():String{ return (((height <= 40)) ? ScrollPolicy.OFF : _horizontalScrollPolicy); } public function set selectionEndIndex(_arg1:int):void{ _selectionEndIndex = _arg1; selectionChanged = true; invalidateProperties(); } public function set editable(_arg1:Boolean):void{ if (_arg1 == _editable){ return; }; _editable = _arg1; editableChanged = true; invalidateProperties(); dispatchEvent(new Event("editableChanged")); } override public function set horizontalScrollPosition(_arg1:Number):void{ super.horizontalScrollPosition = _arg1; _hScrollPosition = _arg1; if (textField){ textField.scrollH = _arg1; textField.background = false; } else { invalidateProperties(); }; } override protected function mouseWheelHandler(_arg1:MouseEvent):void{ _arg1.stopPropagation(); } public function get maxChars():int{ return (_maxChars); } public function get textHeight():Number{ return (_textHeight); } public function get textWidth():Number{ return (_textWidth); } override public function get verticalScrollPolicy():String{ return (((height <= 40)) ? ScrollPolicy.OFF : _verticalScrollPolicy); } public function set wordWrap(_arg1:Boolean):void{ if (_arg1 == _wordWrap){ return; }; _wordWrap = _arg1; wordWrapChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("wordWrapChanged")); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return ((textField) ? textField.getLineMetrics(_arg1) : null); } mx_internal function getTextField():UITextField{ return (textField); } override public function get accessibilityProperties():AccessibilityProperties{ return (_accessibilityProperties); } public function get imeMode():String{ return (_imeMode); } public function get text():String{ return (_text); } override protected function measure():void{ super.measure(); measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; measuredWidth = DEFAULT_MEASURED_WIDTH; measuredMinHeight = (measuredHeight = (2 * DEFAULT_MEASURED_MIN_HEIGHT)); } public function set restrict(_arg1:String):void{ if (_arg1 == _restrict){ return; }; _restrict = _arg1; restrictChanged = true; invalidateProperties(); dispatchEvent(new Event("restrictChanged")); } override public function setFocus():void{ var _local1:int; _local1 = verticalScrollPosition; allowScrollEvent = false; textField.setFocus(); verticalScrollPosition = _local1; allowScrollEvent = true; } public function get listData():BaseListData{ return (_listData); } public function set maxChars(_arg1:int):void{ if (_arg1 == _maxChars){ return; }; _maxChars = _arg1; maxCharsChanged = true; invalidateProperties(); dispatchEvent(new Event("maxCharsChanged")); } override protected function commitProperties():void{ super.commitProperties(); if (accessibilityPropertiesChanged){ textField.accessibilityProperties = _accessibilityProperties; accessibilityPropertiesChanged = false; }; if (condenseWhiteChanged){ textField.condenseWhite = _condenseWhite; condenseWhiteChanged = false; }; if (displayAsPasswordChanged){ textField.displayAsPassword = _displayAsPassword; displayAsPasswordChanged = false; }; if (editableChanged){ textField.type = (((_editable) && (enabled))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; editableChanged = false; }; if (enabledChanged){ textField.enabled = enabled; enabledChanged = false; }; if (maxCharsChanged){ textField.maxChars = _maxChars; maxCharsChanged = false; }; if (restrictChanged){ textField.restrict = _restrict; restrictChanged = false; }; if (selectableChanged){ textField.selectable = _selectable; selectableChanged = false; }; if (tabIndexChanged){ textField.tabIndex = _tabIndex; tabIndexChanged = false; }; if (wordWrapChanged){ textField.wordWrap = _wordWrap; wordWrapChanged = false; }; if (((textChanged) || (htmlTextChanged))){ if (isHTML){ textField.htmlText = explicitHTMLText; } else { textField.text = _text; }; textFieldChanged(false, true); textChanged = false; htmlTextChanged = false; }; if (selectionChanged){ textField.setSelection(_selectionBeginIndex, _selectionEndIndex); selectionChanged = false; }; if (!isNaN(_hScrollPosition)){ horizontalScrollPosition = _hScrollPosition; }; if (!isNaN(_vScrollPosition)){ verticalScrollPosition = _vScrollPosition; }; } override public function get maxHorizontalScrollPosition():Number{ return ((textField) ? textField.maxScrollH : 0); } private function textField_textFormatChangeHandler(_arg1:Event):void{ textFieldChanged(true, false); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } private function textFieldChanged(_arg1:Boolean, _arg2:Boolean):void{ var _local3:Boolean; if (!_arg1){ _local3 = !((_text == textField.text)); _text = textField.text; if (_local3){ dispatchEvent(new Event("textChanged")); if (_arg2){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; }; _local3 = !((_htmlText == textField.htmlText)); _htmlText = textField.htmlText; if (_local3){ dispatchEvent(new Event("htmlTextChanged")); }; _textWidth = textField.textWidth; _textHeight = textField.textHeight; } public function get styleSheet():StyleSheet{ return (textField.styleSheet); } override public function get tabIndex():int{ return (_tabIndex); } override public function set accessibilityProperties(_arg1:AccessibilityProperties):void{ if (_arg1 == _accessibilityProperties){ return; }; _accessibilityProperties = _arg1; accessibilityPropertiesChanged = true; invalidateProperties(); } public function set text(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((_arg1 == _text)))){ return; }; _text = _arg1; textChanged = true; _htmlText = null; explicitHTMLText = null; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("textChanged")); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function get selectionEndIndex():int{ return ((textField) ? textField.selectionEndIndex : _selectionEndIndex); } public function get wordWrap():Boolean{ return (_wordWrap); } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; enabledChanged = true; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; invalidateProperties(); if (((border) && ((border is IInvalidating)))){ IInvalidating(border).invalidateDisplayList(); }; } public function get editable():Boolean{ return (_editable); } public function set condenseWhite(_arg1:Boolean):void{ if (_arg1 == _condenseWhite){ return; }; _condenseWhite = _arg1; condenseWhiteChanged = true; if (isHTML){ htmlTextChanged = true; }; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("condenseWhiteChanged")); } public function set displayAsPassword(_arg1:Boolean):void{ if (_arg1 == _displayAsPassword){ return; }; _displayAsPassword = _arg1; displayAsPasswordChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("displayAsPasswordChanged")); } override public function get baselinePosition():Number{ var _local1:String; _local1 = text; if (((!(_local1)) || ((_local1 == "")))){ _local1 = " "; }; return ((viewMetrics.top + measureText(_local1).ascent)); } override public function get maxVerticalScrollPosition():Number{ return ((textField) ? (textField.maxScrollV - 1) : 0); } private function textField_scrollHandler(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:ScrollEvent; if (((initialized) && (allowScrollEvent))){ _local2 = (textField.scrollH - horizontalScrollPosition); _local3 = ((textField.scrollV - 1) - verticalScrollPosition); horizontalScrollPosition = textField.scrollH; verticalScrollPosition = (textField.scrollV - 1); if (_local2){ _local4 = new ScrollEvent(ScrollEvent.SCROLL, false, false, null, horizontalScrollPosition, ScrollEventDirection.HORIZONTAL, _local2); dispatchEvent(_local4); }; if (_local3){ _local4 = new ScrollEvent(ScrollEvent.SCROLL, false, false, null, verticalScrollPosition, ScrollEventDirection.VERTICAL, _local3); dispatchEvent(_local4); }; }; } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } public function get restrict():String{ return (_restrict); } public function set htmlText(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; _htmlText = _arg1; htmlTextChanged = true; _text = null; explicitHTMLText = _arg1; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("htmlTextChanged")); } public function get length():int{ return (((text)!=null) ? text.length : -1); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; _local2 = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; super.focusOutHandler(_arg1); if (((!((_imeMode == null))) && (_editable))){ if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((prevMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = prevMode; }; IME.enabled = false; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = new UITextField(); textField.autoSize = TextFieldAutoSize.NONE; textField.enabled = enabled; textField.ignorePadding = true; textField.multiline = true; textField.selectable = true; textField.styleName = this; textField.tabEnabled = true; textField.type = TextFieldType.INPUT; textField.useRichTextClipboard = true; textField.wordWrap = true; textField.addEventListener(Event.CHANGE, textField_changeHandler); textField.addEventListener(Event.SCROLL, textField_scrollHandler); textField.addEventListener(IOErrorEvent.IO_ERROR, textField_ioErrorHandler); textField.addEventListener(TextEvent.TEXT_INPUT, textField_textInputHandler); textField.addEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler); textField.addEventListener("textFormatChange", textField_textFormatChangeHandler); addChild(textField); }; } private function textField_ioErrorHandler(_arg1:IOErrorEvent):void{ } public function get condenseWhite():Boolean{ return (_condenseWhite); } public function get displayAsPassword():Boolean{ return (_displayAsPassword); } public function setSelection(_arg1:int, _arg2:int):void{ _selectionBeginIndex = _arg1; _selectionEndIndex = _arg2; selectionChanged = true; invalidateProperties(); } public function set data(_arg1:Object):void{ var _local2:*; _data = _arg1; if (_listData){ _local2 = _listData.label; } else { if (_data != null){ if ((_data is String)){ _local2 = String(_data); } else { _local2 = _data.toString(); }; }; }; if (((!((_local2 === undefined))) && (!(textSet)))){ text = _local2; textSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function get htmlText():String{ return (_htmlText); } public function get data():Object{ return (_data); } override protected function scrollHandler(_arg1:Event):void{ if ((_arg1 is ScrollEvent)){ if (((!(liveScrolling)) && ((ScrollEvent(_arg1).detail == ScrollEventDetail.THUMB_TRACK)))){ return; }; super.scrollHandler(_arg1); textField.scrollH = horizontalScrollPosition; textField.scrollV = (verticalScrollPosition + 1); _vScrollPosition = (textField.scrollV - 1); _hScrollPosition = textField.scrollH; }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; super.updateDisplayList(_arg1, _arg2); _local3 = viewMetrics; _local3.left = (_local3.left + getStyle("paddingLeft")); _local3.top = (_local3.top + getStyle("paddingTop")); _local3.right = (_local3.right + getStyle("paddingRight")); _local3.bottom = (_local3.bottom + getStyle("paddingBottom")); textField.move(_local3.left, _local3.top); _local4 = ((_arg1 - _local3.left) - _local3.right); _local5 = ((_arg2 - _local3.top) - _local3.bottom); if ((_local3.top + _local3.bottom) > 0){ _local5++; }; textField.setActualSize(Math.max(4, _local4), Math.max(4, _local5)); if (!initialized){ callLater(invalidateDisplayList); } else { callLater(adjustScrollBars); }; if (isNaN(_hScrollPosition)){ _hScrollPosition = 0; }; if (isNaN(_vScrollPosition)){ _vScrollPosition = 0; }; _local6 = Math.min(textField.maxScrollH, _hScrollPosition); if (_local6 != textField.scrollH){ horizontalScrollPosition = _local6; }; _local6 = Math.min((textField.maxScrollV - 1), _vScrollPosition); if (_local6 != (textField.scrollV - 1)){ verticalScrollPosition = _local6; }; } private static function loadResources():void{ resourceUnsupportedMode = packageResources.getString("unsupportedMode"); } loadResources(); } }//package mx.controls
Section 123
//TextInput (mx.controls.TextInput) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import flash.text.*; import mx.resources.*; import mx.controls.listClasses.*; import flash.accessibility.*; import mx.utils.*; import mx.skins.*; import flash.system.*; import flash.ui.*; public class TextInput extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IIMESupport, IListItemRenderer { private var _selectionEndIndex:int;// = 0 private var _restrict:String; private var htmlTextChanged:Boolean;// = false mx_internal var border:IFlexDisplayObject; private var enabledChanged:Boolean;// = false private var displayAsPasswordChanged:Boolean;// = false private var restrictChanged:Boolean;// = false private var _data:Object; private var errorCaught:Boolean;// = false private var textChanged:Boolean;// = false private var _displayAsPassword:Boolean;// = false private var horizontalScrollPositionChanged:Boolean;// = false private var _htmlText:String;// = "" private var _condenseWhite:Boolean;// = false private var explicitHTMLText:String;// = null private var _selectionBeginIndex:int;// = 0 private var tabIndexChanged:Boolean;// = false private var _accessibilityProperties:AccessibilityProperties; private var condenseWhiteChanged:Boolean;// = false private var _text:String;// = "" private var _maxChars:int;// = 0 private var accessibilityPropertiesChanged:Boolean;// = false private var _textHeight:Number; private var prevMode:String;// = null private var _listData:BaseListData; mx_internal var parentDrawsFocus:Boolean;// = false private var _textWidth:Number; private var selectionChanged:Boolean;// = false private var maxCharsChanged:Boolean;// = false private var _tabIndex:int;// = -1 private var editableChanged:Boolean;// = false private var _horizontalScrollPosition:Number;// = 0 private var _imeMode:String;// = null protected var textField:UITextField; private var _editable:Boolean;// = true private var textSet:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceUnsupportedMode:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("controls", ApplicationDomain.currentDomain); public function TextInput(){ selectionChanged = false; parentDrawsFocus = false; prevMode = null; errorCaught = false; accessibilityPropertiesChanged = false; enabledChanged = false; _tabIndex = -1; tabIndexChanged = false; _condenseWhite = false; condenseWhiteChanged = false; _displayAsPassword = false; displayAsPasswordChanged = false; _editable = true; editableChanged = false; _horizontalScrollPosition = 0; horizontalScrollPositionChanged = false; _htmlText = ""; htmlTextChanged = false; explicitHTMLText = null; _imeMode = null; _maxChars = 0; maxCharsChanged = false; restrictChanged = false; _selectionBeginIndex = 0; _selectionEndIndex = 0; _text = ""; textChanged = false; super(); tabChildren = true; } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } private function textField_textInputHandler(_arg1:TextEvent):void{ var _local2:TextEvent; _arg1.stopImmediatePropagation(); _local2 = new TextEvent(TextEvent.TEXT_INPUT, false, true); _local2.text = _arg1.text; dispatchEvent(_local2); if (_local2.isDefaultPrevented()){ _arg1.preventDefault(); }; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get horizontalScrollPosition():Number{ return (_horizontalScrollPosition); } public function get selectionBeginIndex():int{ return ((textField) ? textField.selectionBeginIndex : _selectionBeginIndex); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.ENTER: dispatchEvent(new FlexEvent(FlexEvent.ENTER)); break; }; } override protected function focusInHandler(_arg1:FocusEvent):void{ var fm:IFocusManager; var event = _arg1; if (event.target == this){ systemManager.stage.focus = textField; }; fm = focusManager; if (((editable) && (fm))){ fm.showFocusIndicator = true; if (((textField.selectable) && ((_selectionBeginIndex == _selectionEndIndex)))){ textField.setSelection(0, textField.length); }; }; super.focusInHandler(event); if (((!((_imeMode == null))) && (_editable))){ IME.enabled = true; prevMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(StringUtil.substitute(resourceUnsupportedMode, _imeMode))); }; }; } override public function set tabIndex(_arg1:int):void{ if (_arg1 == _tabIndex){ return; }; _tabIndex = _arg1; tabIndexChanged = true; invalidateProperties(); } private function textField_changeHandler(_arg1:Event):void{ textFieldChanged(false, false); textChanged = false; htmlTextChanged = false; _arg1.stopImmediatePropagation(); dispatchEvent(new Event(Event.CHANGE)); } private function textField_textFieldStyleChangeHandler(_arg1:Event):void{ textFieldChanged(true, false); } public function set selectionBeginIndex(_arg1:int):void{ _selectionBeginIndex = _arg1; selectionChanged = true; invalidateProperties(); } public function set horizontalScrollPosition(_arg1:Number):void{ if (_arg1 == _horizontalScrollPosition){ return; }; _horizontalScrollPosition = _arg1; horizontalScrollPositionChanged = true; invalidateProperties(); dispatchEvent(new Event("horizontalScrollPositionChanged")); } public function set selectionEndIndex(_arg1:int):void{ _selectionEndIndex = _arg1; selectionChanged = true; invalidateProperties(); } public function set editable(_arg1:Boolean):void{ if (_arg1 == _editable){ return; }; _editable = _arg1; editableChanged = true; invalidateProperties(); dispatchEvent(new Event("editableChanged")); } public function get textWidth():Number{ return (_textWidth); } public function get maxChars():int{ return (_maxChars); } public function get textHeight():Number{ return (_textHeight); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return ((textField) ? textField.getLineMetrics(_arg1) : null); } mx_internal function getTextField():UITextField{ return (textField); } override public function get accessibilityProperties():AccessibilityProperties{ return (_accessibilityProperties); } public function get imeMode():String{ return (_imeMode); } public function get text():String{ return (_text); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:TextLineMetrics; super.measure(); _local1 = (((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY; measuredWidth = DEFAULT_MEASURED_WIDTH; if (maxChars){ measuredWidth = Math.min(measuredWidth, ((((measureText("W").width * maxChars) + _local1.left) + _local1.right) + 8)); }; if (((!(text)) || ((text == "")))){ _local2 = DEFAULT_MEASURED_MIN_WIDTH; _local3 = (((measureText(" ").height + _local1.top) + _local1.bottom) + UITextField.TEXT_HEIGHT_PADDING); } else { _local4 = measureText(text); _local2 = (((_local4.width + _local1.left) + _local1.right) + 8); _local3 = (((_local4.height + _local1.top) + _local1.bottom) + UITextField.TEXT_HEIGHT_PADDING); }; measuredWidth = Math.max(_local2, measuredWidth); measuredHeight = Math.max(_local3, DEFAULT_MEASURED_HEIGHT); measuredMinWidth = DEFAULT_MEASURED_MIN_WIDTH; measuredMinHeight = DEFAULT_MEASURED_MIN_HEIGHT; } public function set restrict(_arg1:String):void{ if (_arg1 == _restrict){ return; }; _restrict = _arg1; restrictChanged = true; invalidateProperties(); dispatchEvent(new Event("restrictChanged")); } override public function setFocus():void{ textField.setFocus(); } public function get listData():BaseListData{ return (_listData); } public function set maxChars(_arg1:int):void{ if (_arg1 == _maxChars){ return; }; _maxChars = _arg1; maxCharsChanged = true; invalidateProperties(); dispatchEvent(new Event("maxCharsChanged")); } override protected function commitProperties():void{ super.commitProperties(); if (accessibilityPropertiesChanged){ textField.accessibilityProperties = _accessibilityProperties; accessibilityPropertiesChanged = false; }; if (condenseWhiteChanged){ textField.condenseWhite = _condenseWhite; condenseWhiteChanged = false; }; if (displayAsPasswordChanged){ textField.displayAsPassword = _displayAsPassword; displayAsPasswordChanged = false; }; if (((enabledChanged) || (editableChanged))){ textField.type = (((enabled) && (_editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; if (enabledChanged){ textField.selectable = enabled; if (textField.enabled != enabled){ textField.enabled = enabled; }; enabledChanged = false; }; editableChanged = false; }; if (maxCharsChanged){ textField.maxChars = _maxChars; maxCharsChanged = false; }; if (restrictChanged){ textField.restrict = _restrict; restrictChanged = false; }; if (tabIndexChanged){ textField.tabIndex = _tabIndex; tabIndexChanged = false; }; if (((textChanged) || (htmlTextChanged))){ if (isHTML){ textField.htmlText = explicitHTMLText; } else { textField.text = _text; }; textFieldChanged(false, true); textChanged = false; htmlTextChanged = false; }; if (selectionChanged){ textField.setSelection(_selectionBeginIndex, _selectionEndIndex); selectionChanged = false; }; if (horizontalScrollPositionChanged){ textField.scrollH = _horizontalScrollPosition; horizontalScrollPositionChanged = false; }; } public function get maxHorizontalScrollPosition():Number{ return ((textField) ? textField.maxScrollH : 0); } private function textField_textFormatChangeHandler(_arg1:Event):void{ textFieldChanged(true, false); } override public function drawFocus(_arg1:Boolean):void{ if (parentDrawsFocus){ IFocusManagerComponent(parent).drawFocus(_arg1); return; }; super.drawFocus(_arg1); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } private function textFieldChanged(_arg1:Boolean, _arg2:Boolean):void{ var _local3:Boolean; if (!_arg1){ _local3 = !((_text == textField.text)); _text = textField.text; if (_local3){ dispatchEvent(new Event("textChanged")); if (_arg2){ dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; }; }; _local3 = !((_htmlText == textField.htmlText)); _htmlText = textField.htmlText; if (_local3){ dispatchEvent(new Event("htmlTextChanged")); }; _textWidth = textField.textWidth; _textHeight = textField.textHeight; } override public function get tabIndex():int{ return (_tabIndex); } override public function set accessibilityProperties(_arg1:AccessibilityProperties):void{ if (_arg1 == _accessibilityProperties){ return; }; _accessibilityProperties = _arg1; accessibilityPropertiesChanged = true; invalidateProperties(); } public function set text(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((_arg1 == _text)))){ return; }; _text = _arg1; textChanged = true; _htmlText = null; explicitHTMLText = null; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("textChanged")); dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } public function get selectionEndIndex():int{ return ((textField) ? textField.selectionEndIndex : _selectionEndIndex); } public function get editable():Boolean{ return (_editable); } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); if (((border) && ((border is IInvalidating)))){ IInvalidating(border).invalidateDisplayList(); }; } override public function get baselinePosition():Number{ var _local1:String; _local1 = text; if (_local1 == ""){ _local1 = " "; }; return (((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics.top : 0 + measureText(_local1).ascent)); } public function set condenseWhite(_arg1:Boolean):void{ if (_arg1 == _condenseWhite){ return; }; _condenseWhite = _arg1; condenseWhiteChanged = true; if (isHTML){ htmlTextChanged = true; }; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("condenseWhiteChanged")); } public function set displayAsPassword(_arg1:Boolean):void{ if (_arg1 == _displayAsPassword){ return; }; _displayAsPassword = _arg1; displayAsPasswordChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("displayAsPasswordChanged")); } private function textField_scrollHandler(_arg1:Event):void{ _horizontalScrollPosition = textField.scrollH; } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } public function get length():int{ return (((text)!=null) ? text.length : -1); } public function get restrict():String{ return (_restrict); } public function set htmlText(_arg1:String):void{ textSet = true; if (!_arg1){ _arg1 = ""; }; _htmlText = _arg1; htmlTextChanged = true; _text = null; explicitHTMLText = _arg1; invalidateProperties(); invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("htmlTextChanged")); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (((!((_imeMode == null))) && (_editable))){ if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((prevMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = prevMode; }; IME.enabled = false; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!border){ _local1 = getStyle("borderSkin"); if (_local1){ border = new (_local1); if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChild(DisplayObject(border)); }; }; if (!textField){ textField = new UITextField(); textField.autoSize = TextFieldAutoSize.NONE; textField.enabled = enabled; textField.ignorePadding = false; textField.multiline = false; textField.styleName = this; textField.tabEnabled = true; textField.wordWrap = false; textField.addEventListener(Event.CHANGE, textField_changeHandler); textField.addEventListener(TextEvent.TEXT_INPUT, textField_textInputHandler); textField.addEventListener(Event.SCROLL, textField_scrollHandler); textField.addEventListener("textFieldStyleChange", textField_textFieldStyleChangeHandler); textField.addEventListener("textFormatChange", textField_textFormatChangeHandler); addChild(textField); }; } public function get condenseWhite():Boolean{ return (_condenseWhite); } public function get displayAsPassword():Boolean{ return (_displayAsPassword); } public function setSelection(_arg1:int, _arg2:int):void{ _selectionBeginIndex = _arg1; _selectionEndIndex = _arg2; selectionChanged = true; invalidateProperties(); } public function set data(_arg1:Object):void{ var _local2:*; _data = _arg1; if (_listData){ _local2 = _listData.label; } else { if (_data != null){ if ((_data is String)){ _local2 = String(_data); } else { _local2 = _data.toString(); }; }; }; if (((!((_local2 === undefined))) && (!(textSet)))){ text = _local2; textSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } public function get htmlText():String{ return (_htmlText); } public function get data():Object{ return (_data); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; super.updateDisplayList(_arg1, _arg2); if (border){ border.setActualSize(_arg1, _arg2); _local3 = ((border is RectangularBorder)) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY; } else { _local3 = EdgeMetrics.EMPTY; }; textField.x = _local3.left; textField.y = _local3.top; textField.width = Math.max(0, (_arg1 - (_local3.left + _local3.right))); textField.height = Math.max(0, (_arg2 - ((_local3.top + _local3.bottom) + 1))); } private static function loadResources():void{ resourceUnsupportedMode = packageResources.getString("unsupportedMode"); } loadResources(); } }//package mx.controls
Section 124
//ToolTip (mx.controls.ToolTip) package mx.controls { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.text.*; import mx.skins.*; public class ToolTip extends UIComponent implements IToolTip { mx_internal var border:IFlexDisplayObject; private var textChanged:Boolean; private var _text:String; protected var textField:UITextField; mx_internal static const VERSION:String = "2.0.1.0"; public static var maxWidth:Number = 300; public function ToolTip(){ mouseEnabled = false; } mx_internal function getTextField():UITextField{ return (textField); } public function get text():String{ return (_text); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; super.measure(); _local1 = borderMetrics; _local2 = (_local1.left + getStyle("paddingLeft")); _local3 = (_local1.top + getStyle("paddingTop")); _local4 = (_local1.right + getStyle("paddingRight")); _local5 = (_local1.bottom + getStyle("paddingBottom")); _local6 = (_local2 + _local4); _local7 = (_local3 + _local5); textField.wordWrap = false; if ((textField.textWidth + _local6) > ToolTip.maxWidth){ textField.width = (ToolTip.maxWidth - _local6); textField.wordWrap = true; }; measuredWidth = (textField.width + _local6); measuredHeight = (textField.height + _local7); } override protected function commitProperties():void{ var _local1:TextFormat; super.commitProperties(); if (textChanged){ _local1 = textField.getTextFormat(); _local1.leftMargin = 0; _local1.rightMargin = 0; textField.defaultTextFormat = _local1; textField.text = _text; textChanged = false; }; } public function set text(_arg1:String):void{ _text = _arg1; textChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!border){ _local1 = getStyle("borderSkin"); border = new (_local1); if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChild(DisplayObject(border)); }; if (!textField){ textField = new UITextField(); textField.autoSize = TextFieldAutoSize.LEFT; textField.mouseEnabled = false; textField.multiline = true; textField.selectable = false; textField.wordWrap = false; textField.styleName = this; addChild(textField); }; } private function get borderMetrics():EdgeMetrics{ if ((border is RectangularBorder)){ return (RectangularBorder(border).borderMetrics); }; return (EdgeMetrics.EMPTY); } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ invalidateDisplayList(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; super.updateDisplayList(_arg1, _arg2); _local3 = borderMetrics; _local4 = (_local3.left + getStyle("paddingLeft")); _local5 = (_local3.top + getStyle("paddingTop")); _local6 = (_local3.right + getStyle("paddingRight")); _local7 = (_local3.bottom + getStyle("paddingBottom")); _local8 = (_local4 + _local6); _local9 = (_local5 + _local7); border.setActualSize(_arg1, _arg2); textField.move(_local4, _local5); textField.setActualSize((_arg1 - _local8), (_arg2 - _local9)); } } }//package mx.controls
Section 125
//VScrollBar (mx.controls.VScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class VScrollBar extends ScrollBar { mx_internal static const VERSION:String = "2.0.1.0"; public function VScrollBar(){ super.direction = ScrollBarDirection.VERTICAL; } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.UP){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.DOWN){ lineScroll(1); return (true); }; if (_arg1 == Keyboard.PAGE_UP){ pageScroll(-1); return (true); }; if (_arg1 == Keyboard.PAGE_DOWN){ pageScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override protected function measure():void{ super.measure(); measuredWidth = _minWidth; measuredHeight = _minHeight; } override public function get minHeight():Number{ return (_minHeight); } override public function get minWidth():Number{ return (_minWidth); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 126
//Application (mx.core.Application) package mx.core { import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import mx.effects.*; import mx.resources.*; import flash.utils.*; import mx.containers.utilityClasses.*; import flash.net.*; import flash.system.*; import flash.ui.*; import flash.external.*; public class Application extends LayoutContainer { public var frameRate:Number; private var _viewSourceURL:String; public var scriptTimeLimit:Number; public var resetHistory:Boolean;// = true mx_internal var _url:String; public var preloader:Object; public var pageTitle:String; private var processingCreationQueue:Boolean;// = false private var creationQueue:Array; private var resizeWidth:Boolean;// = true public var controlBar:IUIComponent; private var _applicationViewMetrics:EdgeMetrics; private var preloadObj:Object; public var usePreloader:Boolean; private var resizeHandlerAdded:Boolean;// = false private var resizeHeight:Boolean;// = true public var scriptRecursionLimit:int; mx_internal var _parameters:Object; mx_internal static const VERSION:String = "2.0.1.0"; private static var viewSourceMenuItem:String; mx_internal static var useProgressiveLayout:Boolean = false; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function Application(){ resizeHandlerAdded = false; creationQueue = []; processingCreationQueue = false; resizeWidth = true; resizeHeight = true; resetHistory = true; name = "application"; UIComponentGlobals.layoutManager = (Singleton.getInstance("mx.managers::ILayoutManager") as ILayoutManager); UIComponentGlobals.layoutManager.usePhasedInstantiation = true; if (!ApplicationGlobals.application){ ApplicationGlobals.application = this; }; super(); layoutObject = new ApplicationLayout(); layoutObject.target = this; boxLayoutClass = ApplicationLayout; showInAutomationHierarchy = true; } mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{ var controlBar = _arg1; var dock = _arg2; if (dock){ try { removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex); setControlBar(controlBar); } else { try { rawChildren.removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; setControlBar(null); addChildAt(DisplayObject(controlBar), 0); }; } override mx_internal function initThemeColor():Boolean{ var _local1:Boolean; var _local2:Object; var _local3:Number; var _local4:Number; var _local5:CSSStyleDeclaration; _local1 = super.initThemeColor(); if (!_local1){ _local5 = StyleManager.getStyleDeclaration("global"); if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); }; _local1 = true; }; return (_local1); } private function resizeHandler(_arg1:Event):void{ var _local2:Number; var _local3:Number; if (resizeWidth){ if (isNaN(percentWidth)){ _local2 = DisplayObject(systemManager).width; } else { super.percentWidth = Math.max(percentWidth, 0); super.percentWidth = Math.min(percentWidth, 100); _local2 = ((percentWidth * screen.width) / 100); }; if (!isNaN(explicitMaxWidth)){ _local2 = Math.min(_local2, explicitMaxWidth); }; if (!isNaN(explicitMinWidth)){ _local2 = Math.max(_local2, explicitMinWidth); }; } else { _local2 = width; }; if (resizeHeight){ if (isNaN(percentHeight)){ _local3 = DisplayObject(systemManager).height; } else { super.percentHeight = Math.max(percentHeight, 0); super.percentHeight = Math.min(percentHeight, 100); _local3 = ((percentHeight * screen.height) / 100); }; if (!isNaN(explicitMaxHeight)){ _local3 = Math.min(_local3, explicitMaxHeight); }; if (!isNaN(explicitMinHeight)){ _local3 = Math.max(_local3, explicitMinHeight); }; } else { _local3 = height; }; if (((!((_local2 == width))) || (!((_local3 == height))))){ invalidateProperties(); invalidateSize(); }; setActualSize(_local2, _local3); invalidateDisplayList(); } override public function set tabIndex(_arg1:int):void{ } public function set viewSourceURL(_arg1:String):void{ _viewSourceURL = _arg1; } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } private function initContextMenu():void{ var _local1:ContextMenu; var _local2:ContextMenuItem; _local1 = new ContextMenu(); _local1.hideBuiltInItems(); _local1.builtInItems.print = true; if (_viewSourceURL){ _local2 = new ContextMenuItem(viewSourceMenuItem, true); _local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler); _local1.customItems.push(_local2); }; contextMenu = _local1; } override public function set icon(_arg1:Class):void{ } override public function set percentWidth(_arg1:Number):void{ super.percentWidth = _arg1; invalidateDisplayList(); } override public function getChildIndex(_arg1:DisplayObject):int{ if (((controlBar) && ((_arg1 == controlBar)))){ return (-1); }; return (super.getChildIndex(_arg1)); } override public function get id():String{ if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){ return (ExternalInterface.objectID); }; return (super.id); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:Number; super.measure(); _local1 = borderMetrics; if (((controlBar) && (controlBar.includeInLayout))){ _local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right); measuredWidth = Math.max(measuredWidth, _local2); measuredMinWidth = Math.max(measuredMinWidth, _local2); }; } public function get url():String{ return (_url); } private function debugTickler():void{ var _local1:int; _local1 = 0; } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg2 == this){ setActualSize(_arg1.width, _arg1.height); if (horizontalScrollBar){ horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible; }; if (verticalScrollBar){ verticalScrollBar.visible = _arg1.verticalScrollBarVisible; }; if (whiteBox){ whiteBox.visible = _arg1.whiteBoxVisible; }; horizontalScrollPosition = _arg1.horizontalScrollPosition; verticalScrollPosition = _arg1.verticalScrollPosition; updateDisplayList(unscaledWidth, unscaledHeight); }; super.finishPrint(_arg1.scrollRect, _arg2); } override public function set label(_arg1:String):void{ } public function get parameters():Object{ return (_parameters); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Object; _local2 = {}; if (_arg1 == this){ _local2.width = width; _local2.height = height; _local2.verticalScrollPosition = verticalScrollPosition; _local2.horizontalScrollPosition = horizontalScrollPosition; _local2.horizontalScrollBarVisible = !((horizontalScrollBar == null)); _local2.verticalScrollBarVisible = !((verticalScrollBar == null)); _local2.whiteBoxVisible = !((whiteBox == null)); setActualSize(measuredWidth, measuredHeight); horizontalScrollPosition = 0; verticalScrollPosition = 0; if (horizontalScrollBar){ horizontalScrollBar.visible = false; }; if (verticalScrollBar){ verticalScrollBar.visible = false; }; if (whiteBox){ whiteBox.visible = false; }; updateDisplayList(unscaledWidth, unscaledHeight); }; _local2.scrollRect = super.prepareToPrint(_arg1); return (_local2); } public function get viewSourceURL():String{ return (_viewSourceURL); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:EdgeMetrics; super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; _local3 = borderMetrics; _local4 = getStyle("borderThickness"); _local5 = new EdgeMetrics(); _local5.left = (_local3.left - _local4); _local5.top = (_local3.top - _local4); _local5.right = (_local3.right - _local4); _local5.bottom = (_local3.bottom - _local4); if (((controlBar) && (controlBar.includeInLayout))){ if ((controlBar is IInvalidating)){ IInvalidating(controlBar).invalidateDisplayList(); }; controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight()); controlBar.move(_local5.left, _local5.top); }; } override public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:EdgeMetrics; var _local3:Number; if (!_applicationViewMetrics){ _applicationViewMetrics = new EdgeMetrics(); }; _local1 = _applicationViewMetrics; _local2 = super.viewMetrics; _local3 = getStyle("borderThickness"); _local1.left = _local2.left; _local1.top = _local2.top; _local1.right = _local2.right; _local1.bottom = _local2.bottom; if (((controlBar) && (controlBar.includeInLayout))){ _local1.top = (_local1.top - _local3); _local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3)); }; return (_local1); } private function addedHandler(_arg1:Event):void{ if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){ doNextQueueItem(); }; } private function menuItemSelectHandler(_arg1:Event):void{ navigateToURL(new URLRequest(_viewSourceURL), "_blank"); } private function doNextQueueItem(_arg1:FlexEvent=null):void{ processingCreationQueue = true; Application.useProgressiveLayout = true; callLater(processNextQueueItem); } private function setControlBar(_arg1:IUIComponent):void{ if (_arg1 == controlBar){ return; }; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).clearStyle("cornerRadius"); IStyleClient(controlBar).clearStyle("docked"); }; controlBar = _arg1; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).setStyle("cornerRadius", 0); IStyleClient(controlBar).setStyle("docked", true); }; invalidateSize(); invalidateDisplayList(); invalidateViewMetricsAndPadding(); } override public function initialize():void{ var _local1:ISystemManager; var _local2:Object; _local1 = systemManager; _url = _local1.loaderInfo.url; _parameters = _local1.loaderInfo.parameters; initManagers(_local1); _descriptor = null; if (documentDescriptor){ (creationPolicy == documentDescriptor.properties.creationPolicy); if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){ creationPolicy = ContainerCreationPolicy.AUTO; }; _local2 = documentDescriptor.properties; if (_local2.width != null){ width = _local2.width; delete _local2.width; }; if (_local2.height != null){ height = _local2.height; delete _local2.height; }; documentDescriptor.events = null; }; initContextMenu(); super.initialize(); addEventListener(Event.ADDED, addedHandler); if (((_local1.isTopLevel()) && ((Capabilities.isDebugger == true)))){ setInterval(debugTickler, 1500); }; } private function initManagers(_arg1:ISystemManager):void{ if (_arg1.isTopLevel()){ focusManager = new FocusManager(this); _arg1.activate(this); }; } override public function set percentHeight(_arg1:Number):void{ super.percentHeight = _arg1; invalidateDisplayList(); } private function printCreationQueue():void{ var _local1:String; var _local2:Number; var _local3:int; var _local4:Object; _local1 = ""; _local2 = creationQueue.length; _local3 = 0; while (_local3 < _local2) { _local4 = creationQueue[_local3]; _local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index)); _local3++; }; } override public function set toolTip(_arg1:String):void{ } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){ clearStyle("backgroundImage"); }; } private function processNextQueueItem():void{ var queueItem:Object; var nextChild:IUIComponent; if (EffectManager.effectsPlaying.length > 0){ callLater(processNextQueueItem); } else { if (creationQueue.length > 0){ queueItem = creationQueue.shift(); try { nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id; if ((nextChild is Container)){ Container(nextChild).createComponentsFromDescriptors(true); }; if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){ doNextQueueItem(); } else { nextChild.addEventListener("childrenCreationComplete", doNextQueueItem); }; } catch(e:Error) { processNextQueueItem(); }; } else { processingCreationQueue = false; Application.useProgressiveLayout = false; }; }; } public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{ var _local5:int; var _local6:Object; var _local7:Boolean; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; _local5 = creationQueue.length; _local6 = {}; _local7 = false; _local6.id = _arg1; _local6.parent = _arg4; _local6.callbackFunc = _arg3; _local6.index = _arg2; _local11 = 0; while (_local11 < _local5) { _local9 = creationQueue[_local11].index; _local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0; if (_local6.index != -1){ if ((((_local9 == -1)) || ((_local6.index < _local9)))){ _local8 = _local11; _local7 = true; break; }; } else { _local12 = (_local6.parent) ? _local6.parent.nestLevel : 0; if ((((_local9 == -1)) && ((_local10 < _local12)))){ _local8 = _local11; _local7 = true; break; }; }; _local11++; }; if (!_local7){ creationQueue.push(_local6); _local7 = true; } else { creationQueue.splice(_local8, 0, _local6); }; if (((initialized) && (!(processingCreationQueue)))){ doNextQueueItem(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); resizeWidth = isNaN(explicitWidth); resizeHeight = isNaN(explicitHeight); if (((resizeWidth) || (resizeHeight))){ resizeHandler(new Event(Event.RESIZE)); if (!resizeHandlerAdded){ systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true); resizeHandlerAdded = true; }; } else { if (resizeHandlerAdded){ systemManager.removeEventListener(Event.RESIZE, resizeHandler); resizeHandlerAdded = false; }; }; createBorder(); } private static function loadResources():void{ viewSourceMenuItem = packageResources.getString("viewSource"); } public static function get application():Object{ return (ApplicationGlobals.application); } loadResources(); } }//package mx.core
Section 127
//ApplicationGlobals (mx.core.ApplicationGlobals) package mx.core { public class ApplicationGlobals { public static var application:Object; } }//package mx.core
Section 128
//ClassFactory (mx.core.ClassFactory) package mx.core { public class ClassFactory implements IFactory { public var properties:Object;// = null public var generator:Class; mx_internal static const VERSION:String = "2.0.1.0"; public function ClassFactory(_arg1:Class=null){ properties = null; super(); this.generator = _arg1; } public function newInstance(){ var _local1:Object; var _local2:String; _local1 = new generator(); if (properties != null){ for (_local2 in properties) { _local1[_local2] = properties[_local2]; }; }; return (_local1); } } }//package mx.core
Section 129
//ComponentDescriptor (mx.core.ComponentDescriptor) package mx.core { public class ComponentDescriptor { public var events:Object; public var document:Object; public var type:Class; public var propertiesFactory:Function; private var _properties:Object; public var id:String; mx_internal static const VERSION:String = "2.0.1.0"; public function ComponentDescriptor(_arg1:Object){ var _local2:String; super(); for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function toString():String{ return (("ComponentDescriptor_" + id)); } public function invalidateProperties():void{ _properties = null; } public function get properties():Object{ var _local1:Array; var _local2:int; var _local3:int; if (_properties){ return (_properties); }; if (propertiesFactory != null){ _properties = propertiesFactory.call(document); }; if (_properties){ _local1 = _properties.childDescriptors; if (_local1){ _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local1[_local3].document = document; _local3++; }; }; } else { _properties = {}; }; return (_properties); } } }//package mx.core
Section 130
//Container (mx.core.Container) package mx.core { import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.graphics.*; import mx.controls.scrollClasses.*; import mx.binding.*; import mx.controls.*; import mx.resources.*; import mx.controls.listClasses.*; import mx.skins.*; import flash.system.*; import flash.ui.*; public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer { private var _horizontalLineScrollSize:Number;// = 5 mx_internal var border:IFlexDisplayObject; private var _viewMetricsAndPadding:EdgeMetrics; private var scrollableWidth:Number;// = 0 private var _rawChildren:ContainerRawChildrenList; private var _data:Object; private var _viewMetrics:EdgeMetrics; private var changedStyles:String;// = null private var _verticalPageScrollSize:Number;// = 0 private var mouseEventReferenceCount:int;// = 0 protected var whiteBox:Shape; private var _verticalScrollBar:ScrollBar; private var _horizontalPageScrollSize:Number;// = 0 private var _clipContent:Boolean;// = true private var _icon:Class;// = null mx_internal var doingLayout:Boolean;// = false private var _createdComponents:Array; private var _firstChildIndex:int;// = 0 private var scrollableHeight:Number;// = 0 mx_internal var _numChildren:int;// = 0 private var recursionFlag:Boolean;// = true private var forceLayout:Boolean;// = false mx_internal var blocker:Sprite; private var _label:String;// = "" private var _numChildrenCreated:int;// = -1 protected var actualCreationPolicy:String; private var _childRepeaters:Array; private var _childDescriptors:Array; private var scrollPropertiesChanged:Boolean;// = false private var scrollPositionChanged:Boolean;// = true private var _focusPane:Sprite; private var _defaultButton:IFlexDisplayObject; private var _forceClippingCount:int; mx_internal var creatingContentPane:Boolean;// = false private var _creationPolicy:String; private var _creationIndex:int;// = -1 private var _verticalScrollPosition:Number;// = 0 private var _autoLayout:Boolean;// = true private var _horizontalScrollBar:ScrollBar; private var viewableHeight:Number;// = 0 private var viewableWidth:Number;// = 0 mx_internal var contentPane:Sprite;// = null private var numChildrenBefore:int; private var _verticalLineScrollSize:Number;// = 5 private var _horizontalScrollPosition:Number;// = 0 mx_internal var _horizontalScrollPolicy:String;// = "auto" private var verticalScrollPositionPending:Number; mx_internal var _verticalScrollPolicy:String;// = "auto" private var horizontalScrollPositionPending:Number; private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>"; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceMultipleChildSets_ClassAndInstance:String; private static var resourceMultipleChildSets_ClassAndSubclass:String; private static var resourceScrollDirection:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function Container(){ recursionFlag = true; forceLayout = false; doingLayout = false; changedStyles = null; creatingContentPane = false; contentPane = null; scrollPropertiesChanged = false; scrollPositionChanged = true; scrollableWidth = 0; scrollableHeight = 0; viewableWidth = 0; viewableHeight = 0; mouseEventReferenceCount = 0; _numChildren = 0; _autoLayout = true; _clipContent = true; _creationIndex = -1; _firstChildIndex = 0; _horizontalLineScrollSize = 5; _horizontalPageScrollSize = 0; _horizontalScrollPosition = 0; _horizontalScrollPolicy = ScrollPolicy.AUTO; _icon = null; _label = ""; _numChildrenCreated = -1; _verticalLineScrollSize = 5; _verticalPageScrollSize = 0; _verticalScrollPosition = 0; _verticalScrollPolicy = ScrollPolicy.AUTO; super(); tabChildren = true; tabEnabled = false; showInAutomationHierarchy = false; } mx_internal function get firstChildIndex():int{ return (_firstChildIndex); } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } protected function scrollChildren():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Rectangle; if (!contentPane){ return; }; _local1 = viewMetrics; _local2 = 0; _local3 = 0; _local4 = ((unscaledWidth - _local1.left) - _local1.right); _local5 = ((unscaledHeight - _local1.top) - _local1.bottom); if (_clipContent){ _local2 = (_local2 + _horizontalScrollPosition); if (horizontalScrollBar){ _local4 = viewableWidth; }; _local3 = (_local3 + _verticalScrollPosition); if (verticalScrollBar){ _local5 = viewableHeight; }; } else { _local4 = scrollableWidth; _local5 = scrollableHeight; }; _local6 = getScrollableRect(); if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){ contentPane.scrollRect = null; contentPane.opaqueBackground = null; contentPane.cacheAsBitmap = false; } else { contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5); }; if (focusPane){ focusPane.scrollRect = contentPane.scrollRect; }; if (((((border) && ((border is RectangularBorder)))) && (RectangularBorder(border).hasBackgroundImage))){ RectangularBorder(border).adjustBackgroundImage(); }; } mx_internal function get createdComponents():Array{ return (_createdComponents); } public function get childDescriptors():Array{ return (_childDescriptors); } public function get verticalScrollPosition():Number{ if (!isNaN(verticalScrollPositionPending)){ return (verticalScrollPositionPending); }; return (_verticalScrollPosition); } mx_internal function set createdComponents(_arg1:Array):void{ _createdComponents = _arg1; } mx_internal function get childRepeaters():Array{ return (_childRepeaters); } public function get horizontalScrollPosition():Number{ if (!isNaN(horizontalScrollPositionPending)){ return (horizontalScrollPositionPending); }; return (_horizontalScrollPosition); } override public function get focusPane():Sprite{ return (_focusPane); } private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{ var _local4:Boolean; var _local5:IFocusManager; var _local6:String; var _local7:String; var _local8:Graphics; _local4 = false; if (((((_arg1) || (_arg2))) || (_arg3))){ createContentPane(); }; if (_arg1){ if (!horizontalScrollBar){ horizontalScrollBar = new HScrollBar(); horizontalScrollBar.name = "horizontalScrollBar"; _local6 = getStyle("horizontalScrollBarStyleName"); if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(horizontalScrollBar).styleName = _local6; }; rawChildren.addChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); horizontalScrollBar.enabled = enabled; if ((horizontalScrollBar is IInvalidating)){ IInvalidating(horizontalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!verticalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; } else { if (horizontalScrollBar){ horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar = null; viewableWidth = (scrollableWidth = 0); if (_horizontalScrollPosition != 0){ _horizontalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; }; if (_arg2){ if (!verticalScrollBar){ verticalScrollBar = new VScrollBar(); verticalScrollBar.name = "verticalScrollBar"; _local7 = getStyle("verticalScrollBarStyleName"); if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(verticalScrollBar).styleName = _local7; }; rawChildren.addChild(DisplayObject(verticalScrollBar)); verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); verticalScrollBar.enabled = enabled; if ((verticalScrollBar is IInvalidating)){ IInvalidating(verticalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!horizontalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; } else { if (verticalScrollBar){ verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(verticalScrollBar)); verticalScrollBar = null; viewableHeight = (scrollableHeight = 0); if (_verticalScrollPosition != 0){ _verticalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; }; if (((horizontalScrollBar) && (verticalScrollBar))){ if (!whiteBox){ whiteBox = new FlexShape(); whiteBox.name = "whiteBox"; _local8 = whiteBox.graphics; _local8.beginFill(0xFFFFFF); _local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight); _local8.endFill(); rawChildren.addChild(whiteBox); }; } else { if (whiteBox){ rawChildren.removeChild(whiteBox); whiteBox = null; }; }; return (_local4); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:Object; var _local3:String; var _local4:Number; _local2 = getFocus(); if ((_local2 is TextField)){ return; }; if (verticalScrollBar){ _local3 = ScrollEventDirection.VERTICAL; _local4 = verticalScrollPosition; switch (_arg1.keyCode){ case Keyboard.DOWN: verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN); _arg1.stopPropagation(); break; case Keyboard.UP: verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_UP: verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_DOWN: verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN); _arg1.stopPropagation(); break; case Keyboard.HOME: verticalScrollPosition = verticalScrollBar.minScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP); _arg1.stopPropagation(); break; case Keyboard.END: verticalScrollPosition = verticalScrollBar.maxScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM); _arg1.stopPropagation(); break; }; }; if (horizontalScrollBar){ _local3 = ScrollEventDirection.HORIZONTAL; _local4 = horizontalScrollPosition; switch (_arg1.keyCode){ case Keyboard.LEFT: horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT); _arg1.stopPropagation(); break; case Keyboard.RIGHT: horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT); _arg1.stopPropagation(); break; }; }; } protected function createBorder():void{ var _local1:Class; if (((!(border)) && (isBorderNeeded()))){ _local1 = getStyle("borderSkin"); border = new (_local1); border.name = "border"; if ((border is IUIComponent)){ IUIComponent(border).enabled = enabled; }; if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; rawChildren.addChildAt(DisplayObject(border), 0); invalidateDisplayList(); }; } public function set verticalScrollPosition(_arg1:Number):void{ if (_verticalScrollPosition == _arg1){ return; }; _verticalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ verticalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } private function horizontalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = horizontalScrollPosition; horizontalScrollPosition = horizontalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail); }; } public function get icon():Class{ return (_icon); } public function set horizontalScrollBar(_arg1:ScrollBar):void{ _horizontalScrollBar = _arg1; } mx_internal function set childRepeaters(_arg1:Array):void{ _childRepeaters = _arg1; } public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{ var _local3:UIComponentDescriptor; var _local4:Object; var _local5:Class; var _local6:IDeferredInstantiationUIComponent; var _local7:String; var _local8:Object; var _local9:Array; var _local10:IRepeaterClient; var _local11:IStyleClient; var _local12:String; var _local13:String; _local3 = UIComponentDescriptor(_arg1); _local4 = _local3.properties; if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){ return (null); }; UIComponentGlobals.layoutManager.usePhasedInstantiation = true; _local5 = _local3.type; _local6 = new (_local5); _local6.id = _local3.id; if (((_local6.id) && (!((_local6.id == ""))))){ _local6.name = _local6.id; }; _local6.descriptor = _local3; if (((_local4.childDescriptors) && ((_local6 is Container)))){ Container(_local6)._childDescriptors = _local4.childDescriptors; delete _local4.childDescriptors; }; for (_local7 in _local4) { _local6[_local7] = _local4[_local7]; }; if ((_local6 is Container)){ Container(_local6).recursionFlag = _arg2; }; if (_local3.instanceIndices){ if ((_local6 is IRepeaterClient)){ _local10 = IRepeaterClient(_local6); _local10.instanceIndices = _local3.instanceIndices; _local10.repeaters = _local3.repeaters; _local10.repeaterIndices = _local3.repeaterIndices; }; }; if ((_local6 is IStyleClient)){ _local11 = IStyleClient(_local6); if (_local3.stylesFactory != null){ if (!_local11.styleDeclaration){ _local11.styleDeclaration = new CSSStyleDeclaration(); }; _local11.styleDeclaration.factory = _local3.stylesFactory; }; }; _local8 = _local3.events; if (_local8){ for (_local12 in _local8) { _local13 = _local8[_local12]; _local6.addEventListener(_local12, _local3.document[_local13]); }; }; _local9 = _local3.effects; if (_local9){ _local6.registerEffects(_local9); }; if ((_local6 is IRepeaterClient)){ IRepeaterClient(_local6).initializeRepeaterArrays(this); }; _local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document)); if (!_local6.document){ _local6.document = _local3.document; }; if ((_local6 is IRepeater)){ if (!childRepeaters){ childRepeaters = []; }; childRepeaters.push(_local6); _local6.executeBindings(); IRepeater(_local6).initializeRepeater(this, _arg2); } else { addChild(DisplayObject(_local6)); _local6.executeBindings(); if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ _local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; return (_local6); } mx_internal function get usePadding():Boolean{ return (true); } public function set horizontalScrollPosition(_arg1:Number):void{ if (_horizontalScrollPosition == _arg1){ return; }; _horizontalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ horizontalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } override public function set focusPane(_arg1:Sprite):void{ var _local2:Boolean; var _local3:Boolean; _local2 = invalidateSizeFlag; _local3 = invalidateDisplayListFlag; invalidateSizeFlag = true; invalidateDisplayListFlag = true; if (_arg1){ rawChildren.addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { rawChildren.removeChild(_focusPane); _focusPane = null; }; if (((_arg1) && (contentPane))){ _arg1.x = contentPane.x; _arg1.y = contentPane.y; _arg1.scrollRect = contentPane.scrollRect; }; invalidateSizeFlag = _local2; invalidateDisplayListFlag = _local3; } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } public function get horizontalLineScrollSize():Number{ return (_horizontalLineScrollSize); } private function updateBackgroundImageRect():void{ var _local1:RectangularBorder; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; _local1 = (border as RectangularBorder); if (!_local1){ return; }; if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){ _local1.backgroundImageRect = null; return; }; _local2 = viewMetrics; _local3 = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right); _local4 = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom); if (getStyle("backgroundAttachment") == "fixed"){ _local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, _local3, _local4); } else { _local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4)); }; } mx_internal function invalidateViewMetricsAndPadding():void{ _viewMetricsAndPadding = null; } public function get verticalLineScrollSize():Number{ return (_verticalLineScrollSize); } private function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; if (verticalScrollBar){ _arg1.stopPropagation(); _local2 = ((_arg1.delta <= 0)) ? 1 : -1; _local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1; _local4 = Math.max(Math.abs(_arg1.delta), _local3); _local5 = verticalScrollPosition; verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2)); dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN); }; } mx_internal function createContentPane():void{ var _local1:int; var _local2:Sprite; var _local3:int; var _local4:int; var _local5:IUIComponent; if (contentPane){ return; }; creatingContentPane = true; _local1 = numChildren; _local2 = new FlexSprite(); _local2.name = "contentPane"; _local2.tabChildren = true; if (border){ _local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1); if ((((border is RectangularBorder)) && (RectangularBorder(border).hasBackgroundImage))){ _local3++; }; } else { _local3 = 0; }; rawChildren.addChildAt(_local2, _local3); _local4 = 0; while (_local4 < _local1) { _local5 = IUIComponent(super.getChildAt(_firstChildIndex)); _local2.addChild(DisplayObject(_local5)); _local5.parentChanged(_local2); _numChildren--; _local4++; }; contentPane = _local2; creatingContentPane = false; contentPane.visible = true; } public function get creationPolicy():String{ return (_creationPolicy); } public function get defaultButton():IFlexDisplayObject{ return (_defaultButton); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } private function verticalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = verticalScrollPosition; verticalScrollPosition = verticalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail); }; } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = rawChildren_getChildIndex(_arg1); return (rawChildren_removeChildAt(_local2)); } final mx_internal function get $numChildren():int{ return (super.numChildren); } override public function addChild(_arg1:DisplayObject):DisplayObject{ return (addChildAt(_arg1, numChildren)); } override public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; if (contentPane){ return (contentPane.getChildIndex(_arg1)); }; _local2 = (super.getChildIndex(_arg1) - _firstChildIndex); return (_local2); } public function set icon(_arg1:Class):void{ _icon = _arg1; dispatchEvent(new Event("iconChanged")); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } override public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object; _local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); if (_arg1){ executeChildBindings(_arg1); }; } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } public function set verticalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalLineScrollSizeChanged")); } mx_internal function getScrollableRect():Rectangle{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:EdgeMetrics; var _local8:Rectangle; var _local9:DisplayObject; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local9 = getChildAt(_local6); if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){ } else { _local1 = Math.min(_local1, _local9.x); _local2 = Math.min(_local2, _local9.y); if (!isNaN(_local9.width)){ _local3 = Math.max(_local3, (_local9.x + _local9.width)); }; if (!isNaN(_local9.height)){ _local4 = Math.max(_local4, (_local9.y + _local9.height)); }; }; _local6++; }; _local7 = viewMetrics; _local8 = new Rectangle(); _local8.left = _local1; _local8.top = _local2; _local8.right = _local3; _local8.bottom = _local4; if (usePadding){ _local8.right = (_local8.right + getStyle("paddingRight")); _local8.bottom = (_local8.bottom + getStyle("paddingBottom")); }; return (_local8); } mx_internal function get numRepeaters():int{ return ((childRepeaters) ? childRepeaters.length : 0); } public function get creationIndex():int{ return (_creationIndex); } override mx_internal function childAdded(_arg1:DisplayObject):void{ var _local2:ChildExistenceChangedEvent; dispatchEvent(new Event("childrenChanged")); _local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD); _local2.relatedObject = _arg1; dispatchEvent(_local2); _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); super.childAdded(_arg1); } public function set horizontalScrollPolicy(_arg1:String):void{ if (_horizontalScrollPolicy != _arg1){ _horizontalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalScrollPolicyChanged")); }; } override public function removeChildAt(_arg1:int):DisplayObject{ return (removeChild(getChildAt(_arg1))); } override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:EdgeMetrics; var _local5:Number; var _local6:Graphics; _local4 = viewMetrics; _local5 = 0; if (!_arg3){ _arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5); }; if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){ return; }; _local6 = _arg1.graphics; _local6.clear(); _local6.beginFill(_arg2); _local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local6.endFill(); } public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local2:int; var _local3:int; var _local4:IFlexDisplayObject; numChildrenBefore = numChildren; createdComponents = []; _local2 = (childDescriptors) ? childDescriptors.length : 0; _local3 = 0; while (_local3 < _local2) { _local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1); createdComponents.push(_local4); _local3++; }; if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ UIComponentGlobals.layoutManager.usePhasedInstantiation = false; }; numChildrenCreated = (numChildren - numChildrenBefore); processedDescriptors = true; } override public function globalToContent(_arg1:Point):Point{ if (contentPane){ return (contentPane.globalToLocal(_arg1)); }; return (globalToLocal(_arg1)); } override mx_internal function removingChild(_arg1:DisplayObject):void{ var _local2:ChildExistenceChangedEvent; super.removingChild(_arg1); _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); _local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE); _local2.relatedObject = _arg1; dispatchEvent(_local2); } private function isBorderNeeded():Boolean{ var _local1:Object; _local1 = getStyle("borderStyle"); if (_local1){ if (((!((_local1 == "none"))) || ((((_local1 == "none")) && (getStyle("mouseShield")))))){ return (true); }; }; _local1 = getStyle("backgroundColor"); if (((!((_local1 === null))) && (!((_local1 === ""))))){ return (true); }; _local1 = getStyle("backgroundImage"); return (((!((_local1 == null))) && (!((_local1 == ""))))); } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = super.getChildAt(_arg1); super.removingChild(_local2); $removeChildAt(_arg1); super.childRemoved(_local2); if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){ _numChildren--; } else { if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){ _firstChildIndex--; }; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("childrenChanged")); return (_local2); } public function get verticalPageScrollSize():Number{ return (_verticalPageScrollSize); } override public function validateDisplayList():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Object; var _local5:Number; var _local6:Number; var _local7:Number; if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; } else { layoutChrome(unscaledWidth, unscaledHeight); }; invalidateDisplayListFlag = true; if (createContentPaneAndScrollbarsIfNeeded()){ if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; }; createContentPaneAndScrollbarsIfNeeded(); }; if (contentPane){ _local1 = viewMetrics; if (overlay){ overlay.x = 0; overlay.y = 0; overlay.width = unscaledWidth; overlay.height = unscaledHeight; }; if (((horizontalScrollBar) || (verticalScrollBar))){ if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){ _local1.right = (_local1.right - verticalScrollBar.minWidth); }; if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){ _local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight); }; if (horizontalScrollBar){ _local2 = ((unscaledWidth - _local1.left) - _local1.right); if (verticalScrollBar){ _local2 = (_local2 - verticalScrollBar.minWidth); }; horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight); horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight)); }; if (verticalScrollBar){ _local3 = ((unscaledHeight - _local1.top) - _local1.bottom); if (horizontalScrollBar){ _local3 = (_local3 - horizontalScrollBar.minHeight); }; verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3); verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top); }; if (whiteBox){ whiteBox.x = verticalScrollBar.x; whiteBox.y = horizontalScrollBar.y; }; }; contentPane.x = _local1.left; contentPane.y = _local1.top; if (focusPane){ focusPane.x = _local1.left; focusPane.y = _local1.top; }; scrollChildren(); }; invalidateDisplayListFlag = false; if (blocker){ _local1 = viewMetrics; _local4 = (enabled) ? null : getStyle("backgroundDisabledColor"); if (!_local4){ _local4 = getStyle("backgroundColor"); }; if ((((_local4 === null)) || (isNaN(Number(_local4))))){ _local4 = 0xFFFFFF; }; _local5 = getStyle("disabledOverlayAlpha"); if (isNaN(_local5)){ _local5 = 0.6; }; blocker.x = _local1.left; blocker.y = _local1.top; _local6 = (unscaledWidth - (_local1.left + _local1.right)); _local7 = (unscaledHeight - (_local1.top + _local1.bottom)); blocker.graphics.clear(); blocker.graphics.beginFill(uint(_local4), _local5); blocker.graphics.drawRect(0, 0, _local6, _local7); blocker.graphics.endFill(); rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1)); }; } public function set horizontalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalLineScrollSizeChanged")); } override public function contentToGlobal(_arg1:Point):Point{ if (contentPane){ return (contentPane.localToGlobal(_arg1)); }; return (localToGlobal(_arg1)); } mx_internal function set forceClipping(_arg1:Boolean):void{ if (_clipContent){ if (_arg1){ _forceClippingCount++; } else { _forceClippingCount--; }; createContentPane(); scrollChildren(); }; } public function get horizontalPageScrollSize():Number{ return (_horizontalPageScrollSize); } public function set defaultButton(_arg1:IFlexDisplayObject):void{ _defaultButton = _arg1; ContainerGlobals.focusedContainer = null; } private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{ var _local2:String; var _local3:int; var _local4:int; var _local5:IUIComponent; _local2 = _arg1.id; if (((!((_local2 == null))) && ((document[_local2] == null)))){ return (false); }; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IUIComponent(getChildAt(_local4)); if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){ return (true); }; _local4++; }; if (childRepeaters){ _local3 = childRepeaters.length; _local4 = 0; while (_local4 < _local3) { if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){ return (true); }; _local4++; }; }; return (false); } override protected function commitProperties():void{ var _local1:String; super.commitProperties(); if (changedStyles){ _local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles; super.notifyStyleChangeInChildren(_local1, true); changedStyles = null; }; createOrDestroyBlocker(); } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg1){ contentPane.scrollRect = Rectangle(_arg1); }; super.finishPrint(_arg1, _arg2); } public function get autoLayout():Boolean{ return (_autoLayout); } public function get maxHorizontalScrollPosition():Number{ return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0)); } public function set creationPolicy(_arg1:String):void{ _creationPolicy = _arg1; setActualCreationPolicies(_arg1); } public function set verticalScrollPolicy(_arg1:String):void{ if (_verticalScrollPolicy != _arg1){ _verticalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalScrollPolicyChanged")); }; } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Rectangle; _local2 = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null; if (_local2){ contentPane.scrollRect = null; }; super.prepareToPrint(_arg1); return (_local2); } public function set label(_arg1:String):void{ _label = _arg1; dispatchEvent(new Event("labelChanged")); } override protected function initializationComplete():void{ } override mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:IUIComponent; _local2 = IUIComponent(_arg1); super.addingChild(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; _numChildren++; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); }; } mx_internal function setActualCreationPolicies(_arg1:String):void{ var _local2:String; var _local3:int; var _local4:int; var _local5:IFlexDisplayObject; var _local6:Container; actualCreationPolicy = _arg1; _local2 = _arg1; if (_arg1 == ContainerCreationPolicy.QUEUED){ _local2 = ContainerCreationPolicy.AUTO; }; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IFlexDisplayObject(getChildAt(_local4)); if ((_local5 is Container)){ _local6 = Container(_local5); if (_local6.creationPolicy == null){ _local6.setActualCreationPolicies(_local2); }; }; _local4++; }; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = (contentPane.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; }; } override public function contains(_arg1:DisplayObject):Boolean{ if (contentPane){ return (contentPane.contains(_arg1)); }; return (super.contains(_arg1)); } public function set clipContent(_arg1:Boolean):void{ if (_clipContent != _arg1){ _clipContent = _arg1; invalidateDisplayList(); }; } override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:int; var _local4:int; var _local5:ISimpleStyleClient; _local3 = super.numChildren; _local4 = 0; while (_local4 < _local3) { if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){ _local5 = (super.getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; }; _local4++; }; if (_arg2){ changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1; invalidateProperties(); }; } override public function get contentMouseX():Number{ if (contentPane){ return (contentPane.mouseX); }; return (super.contentMouseX); } override public function get contentMouseY():Number{ if (contentPane){ return (contentPane.mouseY); }; return (super.contentMouseY); } override public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; if ((((autoLayout == false)) && ((forceLayout == false)))){ if (_arg1){ _local2 = super.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = super.getChildAt(_local3); if ((_local4 is ILayoutManagerClient)){ ILayoutManagerClient(_local4).validateSize(true); }; _local3++; }; }; adjustSizesForScaleChanges(); } else { super.validateSize(_arg1); }; } override public function getChildAt(_arg1:int):DisplayObject{ if (contentPane){ return (contentPane.getChildAt(_arg1)); }; return (super.getChildAt((_firstChildIndex + _arg1))); } protected function layoutChrome(_arg1:Number, _arg2:Number):void{ if (border){ updateBackgroundImageRect(); border.move(0, 0); border.setActualSize(_arg1, _arg2); }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){ setStyle("mouseShield", true); setStyle("mouseShieldChildren", true); }; }; } override protected function attachOverlay():void{ rawChildren_addChild(overlay); } override public function localToContent(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = localToGlobal(_arg1); return (globalToContent(_arg1)); } public function get rawChildren():IChildList{ if (!_rawChildren){ _rawChildren = new ContainerRawChildrenList(this); }; return (_rawChildren); } public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:Boolean; var _local3:Boolean; _local1 = borderMetrics; _local2 = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON))))); _local3 = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON))))); if (((!(_local2)) && (!(_local3)))){ return (_local1); }; if (!_viewMetrics){ _viewMetrics = _local1.clone(); } else { _viewMetrics.left = _local1.left; _viewMetrics.right = _local1.right; _viewMetrics.top = _local1.top; _viewMetrics.bottom = _local1.bottom; }; if (_local2){ _viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth); }; if (_local3){ _viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight); }; return (_viewMetrics); } public function set creationIndex(_arg1:int):void{ _creationIndex = _arg1; } public function executeChildBindings(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:IUIComponent; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = IUIComponent(getChildAt(_local3)); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1); }; _local3++; }; } public function set verticalScrollBar(_arg1:ScrollBar):void{ _verticalScrollBar = _arg1; } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } private function createOrDestroyBlocker():void{ var _local1:DisplayObject; var _local2:ISystemManager; if (enabled){ if (blocker){ rawChildren.removeChild(blocker); blocker = null; }; } else { if (!blocker){ blocker = new FlexSprite(); blocker.name = "blocker"; blocker.mouseEnabled = true; rawChildren.addChild(blocker); blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler); _local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null; while (_local1) { if (_local1 == this){ _local2 = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.focus = null; }; break; }; _local1 = _local1.parent; }; }; }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; invalidateProperties(); } override public function getChildByName(_arg1:String):DisplayObject{ var _local2:DisplayObject; var _local3:int; if (contentPane){ return (contentPane.getChildByName(_arg1)); }; _local2 = super.getChildByName(_arg1); if (!_local2){ return (null); }; _local3 = (super.getChildIndex(_local2) - _firstChildIndex); if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){ return (null); }; return (_local2); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ addingChild(_arg1); if (contentPane){ contentPane.addChildAt(_arg1, _arg2); } else { $addChildAt(_arg1, (_firstChildIndex + _arg2)); }; childAdded(_arg1); return (_arg1); } override public function get baselinePosition():Number{ var _local1:IUIComponent; if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){ _local1 = (getChildAt(0) as IUIComponent); if (_local1){ return ((_local1.y + _local1.baselinePosition)); }; }; return (super.baselinePosition); } private function blocker_clickHandler(_arg1:Event):void{ _arg1.stopPropagation(); } public function get maxVerticalScrollPosition():Number{ return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0)); } public function set verticalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalPageScrollSizeChanged")); } private function creationCompleteHandler(_arg1:FlexEvent):void{ numChildrenCreated--; if (numChildrenCreated <= 0){ dispatchEvent(new FlexEvent("childrenCreationComplete")); }; } override public function contentToLocal(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = contentToGlobal(_arg1); return (globalToLocal(_arg1)); } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); if (contentPane){ contentPane.removeChild(_arg1); } else { $removeChild(_arg1); }; childRemoved(_arg1); return (_arg1); } private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{ var _local5:ScrollEvent; _local5 = new ScrollEvent(ScrollEvent.SCROLL); _local5.direction = _arg1; _local5.position = _arg3; _local5.delta = (_arg3 - _arg2); _local5.detail = _arg4; dispatchEvent(_local5); } public function get label():String{ return (_label); } mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{ if (processedDescriptors){ return; }; if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){ if (_arg1.properties.childDescriptors){ throw (new Error(resourceMultipleChildSets_ClassAndSubclass)); }; } else { _documentDescriptor = _arg1; _documentDescriptor.document = this; }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:IndexChangedEvent; _local4 = _local3; _local5 = _arg2; if (contentPane){ contentPane.setChildIndex(_arg1, _arg2); if (((_autoLayout) || (forceLayout))){ invalidateDisplayList(); }; } else { _local3 = super.getChildIndex(_arg1); _arg2 = (_arg2 + _firstChildIndex); if (_arg2 == _local3){ return; }; super.setChildIndex(_arg1, _arg2); invalidateDisplayList(); _local4 = (_local3 - _firstChildIndex); _local5 = (_arg2 - _firstChildIndex); }; _local6 = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE); _local6.relatedObject = _arg1; _local6.oldIndex = _local4; _local6.newIndex = _local5; dispatchEvent(_local6); dispatchEvent(new Event("childrenChanged")); } override public function regenerateStyleCache(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; super.regenerateStyleCache(_arg1); if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = getChildAt(_local3); if (((_arg1) && ((_local4 is UIComponent)))){ if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ UIComponent(_local4).regenerateStyleCache(_arg1); }; } else { if ((((_local4 is UITextField)) && (UITextField(_local4).inheritingStyles))){ StyleProtoChain.initTextField(UITextField(_local4)); }; }; _local3++; }; }; } override protected function createChildren():void{ var _local1:Application; super.createChildren(); createBorder(); createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON)))); if (creationPolicy != null){ actualCreationPolicy = creationPolicy; } else { if ((parent is Container)){ if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { actualCreationPolicy = Container(parent).actualCreationPolicy; }; }; }; if (actualCreationPolicy == ContainerCreationPolicy.NONE){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){ _local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application); _local1.addToCreationQueue(this, creationIndex, null, this); } else { if (recursionFlag){ createComponentsFromDescriptors(); }; }; }; if (autoLayout == false){ forceLayout = true; }; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); } mx_internal function set numChildrenCreated(_arg1:int):void{ _numChildrenCreated = _arg1; } public function get borderMetrics():EdgeMetrics{ return ((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY); } public function get clipContent():Boolean{ return (_clipContent); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; _local3 = super.getChildIndex(_arg1); super.setChildIndex(_arg1, _arg2); if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){ _firstChildIndex--; } else { if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){ _firstChildIndex++; }; }; dispatchEvent(new Event("childrenChanged")); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get viewMetricsAndPadding():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:EdgeMetrics; if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){ return (_viewMetricsAndPadding); }; if (!_viewMetricsAndPadding){ _viewMetricsAndPadding = new EdgeMetrics(); }; _local1 = _viewMetricsAndPadding; _local2 = viewMetrics; _local1.left = (_local2.left + getStyle("paddingLeft")); _local1.right = (_local2.right + getStyle("paddingRight")); _local1.top = (_local2.top + getStyle("paddingTop")); _local1.bottom = (_local2.bottom + getStyle("paddingBottom")); return (_local1); } public function set horizontalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalPageScrollSizeChanged")); } private function layoutCompleteHandler(_arg1:Event):void{ var _local2:Boolean; UIComponentGlobals.layoutManager.removeEventListener("updateComplete", layoutCompleteHandler); forceLayout = false; _local2 = false; if (!isNaN(horizontalScrollPositionPending)){ if (horizontalScrollPositionPending < 0){ horizontalScrollPositionPending = 0; } else { if (horizontalScrollPositionPending > maxHorizontalScrollPosition){ horizontalScrollPositionPending = maxHorizontalScrollPosition; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){ _horizontalScrollPosition = horizontalScrollPositionPending; horizontalScrollBar.scrollPosition = horizontalScrollPositionPending; _local2 = true; }; horizontalScrollPositionPending = NaN; }; if (!isNaN(verticalScrollPositionPending)){ if (verticalScrollPositionPending < 0){ verticalScrollPositionPending = 0; } else { if (verticalScrollPositionPending > maxVerticalScrollPosition){ verticalScrollPositionPending = maxVerticalScrollPosition; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){ _verticalScrollPosition = verticalScrollPositionPending; verticalScrollBar.scrollPosition = verticalScrollPositionPending; _local2 = true; }; verticalScrollPositionPending = NaN; }; if (_local2){ scrollChildren(); }; } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){ setStyle("mouseShield", false); setStyle("mouseShieldChildren", false); }; }; } public function set autoLayout(_arg1:Boolean):void{ var _local2:IInvalidating; _autoLayout = _arg1; if (_arg1){ invalidateSize(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } mx_internal function get numChildrenCreated():int{ return (_numChildrenCreated); } override public function initialize():void{ var _local1:*; if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){ _local1 = documentDescriptor.properties; if (((_local1) && (_local1.childDescriptors))){ if (_childDescriptors){ throw (new Error(resourceMultipleChildSets_ClassAndInstance)); }; _childDescriptors = _local1.childDescriptors; }; }; super.initialize(); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + $numChildren) + 1))))){ _numChildren++; } else { if (_arg2 <= _firstChildIndex){ _firstChildIndex++; }; }; super.addingChild(_arg1); $addChildAt(_arg1, _arg2); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } public function set data(_arg1:Object):void{ _data = _arg1; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); invalidateDisplayList(); } private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:EdgeMetrics; var _local8:Boolean; var _local9:Boolean; var _local10:Boolean; var _local11:Boolean; _local2 = _arg1.right; _local3 = _arg1.bottom; _local4 = unscaledWidth; _local5 = unscaledHeight; _local6 = (((_arg1.left < 0)) || ((_arg1.top < 0))); _local7 = viewMetrics; if (scaleX != 1){ _local4 = (_local4 + (1 / Math.abs(scaleX))); }; if (scaleY != 1){ _local5 = (_local5 + (1 / Math.abs(scaleY))); }; _local4 = Math.floor(_local4); _local5 = Math.floor(_local5); _local2 = Math.floor(_local2); _local3 = Math.floor(_local3); if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){ _local5 = (_local5 - horizontalScrollBar.minHeight); }; if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){ _local4 = (_local4 - verticalScrollBar.minWidth); }; _local4 = (_local4 - (_local7.left + _local7.right)); _local5 = (_local5 - (_local7.top + _local7.bottom)); _local8 = (horizontalScrollPolicy == ScrollPolicy.ON); _local9 = (verticalScrollPolicy == ScrollPolicy.ON); _local10 = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0))); if (_local4 < _local2){ _local10 = true; if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){ _local8 = true; }; }; if (_local5 < _local3){ _local10 = true; if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){ _local9 = true; }; }; if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){ _local9 = false; _local8 = _local9; } else { if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){ _local8 = false; }; }; _local11 = createOrDestroyScrollbars(_local8, _local9, _local10); if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){ if (horizontalScrollBar){ horizontalScrollBar.setScrollProperties((_local4 - borderMetrics.right), 0, (_local2 - _local4), horizontalPageScrollSize); scrollPositionChanged = true; }; viewableWidth = _local4; scrollableWidth = _local2; }; if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){ if (verticalScrollBar){ verticalScrollBar.setScrollProperties((_local5 - borderMetrics.bottom), 0, (_local3 - _local5), verticalPageScrollSize); scrollPositionChanged = true; }; viewableHeight = _local5; scrollableHeight = _local3; }; return (_local11); } public function getChildren():Array{ var _local1:Array; var _local2:int; var _local3:int; _local1 = []; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local1.push(getChildAt(_local3)); _local3++; }; return (_local1); } public function removeAllChildren():void{ while (numChildren > 0) { removeChildAt(0); }; } override mx_internal function childRemoved(_arg1:DisplayObject):void{ super.childRemoved(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ _numChildren--; if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); }; dispatchEvent(new Event("childrenChanged")); } override public function get numChildren():int{ return ((contentPane) ? contentPane.numChildren : _numChildren); } public function get data():Object{ return (_data); } override public function styleChanged(_arg1:String):void{ var _local2:Boolean; var _local3:String; var _local4:String; _local2 = (((_arg1 == null)) || ((_arg1 == "styleName"))); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateDisplayList(); }; if (((_local2) || ((_arg1 == "borderSkin")))){ if (border){ rawChildren.removeChild(DisplayObject(border)); border = null; createBorder(); }; }; if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){ createBorder(); }; super.styleChanged(_arg1); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateViewMetricsAndPadding(); }; if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){ if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){ _local3 = getStyle("horizontalScrollBarStyleName"); ISimpleStyleClient(horizontalScrollBar).styleName = _local3; }; }; if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){ if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){ _local4 = getStyle("verticalScrollBarStyleName"); ISimpleStyleClient(verticalScrollBar).styleName = _local4; }; }; } private function createContentPaneAndScrollbarsIfNeeded():Boolean{ var _local1:Rectangle; var _local2:Boolean; if (_clipContent){ _local1 = getScrollableRect(); _local2 = createScrollbarsIfNeeded(_local1); if (border){ updateBackgroundImageRect(); }; return (_local2); //unresolved jump }; _local2 = createOrDestroyScrollbars(false, false, false); _local1 = getScrollableRect(); scrollableWidth = _local1.right; scrollableHeight = _local1.bottom; if (((_local2) && (border))){ updateBackgroundImageRect(); }; return (_local2); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Object; var _local4:Number; super.updateDisplayList(_arg1, _arg2); layoutChrome(_arg1, _arg2); if (scrollPositionChanged){ if (_horizontalScrollPosition < 0){ _horizontalScrollPosition = 0; } else { if (_horizontalScrollPosition > maxHorizontalScrollPosition){ _horizontalScrollPosition = maxHorizontalScrollPosition; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){ horizontalScrollBar.scrollPosition = _horizontalScrollPosition; }; if (_verticalScrollPosition < 0){ _verticalScrollPosition = 0; } else { if (_verticalScrollPosition > maxVerticalScrollPosition){ _verticalScrollPosition = maxVerticalScrollPosition; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){ verticalScrollBar.scrollPosition = _verticalScrollPosition; }; scrollChildren(); scrollPositionChanged = false; }; if (scrollPropertiesChanged){ if (horizontalScrollBar){ horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; }; if (verticalScrollBar){ verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; }; scrollPropertiesChanged = false; }; if (((contentPane) && (contentPane.scrollRect))){ _local3 = (enabled) ? null : getStyle("backgroundDisabledColor"); if (!_local3){ _local3 = getStyle("backgroundColor"); }; _local4 = getStyle("backgroundAlpha"); if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){ _local3 = null; } else { if (((getStyle("backgroundImage")) || (getStyle("background")))){ _local3 = null; } else { if (_local4 != 1){ _local3 = null; }; }; }; contentPane.opaqueBackground = _local3; contentPane.cacheAsBitmap = !((_local3 == null)); }; } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ if (_numChildren == 0){ _firstChildIndex++; }; super.addingChild(_arg1); $addChild(_arg1); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } private static function loadResources():void{ resourceScrollDirection = packageResources.getString("scrollDirection"); resourceMultipleChildSets_ClassAndInstance = packageResources.getString("multipleChildSets_ClassAndInstance"); resourceMultipleChildSets_ClassAndSubclass = packageResources.getString("multipleChildSets_ClassAndSubclass"); } mx_internal static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{ var _local3:InteractiveObject; var _local4:InteractiveObject; var _local5:IUIComponent; var _local6:IFocusManager; var _local7:Button; _local3 = _arg2; _local4 = _arg2; _local5 = null; if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){ return; }; while (_local4) { if (_local4.parent){ _local3 = _local4.parent; } else { _local3 = null; }; if ((_local4 is IUIComponent)){ _local5 = IUIComponent(_local4); }; _local4 = _local3; if (((((_local4) && ((_local4 is Container)))) && (Container(_local4).defaultButton))){ break; }; }; if (ContainerGlobals.focusedContainer != _local4){ if (!_local4){ _local4 = InteractiveObject(_local5); }; if (((_local4) && ((_local4 is Container)))){ _local6 = UIComponent(_local4).focusManager; _local7 = (Container(_local4).defaultButton as Button); if (_local7){ ContainerGlobals.focusedContainer = Container(_local4); _local6.defaultButton = _local7; } else { ContainerGlobals.focusedContainer = Container(_local4); _local6.defaultButton = null; }; }; }; } loadResources(); } }//package mx.core
Section 131
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy) package mx.core { public final class ContainerCreationPolicy { public static const ALL:String = "all"; public static const QUEUED:String = "queued"; public static const NONE:String = "none"; mx_internal static const VERSION:String = "2.0.1.0"; public static const AUTO:String = "auto"; } }//package mx.core
Section 132
//ContainerGlobals (mx.core.ContainerGlobals) package mx.core { import flash.display.*; public class ContainerGlobals { public static var focusedContainer:InteractiveObject; } }//package mx.core
Section 133
//ContainerLayout (mx.core.ContainerLayout) package mx.core { public final class ContainerLayout { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; public static const ABSOLUTE:String = "absolute"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 134
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList) package mx.core { import flash.display.*; import flash.geom.*; public class ContainerRawChildrenList implements IChildList { private var owner:Container; mx_internal static const VERSION:String = "2.0.1.0"; public function ContainerRawChildrenList(_arg1:Container){ this.owner = _arg1; } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } } }//package mx.core
Section 135
//DragSource (mx.core.DragSource) package mx.core { public class DragSource { private var formatHandlers:Object; private var dataHolder:Object; private var _formats:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function DragSource(){ dataHolder = {}; formatHandlers = {}; _formats = []; super(); } public function dataForFormat(_arg1:String):Object{ var _local2:Object; _local2 = dataHolder[_arg1]; if (_local2){ return (_local2); }; if (formatHandlers[_arg1]){ return (formatHandlers[_arg1]()); }; return (null); } public function addHandler(_arg1:Function, _arg2:String):void{ _formats.push(_arg2); formatHandlers[_arg2] = _arg1; } public function addData(_arg1:Object, _arg2:String):void{ _formats.push(_arg2); dataHolder[_arg2] = _arg1; } public function hasFormat(_arg1:String):Boolean{ var _local2:int; var _local3:int; _local2 = _formats.length; _local3 = 0; while (_local3 < _local2) { if (_formats[_local3] == _arg1){ return (true); }; _local3++; }; return (false); } public function get formats():Array{ return (_formats); } } }//package mx.core
Section 136
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var bottom:Number; public var top:Number; public var right:Number; public var left:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static var EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 137
//EventPriority (mx.core.EventPriority) package mx.core { public final class EventPriority { public static const DEFAULT:int = 0; public static const BINDING:int = 100; public static const DEFAULT_HANDLER:int = -50; public static const EFFECT:int = -100; public static const CURSOR_MANAGEMENT:int = 200; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 138
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 139
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexLoader(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 140
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexShape(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 141
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 142
//FlexTextField (mx.core.FlexTextField) package mx.core { import flash.text.*; import mx.utils.*; public class FlexTextField extends TextField { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexTextField(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 143
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function contains(_arg1:DisplayObject):Boolean; function getChildByName(_arg1:String):DisplayObject; function removeChildAt(_arg1:int):DisplayObject; function getChildIndex(_arg1:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(_arg1:Point):Array; function removeChild(_arg1:DisplayObject):DisplayObject; function getChildAt(_arg1:int):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; } }//package mx.core
Section 144
//IContainer (mx.core.IContainer) package mx.core { public interface IContainer { } }//package mx.core
Section 145
//IDataRenderer (mx.core.IDataRenderer) package mx.core { public interface IDataRenderer { function set data(_arg1:Object):void; function get data():Object; } }//package mx.core
Section 146
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent) package mx.core { public interface IDeferredInstantiationUIComponent extends IUIComponent { function get descriptor():UIComponentDescriptor; function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function set descriptor(_arg1:UIComponentDescriptor):void; function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function executeBindings(_arg1:Boolean=false):void; function get id():String; function set cacheHeuristic(_arg1:Boolean):void; function get cachePolicy():String; function registerEffects(_arg1:Array):void; function set id(_arg1:String):void; } }//package mx.core
Section 147
//IFactory (mx.core.IFactory) package mx.core { public interface IFactory { function newInstance(); } }//package mx.core
Section 148
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 149
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.events.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function set height(_arg1:Number):void; function get scaleY():Number; function move(_arg1:Number, _arg2:Number):void; function get scaleX():Number; function set mask(_arg1:DisplayObject):void; function set scaleX(_arg1:Number):void; function set name(_arg1:String):void; function set scaleY(_arg1:Number):void; function get visible():Boolean; function get measuredWidth():Number; function set visible(_arg1:Boolean):void; function get alpha():Number; function get height():Number; function get width():Number; function get parent():DisplayObjectContainer; function get mask():DisplayObject; function set x(_arg1:Number):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set y(_arg1:Number):void; function get x():Number; function get y():Number; function set alpha(_arg1:Number):void; } }//package mx.core
Section 150
//IFlexModule (mx.core.IFlexModule) package mx.core { public interface IFlexModule { function set moduleFactory(_arg1:IFlexModuleFactory):void; function get moduleFactory():IFlexModuleFactory; } }//package mx.core
Section 151
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 152
//IIMESupport (mx.core.IIMESupport) package mx.core { public interface IIMESupport { function get imeMode():String; function set imeMode(_arg1:String):void; } }//package mx.core
Section 153
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateDisplayList():void; function invalidateSize():void; function invalidateProperties():void; } }//package mx.core
Section 154
//IMXMLObject (mx.core.IMXMLObject) package mx.core { public interface IMXMLObject { function initialized(_arg1:Object, _arg2:String):void; } }//package mx.core
Section 155
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier) package mx.core { import flash.events.*; public interface IPropertyChangeNotifier extends IEventDispatcher, IUID { } }//package mx.core
Section 156
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 157
//IRepeater (mx.core.IRepeater) package mx.core { public interface IRepeater { function get container():Container; function set recycleChildren(_arg1:Boolean):void; function get startingIndex():int; function set startingIndex(_arg1:int):void; function get currentItem():Object; function get count():int; function get recycleChildren():Boolean; function executeChildBindings():void; function set dataProvider(_arg1:Object):void; function initializeRepeater(_arg1:Container, _arg2:Boolean):void; function get currentIndex():int; function get dataProvider():Object; function set count(_arg1:int):void; } }//package mx.core
Section 158
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function get repeaters():Array; function get instanceIndices():Array; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 159
//IToolTip (mx.core.IToolTip) package mx.core { import flash.geom.*; public interface IToolTip extends IUIComponent { function get screen():Rectangle; function get text():String; function set text(_arg1:String):void; } }//package mx.core
Section 160
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set enabled(_arg1:Boolean):void; function set measuredMinWidth(_arg1:Number):void; function set isPopUp(_arg1:Boolean):void; function get percentWidth():Number; function set percentWidth(_arg1:Number):void; function get baselinePosition():Number; function initialize():void; function getExplicitOrMeasuredWidth():Number; function set percentHeight(_arg1:Number):void; function get minHeight():Number; function getExplicitOrMeasuredHeight():Number; function get document():Object; function get explicitMaxWidth():Number; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function get maxHeight():Number; function get minWidth():Number; function owns(_arg1:DisplayObject):Boolean; function get opaqueBackground():Object; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function get owner():DisplayObjectContainer; function set document(_arg1:Object):void; function get tweeningProperties():Array; function get enabled():Boolean; function get isPopUp():Boolean; function get explicitMinHeight():Number; function set focusPane(_arg1:Sprite):void; function get maxWidth():Number; function get percentHeight():Number; function set tweeningProperties(_arg1:Array):void; function get explicitMaxHeight():Number; function get focusPane():Sprite; function parentChanged(_arg1:DisplayObjectContainer):void; function set opaqueBackground(_arg1:Object):void; function set measuredMinHeight(_arg1:Number):void; function set cacheAsBitmap(_arg1:Boolean):void; function get scrollRect():Rectangle; function set explicitWidth(_arg1:Number):void; function set owner(_arg1:DisplayObjectContainer):void; function set includeInLayout(_arg1:Boolean):void; function get explicitMinWidth():Number; function get explicitWidth():Number; function get measuredMinHeight():Number; function set explicitHeight(_arg1:Number):void; function get includeInLayout():Boolean; function get measuredMinWidth():Number; function get explicitHeight():Number; function set systemManager(_arg1:ISystemManager):void; function get systemManager():ISystemManager; } }//package mx.core
Section 161
//IUID (mx.core.IUID) package mx.core { public interface IUID { function get uid():String; function set uid(_arg1:String):void; } }//package mx.core
Section 162
//LayoutContainer (mx.core.LayoutContainer) package mx.core { import flash.events.*; import mx.containers.*; import mx.resources.*; import mx.containers.utilityClasses.*; import flash.system.*; public class LayoutContainer extends Container { private var _layout:String;// = "vertical" private var processingCreationQueue:Boolean;// = false private var creationQueue:Array; protected var boxLayoutClass:Class; private var preloadObj:Object; private var resizeHandlerAdded:Boolean;// = false protected var layoutObject:Layout; protected var canvasLayoutClass:Class; mx_internal static const VERSION:String = "2.0.1.0"; private static var viewSourceMenuItem:String; mx_internal static var useProgressiveLayout:Boolean = false; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function LayoutContainer(){ layoutObject = new BoxLayout(); canvasLayoutClass = CanvasLayout; boxLayoutClass = BoxLayout; resizeHandlerAdded = false; creationQueue = []; processingCreationQueue = false; _layout = ContainerLayout.VERTICAL; super(); layoutObject.target = this; } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override protected function measure():void{ super.measure(); layoutObject.measure(); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; } public function set layout(_arg1:String):void{ if (_layout != _arg1){ _layout = _arg1; if (layoutObject){ layoutObject.target = null; }; if (_layout == ContainerLayout.ABSOLUTE){ layoutObject = new canvasLayoutClass(); } else { layoutObject = new boxLayoutClass(); if (_layout == ContainerLayout.VERTICAL){ BoxLayout(layoutObject).direction = BoxDirection.VERTICAL; } else { BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL; }; }; if (layoutObject){ layoutObject.target = this; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("layoutChanged")); }; } public function get layout():String{ return (_layout); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); createBorder(); } private static function loadResources():void{ viewSourceMenuItem = packageResources.getString("viewSource"); } loadResources(); } }//package mx.core
Section 163
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 164
//ScrollControlBase (mx.core.ScrollControlBase) package mx.core { import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.controls.scrollClasses.*; import mx.controls.*; import mx.skins.*; public class ScrollControlBase extends UIComponent { protected var maskShape:Shape; protected var border:IFlexDisplayObject; protected var scrollAreaChanged:Boolean; private var _viewMetrics:EdgeMetrics; private var numberOfRows:Number;// = 0 private var viewableColumns:Number; private var _scrollTipFunction:Function; private var numberOfCols:Number;// = 0 private var oldTTMEnabled:Boolean; mx_internal var _maxHorizontalScrollPosition:Number; public var liveScrolling:Boolean;// = true private var scrollThumbMidPoint:Number; protected var horizontalScrollBar:ScrollBar; private var invLayout:Boolean; public var showScrollTips:Boolean;// = false private var scrollTip:ToolTip; mx_internal var _maxVerticalScrollPosition:Number; protected var verticalScrollBar:ScrollBar; private var propsInited:Boolean; mx_internal var _verticalScrollPosition:Number;// = 0 private var specialHScrollCase:Boolean; mx_internal var _horizontalScrollPosition:Number;// = 0 mx_internal var _horizontalScrollPolicy:String;// = "off" mx_internal var _verticalScrollPolicy:String;// = "auto" private var viewableRows:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function ScrollControlBase(){ numberOfCols = 0; numberOfRows = 0; _horizontalScrollPosition = 0; _horizontalScrollPolicy = ScrollPolicy.OFF; liveScrolling = true; showScrollTips = false; _verticalScrollPosition = 0; _verticalScrollPolicy = ScrollPolicy.AUTO; super(); _viewMetrics = EdgeMetrics.EMPTY; addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); } protected function setScrollBarProperties(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:String; var _local6:String; _local5 = this.horizontalScrollPolicy; _local6 = this.verticalScrollPolicy; scrollAreaChanged = false; if ((((_local5 == ScrollPolicy.ON)) || ((((((_arg2 < _arg1)) && ((_arg1 > 0)))) && ((_local5 == ScrollPolicy.AUTO)))))){ if (((!(horizontalScrollBar)) || (specialHScrollCase))){ specialHScrollCase = false; if (!horizontalScrollBar){ if (createHScrollBar()){ horizontalScrollBar.visible = false; horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollHandler); horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollTipHandler); horizontalScrollBar.scrollPosition = _horizontalScrollPosition; scrollAreaChanged = true; }; }; }; if (((horizontalScrollBar) && (((((!((numberOfCols == _arg1))) || (!((viewableColumns == _arg2))))) || (scrollAreaChanged))))){ horizontalScrollBar.setScrollProperties(_arg2, 0, (_arg1 - _arg2)); if (horizontalScrollBar.scrollPosition != _horizontalScrollPosition){ horizontalScrollBar.scrollPosition = _horizontalScrollPosition; }; viewableColumns = _arg2; numberOfCols = _arg1; }; } else { if ((((((_local5 == ScrollPolicy.AUTO)) || ((_local5 == ScrollPolicy.OFF)))) && (horizontalScrollBar))){ horizontalScrollPosition = 0; removeChild(horizontalScrollBar); horizontalScrollBar = null; viewableColumns = NaN; scrollAreaChanged = true; }; }; if ((((_local6 == ScrollPolicy.ON)) || ((((((_arg4 < _arg3)) && ((_arg3 > 0)))) && ((_local6 == ScrollPolicy.AUTO)))))){ if (!verticalScrollBar){ if (createVScrollBar()){ verticalScrollBar.visible = false; verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollHandler); verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollTipHandler); verticalScrollBar.scrollPosition = _verticalScrollPosition; scrollAreaChanged = true; }; }; if (((verticalScrollBar) && (((((!((numberOfRows == _arg3))) || (!((viewableRows == _arg4))))) || (scrollAreaChanged))))){ verticalScrollBar.setScrollProperties(_arg4, 0, (_arg3 - _arg4)); if (verticalScrollBar.scrollPosition != _verticalScrollPosition){ verticalScrollBar.scrollPosition = _verticalScrollPosition; }; viewableRows = _arg4; numberOfRows = _arg3; }; } else { if ((((((_local6 == ScrollPolicy.AUTO)) || ((_local6 == ScrollPolicy.OFF)))) && (verticalScrollBar))){ verticalScrollPosition = 0; removeChild(verticalScrollBar); verticalScrollBar = null; viewableRows = NaN; scrollAreaChanged = true; }; }; if (scrollAreaChanged){ updateDisplayList(unscaledWidth, unscaledHeight); }; } public function get verticalScrollPosition():Number{ return (_verticalScrollPosition); } protected function createBorder():void{ var _local1:Class; if (((!(border)) && (isBorderNeeded()))){ _local1 = getStyle("borderSkin"); border = new (_local1); if ((border is IUIComponent)){ IUIComponent(border).enabled = enabled; }; if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChildAt(DisplayObject(border), 0); invalidateDisplayList(); }; } public function get horizontalScrollPosition():Number{ return (_horizontalScrollPosition); } private function createVScrollBar():ScrollBar{ var _local1:EdgeMetrics; var _local2:VScrollBar; var _local3:String; _local1 = borderMetrics; _local2 = new VScrollBar(); if (unscaledWidth >= ((_local2.minWidth + _local1.left) + _local1.right)){ verticalScrollBar = _local2; verticalScrollBar.enabled = enabled; _local3 = getStyle("verticalScrollBarStyleName"); verticalScrollBar.styleName = _local3; addChild(verticalScrollBar); }; return (verticalScrollBar); } public function get scrollTipFunction():Function{ return (_scrollTipFunction); } public function set verticalScrollPosition(_arg1:Number):void{ _verticalScrollPosition = _arg1; if (verticalScrollBar){ verticalScrollBar.scrollPosition = _arg1; }; dispatchEvent(new Event("viewChanged")); } private function createHScrollBar():ScrollBar{ var _local1:EdgeMetrics; var _local2:HScrollBar; var _local3:String; _local1 = borderMetrics; _local2 = new HScrollBar(); if (unscaledHeight >= ((_local2.minHeight + _local1.top) + _local1.bottom)){ horizontalScrollBar = _local2; horizontalScrollBar.enabled = enabled; _local3 = getStyle("horizontalScrollBarStyleName"); horizontalScrollBar.styleName = _local3; addChild(horizontalScrollBar); horizontalScrollBar.validateNow(); }; return (horizontalScrollBar); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } public function set horizontalScrollPosition(_arg1:Number):void{ _horizontalScrollPosition = _arg1; if (horizontalScrollBar){ horizontalScrollBar.scrollPosition = _arg1; }; dispatchEvent(new Event("viewChanged")); } private function scrollTipHandler(_arg1:Event):void{ var _local2:ScrollBar; var _local3:Boolean; var _local4:String; var _local5:Number; var _local6:String; var _local7:Point; if ((_arg1 is ScrollEvent)){ if (!showScrollTips){ return; }; if (ScrollEvent(_arg1).detail == ScrollEventDetail.THUMB_POSITION){ if (scrollTip){ systemManager.toolTipChildren.removeChild(scrollTip); scrollTip = null; ToolTipManager.enabled = oldTTMEnabled; }; } else { if (ScrollEvent(_arg1).detail == ScrollEventDetail.THUMB_TRACK){ _local2 = ScrollBar(_arg1.target); _local3 = (_local2 == verticalScrollBar); _local4 = (_local3) ? "vertical" : "horizontal"; _local5 = _local2.scrollPosition; if (!scrollTip){ scrollTip = new ToolTip(); systemManager.toolTipChildren.addChild(scrollTip); scrollThumbMidPoint = (_local2.scrollThumb.height / 2); oldTTMEnabled = ToolTipManager.enabled; ToolTipManager.enabled = false; }; _local6 = _local5.toString(); if (_scrollTipFunction != null){ _local6 = _scrollTipFunction(_local4, _local5); }; if (_local6 == ""){ scrollTip.visible = false; } else { scrollTip.text = _local6; ToolTipManager.sizeTip(scrollTip); _local7 = new Point(); if (_local3){ _local7.x = (-3 - scrollTip.width); _local7.y = ((_local2.scrollThumb.y + scrollThumbMidPoint) - (scrollTip.height / 2)); } else { _local7.x = (-3 - scrollTip.height); _local7.y = ((_local2.scrollThumb.y + scrollThumbMidPoint) - (scrollTip.width / 2)); }; _local7 = _local2.localToGlobal(_local7); scrollTip.move(_local7.x, _local7.y); scrollTip.visible = true; }; }; }; }; } protected function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:Number; var _local4:Number; var _local5:ScrollEvent; if (verticalScrollBar){ _arg1.stopPropagation(); _local2 = ((_arg1.delta <= 0)) ? 1 : -1; _local3 = Math.max(Math.abs(_arg1.delta), verticalScrollBar.lineScrollSize); _local4 = verticalScrollPosition; verticalScrollPosition = (verticalScrollPosition + ((3 * _local3) * _local2)); _local5 = new ScrollEvent(ScrollEvent.SCROLL); _local5.direction = ScrollEventDirection.VERTICAL; _local5.position = verticalScrollPosition; _local5.delta = (verticalScrollPosition - _local4); dispatchEvent(_local5); }; } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function set scrollTipFunction(_arg1:Function):void{ _scrollTipFunction = _arg1; dispatchEvent(new Event("scrollTipFunctionChanged")); } public function set horizontalScrollPolicy(_arg1:String):void{ var _local2:String; _local2 = _arg1.toLowerCase(); if (_horizontalScrollPolicy != _local2){ _horizontalScrollPolicy = _local2; invalidateDisplayList(); dispatchEvent(new Event("horizontalScrollPolicyChanged")); }; } private function isBorderNeeded():Boolean{ var _local1:Object; _local1 = getStyle("borderStyle"); if (_local1){ if (((!((_local1 == "none"))) || ((((_local1 == "none")) && (getStyle("mouseShield")))))){ return (true); }; }; _local1 = getStyle("backgroundColor"); if (((!((_local1 === null))) && (!((_local1 === ""))))){ return (true); }; _local1 = getStyle("backgroundImage"); return (((!((_local1 == null))) && (!((_local1 == ""))))); } public function set maxVerticalScrollPosition(_arg1:Number):void{ _maxVerticalScrollPosition = _arg1; dispatchEvent(new Event("maxVerticalScrollPositionChanged")); } public function get maxHorizontalScrollPosition():Number{ var _local1:Number; if (!isNaN(_maxHorizontalScrollPosition)){ return (_maxHorizontalScrollPosition); }; _local1 = (horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : 0; return (_local1); } public function set verticalScrollPolicy(_arg1:String):void{ var _local2:String; _local2 = _arg1.toLowerCase(); if (_verticalScrollPolicy != _local2){ _verticalScrollPolicy = _local2; invalidateDisplayList(); dispatchEvent(new Event("verticalScrollPolicyChanged")); }; } mx_internal function get scroll_horizontalScrollBar():ScrollBar{ return (horizontalScrollBar); } protected function layoutChrome(_arg1:Number, _arg2:Number):void{ if (border){ border.move(0, 0); border.setActualSize(_arg1, _arg2); }; } mx_internal function get scroll_verticalScrollBar():ScrollBar{ return (verticalScrollBar); } public function get viewMetrics():EdgeMetrics{ _viewMetrics = borderMetrics.clone(); if (((!(horizontalScrollBar)) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){ if (createHScrollBar()){ horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollHandler); horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollTipHandler); horizontalScrollBar.scrollPosition = _horizontalScrollPosition; specialHScrollCase = true; invalidateDisplayList(); }; }; if (((!(verticalScrollBar)) && ((verticalScrollPolicy == ScrollPolicy.ON)))){ if (createVScrollBar()){ verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollHandler); verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollTipHandler); verticalScrollBar.scrollPosition = _verticalScrollPosition; invalidateDisplayList(); }; }; if (verticalScrollBar){ _viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth); }; if (horizontalScrollBar){ _viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight); }; return (_viewMetrics); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; } public function get maxVerticalScrollPosition():Number{ var _local1:Number; if (!isNaN(_maxVerticalScrollPosition)){ return (_maxVerticalScrollPosition); }; _local1 = (verticalScrollBar) ? verticalScrollBar.maxScrollPosition : 0; return (_local1); } override protected function createChildren():void{ var _local1:Graphics; super.createChildren(); createBorder(); if (!maskShape){ maskShape = new FlexShape(); maskShape.name = "mask"; _local1 = maskShape.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, 10, 10); _local1.endFill(); addChild(maskShape); }; maskShape.visible = false; } public function get borderMetrics():EdgeMetrics{ return ((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY); } protected function scrollHandler(_arg1:Event):void{ var _local2:ScrollBar; var _local3:Number; var _local4:QName; if ((_arg1 is ScrollEvent)){ _local2 = ScrollBar(_arg1.target); _local3 = _local2.scrollPosition; if (_local2 == verticalScrollBar){ _local4 = new QName(mx_internal, "_verticalScrollPosition"); } else { if (_local2 == horizontalScrollBar){ _local4 = new QName(mx_internal, "_horizontalScrollPosition"); }; }; dispatchEvent(_arg1); if (_local4){ this[_local4] = _local3; }; }; } override public function styleChanged(_arg1:String):void{ var _local2:Boolean; var _local3:String; var _local4:String; _local2 = (((_arg1 == null)) || ((_arg1 == "styleName"))); super.styleChanged(_arg1); if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){ if (horizontalScrollBar){ _local3 = getStyle("horizontalScrollBarStyleName"); horizontalScrollBar.styleName = _local3; }; }; if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){ if (verticalScrollBar){ _local4 = getStyle("verticalScrollBarStyleName"); verticalScrollBar.styleName = _local4; }; }; } public function set maxHorizontalScrollPosition(_arg1:Number):void{ _maxHorizontalScrollPosition = _arg1; dispatchEvent(new Event("maxHorizontalScrollPositionChanged")); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:EdgeMetrics; var _local6:DisplayObject; var _local7:Number; var _local8:Number; super.updateDisplayList(_arg1, _arg2); layoutChrome(_arg1, _arg2); if ((((verticalScrollBar == null)) && ((verticalScrollPolicy == ScrollPolicy.ON)))){ if (createVScrollBar()){ verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollHandler); verticalScrollBar.addEventListener(ScrollEvent.SCROLL, scrollTipHandler); verticalScrollBar.scrollPosition = _verticalScrollPosition; }; }; _local3 = _arg1; _local4 = _arg2; invLayout = false; _local5 = (_viewMetrics = viewMetrics); if (horizontalScrollBar){ horizontalScrollBar.setActualSize(((_local3 - _local5.left) - _local5.right), horizontalScrollBar.minHeight); horizontalScrollBar.move(_local5.left, (_local4 - _local5.bottom)); horizontalScrollBar.visible = (((horizontalScrollBar.width >= horizontalScrollBar.minWidth)) && ((_local4 > horizontalScrollBar.height))); horizontalScrollBar.enabled = enabled; }; if (verticalScrollBar){ verticalScrollBar.setActualSize(verticalScrollBar.minWidth, ((_local4 - _local5.top) - _local5.bottom)); verticalScrollBar.move((_local3 - _local5.right), _local5.top); verticalScrollBar.visible = (((verticalScrollBar.height >= verticalScrollBar.minHeight)) && ((_local3 > verticalScrollBar.width))); verticalScrollBar.enabled = enabled; }; _local6 = maskShape; _local7 = ((_local3 - _local5.left) - _local5.right); _local8 = ((_local4 - _local5.top) - _local5.bottom); _local6.width = ((_local7 < 0)) ? 0 : _local7; _local6.height = ((_local8 < 0)) ? 0 : _local8; _local6.x = _local5.left; _local6.y = _local5.top; } } }//package mx.core
Section 165
//ScrollPolicy (mx.core.ScrollPolicy) package mx.core { public final class ScrollPolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OFF:String = "off"; } }//package mx.core
Section 166
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { private static var classMap:Object = {}; public static function getClass(_arg1:String):Class{ return (classMap[_arg1]); } public static function getInstance(_arg1:String):Object{ var _local2:Class; _local2 = classMap[_arg1]; return (Object(_local2).getInstance()); } public static function registerClass(_arg1:String, _arg2:Class):void{ var _local3:Class; _local3 = classMap[_arg1]; if (!_local3){ classMap[_arg1] = _arg2; }; } } }//package mx.core
Section 167
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject { private var _measuredWidth:Number; private var _measuredHeight:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 168
//UIComponent (mx.core.UIComponent) package mx.core { import mx.events.*; import mx.automation.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.states.*; import mx.effects.*; import mx.graphics.*; import mx.binding.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import mx.validators.*; import mx.skins.*; import flash.system.*; import mx.modules.*; public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener { private var errorStringChanged:Boolean;// = false mx_internal var overlay:UIComponent; mx_internal var automaticRadioButtonGroups:Object; private var _currentState:String; private var _isPopUp:Boolean; private var _repeaters:Array; private var packageResources:ResourceBundle; private var _systemManager:ISystemManager; private var _measuredWidth:Number;// = 0 private var methodQueue:Array; mx_internal var _width:Number; private var _tweeningProperties:Array; private var _validationSubField:String; private var _endingEffectInstances:Array; mx_internal var saveBorderColor:Boolean;// = true mx_internal var overlayColor:uint; private var _repeaterIndices:Array; private var oldExplicitWidth:Number; mx_internal var _descriptor:UIComponentDescriptor; private var _initialized:Boolean;// = false private var requestedCurrentState:String; private var _focusEnabled:Boolean;// = true private var cacheAsBitmapCount:int;// = 0 mx_internal var overlayReferenceCount:int;// = 0 private var listeningForRender:Boolean;// = false mx_internal var invalidateDisplayListFlag:Boolean;// = false private var oldScaleX:Number;// = 1 private var oldScaleY:Number;// = 1 mx_internal var _explicitMaxHeight:Number; mx_internal var invalidatePropertiesFlag:Boolean;// = false private var hasFocusRect:Boolean;// = false private var _scaleX:Number;// = 1 private var _scaleY:Number;// = 1 mx_internal var invalidateSizeFlag:Boolean;// = false private var _styleDeclaration:CSSStyleDeclaration; mx_internal var _documentDescriptor:UIComponentDescriptor; mx_internal var _affectedProperties:Object; private var _processedDescriptors:Boolean;// = false mx_internal var origBorderColor:Number; private var _focusManager:IFocusManager; private var _cachePolicy:String;// = "auto" private var _measuredHeight:Number;// = 0 private var _id:String; private var _owner:DisplayObjectContainer; public var transitions:Array; mx_internal var _parent:DisplayObjectContainer; private var _measuredMinWidth:Number;// = 0 private var oldMinWidth:Number; private var _enabled:Boolean;// = false public var states:Array; private var _explicitWidth:Number; private var _mouseFocusEnabled:Boolean;// = true private var oldHeight:Number;// = 0 private var _currentStateChanged:Boolean; private var cachedTextFormat:UITextFormat; private var _automationDelegate:IAutomationObject; mx_internal var _height:Number; private var _percentWidth:Number; private var _automationName:String;// = null private var _isEffectStarted:Boolean;// = false private var _styleName:Object; mx_internal var _document:Object; private var _errorString:String;// = "" private var oldExplicitHeight:Number; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _filters:Array; private var _toolTip:String; private var _focusPane:Sprite; private var playStateTransition:Boolean;// = true private var _nonInheritingStyles:Object; private var _showInAutomationHierarchy:Boolean;// = true private var _moduleFactory:IFlexModuleFactory; private var oldX:Number;// = 0 private var oldY:Number;// = 0 private var _instanceIndices:Array; private var _visible:Boolean;// = true private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true mx_internal var _effectsStarted:Array; private var _explicitMinWidth:Number; private var resourceStateUndefined:String;// = null mx_internal var _explicitMaxWidth:Number; private var _measuredMinHeight:Number;// = 0 private var _uid:String; private var _currentTransitionEffect:Effect; private var _updateCompletePendingFlag:Boolean;// = false private var oldMinHeight:Number; mx_internal var _explicitMinHeight:Number; private var _percentHeight:Number; private var oldWidth:Number;// = 0 public static const DEFAULT_MEASURED_WIDTH:Number = 160; public static const DEFAULT_MAX_WIDTH:Number = 10000; public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22; public static const DEFAULT_MAX_HEIGHT:Number = 10000; public static const DEFAULT_MEASURED_HEIGHT:Number = 22; mx_internal static const VERSION:String = "2.0.1.0"; public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40; mx_internal static var dispatchEventHook:Function; private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY"); mx_internal static var createAccessibilityImplementation:Function; mx_internal static var STYLE_UNINITIALIZED:Object = {}; private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX"); public function UIComponent(){ packageResources = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); resourceStateUndefined = null; listeningForRender = false; methodQueue = []; hasFocusRect = false; _initialized = false; _processedDescriptors = false; _updateCompletePendingFlag = false; invalidatePropertiesFlag = false; invalidateSizeFlag = false; invalidateDisplayListFlag = false; oldX = 0; oldY = 0; oldWidth = 0; oldHeight = 0; oldScaleX = 1; oldScaleY = 1; overlayReferenceCount = 0; saveBorderColor = true; _scaleX = 1; _scaleY = 1; _visible = true; _enabled = false; _nestLevel = 0; _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; _cachePolicy = UIComponentCachePolicy.AUTO; cacheAsBitmapCount = 0; _focusEnabled = true; _mouseFocusEnabled = true; _measuredMinWidth = 0; _measuredMinHeight = 0; _measuredWidth = 0; _measuredHeight = 0; _includeInLayout = true; playStateTransition = true; states = []; transitions = []; _automationName = null; _showInAutomationHierarchy = true; _errorString = ""; errorStringChanged = false; _effectsStarted = []; _affectedProperties = {}; _isEffectStarted = false; _endingEffectInstances = []; super(); focusRect = false; tabEnabled = (this is IFocusManagerComponent); enabled = true; $visible = false; addEventListener(Event.ADDED, addedHandler); addEventListener(Event.REMOVED, removedHandler); if ((this is IFocusManagerComponent)){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; _width = super.width; _height = super.height; } public function getStyle(_arg1:String){ return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]); } public function get toolTip():String{ return (_toolTip); } private function transition_effectEndHandler(_arg1:EffectEvent):void{ _currentTransitionEffect = null; } public function get nestLevel():int{ return (_nestLevel); } protected function adjustFocusRect(_arg1:DisplayObject=null):void{ var _local2:IFocusManager; var _local3:IFlexDisplayObject; var _local4:Number; var _local5:Number; var _local6:Point; var _local7:Number; if (!_arg1){ _arg1 = this; }; if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){ return; }; _local2 = focusManager; if (!_local2){ return; }; _local3 = IFlexDisplayObject(getFocusObject()); if (_local3){ if (((errorString) && (!((errorString == ""))))){ _local4 = getStyle("errorColor"); } else { _local4 = getStyle("themeColor"); }; _local5 = getStyle("focusThickness"); if ((_local3 is IStyleClient)){ IStyleClient(_local3).setStyle("focusColor", _local4); }; _local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5))); if (rotation){ _local7 = ((rotation * Math.PI) / 180); _local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7))))); DisplayObject(_local3).rotation = rotation; } else { _local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5)); }; if (_arg1.parent == this){ _local6.x = (_local6.x + x); _local6.y = (_local6.y + y); }; _local6 = parent.localToGlobal(_local6); _local6 = parent.globalToLocal(_local6); _local3.move(_local6.x, _local6.y); if ((_local3 is IInvalidating)){ IInvalidating(_local3).validateNow(); } else { if ((_local3 is ProgrammaticSkin)){ ProgrammaticSkin(_local3).validateNow(); }; }; }; } public function set nestLevel(_arg1:int):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:ILayoutManagerClient; var _local6:UITextField; if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; updateCallbacks(); _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); _local3 = _local2.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient); if (_local5){ _local5.nestLevel = (_arg1 + 1); } else { _local6 = (_local2.getChildAt(_local4) as UITextField); if (_local6){ _local6.nestLevel = (_arg1 + 1); }; }; _local4++; }; }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } private function callLaterDispatcher(_arg1:Event):void{ var layoutErrorEvent:DynamicEvent; var event = _arg1; UIComponentGlobals.callLaterDispatcherCount++; if (!UIComponentGlobals.designTime){ callLaterDispatcher2(event); } else { try { callLaterDispatcher2(event); } catch(e:Error) { layoutErrorEvent = new DynamicEvent("layoutError"); layoutErrorEvent.error = e; systemManager.dispatchEvent(layoutErrorEvent); }; }; UIComponentGlobals.callLaterDispatcherCount--; } final mx_internal function get $width():Number{ return (super.width); } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{ if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){ requestedCurrentState = _arg1; playStateTransition = _arg2; if (initialized){ commitCurrentState(); } else { _currentStateChanged = true; addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; } private function getBaseStates(_arg1:State):Array{ var _local2:Array; _local2 = []; while (((_arg1) && (!((_arg1.basedOn == ""))))) { _local2.push(_arg1.basedOn); _arg1 = getState(_arg1.basedOn); }; return (_local2); } public function set minHeight(_arg1:Number):void{ if (explicitMinHeight == _arg1){ return; }; explicitMinHeight = _arg1; } public function get errorString():String{ return (_errorString); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } final mx_internal function set $width(_arg1:Number):void{ super.width = _arg1; } public function invalidateDisplayList():void{ if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; }; } override public function get scaleX():Number{ return (_scaleX); } override public function get scaleY():Number{ return (_scaleY); } mx_internal function initThemeColor():Boolean{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Array; var _local7:int; var _local8:CSSStyleDeclaration; _local1 = _styleName; if (_styleDeclaration){ _local2 = _styleDeclaration.getStyle("themeColor"); _local3 = _styleDeclaration.getStyle("rollOverColor"); _local4 = _styleDeclaration.getStyle("selectionColor"); }; if (((((!(_local2)) && (_local1))) && (!((_local1 is ISimpleStyleClient))))){ _local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1; if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; }; if (!_local2){ _local6 = getClassStyleDeclarations(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_local8){ _local2 = _local8.getStyle("themeColor"); _local3 = _local8.getStyle("rollOverColor"); _local4 = _local8.getStyle("selectionColor"); }; if (_local2){ break; }; _local7++; }; }; if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); return (true); }; return (((((_local2) && (!(isNaN(_local3))))) && (!(isNaN(_local4))))); } override public function get mouseX():Number{ if (((!(root)) || ((root[fakeMouseX] === undefined)))){ return (super.mouseX); }; return (globalToLocal(new Point(root[fakeMouseX], 0)).x); } override public function get mouseY():Number{ if (((!(root)) || ((root[fakeMouseY] === undefined)))){ return (super.mouseY); }; return (globalToLocal(new Point(0, root[fakeMouseY])).y); } override public function stopDrag():void{ super.stopDrag(); invalidateProperties(); dispatchEvent(new Event("xChanged")); dispatchEvent(new Event("yChanged")); } public function get uid():String{ if (!_uid){ _uid = toString(); }; return (_uid); } public function set tweeningProperties(_arg1:Array):void{ _tweeningProperties = _arg1; } public function get focusPane():Sprite{ return (_focusPane); } public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function set validationSubField(_arg1:String):void{ _validationSubField = _arg1; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function get isDocument():Boolean{ return ((document == this)); } mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{ if (!overlay){ overlayColor = _arg1; overlay = new UIComponent(); overlay.name = "overlay"; fillOverlay(overlay, _arg1, _arg2); attachOverlay(); if (!_arg2){ addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler); }; overlay.x = 0; overlay.y = 0; invalidateDisplayList(); overlayReferenceCount = 1; } else { overlayReferenceCount++; }; dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay)); } override public function get visible():Boolean{ return (_visible); } public function get screen():Rectangle{ var _local1:ISystemManager; _local1 = systemManager; return ((_local1) ? _local1.screen : null); } override public function get x():Number{ return (super.x); } override public function get y():Number{ return (super.y); } public function get explicitHeight():Number{ return (_explicitHeight); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus(DisplayObject(_arg1.target))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); }; Container.checkFocus(_arg1.relatedObject, this); }; } private function focusObj_scrollHandler(_arg1:Event):void{ adjustFocusRect(); } public function get percentWidth():Number{ return (_percentWidth); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } public function set explicitMinHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMinHeight == _arg1){ return; }; _explicitMinHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinHeightChanged")); } public function stylesInitialized():void{ } public function set errorString(_arg1:String):void{ ToolTipManager.registerErrorString(this, _arg1); _errorString = _arg1; errorStringChanged = true; invalidateProperties(); dispatchEvent(new Event("errorStringChanged")); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } final mx_internal function set $height(_arg1:Number):void{ super.height = _arg1; } final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{ return (super.removeChild(_arg1)); } override public function set scaleX(_arg1:Number):void{ if (_scaleX == _arg1){ return; }; _scaleX = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleXChanged")); } override public function set scaleY(_arg1:Number):void{ if (_scaleY == _arg1){ return; }; _scaleY = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleYChanged")); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } mx_internal function get isEffectStarted():Boolean{ return (_isEffectStarted); } public function set uid(_arg1:String):void{ this._uid = _arg1; } mx_internal function adjustSizesForScaleChanges():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = scaleX; _local2 = scaleY; if (_local1 != oldScaleX){ _local3 = Math.abs((_local1 / oldScaleX)); if (explicitMinWidth){ explicitMinWidth = (explicitMinWidth * _local3); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local3); }; if (explicitMaxWidth){ explicitMaxWidth = (explicitMaxWidth * _local3); }; oldScaleX = _local1; }; if (_local2 != oldScaleY){ _local3 = Math.abs((_local2 / oldScaleY)); if (explicitMinHeight){ explicitMinHeight = (explicitMinHeight * _local3); }; if (explicitHeight){ explicitHeight = (explicitHeight * _local3); }; if (explicitMaxHeight){ explicitMaxHeight = (explicitMaxHeight * _local3); }; oldScaleY = _local2; }; } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } public function determineTextFormatFromStyles():UITextFormat{ var _local1:UITextFormat; _local1 = cachedTextFormat; if (!_local1){ _local1 = new UITextFormat(systemManager); _local1.align = _inheritingStyles.textAlign; _local1.bold = (_inheritingStyles.fontWeight == "bold"); _local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor; _local1.font = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ","); _local1.indent = _inheritingStyles.textIndent; _local1.italic = (_inheritingStyles.fontStyle == "italic"); _local1.kerning = _inheritingStyles.kerning; _local1.leading = _nonInheritingStyles.leading; _local1.leftMargin = _nonInheritingStyles.paddingLeft; _local1.letterSpacing = _inheritingStyles.letterSpacing; _local1.rightMargin = _nonInheritingStyles.paddingRight; _local1.size = _inheritingStyles.fontSize; _local1.underline = (_nonInheritingStyles.textDecoration == "underline"); _local1.antiAliasType = _inheritingStyles.fontAntiAliasType; _local1.gridFitType = _inheritingStyles.fontGridFitType; _local1.sharpness = _inheritingStyles.fontSharpness; _local1.thickness = _inheritingStyles.fontThickness; cachedTextFormat = _local1; }; return (_local1); } public function getAutomationChildAt(_arg1:int):IAutomationObject{ if (automationDelegate){ return (automationDelegate.getAutomationChildAt(_arg1)); }; return (null); } private function focusObj_resizeHandler(_arg1:ResizeEvent):void{ adjustFocusRect(); } public function validationResultHandler(_arg1:ValidationResultEvent):void{ var _local2:String; var _local3:ValidationResult; var _local4:int; if (_arg1.type == ValidationResultEvent.VALID){ if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; } else { if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){ _local4 = 0; while (_local4 < _arg1.results.length) { _local3 = _arg1.results[_local4]; if (_local3.subField == validationSubField){ if (_local3.isError){ _local2 = _local3.errorMessage; } else { if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; }; break; }; _local4++; }; } else { if (((_arg1.results) && ((_arg1.results.length > 0)))){ _local2 = _arg1.results[0].errorMessage; }; }; if (((_local2) && (!((errorString == _local2))))){ errorString = _local2; dispatchEvent(new FlexEvent(FlexEvent.INVALID)); }; }; } public function invalidateProperties():void{ if (!invalidatePropertiesFlag){ invalidatePropertiesFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; }; } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_width != _arg1){ _width = _arg1; dispatchEvent(new Event("widthChanged")); _local3 = true; }; if (_height != _arg2){ _height = _arg2; dispatchEvent(new Event("heightChanged")); _local3 = true; }; if (_local3){ invalidateDisplayList(); dispatchResizeEvent(); }; } final mx_internal function get $x():Number{ return (super.x); } final mx_internal function get $y():Number{ return (super.y); } override public function set visible(_arg1:Boolean):void{ setVisible(_arg1); } public function registerEffects(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:String; _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { _local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]); if (((!((_local4 == null))) && (!((_local4 == ""))))){ addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT); }; _local3++; }; } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ if (automationDelegate){ return (automationDelegate.createAutomationIDPart(_arg1)); }; return (null); } public function get explicitMinWidth():Number{ return (_explicitMinWidth); } private function filterChangeHandler(_arg1:Event):void{ super.filters = _filters; } override public function set x(_arg1:Number):void{ if (super.x == _arg1){ return; }; super.x = _arg1; invalidateProperties(); dispatchEvent(new Event("xChanged")); } override public function set y(_arg1:Number):void{ if (super.y == _arg1){ return; }; super.y = _arg1; invalidateProperties(); dispatchEvent(new Event("yChanged")); } public function set explicitHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } public function set showInAutomationHierarchy(_arg1:Boolean):void{ _showInAutomationHierarchy = _arg1; } public function set systemManager(_arg1:ISystemManager):void{ _systemManager = _arg1; } mx_internal function getFocusObject():DisplayObject{ var _local1:IFocusManager; _local1 = focusManager; if (((!(_local1)) || (!(_local1.focusPane)))){ return (null); }; return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0)); } override public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren; addingChild(_arg1); $addChildAt(_arg1, _local2); childAdded(_arg1); return (_arg1); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set percentWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } public function get document():Object{ return (_document); } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{ return (super.addChild(_arg1)); } mx_internal function setThemeColor(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Number; if ((_local2 is String)){ _local2 = parseInt(String(_arg1)); } else { _local2 = Number(_arg1); }; if (isNaN(_local2)){ _local2 = StyleManager.getColorName(_arg1); }; _local3 = ColorUtil.adjustBrightness2(_local2, 50); _local4 = ColorUtil.adjustBrightness2(_local2, 70); setStyle("selectionColor", _local3); setStyle("rollOverColor", _local4); } override public function get height():Number{ return (_height); } public function get id():String{ return (_id); } public function set minWidth(_arg1:Number):void{ if (explicitMinWidth == _arg1){ return; }; explicitMinWidth = _arg1; } public function set currentState(_arg1:String):void{ setCurrentState(_arg1, true); } public function getRepeaterItem(_arg1:int=-1):Object{ var _local2:Array; _local2 = repeaters; if (_arg1 == -1){ _arg1 = (_local2.length - 1); }; return (_local2[_arg1].getItemAt(repeaterIndices[_arg1])); } public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object; _local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function get instanceIndex():int{ return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1); } public function get explicitMaxWidth():Number{ return (_explicitMaxWidth); } public function effectFinished(_arg1:EffectInstance):void{ _endingEffectInstances.push(_arg1); invalidateProperties(); UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true); } public function set measuredWidth(_arg1:Number):void{ _measuredWidth = _arg1; } override public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = getChildAt(_arg1); removingChild(_local2); $removeChild(_local2); childRemoved(_local2); return (_local2); } mx_internal function set isEffectStarted(_arg1:Boolean):void{ _isEffectStarted = _arg1; } mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:Graphics; if (!_arg3){ _arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0); }; _local4 = _arg1.graphics; _local4.clear(); _local4.beginFill(_arg2); _local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local4.endFill(); } mx_internal function childAdded(_arg1:DisplayObject):void{ if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).initialized){ UIComponent(_arg1).initialize(); }; } else { if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; }; } public function globalToContent(_arg1:Point):Point{ return (globalToLocal(_arg1)); } public function get instanceIndices():Array{ return ((_instanceIndices) ? _instanceIndices.slice(0) : null); } mx_internal function removingChild(_arg1:DisplayObject):void{ } private function getTransition(_arg1:String, _arg2:String):Effect{ var _local3:Effect; var _local4:int; var _local5:int; var _local6:Transition; _local3 = null; _local4 = 0; if (!transitions){ return (null); }; if (!_arg1){ _arg1 = ""; }; if (!_arg2){ _arg2 = ""; }; _local5 = 0; while (_local5 < transitions.length) { _local6 = transitions[_local5]; if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){ _local3 = _local6.effect; _local4 = 1; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){ _local3 = _local6.effect; _local4 = 2; } else { if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){ _local3 = _local6.effect; _local4 = 3; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){ _local3 = _local6.effect; _local4 = 4; break; }; }; }; }; _local5++; }; return (_local3); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } mx_internal function getEffectsForProperty(_arg1:String):Array{ return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []); } protected function get unscaledWidth():Number{ return ((width / Math.abs(scaleX))); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; if (_arg1){ dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE)); }; } private function processEffectFinished(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:EffectInstance; var _local5:EffectInstance; var _local6:Array; var _local7:int; var _local8:String; var _local9:int; _local2 = (_effectsStarted.length - 1); while (_local2 >= 0) { _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if (_local4 == _effectsStarted[_local2]){ _local5 = _effectsStarted[_local2]; _effectsStarted.splice(_local2, 1); _local6 = _local5.effect.getAffectedProperties(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_affectedProperties[_local8] != undefined){ _local9 = 0; while (_local9 < _affectedProperties[_local8].length) { if (_affectedProperties[_local8][_local9] == _local4){ _affectedProperties[_local8].splice(_local9, 1); break; }; _local9++; }; if (_affectedProperties[_local8].length == 0){ delete _affectedProperties[_local8]; }; }; _local7++; }; break; }; _local3++; }; _local2--; }; isEffectStarted = ((_effectsStarted.length > 0)) ? true : false; } protected function measure():void{ measuredWidth = (isNaN(_width)) ? 0 : _width; measuredHeight = (isNaN(_height)) ? 0 : _height; } private function dispatchResizeEvent():void{ var _local1:ResizeEvent; _local1 = new ResizeEvent(ResizeEvent.RESIZE); _local1.oldWidth = oldWidth; _local1.oldHeight = oldHeight; dispatchEvent(_local1); oldWidth = width; oldHeight = height; } public function get includeInLayout():Boolean{ return (_includeInLayout); } public function set maxWidth(_arg1:Number):void{ if (explicitMaxWidth == _arg1){ return; }; explicitMaxWidth = _arg1; } public function validateDisplayList():void{ var _local1:ISystemManager; if (invalidateDisplayListFlag){ _local1 = (parent as ISystemManager); if (_local1){ if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){ setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight()); }; }; updateDisplayList(((scaleX == 0)) ? 0 : (width / scaleX), ((scaleY == 0)) ? 0 : (height / scaleY)); invalidateDisplayListFlag = false; }; } public function contentToGlobal(_arg1:Point):Point{ return (localToGlobal(_arg1)); } public function resolveAutomationIDPart(_arg1:Object):Array{ if (automationDelegate){ return (automationDelegate.resolveAutomationIDPart(_arg1)); }; return ([]); } public function setFocus():void{ var _local1:ISystemManager; _local1 = systemManager; if (((_local1) && (_local1.stage))){ if (UIComponentGlobals.callLaterDispatcherCount == 0){ _local1.stage.focus = this; UIComponentGlobals.nextFocusObject = null; } else { UIComponentGlobals.nextFocusObject = this; _local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater); }; } else { UIComponentGlobals.nextFocusObject = this; callLater(setFocusLater); }; } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; if (_arg1){ setVisible(_visible, true); dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE)); }; } public function owns(_arg1:DisplayObject):Boolean{ var _local2:IChildList; _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); if (_local2.contains(_arg1)){ return (true); }; while (((_arg1) && (!((_arg1 == this))))) { if ((_arg1 is IUIComponent)){ _arg1 = IUIComponent(_arg1).owner; } else { _arg1 = _arg1.parent; }; }; return ((_arg1 == this)); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ _visible = _arg1; if (!initialized){ return; }; if ($visible == _arg1){ return; }; $visible = _arg1; if (!_arg2){ dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE)); }; } final mx_internal function set $y(_arg1:Number):void{ super.y = _arg1; } final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (super.addChildAt(_arg1, _arg2)); } public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:Array; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:PropertyChangeEvent; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = null; } else { _local3 = _arg1[id]; if (!_local3){ return; }; _local4 = []; _local4.push(_local3); _local5 = _local2.length; _local6 = 0; while (_local6 < (_local5 - 1)) { _local8 = _local3[_local2[_local6]]; if (!_local8){ return; }; _local3 = _local8; _local4.push(_local3); _local6++; }; _local3.splice(_local2[(_local5 - 1)], 1); _local7 = (_local4.length - 1); while (_local7 > 0) { if (_local4[_local7].length == 0){ _local4[(_local7 - 1)].splice(_local2[_local7], 1); }; _local7--; }; if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){ _arg1[id] = null; } else { _local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local9); }; }; }; } private function commitCurrentState():void{ var _local1:Effect; var _local2:String; var _local3:StateChangeEvent; var _local4:String; var _local5:State; _local1 = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null; _local2 = findCommonBaseState(_currentState, requestedCurrentState); _local4 = (_currentState) ? _currentState : ""; _local5 = getState(requestedCurrentState); if (_currentTransitionEffect){ _currentTransitionEffect.end(); }; initializeState(requestedCurrentState); if (_local1){ _local1.captureStartValues(); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING); _local3.oldState = _local4; _local3.newState = (requestedCurrentState) ? requestedCurrentState : ""; dispatchEvent(_local3); if (isBaseState(_currentState)){ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); }; removeState(_currentState, _local2); _currentState = requestedCurrentState; if (isBaseState(currentState)){ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } else { applyState(_currentState, _local2); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE); _local3.oldState = _local4; _local3.newState = (_currentState) ? _currentState : ""; dispatchEvent(_local3); if (_local1){ UIComponentGlobals.layoutManager.validateNow(); _currentTransitionEffect = _local1; _local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler); _local1.play(); }; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } final mx_internal function set $x(_arg1:Number):void{ super.x = _arg1; } private function applyState(_arg1:String, _arg2:String):void{ var _local3:State; var _local4:Array; var _local5:int; _local3 = getState(_arg1); if (_local3){ if (_local3.basedOn != _arg2){ applyState(_local3.basedOn, _arg2); }; _local4 = _local3.overrides; _local5 = 0; while (_local5 < _local4.length) { _local4[_local5].apply(this); _local5++; }; _local3.dispatchEnterState(); }; } override public function get width():Number{ return (_width); } public function effectStarted(_arg1:EffectInstance):void{ var _local2:Array; var _local3:int; var _local4:String; _effectsStarted.push(_arg1); _local2 = _arg1.effect.getAffectedProperties(); _local3 = 0; while (_local3 < _local2.length) { _local4 = _local2[_local3]; if (_affectedProperties[_local4] == undefined){ _affectedProperties[_local4] = []; }; _affectedProperties[_local4].push(_arg1); _local3++; }; isEffectStarted = true; } protected function commitProperties():void{ var _local1:Number; var _local2:Number; if (_scaleX != oldScaleX){ _local1 = Math.abs((_scaleX / oldScaleX)); if (!isNaN(explicitMinWidth)){ explicitMinWidth = (explicitMinWidth * _local1); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local1); }; if (!isNaN(explicitMaxWidth)){ explicitMaxWidth = (explicitMaxWidth * _local1); }; _width = (_width * _local1); super.scaleX = (oldScaleX = _scaleX); }; if (_scaleY != oldScaleY){ _local2 = Math.abs((_scaleY / oldScaleY)); if (!isNaN(explicitMinHeight)){ explicitMinHeight = (explicitMinHeight * _local2); }; if (!isNaN(explicitHeight)){ explicitHeight = (explicitHeight * _local2); }; if (!isNaN(explicitMaxHeight)){ explicitMaxHeight = (explicitMaxHeight * _local2); }; _height = (_height * _local2); super.scaleY = (oldScaleY = _scaleY); }; if (((!((x == oldX))) || (!((y == oldY))))){ dispatchMoveEvent(); }; if (((!((width == oldWidth))) || (!((height == oldHeight))))){ dispatchResizeEvent(); }; if (errorStringChanged){ errorStringChanged = false; setBorderColorForErrorString(); }; } public function get percentHeight():Number{ return (_percentHeight); } final mx_internal function get $parent():DisplayObjectContainer{ return (super.parent); } public function set explicitMinWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMinWidth == _arg1){ return; }; _explicitMinWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinWidthChanged")); } public function get isPopUp():Boolean{ return (_isPopUp); } private function measureSizes():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = false; if (!invalidateSizeFlag){ return (_local1); }; if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){ _local4 = Math.abs(scaleX); _local5 = Math.abs(scaleY); if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth / _local4); _measuredWidth = (_measuredWidth / _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight / _local5); _measuredHeight = (_measuredHeight / _local5); }; measure(); invalidateSizeFlag = false; if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){ measuredWidth = explicitMinWidth; }; if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){ measuredWidth = explicitMaxWidth; }; if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){ measuredHeight = explicitMinHeight; }; if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){ measuredHeight = explicitMaxHeight; }; if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth * _local4); _measuredWidth = (_measuredWidth * _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight * _local5); _measuredHeight = (_measuredHeight * _local5); }; } else { invalidateSizeFlag = false; _measuredMinWidth = 0; _measuredMinHeight = 0; }; adjustSizesForScaleChanges(); if (isNaN(oldMinWidth)){ oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; _local1 = true; } else { _local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; if (_local3 != oldMinWidth){ oldMinWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; if (_local3 != oldMinHeight){ oldMinHeight = _local3; _local1 = true; }; _local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; if (_local3 != oldExplicitWidth){ oldExplicitWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; if (_local3 != oldExplicitHeight){ oldExplicitHeight = _local3; _local1 = true; }; }; return (_local1); } public function get automationTabularData():Object{ if (automationDelegate){ return (automationDelegate.automationTabularData); }; return (null); } public function validateNow():void{ UIComponentGlobals.layoutManager.validateClient(this); } public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ } public function get repeaters():Array{ return ((_repeaters) ? _repeaters.slice(0) : []); } private function dispatchMoveEvent():void{ var _local1:MoveEvent; _local1 = new MoveEvent(MoveEvent.MOVE); _local1.oldX = oldX; _local1.oldY = oldY; dispatchEvent(_local1); oldX = x; oldY = y; } public function get measuredMinHeight():Number{ return (_measuredMinHeight); } public function drawFocus(_arg1:Boolean):void{ var _local2:DisplayObject; var _local3:Sprite; var _local4:DisplayObjectContainer; var _local5:Class; if (!parent){ return; }; _local2 = getFocusObject(); _local3 = (focusManager) ? focusManager.focusPane : null; if (((_arg1) && (!(isEffectStarted)))){ _local4 = _local3.parent; if (_local4 != parent){ if (_local4){ if ((_local4 is ISystemManager)){ ISystemManager(_local4).focusPane = null; } else { IUIComponent(_local4).focusPane = null; }; }; if ((parent is ISystemManager)){ ISystemManager(parent).focusPane = _local3; } else { IUIComponent(parent).focusPane = _local3; }; }; _local5 = getStyle("focusSkin"); if (((_local2) && (!((_local2 is _local5))))){ _local3.removeChild(_local2); _local2 = null; }; if (!_local2){ _local2 = new (_local5); _local2.name = "focus"; _local3.addChild(_local2); }; if ((_local2 is ILayoutManagerClient)){ ILayoutManagerClient(_local2).nestLevel = nestLevel; }; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); addEventListener(MoveEvent.MOVE, focusObj_moveHandler); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); addEventListener(Event.REMOVED, focusObj_removedHandler, true); _local2.visible = true; hasFocusRect = true; adjustFocusRect(); } else { if (hasFocusRect){ if (_local2){ _local2.visible = false; }; removeEventListener(MoveEvent.MOVE, focusObj_moveHandler); removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); removeEventListener(Event.REMOVED, focusObj_removedHandler, true); }; }; } private function get indexedID():String{ var _local1:String; var _local2:Array; _local1 = id; _local2 = instanceIndices; if (_local2){ _local1 = (_local1 + (("[" + _local2.join("][")) + "]")); }; return (_local1); } mx_internal function addingChild(_arg1:DisplayObject):void{ if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = (document) ? document : Application.application; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); } else { if ((_arg1 is UITextField)){ UITextField(_arg1).nestLevel = (nestLevel + 1); }; }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); } else { if ((((_arg1 is UITextField)) && (UITextField(_arg1).inheritingStyles))){ StyleProtoChain.initTextField(UITextField(_arg1)); }; }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).initThemeColor(); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).stylesInitialized(); }; } protected function initializationComplete():void{ processedDescriptors = true; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } public function set repeaterIndices(_arg1:Array):void{ _repeaterIndices = _arg1; } private function focusObj_removedHandler(_arg1:Event):void{ var _local2:DisplayObject; if (_arg1.target != this){ return; }; _local2 = getFocusObject(); if (_local2){ _local2.visible = false; }; } mx_internal function updateCallbacks():void{ if (invalidateDisplayListFlag){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; if (invalidateSizeFlag){ UIComponentGlobals.layoutManager.invalidateSize(this); }; if (invalidatePropertiesFlag){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; if (systemManager){ if ((((methodQueue.length > 0)) && (!(listeningForRender)))){ _systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher); _systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _systemManager.stage.invalidate(); }; } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ _styleDeclaration = _arg1; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:IChildList; var _local3:int; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if ((this is IRawChildrenContainer)){ _local2 = IRawChildrenContainer(this).rawChildren; } else { _local2 = IChildList(this); }; _local3 = 0; while (_local3 < _local2.numChildren) { _local4 = (_local2.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; } public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ return (null); } public function get minHeight():Number{ if (!isNaN(explicitMinHeight)){ return (explicitMinHeight); }; return (measuredMinHeight); } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:int; var _local4:int; var _local5:ISimpleStyleClient; cachedTextFormat = null; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; _local4++; }; } public function get contentMouseX():Number{ return (mouseX); } public function get contentMouseY():Number{ return (mouseY); } public function get tweeningProperties():Array{ return (_tweeningProperties); } public function set explicitMaxWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMaxWidth == _arg1){ return; }; _explicitMaxWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxWidthChanged")); } public function set document(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:IUIComponent; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as IUIComponent); if (!_local4){ } else { if ((((_local4.document == _document)) || ((_local4.document == Application.application)))){ _local4.document = _arg1; }; }; _local3++; }; _document = _arg1; } public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:IInvalidating; if (_arg1){ _local2 = 0; while (_local2 < numChildren) { _local3 = getChildAt(_local2); if ((_local3 is ILayoutManagerClient)){ (_local3 as ILayoutManagerClient).validateSize(true); }; _local2++; }; }; if (invalidateSizeFlag){ _local4 = measureSizes(); if (((_local4) && (includeInLayout))){ invalidateDisplayList(); _local5 = (parent as IInvalidating); if (_local5){ _local5.invalidateSize(); _local5.invalidateDisplayList(); }; }; }; } override public function dispatchEvent(_arg1:Event):Boolean{ if (dispatchEventHook != null){ dispatchEventHook(_arg1, this); }; return (super.dispatchEvent(_arg1)); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } final mx_internal function get $height():Number{ return (super.height); } override public function set height(_arg1:Number):void{ var _local2:IInvalidating; if (explicitHeight != _arg1){ explicitHeight = _arg1; invalidateSize(); }; if (_height != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _height = _arg1; dispatchEvent(new Event("heightChanged")); }; } protected function attachOverlay():void{ addChild(overlay); } private function overlay_resizeHandler(_arg1:Event):void{ fillOverlay(overlay, overlayColor, null); } public function get numAutomationChildren():int{ if (automationDelegate){ return (automationDelegate.numAutomationChildren); }; return (0); } public function get explicitMinHeight():Number{ return (_explicitMinHeight); } public function localToContent(_arg1:Point):Point{ return (_arg1); } public function set id(_arg1:String):void{ _id = _arg1; } public function get parentApplication():Object{ var _local1:Object; var _local2:UIComponent; _local1 = systemManager.document; if (_local1 == this){ _local2 = (_local1.systemManager.parent as UIComponent); _local1 = (_local2) ? _local2.systemManager.document : null; }; return (_local1); } private function removeState(_arg1:String, _arg2:String):void{ var _local3:State; var _local4:Array; var _local5:int; _local3 = getState(_arg1); if (_local3){ _local3.dispatchExitState(); _local4 = _local3.overrides; _local5 = _local4.length; while (_local5) { _local4[(_local5 - 1)].remove(this); _local5--; }; if (_local3.basedOn != _arg2){ removeState(_local3.basedOn, _arg2); }; }; } public function setStyle(_arg1:String, _arg2):void{ var _local3:Boolean; var _local4:Boolean; var _local5:Boolean; if (_arg1 == "styleName"){ styleName = _arg2; return; }; if (EffectManager.getEventForEffectTrigger(_arg1) != ""){ EffectManager.setStyle(_arg1, this); }; _local3 = StyleManager.isInheritingStyle(_arg1); _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED)); _local5 = !((getStyle(_arg1) == _arg2)); if (!_styleDeclaration){ _styleDeclaration = new CSSStyleDeclaration(); _styleDeclaration.setStyle(_arg1, _arg2); if (_local4){ regenerateStyleCache(_local3); }; } else { _styleDeclaration.setStyle(_arg1, _arg2); }; if (((_local4) && (_local5))){ styleChanged(_arg1); notifyStyleChangeInChildren(_arg1, _local3); }; } public function get validationSubField():String{ return (_validationSubField); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:DisplayObjectContainer; var _local3:IUIComponent; if (!_systemManager){ _local1 = root; if (_local1){ _systemManager = (_local1 as ISystemManager); } else { _local2 = parent; while (_local2) { _local3 = (_local2 as IUIComponent); if (_local3){ _systemManager = _local3.systemManager; break; }; _local2 = _local2.parent; }; }; }; return (_systemManager); } public function get showInAutomationHierarchy():Boolean{ return (_showInAutomationHierarchy); } private function isBaseState(_arg1:String):Boolean{ return (((!(_arg1)) || ((_arg1 == "")))); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1))); }; addingChild(_arg1); $addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; cachedTextFormat = null; invalidateDisplayList(); dispatchEvent(new Event("enabledChanged")); } public function get minWidth():Number{ if (!isNaN(explicitMinWidth)){ return (explicitMinWidth); }; return (measuredMinWidth); } private function setFocusLater(_arg1:Event=null):void{ var _local2:ISystemManager; _local2 = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater); if (UIComponentGlobals.nextFocusObject){ _local2.stage.focus = UIComponentGlobals.nextFocusObject; }; UIComponentGlobals.nextFocusObject = null; }; } public function get currentState():String{ return ((_currentStateChanged) ? requestedCurrentState : _currentState); } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get baselinePosition():Number{ return (NaN); } public function set cachePolicy(_arg1:String):void{ if (_cachePolicy != _arg1){ _cachePolicy = _arg1; if (_arg1 == UIComponentCachePolicy.OFF){ cacheAsBitmap = false; } else { if (_arg1 == UIComponentCachePolicy.ON){ cacheAsBitmap = true; } else { cacheAsBitmap = (cacheAsBitmapCount > 0); }; }; }; } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([]); } public function set instanceIndices(_arg1:Array):void{ _instanceIndices = _arg1; } public function get repeaterIndex():int{ return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1); } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is SystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } override public function set alpha(_arg1:Number):void{ super.alpha = _arg1; dispatchEvent(new Event("alphaChanged")); } public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{ if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){ _instanceIndices = _arg1.instanceIndices; _repeaters = _arg1.repeaters; _repeaterIndices = _arg1.repeaterIndices; }; } public function get maxWidth():Number{ return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth); } private function removedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is Container)) && (Container(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function callLater(_arg1:Function, _arg2:Array=null):void{ var _local3:ISystemManager; methodQueue.push(new MethodQueueElement(_arg1, _arg2)); _local3 = systemManager; if (((_local3) && (_local3.stage))){ if (!listeningForRender){ _local3.stage.addEventListener(Event.RENDER, callLaterDispatcher); _local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _local3.stage.invalidate(); }; } private function addedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is Container)) && (Container(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function get initialized():Boolean{ return (_initialized); } private function callLaterDispatcher2(_arg1:Event):void{ var _local2:ISystemManager; var _local3:Array; var _local4:int; var _local5:int; var _local6:MethodQueueElement; if (UIComponentGlobals.callLaterSuspendCount > 0){ return; }; _local2 = systemManager; if (((((_local2) && (_local2.stage))) && (listeningForRender))){ _local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; _local3 = methodQueue; methodQueue = []; _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = MethodQueueElement(_local3[_local5]); _local6.method.apply(null, _local6.args); _local5++; }; } public function measureHTMLText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureHTMLText(_arg1)); } public function set descriptor(_arg1:UIComponentDescriptor):void{ _descriptor = _arg1; } private function getState(_arg1:String):State{ var _local2:int; if (((!(states)) || (isBaseState(_arg1)))){ return (null); }; _local2 = 0; while (_local2 < states.length) { if (states[_local2].name == _arg1){ return (states[_local2]); }; _local2++; }; if (resourceStateUndefined == null){ loadResources(); }; throw (new ArgumentError(StringUtil.substitute(resourceStateUndefined, _arg1))); } mx_internal function get documentDescriptor():UIComponentDescriptor{ return (_documentDescriptor); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("includeInLayoutChanged")); }; } public function getClassStyleDeclarations():Array{ var myApplicationDomain:ApplicationDomain; var factory:IFlexModuleFactory; var className:String; var cache:Array; var decls:Array; var classNames:Array; var caches:Array; var declcache:Array; var myRoot:DisplayObject; var s:CSSStyleDeclaration; factory = ModuleManager.getAssociatedFactory(this); if (factory != null){ myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]); } else { myRoot = SystemManager.getSWFRoot(this); if (!myRoot){ return ([]); }; myApplicationDomain = myRoot.loaderInfo.applicationDomain; }; className = getQualifiedClassName(this); className = className.replace("::", "."); cache = StyleManager.typeSelectorCache[className]; if (cache){ return (cache); }; decls = []; classNames = []; caches = []; declcache = []; while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) { cache = StyleManager.typeSelectorCache[className]; if (cache){ decls = decls.concat(cache); break; }; s = StyleManager.getStyleDeclaration(className); if (s){ decls.unshift(s); classNames.push(className); caches.push(classNames); declcache.push(decls); decls = []; classNames = []; } else { classNames.push(className); }; try { className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className)); className = className.replace("::", "."); } catch(e:ReferenceError) { className = null; }; }; caches.push(classNames); declcache.push(decls); decls = []; while (caches.length) { classNames = caches.pop(); decls = decls.concat(declcache.pop()); while (classNames.length) { StyleManager.typeSelectorCache[classNames.pop()] = decls; }; }; return (decls); } public function validateProperties():void{ if (invalidatePropertiesFlag){ commitProperties(); invalidatePropertiesFlag = false; }; } public function set measuredMinWidth(_arg1:Number):void{ _measuredMinWidth = _arg1; } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); $removeChild(_arg1); childRemoved(_arg1); return (_arg1); } private function initializeState(_arg1:String):void{ var _local2:State; _local2 = getState(_arg1); while (_local2) { _local2.initialize(); _local2 = getState(_local2.basedOn); }; } private function focusObj_moveHandler(_arg1:MoveEvent):void{ adjustFocusRect(); } public function get styleDeclaration():CSSStyleDeclaration{ return (_styleDeclaration); } override public function get doubleClickEnabled():Boolean{ return (super.doubleClickEnabled); } mx_internal function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local2:Object; var _local3:IStyleClient; var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:CSSStyleDeclaration; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((styleName is IFlexDisplayObject)){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; _local2 = StyleManager.stylesRoot; if (((_local2) && (_local2.effects))){ registerEffects(_local2.effects); }; _local3 = (parent as IStyleClient); if (_local3){ _local7 = _local3.inheritingStyles; if (_local7 == UIComponent.STYLE_UNINITIALIZED){ _local7 = _local2; }; } else { if (isPopUp){ _local7 = Application.application.inheritingStyles; } else { _local7 = StyleManager.stylesRoot; }; }; _local4 = getClassStyleDeclarations(); _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local8 = _local4[_local6]; _local7 = _local8.addStyleToProtoChain(_local7, this); _local2 = _local8.addStyleToProtoChain(_local2, this); if (_local8.effects){ registerEffects(_local8.effects); }; _local6++; }; if (_local1){ _local7 = _local1.addStyleToProtoChain(_local7, this); _local2 = _local1.addStyleToProtoChain(_local2, this); if (_local1.effects){ registerEffects(_local1.effects); }; }; inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7; nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2; } public function get repeaterIndices():Array{ return ((_repeaterIndices) ? _repeaterIndices.slice() : []); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (_currentStateChanged){ _currentStateChanged = false; commitCurrentState(); validateNow(); }; removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2))); }; super.setChildIndex(_arg1, _arg2); } public function set measuredHeight(_arg1:Number):void{ _measuredHeight = _arg1; } protected function createChildren():void{ } public function regenerateStyleCache(_arg1:Boolean):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:DisplayObject; initProtoChain(); _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); _local3 = _local2.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = _local2.getChildAt(_local4); if ((_local5 is IStyleClient)){ if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ IStyleClient(_local5).regenerateStyleCache(_arg1); }; } else { if ((_local5 is UITextField)){ if (UITextField(_local5).inheritingStyles){ StyleProtoChain.initTextField(UITextField(_local5)); }; }; }; _local4++; }; } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus(DisplayObject(_arg1.target))){ drawFocus(false); }; } public function contentToLocal(_arg1:Point):Point{ return (_arg1); } public function getFocus():InteractiveObject{ var _local1:ISystemManager; _local1 = systemManager; if (!_local1){ return (null); }; if (UIComponentGlobals.nextFocusObject){ return (UIComponentGlobals.nextFocusObject); }; return (_local1.stage.focus); } public function endEffectsStarted():void{ var _local1:int; var _local2:int; _local1 = _effectsStarted.length; _local2 = 0; while (_local2 < _local1) { _effectsStarted[_local2].end(); _local2++; }; } protected function get unscaledHeight():Number{ return ((height / Math.abs(scaleY))); } public function get enabled():Boolean{ return (_enabled); } override public function set cacheAsBitmap(_arg1:Boolean):void{ super.cacheAsBitmap = _arg1; cacheAsBitmapCount = (_arg1) ? 1 : 0; } public function get focusEnabled():Boolean{ return (_focusEnabled); } mx_internal function removeOverlay():void{ if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){ removeEventListener("resize", overlay_resizeHandler); if (super.getChildByName("overlay")){ $removeChild(overlay); }; overlay = null; }; } public function set cacheHeuristic(_arg1:Boolean):void{ if (_cachePolicy == UIComponentCachePolicy.AUTO){ if (_arg1){ cacheAsBitmapCount++; } else { if (cacheAsBitmapCount != 0){ cacheAsBitmapCount--; }; }; super.cacheAsBitmap = !((cacheAsBitmapCount == 0)); }; } public function get cachePolicy():String{ return (_cachePolicy); } public function set maxHeight(_arg1:Number):void{ if (explicitMaxHeight == _arg1){ return; }; explicitMaxHeight = _arg1; } public function set focusManager(_arg1:IFocusManager):void{ _focusManager = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function get descriptor():UIComponentDescriptor{ return (_descriptor); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredMinWidth():Number{ return (_measuredMinWidth); } public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:int; var _local5:int; var _local6:PropertyChangeEvent; var _local7:Object; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = this; } else { _local3 = _arg1[id]; if (!(_local3 is Array)){ _local3 = (_arg1[id] = []); }; _local4 = _local2.length; _local5 = 0; while (_local5 < (_local4 - 1)) { _local7 = _local3[_local2[_local5]]; if (!(_local7 is Array)){ _local7 = (_local3[_local2[_local5]] = []); }; _local3 = _local7; _local5++; }; _local3[_local2[(_local4 - 1)]] = this; _local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local6); }; }; } public function set isPopUp(_arg1:Boolean):void{ _isPopUp = _arg1; } override public function set width(_arg1:Number):void{ var _local2:IInvalidating; if (explicitWidth != _arg1){ explicitWidth = _arg1; invalidateSize(); }; if (_width != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _width = _arg1; dispatchEvent(new Event("widthChanged")); }; } public function get measuredHeight():Number{ return (_measuredHeight); } public function get repeater():IRepeater{ return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null); } public function initialize():void{ if (initialized){ return; }; dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE)); createChildren(); childrenCreated(); initializeAccessibility(); initializationComplete(); } public function set percentHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } final mx_internal function set $visible(_arg1:Boolean):void{ super.visible = _arg1; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } private function findCommonBaseState(_arg1:String, _arg2:String):String{ var _local3:State; var _local4:State; var _local5:Array; var _local6:Array; var _local7:String; _local3 = getState(_arg1); _local4 = getState(_arg2); if (((!(_local3)) || (!(_local4)))){ return (""); }; if (((isBaseState(_local3.basedOn)) || (isBaseState(_local4.basedOn)))){ return (""); }; _local5 = getBaseStates(_local3); _local6 = getBaseStates(_local4); _local7 = ""; while (_local5[_local5.length] == _local6[_local6.length]) { _local7 = _local5.pop(); _local6.pop(); if (((!(_local5.length)) || (!(_local6.length)))){ break; }; }; return (_local7); } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ if (IUIComponent(_arg1).document != _arg1){ IUIComponent(_arg1).document = null; }; IUIComponent(_arg1).parentChanged(null); }; } final mx_internal function $removeChildAt(_arg1:int):DisplayObject{ return (super.removeChildAt(_arg1)); } public function get maxHeight():Number{ return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight); } public function get focusManager():IFocusManager{ var _local1:DisplayObject; if (_focusManager){ return (_focusManager); }; _local1 = parent; while (_local1) { if ((_local1 is IFocusManagerContainer)){ return (IFocusManagerContainer(_local1).focusManager); }; _local1 = _local1.parent; }; return (null); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){ return; }; regenerateStyleCache(true); initThemeColor(); styleChanged("styleName"); notifyStyleChangeInChildren("styleName", true); } public function get automationDelegate():Object{ return (_automationDelegate); } public function set explicitMaxHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMaxHeight == _arg1){ return; }; _explicitMaxHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxHeightChanged")); } mx_internal function cancelAllCallLaters():void{ var _local1:ISystemManager; _local1 = systemManager; if (((_local1) && (_local1.stage))){ if (listeningForRender){ _local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local1.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; }; methodQueue.splice(0); } private function updateCompleteHandler(_arg1:Event):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler); processEffectFinished(_endingEffectInstances); _endingEffectInstances = []; } public function styleChanged(_arg1:String):void{ if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateSize(); }; if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){ initThemeColor(); }; invalidateDisplayList(); if ((parent is IInvalidating)){ if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateSize(); }; if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateDisplayList(); }; }; } final mx_internal function get $visible():Boolean{ return (super.visible); } public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{ var _local12:Graphics; var _local13:Number; var _local14:Array; var _local15:Matrix; var _local16:Object; _local12 = graphics; if (((!(_arg3)) || (!(_arg4)))){ return; }; if (_arg6 !== null){ if ((_arg6 is Array)){ if ((_arg7 is Array)){ _local14 = (_arg7 as Array); } else { _local14 = [_arg7, _arg7]; }; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local15 = null; if (_arg8){ if ((_arg8 is Matrix)){ _local15 = Matrix(_arg8); } else { _local15 = new Matrix(); if ((_arg8 is Number)){ _local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2); } else { _local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y); }; }; }; if (_arg9 == GradientType.RADIAL){ _local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15); } else { _local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15); }; } else { _local12.beginFill(Number(_arg6), Number(_arg7)); }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local16 = _arg11.r; if ((_local16 is Number)){ _local13 = (Number(_local16) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function move(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_arg1 != super.x){ super.x = _arg1; dispatchEvent(new Event("xChanged")); _local3 = true; }; if (_arg2 != super.y){ super.y = _arg2; dispatchEvent(new Event("yChanged")); _local3 = true; }; if (_local3){ dispatchMoveEvent(); }; } public function set toolTip(_arg1:String):void{ ToolTipManager.registerToolTip(this, _arg1); _toolTip = _arg1; dispatchEvent(new Event("toolTipChanged")); } public function set repeaters(_arg1:Array):void{ _repeaters = _arg1; } public function get explicitMaxHeight():Number{ return (_explicitMaxHeight); } public function get styleName():Object{ return (_styleName); } private function loadResources():void{ resourceStateUndefined = packageResources.getString("stateUndefined"); } public function set explicitWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } public function get parentDocument():Object{ var _local1:IUIComponent; var _local2:ISystemManager; if (document == this){ _local1 = (parent as IUIComponent); if (_local1){ return (_local1.document); }; _local2 = (parent as ISystemManager); if (_local2){ return (_local2.document); }; return (null); //unresolved jump }; return (document); } public function set measuredMinHeight(_arg1:Number):void{ _measuredMinHeight = _arg1; } protected function childrenCreated():void{ invalidateProperties(); invalidateSize(); invalidateDisplayList(); } private function setBorderColorForErrorString():void{ var _local1:IFocusManager; var _local2:DisplayObject; if (((!(_errorString)) || ((_errorString.length == 0)))){ setStyle("borderColor", origBorderColor); saveBorderColor = true; } else { if (saveBorderColor){ saveBorderColor = false; origBorderColor = getStyle("borderColor"); }; setStyle("borderColor", getStyle("errorColor")); }; styleChanged("themeColor"); _local1 = focusManager; _local2 = (_local1) ? DisplayObject(_local1.getFocus()) : null; if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){ drawFocus(true); }; } public function measureText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureText(_arg1)); } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ if (!invalidateSizeFlag){ invalidateSizeFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateSize(this); }; }; } override public function set filters(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:IEventDispatcher; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.removeEventListener("change", filterChangeHandler); }; _local3++; }; }; _filters = _arg1; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.addEventListener("change", filterChangeHandler); }; _local3++; }; }; super.filters = _filters; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } override public function get filters():Array{ return ((_filters) ? _filters : super.filters); } public static function resumeBackgroundProcessing():void{ var _local1:SystemManager; if (UIComponentGlobals.callLaterSuspendCount > 0){ UIComponentGlobals.callLaterSuspendCount--; if (UIComponentGlobals.callLaterSuspendCount == 0){ _local1 = SystemManagerGlobals.topLevelSystemManagers[0]; if (((_local1) && (_local1.stage))){ _local1.stage.invalidate(); }; }; }; } public static function suspendBackgroundProcessing():void{ UIComponentGlobals.callLaterSuspendCount++; } } }//package mx.core class MethodQueueElement { public var method:Function; public var args:Array; private function MethodQueueElement(_arg1:Function, _arg2:Array=null){ this.method = _arg1; this.args = _arg2; } }
Section 169
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy) package mx.core { public final class UIComponentCachePolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OFF:String = "off"; } }//package mx.core
Section 170
//UIComponentDescriptor (mx.core.UIComponentDescriptor) package mx.core { public class UIComponentDescriptor extends ComponentDescriptor { public var effects:Array; public var stylesFactory:Function; mx_internal var instanceIndices:Array; mx_internal var repeaters:Array; mx_internal var repeaterIndices:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function UIComponentDescriptor(_arg1:Object){ super(_arg1); } override public function toString():String{ return (("UIComponentDescriptor_" + id)); } } }//package mx.core
Section 171
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import mx.managers.*; import flash.geom.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; } }//package mx.core
Section 172
//UITextField (mx.core.UITextField) package mx.core { import mx.automation.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import flash.text.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import flash.system.*; public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent { private var _initialized:Boolean;// = false private var invalidateDisplayListFlag:Boolean;// = true mx_internal var explicitColor:uint;// = 4294967295 private var _processedDescriptors:Boolean;// = true private var explicitHTMLText:String;// = null private var _owner:DisplayObjectContainer; mx_internal var _parent:DisplayObjectContainer; mx_internal var styleChangedFlag:Boolean;// = true private var _explicitWidth:Number; private var _enabled:Boolean;// = true private var cachedTextFormat:TextFormat; private var _automationDelegate:IAutomationObject; private var _automationName:String; private var _document:Object; private var _styleName:Object; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _toolTip:String; private var _nonInheritingStyles:Object; private var _moduleFactory:IFlexModuleFactory; private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true private var _updateCompletePendingFlag:Boolean;// = false private var _imeMode:String;// = null private var _ignorePadding:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static const TEXT_HEIGHT_PADDING:int = 4; mx_internal static const TEXT_WIDTH_PADDING:int = 5; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); private static var resourceTruncationIndicator:String; public function UITextField(){ invalidateDisplayListFlag = true; styleChangedFlag = true; explicitHTMLText = null; explicitColor = StyleManager.NOT_A_COLOR; _enabled = true; _ignorePadding = true; _imeMode = null; _includeInLayout = true; _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _initialized = false; _nestLevel = 0; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; _processedDescriptors = true; _updateCompletePendingFlag = false; super(); focusRect = false; selectable = false; tabEnabled = false; addEventListener(Event.CHANGE, changeHandler); addEventListener("textFieldStyleChange", textFieldStyleChangeHandler); } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; StyleProtoChain.initTextField(this); styleChangedFlag = true; validateNow(); }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function setColor(_arg1:uint):void{ explicitColor = _arg1; styleChangedFlag = true; invalidateDisplayListFlag = true; validateNow(); } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } private function creatingSystemManager():ISystemManager{ return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager); } public function set tweeningProperties(_arg1:Array):void{ } public function invalidateDisplayList():void{ invalidateDisplayListFlag = true; } public function get focusPane():Sprite{ return (null); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function getTextStyles():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.align = getStyle("textAlign"); _local1.bold = (getStyle("fontWeight") == "bold"); if (enabled){ if (explicitColor == StyleManager.NOT_A_COLOR){ _local1.color = getStyle("color"); } else { _local1.color = explicitColor; }; } else { _local1.color = getStyle("disabledColor"); }; _local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); _local1.indent = getStyle("textIndent"); _local1.italic = (getStyle("fontStyle") == "italic"); _local1.kerning = getStyle("kerning"); _local1.leading = getStyle("leading"); _local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft"); _local1.letterSpacing = getStyle("letterSpacing"); _local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight"); _local1.size = getStyle("fontSize"); _local1.underline = (getStyle("textDecoration") == "underline"); cachedTextFormat = _local1; return (_local1); } public function get explicitHeight():Number{ return (_explicitHeight); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get percentWidth():Number{ return (NaN); } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ return (null); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (width != _arg1){ width = _arg1; }; if (height != _arg2){ height = _arg2; }; } public function set focusPane(_arg1:Sprite):void{ } public function getAutomationChildAt(_arg1:int):IAutomationObject{ return (null); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function invalidateProperties():void{ } public function get explicitMinWidth():Number{ return (NaN); } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } public function set showInAutomationHierarchy(_arg1:Boolean):void{ } public function set systemManager(_arg1:ISystemManager):void{ } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set percentWidth(_arg1:Number):void{ } public function get imeMode():String{ return (_imeMode); } public function get document():Object{ return (_document); } public function get explicitMaxWidth():Number{ return (NaN); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function get includeInLayout():Boolean{ return (_includeInLayout); } private function changeHandler(_arg1:Event):void{ explicitHTMLText = null; } override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{ if (styleSheet){ return; }; super.setTextFormat(_arg1, _arg2, _arg3); dispatchEvent(new Event("textFormatChange")); } public function resolveAutomationIDPart(_arg1:Object):Array{ return ([]); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function setFocus():void{ systemManager.stage.focus = this; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } public function owns(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ this.visible = _arg1; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function get isPopUp():Boolean{ return (false); } public function get percentHeight():Number{ return (NaN); } public function truncateToFit(_arg1:String=null):Boolean{ var _local2:String; var _local3:Number; var _local4:String; if (!_arg1){ _arg1 = resourceTruncationIndicator; }; validateNow(); _local2 = super.text; _local3 = width; if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))){ var _local5 = _local2; super.text = _local5; _local4 = _local5; _local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length))); while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) { _local4 = _local4.slice(0, -1); super.text = (_local4 + _arg1); }; return (true); }; return (false); } public function validateNow():void{ var _local1:TextFormat; var _local2:ISystemManager; if (!parent){ return; }; if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){ super.width = ((explicitWidth)>4) ? explicitWidth : 4; }; if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){ super.height = explicitHeight; }; if (styleChangedFlag){ _local1 = getTextStyles(); _local2 = creatingSystemManager(); embedFonts = (_local1.font) ? ((!((_local2 == null))) && (_local2.isFontFaceEmbedded(_local1))) : getStyle("embedFonts"); antiAliasType = getStyle("fontAntiAliasType"); gridFitType = getStyle("fontGridFitType"); sharpness = getStyle("fontSharpness"); thickness = getStyle("fontThickness"); if (!styleSheet){ super.setTextFormat(_local1); defaultTextFormat = _local1; }; dispatchEvent(new Event("textFieldStyleChange")); }; styleChangedFlag = false; invalidateDisplayListFlag = false; } public function get ignorePadding():Boolean{ return (_ignorePadding); } public function get automationTabularData():Object{ return (null); } private function textFieldStyleChangeHandler(_arg1:Event):void{ if (explicitHTMLText != null){ super.htmlText = explicitHTMLText; }; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get measuredMinHeight():Number{ return (0); } public function get minHeight():Number{ return (0); } public function get tweeningProperties():Array{ return (null); } public function set document(_arg1:Object):void{ _document = _arg1; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } public function get explicitMinHeight():Number{ return (NaN); } override public function set text(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((super.text == _arg1)))){ return; }; super.text = _arg1; explicitHTMLText = null; if (invalidateDisplayListFlag){ validateNow(); }; } public function get numAutomationChildren():int{ return (0); } public function setStyle(_arg1:String, _arg2):void{ } public function get showInAutomationHierarchy():Boolean{ return (true); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:IUIComponent; _local1 = parent; while (_local1) { _local2 = (_local1 as IUIComponent); if (_local2){ return (_local2.systemManager); }; _local1 = _local1.parent; }; return (null); } public function get baselinePosition():Number{ var _local1:TextLineMetrics; _local1 = getLineMetrics(0); return (((height - 4) - _local1.descent)); } public function set enabled(_arg1:Boolean):void{ mouseEnabled = _arg1; _enabled = _arg1; styleChanged("color"); } public function get minWidth():Number{ return (0); } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([""]); } public function get measuredWidth():Number{ validateNow(); return ((textWidth + TEXT_WIDTH_PADDING)); } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is SystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function get maxWidth():Number{ return (UIComponent.DEFAULT_MAX_WIDTH); } public function get initialized():Boolean{ return (_initialized); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } override public function set htmlText(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((isHTML) && ((super.htmlText == _arg1)))){ return; }; if (((cachedTextFormat) && ((styleSheet == null)))){ defaultTextFormat = cachedTextFormat; }; super.htmlText = _arg1; explicitHTMLText = _arg1; if (invalidateDisplayListFlag){ validateNow(); }; } public function set measuredMinWidth(_arg1:Number):void{ } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } public function get enabled():Boolean{ return (_enabled); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredMinWidth():Number{ return (0); } public function set isPopUp(_arg1:Boolean):void{ } public function get measuredHeight():Number{ validateNow(); return ((textHeight + TEXT_HEIGHT_PADDING)); } public function getUITextFormat():UITextFormat{ var _local1:UITextFormat; validateNow(); _local1 = new UITextFormat(creatingSystemManager()); _local1.copyFrom(getTextFormat()); _local1.antiAliasType = antiAliasType; _local1.gridFitType = gridFitType; _local1.sharpness = sharpness; _local1.thickness = thickness; return (_local1); } public function initialize():void{ } public function set percentHeight(_arg1:Number):void{ } public function get maxHeight():Number{ return (UIComponent.DEFAULT_MAX_HEIGHT); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (parent){ StyleProtoChain.initTextField(this); styleChanged("styleName"); }; } public function get automationDelegate():Object{ return (_automationDelegate); } public function set ignorePadding(_arg1:Boolean):void{ _ignorePadding = _arg1; styleChanged(null); } public function set toolTip(_arg1:String):void{ ToolTipManager.registerToolTip(this, _arg1); _toolTip = _arg1; } public function styleChanged(_arg1:String):void{ styleChangedFlag = true; if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; UIComponent(parent).callLater(validateNow); }; } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } public function get explicitMaxHeight():Number{ return (NaN); } public function invalidateSize():void{ invalidateDisplayListFlag = true; } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } public function move(_arg1:Number, _arg2:Number):void{ if (this.x != _arg1){ this.x = _arg1; }; if (this.y != _arg2){ this.y = _arg2; }; } public function get toolTip():String{ return (_toolTip); } public function set measuredMinHeight(_arg1:Number):void{ } public function get explicitWidth():Number{ return (_explicitWidth); } public function getStyle(_arg1:String){ if (StyleManager.inheritingStyles[_arg1]){ return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); //unresolved jump }; return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); } public function get styleName():Object{ return (_styleName); } private static function loadResources():void{ resourceTruncationIndicator = packageResources.getString("truncationIndicator"); } loadResources(); } }//package mx.core
Section 173
//UITextFormat (mx.core.UITextFormat) package mx.core { import mx.managers.*; import flash.text.*; public class UITextFormat extends TextFormat { public var sharpness:Number; public var gridFitType:String; public var antiAliasType:String; public var thickness:Number; private var systemManager:ISystemManager; mx_internal static const VERSION:String = "2.0.1.0"; private static var measurementTextField:TextField; public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){ this.systemManager = _arg1; super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14); } public function measureText(_arg1:String):TextLineMetrics{ return (measure(_arg1, false)); } mx_internal function copyFrom(_arg1:TextFormat):void{ font = _arg1.font; size = _arg1.size; color = _arg1.color; bold = _arg1.bold; italic = _arg1.italic; underline = _arg1.underline; url = _arg1.url; target = _arg1.target; align = _arg1.align; leftMargin = _arg1.leftMargin; rightMargin = _arg1.rightMargin; indent = _arg1.indent; leading = _arg1.leading; } public function measureHTMLText(_arg1:String):TextLineMetrics{ return (measure(_arg1, true)); } private function measure(_arg1:String, _arg2:Boolean):TextLineMetrics{ var _local3:ISystemManager; var _local4:TextLineMetrics; if (!_arg1){ _arg1 = ""; }; if (!measurementTextField){ measurementTextField = new TextField(); }; if (_arg2){ measurementTextField.htmlText = ""; } else { measurementTextField.text = ""; }; measurementTextField.defaultTextFormat = this; _local3 = systemManager; if (font){ measurementTextField.embedFonts = ((!((_local3 == null))) && (_local3.isFontFaceEmbedded(this))); } else { measurementTextField.embedFonts = false; }; measurementTextField.antiAliasType = antiAliasType; measurementTextField.gridFitType = gridFitType; measurementTextField.sharpness = sharpness; measurementTextField.thickness = thickness; if (_arg2){ measurementTextField.htmlText = _arg1; } else { measurementTextField.text = _arg1; }; _local4 = measurementTextField.getLineMetrics(0); _local4.width = Math.ceil(_local4.width); _local4.height = Math.ceil(_local4.height); return (_local4); } } }//package mx.core
Section 174
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class AddRemoveEffectTargetFilter extends EffectTargetFilter { public var add:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function AddRemoveEffectTargetFilter(){ add = true; super(); filterProperties = ["parent"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ if (add){ return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null))))); }; return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null)))); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 175
//BlurInstance (mx.effects.effectClasses.BlurInstance) package mx.effects.effectClasses { import flash.events.*; import flash.filters.*; public class BlurInstance extends TweenEffectInstance { public var blurXFrom:Number; public var blurXTo:Number; public var blurYFrom:Number; public var blurYTo:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function BlurInstance(_arg1:Object){ super(_arg1); } override public function play():void{ super.play(); if (isNaN(blurXFrom)){ blurXFrom = 4; }; if (isNaN(blurXTo)){ blurXTo = 0; }; if (isNaN(blurYFrom)){ blurYFrom = 4; }; if (isNaN(blurYTo)){ blurYTo = 0; }; tween = createTween(this, [blurXFrom, blurYFrom], [blurXTo, blurYTo], duration); } override public function onTweenEnd(_arg1:Object):void{ setBlurFilter(_arg1[0], _arg1[1]); super.onTweenEnd(_arg1); } override public function onTweenUpdate(_arg1:Object):void{ setBlurFilter(_arg1[0], _arg1[1]); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); } private function setBlurFilter(_arg1:Number, _arg2:Number):void{ var _local3:Array; var _local4:int; var _local5:int; _local3 = target.filters; _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { if ((_local3[_local5] is BlurFilter)){ _local3.splice(_local5, 1); }; _local5++; }; if (((_arg1) || (_arg2))){ _local3.push(new BlurFilter(_arg1, _arg2)); }; target.filters = _local3; } } }//package mx.effects.effectClasses
Section 176
//CompositeEffectInstance (mx.effects.effectClasses.CompositeEffectInstance) package mx.effects.effectClasses { import mx.events.*; import flash.events.*; import mx.effects.*; public class CompositeEffectInstance extends EffectInstance { mx_internal var activeEffectQueue:Array; mx_internal var timerTween:Tween; mx_internal var childSets:Array; private var _playheadTime:Number;// = 0 mx_internal var endEffectCalled:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function CompositeEffectInstance(_arg1:Object){ activeEffectQueue = []; _playheadTime = 0; childSets = []; super(_arg1); } override public function get playheadTime():Number{ return ((_playheadTime + super.playheadTime)); } override public function finishEffect():void{ activeEffectQueue = null; super.finishEffect(); } override public function resume():void{ super.resume(); if (timerTween){ timerTween.resume(); }; } override public function play():void{ timerTween = new Tween(this, 0, 0, durationWithoutRepeat); super.play(); } override mx_internal function playWithNoDuration():void{ super.playWithNoDuration(); end(); } override mx_internal function get actualDuration():Number{ var _local1:Number; _local1 = NaN; if (repeatCount > 0){ _local1 = (((durationWithoutRepeat * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay); }; return (_local1); } mx_internal function get durationWithoutRepeat():Number{ return (0); } mx_internal function hasRotateInstance():Boolean{ var _local1:int; var _local2:CompositeEffectInstance; if (childSets){ _local1 = 0; while (_local1 < childSets.length) { if (childSets[_local1].length > 0){ _local2 = (childSets[_local1][0] as CompositeEffectInstance); if ((((childSets[_local1][0] is RotateInstance)) || (((_local2) && (_local2.hasRotateInstance()))))){ return (true); }; }; _local1++; }; }; return (false); } mx_internal function effectEndHandler(_arg1:EffectEvent):void{ onEffectEnd(_arg1.effectInstance); } public function addChildSet(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1){ _local2 = _arg1.length; if (_local2 > 0){ if (!childSets){ childSets = [_arg1]; } else { childSets.push(_arg1); }; _local3 = 0; while (_local3 < _local2) { _arg1[_local3].addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _arg1[_local3].parentCompositeEffectInstance = this; _local3++; }; }; }; } protected function onEffectEnd(_arg1:IEffectInstance):void{ } public function onTweenEnd(_arg1:Object):void{ _playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime; } public function onTweenUpdate(_arg1:Object):void{ _playheadTime = (timerTween) ? timerTween.playheadTime : _playheadTime; } override public function initEffect(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:Array; var _local5:int; var _local6:int; super.initEffect(_arg1); _local2 = childSets.length; _local3 = 0; while (_local3 < _local2) { _local4 = childSets[_local3]; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local4[_local6].initEffect(_arg1); _local6++; }; _local3++; }; } override public function reverse():void{ super.reverse(); super.playReversed = !(playReversed); if (timerTween){ timerTween.reverse(); }; } override public function pause():void{ super.pause(); if (timerTween){ timerTween.pause(); }; } } }//package mx.effects.effectClasses
Section 177
//FadeInstance (mx.effects.effectClasses.FadeInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import flash.events.*; public class FadeInstance extends TweenEffectInstance { public var alphaFrom:Number; private var restoreAlpha:Boolean; public var alphaTo:Number; private var origAlpha:Number;// = NAN mx_internal static const VERSION:String = "2.0.1.0"; public function FadeInstance(_arg1:Object){ origAlpha = NaN; super(_arg1); } override public function play():void{ var _local1:PropertyChanges; super.play(); origAlpha = target.alpha; _local1 = propertyChanges; if (((isNaN(alphaFrom)) && (isNaN(alphaTo)))){ if (((_local1) && (!((_local1.end["alpha"] === undefined))))){ alphaFrom = origAlpha; alphaTo = _local1.end["alpha"]; } else { if (((_local1) && (!((_local1.end["visible"] === undefined))))){ alphaFrom = (_local1.start["visible"]) ? origAlpha : 0; alphaTo = (_local1.end["visible"]) ? origAlpha : 0; } else { alphaFrom = 0; alphaTo = origAlpha; }; }; } else { if (isNaN(alphaFrom)){ alphaFrom = ((alphaTo)==0) ? origAlpha : 0; } else { if (isNaN(alphaTo)){ if (((_local1) && (!((_local1.end["alpha"] === undefined))))){ alphaTo = _local1.end["alpha"]; } else { alphaTo = ((alphaFrom)==0) ? origAlpha : 0; }; }; }; }; tween = createTween(this, alphaFrom, alphaTo, duration); target.alpha = tween.mx_internal::getCurrentValue(0); } override public function onTweenEnd(_arg1:Object):void{ super.onTweenEnd(_arg1); if (((mx_internal::hideOnEffectEnd) || (restoreAlpha))){ target.alpha = origAlpha; }; } override public function onTweenUpdate(_arg1:Object):void{ target.alpha = _arg1; } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); switch (_arg1.type){ case "childrenCreationComplete": case FlexEvent.CREATION_COMPLETE: case FlexEvent.SHOW: case Event.ADDED: case "resizeEnd": if (isNaN(alphaFrom)){ alphaFrom = 0; }; if (isNaN(alphaTo)){ alphaTo = target.alpha; }; break; case FlexEvent.HIDE: case Event.REMOVED: case "resizeStart": restoreAlpha = true; if (isNaN(alphaFrom)){ alphaFrom = target.alpha; }; if (isNaN(alphaTo)){ alphaTo = 0; }; break; }; } } }//package mx.effects.effectClasses
Section 178
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class HideShowEffectTargetFilter extends EffectTargetFilter { public var show:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function HideShowEffectTargetFilter(){ show = true; super(); filterProperties = ["visible"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ return ((_local5.end["visible"] == show)); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 179
//MoveInstance (mx.effects.effectClasses.MoveInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import flash.events.*; import mx.effects.*; public class MoveInstance extends TweenEffectInstance { public var xTo:Number; private var right; private var left; private var bottom; public var xFrom:Number; private var oldHeight:Number; private var top; private var verticalCenter; private var horizontalCenter; public var yBy:Number; public var yFrom:Number; private var forceClipping:Boolean;// = false private var oldWidth:Number; public var yTo:Number; private var checkClipping:Boolean;// = true public var xBy:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function MoveInstance(_arg1:Object){ forceClipping = false; checkClipping = true; super(_arg1); } override public function play():void{ var _local1:Container; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; super.play(); var _local9 = EffectManager; _local9.mx_internal::startBitmapEffect(IUIComponent(target)); if (isNaN(xFrom)){ xFrom = (((!(isNaN(xTo))) && (!(isNaN(xBy))))) ? (xTo - xBy) : target.x; }; if (isNaN(xTo)){ if (((((isNaN(xBy)) && (propertyChanges))) && (!((propertyChanges.end["x"] === undefined))))){ xTo = propertyChanges.end["x"]; } else { xTo = (isNaN(xBy)) ? target.x : (xFrom + xBy); }; }; if (isNaN(yFrom)){ yFrom = (((!(isNaN(yTo))) && (!(isNaN(yBy))))) ? (yTo - yBy) : target.y; }; if (isNaN(yTo)){ if (((((isNaN(yBy)) && (propertyChanges))) && (!((propertyChanges.end["y"] === undefined))))){ yTo = propertyChanges.end["y"]; } else { yTo = (isNaN(yBy)) ? target.y : (yFrom + yBy); }; }; tween = createTween(this, [xFrom, yFrom], [xTo, yTo], duration); _local1 = (target.parent as Container); if (_local1){ _local2 = _local1.viewMetrics; _local3 = _local2.left; _local4 = (_local1.width - _local2.right); _local5 = _local2.top; _local6 = (_local1.height - _local2.bottom); if ((((((((((((((((xFrom < _local3)) || ((xTo < _local3)))) || (((xFrom + target.width) > _local4)))) || (((xTo + target.width) > _local4)))) || ((yFrom < _local5)))) || ((yTo < _local5)))) || (((yFrom + target.height) > _local6)))) || (((yTo + target.height) > _local6)))){ forceClipping = true; _local1.mx_internal::forceClipping = true; }; }; mx_internal::applyTweenStartValues(); left = target.getStyle("left"); if (left != undefined){ target.setStyle("left", undefined); }; right = target.getStyle("right"); if (right != undefined){ target.setStyle("right", undefined); }; top = target.getStyle("top"); if (top != undefined){ target.setStyle("top", undefined); }; bottom = target.getStyle("bottom"); if (bottom != undefined){ target.setStyle("bottom", undefined); }; horizontalCenter = target.getStyle("horizontalCenter"); if (horizontalCenter != undefined){ target.setStyle("horizontalCenter", undefined); }; verticalCenter = target.getStyle("verticalCenter"); if (verticalCenter != undefined){ target.setStyle("verticalCenter", undefined); }; if (((!((left == undefined))) && (!((right == undefined))))){ _local7 = target.width; oldWidth = target.explicitWidth; target.width = _local7; }; if (((!((top == undefined))) && (!((bottom == undefined))))){ _local8 = target.height; oldHeight = target.explicitHeight; target.height = _local8; }; } override public function onTweenEnd(_arg1:Object):void{ var _local2:Container; var _local3 = EffectManager; _local3.mx_internal::endBitmapEffect(IUIComponent(target)); if (left != undefined){ target.setStyle("left", left); }; if (right != undefined){ target.setStyle("right", right); }; if (top != undefined){ target.setStyle("top", top); }; if (bottom != undefined){ target.setStyle("bottom", bottom); }; if (horizontalCenter != undefined){ target.setStyle("horizontalCenter", horizontalCenter); }; if (verticalCenter != undefined){ target.setStyle("verticalCenter", verticalCenter); }; if (((!((left == undefined))) && (!((right == undefined))))){ target.explicitWidth = oldWidth; }; if (((!((top == undefined))) && (!((bottom == undefined))))){ target.explicitHeight = oldHeight; }; if (forceClipping){ _local2 = (target.parent as Container); if (_local2){ forceClipping = false; _local2.mx_internal::forceClipping = false; }; }; checkClipping = false; super.onTweenEnd(_arg1); } override public function onTweenUpdate(_arg1:Object):void{ var _local2:Container; var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; EffectManager.suspendEventHandling(); if (((!(forceClipping)) && (checkClipping))){ _local2 = (target.parent as Container); if (_local2){ _local3 = _local2.viewMetrics; _local4 = _local3.left; _local5 = (_local2.width - _local3.right); _local6 = _local3.top; _local7 = (_local2.height - _local3.bottom); if ((((((((_arg1[0] < _local4)) || (((_arg1[0] + target.width) > _local5)))) || ((_arg1[1] < _local6)))) || (((_arg1[1] + target.height) > _local7)))){ forceClipping = true; _local2.mx_internal::forceClipping = true; }; }; }; target.move(_arg1[0], _arg1[1]); EffectManager.resumeEventHandling(); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); if ((((_arg1 is MoveEvent)) && ((_arg1.type == MoveEvent.MOVE)))){ if (((((((((((isNaN(xFrom)) && (isNaN(xTo)))) && (isNaN(xBy)))) && (isNaN(yFrom)))) && (isNaN(yTo)))) && (isNaN(yBy)))){ xFrom = MoveEvent(_arg1).oldX; xTo = target.x; yFrom = MoveEvent(_arg1).oldY; yTo = target.y; }; }; } } }//package mx.effects.effectClasses
Section 180
//ParallelInstance (mx.effects.effectClasses.ParallelInstance) package mx.effects.effectClasses { import mx.core.*; import flash.events.*; import mx.effects.*; import flash.utils.*; public class ParallelInstance extends CompositeEffectInstance { private var isReversed:Boolean;// = false private var doneEffectQueue:Array; private var timer:Timer; private var replayEffectQueue:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function ParallelInstance(_arg1:Object){ isReversed = false; super(_arg1); } private function startTimer():void{ if (!timer){ timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, timerHandler); }; timer.start(); } override public function resume():void{ var _local1:int; var _local2:int; super.resume(); _local1 = activeEffectQueue.length; _local2 = 0; while (_local2 < _local1) { activeEffectQueue[_local2].resume(); _local2++; }; } override mx_internal function get durationWithoutRepeat():Number{ var _local1:Number; var _local2:int; var _local3:int; var _local4:Array; _local1 = 0; _local2 = childSets.length; _local3 = 0; while (_local3 < _local2) { _local4 = childSets[_local3]; _local1 = Math.max(_local4[0].actualDuration, _local1); _local3++; }; return (_local1); } private function timerHandler(_arg1:TimerEvent):void{ var _local2:Number; var _local3:int; var _local4:int; var _local5:EffectInstance; _local2 = (durationWithoutRepeat - playheadTime); _local3 = replayEffectQueue.length; if (_local3 == 0){ stopTimer(); return; }; _local4 = (_local3 - 1); while (_local4 >= 0) { _local5 = replayEffectQueue[_local4]; if (_local2 <= _local5.actualDuration){ activeEffectQueue.push(_local5); replayEffectQueue.splice(_local4, 1); _local5.playReversed = playReversed; _local5.startEffect(); }; _local4--; }; } override public function play():void{ var _local1:Boolean; var _local2:int; var _local3:int; var _local4:Array; var _local5:int; var _local6:int; var _local7:EffectInstance; var _local8:Array; doneEffectQueue = []; activeEffectQueue = []; replayEffectQueue = []; _local1 = false; super.play(); _local2 = childSets.length; _local3 = 0; while (_local3 < _local2) { _local4 = childSets[_local3]; _local5 = _local4.length; _local6 = 0; while ((((_local6 < _local5)) && (!((activeEffectQueue == null))))) { _local7 = _local4[_local6]; if (((playReversed) && ((_local7.actualDuration < durationWithoutRepeat)))){ replayEffectQueue.push(_local7); startTimer(); } else { _local7.playReversed = playReversed; activeEffectQueue.push(_local7); }; if (_local7.suspendBackgroundProcessing){ UIComponent.suspendBackgroundProcessing(); }; _local6++; }; _local3++; }; if (activeEffectQueue.length > 0){ _local8 = activeEffectQueue.slice(0); _local3 = 0; while (_local3 < _local8.length) { _local8[_local3].startEffect(); _local3++; }; }; } override public function addChildSet(_arg1:Array):void{ var _local2:CompositeEffectInstance; super.addChildSet(_arg1); if (_arg1.length > 0){ _local2 = (_arg1[0] as CompositeEffectInstance); if ((((_arg1[0] is RotateInstance)) || (((!((_local2 == null))) && (_local2.hasRotateInstance()))))){ childSets.pop(); childSets.unshift(_arg1); }; }; } private function stopTimer():void{ if (timer){ timer.reset(); }; } override protected function onEffectEnd(_arg1:IEffectInstance):void{ var _local2:int; var _local3:int; if (Object(_arg1).suspendBackgroundProcessing){ UIComponent.resumeBackgroundProcessing(); }; if (((endEffectCalled) || ((activeEffectQueue == null)))){ return; }; _local2 = activeEffectQueue.length; _local3 = 0; while (_local3 < _local2) { if (_arg1 == activeEffectQueue[_local3]){ doneEffectQueue.push(_arg1); activeEffectQueue.splice(_local3, 1); break; }; _local3++; }; if (_local2 == 1){ finishRepeat(); }; } override public function reverse():void{ var _local1:int; var _local2:int; super.reverse(); if (isReversed){ _local1 = activeEffectQueue.length; _local2 = 0; while (_local2 < _local1) { activeEffectQueue[_local2].reverse(); _local2++; }; stopTimer(); } else { replayEffectQueue = doneEffectQueue.splice(0); _local1 = activeEffectQueue.length; _local2 = 0; while (_local2 < _local1) { activeEffectQueue[_local2].reverse(); _local2++; }; startTimer(); }; isReversed = !(isReversed); } override public function end():void{ var _local1:Array; var _local2:int; var _local3:int; endEffectCalled = true; stopTimer(); if (activeEffectQueue){ _local1 = activeEffectQueue.concat(); activeEffectQueue = null; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { if (_local1[_local3]){ _local1[_local3].end(); }; _local3++; }; }; super.end(); } override public function pause():void{ var _local1:int; var _local2:int; super.pause(); _local1 = activeEffectQueue.length; _local2 = 0; while (_local2 < _local1) { activeEffectQueue[_local2].pause(); _local2++; }; } } }//package mx.effects.effectClasses
Section 181
//PropertyChanges (mx.effects.effectClasses.PropertyChanges) package mx.effects.effectClasses { import mx.core.*; public class PropertyChanges { public var start:Object; public var target:IUIComponent; public var end:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function PropertyChanges(_arg1:IUIComponent){ end = {}; start = {}; super(); this.target = _arg1; } } }//package mx.effects.effectClasses
Section 182
//RotateInstance (mx.effects.effectClasses.RotateInstance) package mx.effects.effectClasses { import mx.effects.*; public class RotateInstance extends TweenEffectInstance { private var originalOffsetX:Number; private var originalOffsetY:Number; public var angleFrom:Number;// = 0 private var centerY:Number; private var centerX:Number; public var angleTo:Number;// = 360 private var newX:Number; private var newY:Number; public var originX:Number; public var originY:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function RotateInstance(_arg1:Object){ angleFrom = 0; angleTo = 360; super(_arg1); } override public function play():void{ var _local1:Number; super.play(); _local1 = ((Math.PI * target.rotation) / 180); if (isNaN(originX)){ originX = (target.width / 2); }; if (isNaN(originY)){ originY = (target.height / 2); }; centerX = ((target.x + (originX * Math.cos(_local1))) - (originY * Math.sin(_local1))); centerY = ((target.y + (originX * Math.sin(_local1))) + (originY * Math.cos(_local1))); if (isNaN(angleFrom)){ angleFrom = target.rotation; }; if (isNaN(angleTo)){ angleTo = ((target.rotation)==0) ? ((angleFrom)>180) ? 360 : 0 : target.rotation; }; tween = createTween(this, angleFrom, angleTo, duration); target.rotation = angleFrom; _local1 = ((Math.PI * angleFrom) / 180); EffectManager.suspendEventHandling(); originalOffsetX = ((originX * Math.cos(_local1)) - (originY * Math.sin(_local1))); originalOffsetY = ((originX * Math.sin(_local1)) + (originY * Math.cos(_local1))); newX = Number((centerX - originalOffsetX).toFixed(1)); newY = Number((centerY - originalOffsetY).toFixed(1)); target.move(newX, newY); EffectManager.resumeEventHandling(); } override public function onTweenUpdate(_arg1:Object):void{ var _local2:Number; var _local3:Number; if (newX != Number(target.x.toFixed(1))){ centerX = (target.x + originalOffsetX); }; if (newY != Number(target.y.toFixed(1))){ centerY = (target.y + originalOffsetY); }; _local2 = Number(_arg1); _local3 = ((Math.PI * _local2) / 180); EffectManager.suspendEventHandling(); target.rotation = _local2; newX = ((centerX - (originX * Math.cos(_local3))) + (originY * Math.sin(_local3))); newY = ((centerY - (originX * Math.sin(_local3))) - (originY * Math.cos(_local3))); newX = Number(newX.toFixed(1)); newY = Number(newY.toFixed(1)); target.move(newX, newY); EffectManager.resumeEventHandling(); } } }//package mx.effects.effectClasses
Section 183
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import mx.effects.*; public class TweenEffectInstance extends EffectInstance { mx_internal var needToLayout:Boolean;// = false private var _seekTime:Number;// = 0 public var tween:Tween; public var easingFunction:Function; mx_internal static const VERSION:String = "2.0.1.0"; public function TweenEffectInstance(_arg1:Object){ needToLayout = false; _seekTime = 0; super(_arg1); } override public function get playheadTime():Number{ if (tween){ return ((tween.playheadTime + super.playheadTime)); }; return (0); } override mx_internal function set playReversed(_arg1:Boolean):void{ super.playReversed = _arg1; if (tween){ tween.playReversed = _arg1; }; } override public function resume():void{ super.resume(); if (tween){ tween.resume(); }; } public function onTweenUpdate(_arg1:Object):void{ } mx_internal function applyTweenStartValues():void{ if (duration > 0){ onTweenUpdate(tween.getCurrentValue(0)); }; } protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{ var _local6:Tween; _local6 = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5); _local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); if (easingFunction != null){ _local6.easingFunction = easingFunction; }; if (_seekTime > 0){ _local6.seek(_seekTime); }; _local6.playReversed = playReversed; return (_local6); } override public function end():void{ stopRepeat = true; if (delayTimer){ delayTimer.reset(); }; if (tween){ tween.endTween(); tween = null; }; } override public function reverse():void{ super.reverse(); if (tween){ tween.reverse(); }; super.playReversed = !(playReversed); } private function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } public function seek(_arg1:Number):void{ if (tween){ tween.seek(_arg1); } else { _seekTime = _arg1; }; } override public function pause():void{ super.pause(); if (tween){ tween.pause(); }; } public function onTweenEnd(_arg1:Object):void{ onTweenUpdate(_arg1); tween = null; if (needToLayout){ UIComponentGlobals.layoutManager.validateNow(); }; finishRepeat(); } } }//package mx.effects.effectClasses
Section 184
//ZoomInstance (mx.effects.effectClasses.ZoomInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import flash.events.*; import mx.effects.*; public class ZoomInstance extends TweenEffectInstance { private var show:Boolean;// = true private var origPercentHeight:Number; public var zoomWidthFrom:Number; private var origX:Number; private var origY:Number; private var scaledOriginY:Number; private var scaledOriginX:Number; private var origPercentWidth:Number; public var zoomWidthTo:Number; public var zoomHeightFrom:Number; private var newX:Number; private var newY:Number; public var captureRollEvents:Boolean; private var origScaleX:Number; private var origScaleY:Number; public var originX:Number; public var originY:Number; public var zoomHeightTo:Number; private var _mouseHasMoved:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; public function ZoomInstance(_arg1:Object){ _mouseHasMoved = false; show = true; super(_arg1); } override public function finishEffect():void{ if (captureRollEvents){ target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; super.finishEffect(); } private function getScaleFromWidth(_arg1:Number):Number{ return ((_arg1 / (target.width / Math.abs(target.scaleX)))); } private function getScaleFromHeight(_arg1:Number):Number{ return ((_arg1 / (target.height / Math.abs(target.scaleY)))); } override public function play():void{ super.play(); applyPropertyChanges(); if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){ if (show){ zoomWidthFrom = (zoomHeightFrom = 0); zoomWidthTo = target.scaleX; zoomHeightTo = target.scaleY; } else { zoomWidthFrom = target.scaleX; zoomHeightFrom = target.scaleY; zoomWidthTo = (zoomHeightTo = 0); }; } else { if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){ zoomWidthFrom = (zoomWidthTo = target.scaleX); } else { if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){ zoomHeightFrom = (zoomHeightTo = target.scaleY); }; }; if (isNaN(zoomWidthFrom)){ zoomWidthFrom = target.scaleX; } else { if (isNaN(zoomWidthTo)){ zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1; }; }; if (isNaN(zoomHeightFrom)){ zoomHeightFrom = target.scaleY; } else { if (isNaN(zoomHeightTo)){ zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1; }; }; }; if (zoomWidthFrom < 0.01){ zoomWidthFrom = 0.01; }; if (zoomWidthTo < 0.01){ zoomWidthTo = 0.01; }; if (zoomHeightFrom < 0.01){ zoomHeightFrom = 0.01; }; if (zoomHeightTo < 0.01){ zoomHeightTo = 0.01; }; origScaleX = target.scaleX; origScaleY = target.scaleY; newX = (origX = target.x); newY = (origY = target.y); if (isNaN(originX)){ scaledOriginX = (target.width / 2); } else { scaledOriginX = (originX * origScaleX); }; if (isNaN(originY)){ scaledOriginY = (target.height / 2); } else { scaledOriginY = (originY * origScaleY); }; scaledOriginX = Number(scaledOriginX.toFixed(1)); scaledOriginY = Number(scaledOriginY.toFixed(1)); origPercentWidth = target.percentWidth; if (!isNaN(origPercentWidth)){ target.width = target.width; }; origPercentHeight = target.percentHeight; if (!isNaN(origPercentHeight)){ target.height = target.height; }; tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration); if (captureRollEvents){ target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; } override public function onTweenEnd(_arg1:Object):void{ var _local2:Number; var _local3:Number; if (!isNaN(origPercentWidth)){ _local2 = target.width; target.percentWidth = origPercentWidth; if (((target.parent) && ((target.parent.autoLayout == false)))){ target._width = _local2; }; }; if (!isNaN(origPercentHeight)){ _local3 = target.height; target.percentHeight = origPercentHeight; if (((target.parent) && ((target.parent.autoLayout == false)))){ target._height = _local3; }; }; super.onTweenEnd(_arg1); if (mx_internal::hideOnEffectEnd){ EffectManager.suspendEventHandling(); target.scaleX = origScaleX; target.scaleY = origScaleY; target.move(origX, origY); EffectManager.resumeEventHandling(); }; } private function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_MOVE){ _mouseHasMoved = true; } else { if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){ if (!_mouseHasMoved){ _arg1.stopImmediatePropagation(); }; _mouseHasMoved = false; }; }; } override public function onTweenUpdate(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; EffectManager.suspendEventHandling(); if (Math.abs((newX - Number(target.x.toFixed(1)))) > 0.1){ origX = (origX + (Number(target.x.toFixed(1)) - newX)); }; if (Math.abs((newY - Number(target.y.toFixed(1)))) > 0.1){ origY = (origY + (Number(target.y.toFixed(1)) - newY)); }; target.scaleX = _arg1[0]; target.scaleY = _arg1[1]; _local2 = (_arg1[0] / origScaleX); _local3 = (_arg1[1] / origScaleY); _local4 = (scaledOriginX * _local2); _local5 = (scaledOriginY * _local3); newX = ((scaledOriginX - _local4) + origX); newY = ((scaledOriginY - _local5) + origY); newX = Number(newX.toFixed(1)); newY = Number(newY.toFixed(1)); target.move(newX, newY); tween.mx_internal::needToLayout = true; EffectManager.resumeEventHandling(); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){ show = false; }; } private function applyPropertyChanges():void{ var _local1:PropertyChanges; var _local2:Boolean; var _local3:Boolean; _local1 = propertyChanges; if (_local1){ _local2 = false; _local3 = false; if (_local1.end["scaleX"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo; _local3 = true; }; if (_local1.end["scaleY"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo; _local3 = true; }; if (_local3){ return; }; if (_local1.end["width"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo; _local2 = true; }; if (_local1.end["height"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo; _local2 = true; }; if (_local2){ return; }; if (_local1.end["visible"] !== undefined){ show = _local1.end["visible"]; }; }; } } }//package mx.effects.effectClasses
Section 185
//Blur (mx.effects.Blur) package mx.effects { import mx.effects.effectClasses.*; public class Blur extends TweenEffect { public var blurXFrom:Number; public var blurYFrom:Number; public var blurXTo:Number; public var blurYTo:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var AFFECTED_PROPERTIES:Array = ["filters"]; public function Blur(_arg1:Object=null){ super(_arg1); instanceClass = BlurInstance; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:BlurInstance; super.initInstance(_arg1); _local2 = BlurInstance(_arg1); _local2.blurXFrom = blurXFrom; _local2.blurXTo = blurXTo; _local2.blurYFrom = blurYFrom; _local2.blurYTo = blurYTo; } } }//package mx.effects
Section 186
//CompositeEffect (mx.effects.CompositeEffect) package mx.effects { import mx.effects.effectClasses.*; public class CompositeEffect extends Effect { private var childTargets:Array; private var _affectedProperties:Array; public var children:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function CompositeEffect(_arg1:Object=null){ children = []; super(_arg1); instanceClass = CompositeEffectInstance; } override mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local3:int; var _local4:int; var _local5:Effect; _local3 = children.length; _local4 = 0; while (_local4 < _local3) { _local5 = children[_local4]; _arg1 = _local5.captureValues(_arg1, _arg2); _local4++; }; return (_arg1); } public function addChild(_arg1:Effect):void{ children.push(_arg1); _affectedProperties = null; } override protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ var _local3:Array; var _local4:int; var _local5:int; if (filterObject){ _local3 = targets; if (_local3.length == 0){ _local3 = childTargets; }; _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { if (filterObject.filterFunction(_arg1, _local3[_local5])){ return (true); }; _local5++; }; return (false); }; return (true); } override public function createInstance(_arg1:Object=null):IEffectInstance{ var _local2:IEffectInstance; if (!childTargets){ childTargets = [_arg1]; }; _local2 = super.createInstance(_arg1); childTargets = null; return (_local2); } override public function getAffectedProperties():Array{ var _local1:Array; var _local2:int; var _local3:int; if (!_affectedProperties){ _local1 = []; _local2 = children.length; _local3 = 0; while (_local3 < _local2) { _local1 = _local1.concat(children[_local3].getAffectedProperties()); _local3++; }; _affectedProperties = _local1; }; return (_affectedProperties); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:CompositeEffectInstance; var _local3:Object; var _local4:int; var _local5:int; var _local6:Effect; super.initInstance(_arg1); _local2 = CompositeEffectInstance(_arg1); _local3 = childTargets; if (!(_local3 is Array)){ _local3 = [_local3]; }; if (children){ _local4 = children.length; _local5 = 0; while (_local5 < _local4) { _local6 = children[_local5]; if (propertyChangesArray != null){ _local6.propertyChangesArray = propertyChangesArray; }; if ((((_local6.filterObject == null)) && (filterObject))){ _local6.filterObject = filterObject; }; if (_local6.targets.length == 0){ _local2.addChildSet(children[_local5].createInstances(_local3)); } else { _local2.addChildSet(children[_local5].createInstances(_local6.targets)); }; _local5++; }; }; } override mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local3:int; var _local4:int; var _local5:Effect; var _local6:Array; _local3 = children.length; _local4 = 0; while (_local4 < _local3) { _local5 = children[_local4]; _local6 = ((_local5.targets.length > 0)) ? _local5.targets : _arg2; if ((((_local5.filterObject == null)) && (filterObject))){ _local5.filterObject = filterObject; }; _local5.applyStartValues(_arg1, _local6); _local4++; }; } private function getChildrenTargets():Array{ var _local1:Array; var _local2:Object; var _local3:Array; var _local4:Effect; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:String; _local1 = []; _local2 = {}; _local5 = children.length; _local6 = 0; while (_local6 < _local5) { _local4 = children[_local6]; if ((_local4 is CompositeEffect)){ _local3 = CompositeEffect(_local4).getChildrenTargets(); _local7 = _local3.length; _local8 = 0; while (_local8 < _local7) { if (_local3[_local8] != null){ _local2[_local3[_local8].toString()] = _local3[_local8]; }; _local8++; }; } else { if (_local4.targets != null){ _local7 = _local4.targets.length; _local8 = 0; while (_local8 < _local7) { if (_local4.targets[_local8] != null){ _local2[_local4.targets[_local8].toString()] = _local4.targets[_local8]; }; _local8++; }; }; }; _local6++; }; _local5 = targets.length; _local6 = 0; while (_local6 < _local5) { if (targets[_local6] != null){ _local2[targets[_local6].toString()] = targets[_local6]; }; _local6++; }; for (_local9 in _local2) { _local1.push(_local2[_local9]); }; return (_local1); } override public function createInstances(_arg1:Array=null):Array{ var _local2:IEffectInstance; if (!_arg1){ _arg1 = this.targets; }; childTargets = _arg1; _local2 = createInstance(); childTargets = null; return ((_local2) ? [_local2] : []); } override public function captureStartValues():void{ var _local1:Array; var _local2:int; var _local3:int; _local1 = getChildrenTargets(); propertyChangesArray = []; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { propertyChangesArray.push(new PropertyChanges(_local1[_local3])); _local3++; }; propertyChangesArray = captureValues(propertyChangesArray, true); } } }//package mx.effects
Section 187
//Effect (mx.effects.Effect) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import mx.managers.*; import mx.effects.effectClasses.*; import flash.utils.*; public class Effect extends EventDispatcher { mx_internal var applyActualDimensions:Boolean;// = true private var _instances:Array; private var _filter:String; private var _customFilter:EffectTargetFilter; mx_internal var durationExplicitlySet:Boolean;// = false public var repeatCount:int;// = 1 public var repeatDelay:int;// = 0 public var suspendBackgroundProcessing:Boolean;// = false public var startDelay:int;// = 0 private var _targets:Array; mx_internal var propertyChangesArray:Array; private var _relevantProperties:Array; mx_internal var filterObject:EffectTargetFilter; private var _callValidateNow:Boolean;// = false mx_internal var initEvent:Event; public var instanceClass:Class; private var _duration:Number;// = 500 private var _relevantStyles:Array; private var isPaused:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; public function Effect(_arg1:Object=null){ _instances = []; _callValidateNow = false; isPaused = false; applyActualDimensions = true; _duration = 500; durationExplicitlySet = false; _relevantStyles = []; instanceClass = IEffectInstance; repeatCount = 1; repeatDelay = 0; startDelay = 0; suspendBackgroundProcessing = false; _targets = []; super(); this.target = _arg1; } public function set targets(_arg1:Array):void{ var _local2:int; var _local3:int; _local2 = _arg1.length; _local3 = (_local2 - 1); while (_local3 > 0) { if (_arg1[_local3] == null){ _arg1.splice(_local3, 1); }; _local3--; }; _targets = _arg1; } public function end(_arg1:IEffectInstance=null):void{ var _local2:int; var _local3:int; var _local4:IEffectInstance; if (_arg1){ _arg1.end(); } else { _local2 = _instances.length; _local3 = _local2; while (_local3 >= 0) { _local4 = IEffectInstance(_instances[_local3]); if (_local4){ _local4.end(); }; _local3--; }; }; } protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ if (filterObject){ return (filterObject.filterFunction(_arg1, _arg2)); }; return (true); } public function get target():Object{ if (_targets.length > 0){ return (_targets[0]); }; return (null); } public function get duration():Number{ return (_duration); } protected function getValueFromTarget(_arg1:Object, _arg2:String){ if ((_arg2 in _arg1)){ return (_arg1[_arg2]); }; return (undefined); } public function set customFilter(_arg1:EffectTargetFilter):void{ _customFilter = _arg1; filterObject = _arg1; } public function get targets():Array{ return (_targets); } public function captureStartValues():void{ var _local1:int; var _local2:int; if (targets.length > 0){ propertyChangesArray = []; _callValidateNow = true; _local1 = targets.length; _local2 = 0; while (_local2 < _local1) { propertyChangesArray.push(new PropertyChanges(targets[_local2])); _local2++; }; propertyChangesArray = captureValues(propertyChangesArray, true); }; } public function set target(_arg1:Object):void{ _targets.splice(0); if (_arg1){ _targets[0] = _arg1; }; } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function get isPlaying():Boolean{ return (((_instances) && ((_instances.length > 0)))); } mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local3:Array; var _local4:Object; var _local5:Object; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Array; _local3 = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties; if (((_local3) && ((_local3.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local3.length; _local9 = 0; while (_local9 < _local8) { _local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]); _local9++; }; _local7++; }; }; _local10 = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles; if (((_local10) && ((_local10.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local10.length; _local9 = 0; while (_local9 < _local8) { _local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]); _local9++; }; _local7++; }; }; return (_arg1); } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } public function get relevantProperties():Array{ if (_relevantProperties){ return (_relevantProperties); }; return (getAffectedProperties()); } public function createInstance(_arg1:Object=null):IEffectInstance{ var _local2:IEffectInstance; var _local3:PropertyChanges; var _local4:Boolean; var _local5:Boolean; var _local6:int; var _local7:int; if (!_arg1){ _arg1 = this.target; }; _local2 = null; _local3 = null; _local4 = true; _local5 = false; if (propertyChangesArray){ _local5 = true; _local4 = filterInstance(propertyChangesArray, _arg1); }; if (_local4){ _local2 = IEffectInstance(new instanceClass(_arg1)); initInstance(_local2); if (_local5){ _local6 = propertyChangesArray.length; _local7 = 0; while (_local7 < _local6) { if (propertyChangesArray[_local7].target == _arg1){ _local2.propertyChanges = propertyChangesArray[_local7]; }; _local7++; }; }; EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _instances.push(_local2); if (initEvent){ _local2.initEffect(initEvent); }; }; return (_local2); } protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ var target = _arg1; var property = _arg2; var value = _arg3; var props = _arg4; if ((property in target)){ try { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){ target.setActualSize(target.width, value); } else { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){ target.setActualSize(value, target.height); } else { target[property] = value; }; }; } catch(e:Error) { }; }; } protected function effectStartHandler(_arg1:EffectEvent):void{ dispatchEvent(_arg1); } public function play(_arg1:Array=null, _arg2:Boolean=false):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:IEffectInstance; if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){ if (_callValidateNow){ LayoutManager.getInstance().validateNow(); }; propertyChangesArray = captureValues(propertyChangesArray, false); propertyChangesArray = stripUnchangedValues(propertyChangesArray); applyStartValues(propertyChangesArray, this.targets); }; _local3 = createInstances(_arg1); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = IEffectInstance(_local3[_local5]); Object(_local6).playReversed = _arg2; _local6.startEffect(); _local5++; }; return (_local3); } public function resume():void{ var _local1:int; var _local2:int; if (((isPlaying) && (isPaused))){ isPaused = false; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).resume(); _local2++; }; }; } public function set relevantStyles(_arg1:Array):void{ _relevantStyles = _arg1; } public function getAffectedProperties():Array{ return ([]); } protected function initInstance(_arg1:IEffectInstance):void{ _arg1.duration = duration; Object(_arg1).durationExplicitlySet = durationExplicitlySet; _arg1.effect = this; _arg1.repeatCount = repeatCount; _arg1.repeatDelay = repeatDelay; _arg1.startDelay = startDelay; _arg1.suspendBackgroundProcessing = suspendBackgroundProcessing; } public function get customFilter():EffectTargetFilter{ return (_customFilter); } mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:Boolean; _local3 = relevantProperties; _local4 = _arg1.length; _local5 = 0; while (_local5 < _local4) { _local8 = _arg1[_local5].target; _local9 = false; _local6 = _arg2.length; _local7 = 0; while (_local7 < _local6) { if (_arg2[_local7] == _local8){ _local9 = filterInstance(_arg1, _local8); break; }; _local7++; }; if (_local9){ _local6 = _local3.length; _local7 = 0; while (_local7 < _local6) { if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){ applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start); }; _local7++; }; _local6 = relevantStyles.length; _local7 = 0; while (_local7 < _local6) { if ((relevantStyles[_local7] in _arg1[_local5].start)){ _local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]); }; _local7++; }; }; _local5++; }; } public function get relevantStyles():Array{ return (_relevantStyles); } public function set relevantProperties(_arg1:Array):void{ _relevantProperties = _arg1; } public function createInstances(_arg1:Array=null):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:IEffectInstance; if (!_arg1){ _arg1 = this.targets; }; _local2 = []; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = createInstance(_arg1[_local4]); if (_local5){ _local2.push(_local5); }; _local4++; }; initEvent = null; return (_local2); } protected function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance; var _local3:int; var _local4:int; _local2 = IEffectInstance(_arg1.effectInstance); EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); _local3 = _instances.length; _local4 = 0; while (_local4 < _local3) { if (_instances[_local4] === _local2){ _instances.splice(_local4, 1); }; _local4++; }; dispatchEvent(_arg1); } public function reverse():void{ var _local1:int; var _local2:int; if (isPlaying){ _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).reverse(); _local2++; }; }; } public function set filter(_arg1:String):void{ if (!customFilter){ _filter = _arg1; switch (_arg1){ case "add": case "remove": filterObject = new AddRemoveEffectTargetFilter(); AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add"); break; case "hide": case "show": filterObject = new HideShowEffectTargetFilter(); HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show"); break; case "move": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["x", "y"]; break; case "resize": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["width", "height"]; break; default: filterObject = null; break; }; }; } public function pause():void{ var _local1:int; var _local2:int; if (((isPlaying) && (!(isPaused)))){ isPaused = true; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).pause(); _local2++; }; }; } public function get filter():String{ return (_filter); } private static function mergeArrays(_arg1:Array, _arg2:Array):Array{ var _local3:int; var _local4:Boolean; var _local5:int; if (_arg2){ _local3 = 0; while (_local3 < _arg2.length) { _local4 = true; _local5 = 0; while (_local5 < _arg1.length) { if (_arg1[_local5] == _arg2[_local3]){ _local4 = false; break; }; _local5++; }; if (_local4){ _arg1.push(_arg2[_local3]); }; _local3++; }; }; return (_arg1); } private static function stripUnchangedValues(_arg1:Array):Array{ var _local2:int; var _local3:Object; _local2 = 0; while (_local2 < _arg1.length) { for (_local3 in _arg1[_local2].start) { if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){ delete _arg1[_local2].start[_local3]; delete _arg1[_local2].end[_local3]; }; }; _local2++; }; return (_arg1); } } }//package mx.effects
Section 188
//EffectInstance (mx.effects.EffectInstance) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import mx.effects.effectClasses.*; import flash.utils.*; public class EffectInstance extends EventDispatcher implements IEffectInstance { private var delayStartTime:Number;// = 0 private var playCount:int;// = 0 mx_internal var stopRepeat:Boolean;// = false private var _repeatCount:int; private var _suspendBackgroundProcessing:Boolean;// = false mx_internal var delayTimer:Timer; private var _triggerEvent:Event; mx_internal var parentCompositeEffectInstance:EffectInstance; mx_internal var durationExplicitlySet:Boolean;// = false private var _effect:Effect; private var _target:Object; mx_internal var hideOnEffectEnd:Boolean;// = false private var _startDelay:int;// = 0 private var delayElapsedTime:Number;// = 0 private var _repeatDelay:int;// = 0 private var _propertyChanges:PropertyChanges; private var _duration:Number;// = 500 private var _playReversed:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function EffectInstance(_arg1:Object){ delayStartTime = 0; delayElapsedTime = 0; durationExplicitlySet = false; hideOnEffectEnd = false; playCount = 0; stopRepeat = false; _duration = 500; _repeatDelay = 0; _startDelay = 0; _suspendBackgroundProcessing = false; super(); this.target = _arg1; } public function get playheadTime():Number{ return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay)); } public function finishEffect():void{ playCount = 0; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); }; if ((target is IUIComponent)){ Object(target).effectFinished(this); }; } public function finishRepeat():void{ if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){ if (repeatDelay > 0){ delayTimer = new Timer(repeatDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } else { finishEffect(); }; } mx_internal function get playReversed():Boolean{ return (_playReversed); } public function set effect(_arg1:Effect):void{ _effect = _arg1; } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } mx_internal function set playReversed(_arg1:Boolean):void{ _playReversed = _arg1; } public function resume():void{ if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){ delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime); delayTimer.start(); }; } public function get propertyChanges():PropertyChanges{ return (_propertyChanges); } public function set target(_arg1:Object):void{ _target = _arg1; } public function get repeatCount():int{ return (_repeatCount); } mx_internal function playWithNoDuration():void{ duration = 0; repeatCount = 1; repeatDelay = 0; startDelay = 0; startEffect(); } public function get startDelay():int{ return (_startDelay); } mx_internal function get actualDuration():Number{ var _local1:Number; _local1 = NaN; if (repeatCount > 0){ _local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay); }; return (_local1); } public function get suspendBackgroundProcessing():Boolean{ return (_suspendBackgroundProcessing); } public function play():void{ playCount++; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); }; } public function set repeatDelay(_arg1:int):void{ _repeatDelay = _arg1; } public function set propertyChanges(_arg1:PropertyChanges):void{ _propertyChanges = _arg1; } mx_internal function eventHandler(_arg1:Event):void{ if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){ hideOnEffectEnd = false; _arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler); }; } public function set repeatCount(_arg1:int):void{ _repeatCount = _arg1; } private function delayTimerHandler(_arg1:TimerEvent):void{ delayTimer.reset(); delayStartTime = NaN; delayElapsedTime = NaN; play(); } public function set suspendBackgroundProcessing(_arg1:Boolean):void{ _suspendBackgroundProcessing = _arg1; } public function set triggerEvent(_arg1:Event):void{ _triggerEvent = _arg1; } public function set startDelay(_arg1:int):void{ _startDelay = _arg1; } public function get effect():Effect{ return (_effect); } public function get duration():Number{ if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){ return (parentCompositeEffectInstance.duration); }; return (_duration); } public function get target():Object{ return (_target); } public function startEffect():void{ if ((target is IUIComponent)){ Object(target).effectStarted(this); Object(target).drawFocus(false); }; if ((((startDelay > 0)) && (!(playReversed)))){ delayTimer = new Timer(startDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } public function get repeatDelay():int{ return (_repeatDelay); } public function initEffect(_arg1:Event):void{ triggerEvent = _arg1; switch (_arg1.type){ case "resizeStart": case "resizeEnd": if (!durationExplicitlySet){ duration = 250; }; break; case FlexEvent.HIDE: target.setVisible(true, true); hideOnEffectEnd = true; target.addEventListener(FlexEvent.SHOW, eventHandler); break; }; } public function get triggerEvent():Event{ return (_triggerEvent); } public function end():void{ if (delayTimer){ delayTimer.reset(); }; stopRepeat = true; finishEffect(); } public function reverse():void{ if (repeatCount > 0){ playCount = ((repeatCount - playCount) + 1); }; } public function pause():void{ if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){ delayTimer.stop(); delayElapsedTime = (getTimer() - delayStartTime); }; } } }//package mx.effects
Section 189
//EffectManager (mx.effects.EffectManager) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.resources.*; import flash.system.*; public class EffectManager extends EventDispatcher { mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceIncorrectTrigger:String; mx_internal static var effectsPlaying:Array = []; private static var targetsInfo:Array = []; private static var effectTriggersForEvent:Object = {}; mx_internal static var lastEffectCreated:Effect; private static var eventHandlingSuspendCount:Number = 0; private static var eventsForEffectTriggers:Object = {}; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("effects", ApplicationDomain.currentDomain); private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{ var _local3:Effect; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Array; var _local9:String; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:EffectInstance; _local3 = createEffectForType(_arg2, _arg1.type); if (!_local3){ return; }; if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){ throw (new Error(resourceIncorrectTrigger)); }; if (_arg2.initialized == false){ _local9 = _arg1.type; if ((((((((((_local9 == MoveEvent.MOVE)) || ((_local9 == ResizeEvent.RESIZE)))) || ((_local9 == FlexEvent.SHOW)))) || ((_local9 == FlexEvent.HIDE)))) || ((_local9 == Event.CHANGE)))){ _local3 = null; return; }; }; if ((_local3.target is IUIComponent)){ _local10 = IUIComponent(_local3.target).tweeningProperties; if (((_local10) && ((_local10.length > 0)))){ _local11 = _local3.getAffectedProperties(); _local4 = _local10.length; _local6 = _local11.length; _local5 = 0; while (_local5 < _local4) { _local7 = 0; while (_local7 < _local6) { if (_local10[_local5] == _local11[_local7]){ _local3 = null; return; }; _local7++; }; _local5++; }; }; }; if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){ _local12 = _local3.getAffectedProperties(); _local5 = 0; while (_local5 < _local12.length) { _local13 = _local3.target.getEffectsForProperty(_local12[_local5]); if (_local13.length > 0){ if (_arg1.type == ResizeEvent.RESIZE){ return; }; _local7 = 0; while (_local7 < _local13.length) { _local14 = _local13[_local7]; if ((((_arg1.type == FlexEvent.SHOW)) && (_local14.hideOnEffectEnd))){ _local14.target.removeEventListener(FlexEvent.SHOW, _local14.eventHandler); _local14.hideOnEffectEnd = false; }; _local14.end(); _local7++; }; }; _local5++; }; }; _local3.initEvent = _arg1; _local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler); lastEffectCreated = _local3; _local8 = _local3.play(); _local4 = _local8.length; _local5 = 0; while (_local5 < _local4) { effectsPlaying.push(new EffectNode(_local3, _local8[_local5])); _local5++; }; if (_local3.suspendBackgroundProcessing){ UIComponent.suspendBackgroundProcessing(); }; } public static function suspendEventHandling():void{ eventHandlingSuspendCount++; } mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{ var _local3:Number; if (_arg1 != ""){ if (_arg2 == ""){ _local3 = _arg1.length; if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){ _arg2 = _arg1.substring(0, (_local3 - 6)); }; }; if (_arg2 != ""){ effectTriggersForEvent[_arg2] = _arg1; eventsForEffectTriggers[_arg1] = _arg2; }; }; } private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{ suspendEventHandling(); _arg2.addChildAt(_arg1, _arg3); resumeEventHandling(); createAndPlayEffect(_arg4, _arg1); } mx_internal static function endVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, false); } public static function endEffectsForTarget(_arg1:IUIComponent):void{ var _local2:int; var _local3:int; var _local4:EffectInstance; _local2 = effectsPlaying.length; _local3 = (_local2 - 1); while (_local3 >= 0) { _local4 = effectsPlaying[_local3].instance; if (_local4.target == _arg1){ _local4.end(); }; _local3--; }; } private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:int; var _local5:int; var _local6:Object; _local6 = null; _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ _local6 = targetsInfo[_local5]; break; }; _local5++; }; if (!_local6){ _local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0}; targetsInfo.push(_local6); }; if (_arg2){ if (_arg3){ _local6.bitmapEffectsCount++; if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; } else { if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){ _arg1.cacheAsBitmap = false; }; }; } else { if (_arg3){ if (_local6.bitmapEffectsCount != 0){ _local6.bitmapEffectsCount--; }; if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false; }; } else { if (_local6.vectorEffectsCount != 0){ if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){ _local4 = _local6.bitmapEffectsCount; _local5 = 0; while (_local5 < _local4) { if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; _local5++; }; }; }; }; if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){ _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ targetsInfo.splice(_local5, 1); break; }; _local5++; }; }; }; } mx_internal static function eventHandler(_arg1:Event):void{ var _local2:FocusEvent; var _local3:DisplayObject; var _local4:int; var _local5:DisplayObjectContainer; var _local6:int; if (!(_arg1.currentTarget is IFlexDisplayObject)){ return; }; if (eventHandlingSuspendCount > 0){ return; }; if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){ _local2 = FocusEvent(_arg1); if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){ return; }; }; if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){ return; }; if (_arg1.type == Event.REMOVED){ if ((_arg1.target is UIComponent)){ if (UIComponent(_arg1.target).initialized == false){ return; }; if (UIComponent(_arg1.target).isEffectStarted){ _local4 = 0; while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) { if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){ return; }; _local4++; }; }; }; _local3 = (_arg1.target as DisplayObject); if (_local3 != null){ _local5 = (_local3.parent as DisplayObjectContainer); if (_local5 != null){ _local6 = _local5.getChildIndex(_local3); if (_local6 >= 0){ if ((_local3 is UIComponent)){ UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]); }; }; }; }; } else { createAndPlayEffect(_arg1, _arg1.currentTarget); }; } mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, true); } private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{ var _local4:Array; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; var _local9:int; if (_arg1.target == _arg3.target){ _local4 = _arg1.getAffectedProperties(); _local5 = _arg2.getAffectedProperties(); _local6 = _local4.length; _local7 = _local5.length; _local8 = 0; while (_local8 < _local6) { _local9 = 0; while (_local9 < _local7) { if (_local4[_local8] == _local5[_local9]){ return (true); }; _local9++; }; _local8++; }; }; return (false); } private static function loadResources():void{ resourceIncorrectTrigger = packageResources.getString("incorrectTrigger"); } mx_internal static function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance; var _local3:int; var _local4:int; var _local5:DisplayObject; var _local6:DisplayObjectContainer; _local2 = _arg1.effectInstance; _local3 = effectsPlaying.length; _local4 = (_local3 - 1); while (_local4 >= 0) { if (effectsPlaying[_local4].instance == _local2){ effectsPlaying.splice(_local4, 1); break; }; _local4--; }; if (Object(_local2).hideOnEffectEnd == true){ _local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler); _local2.target.setVisible(false, true); }; if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){ _local5 = (_local2.target as DisplayObject); if (_local5 != null){ _local6 = (_local5.parent as DisplayObjectContainer); if (_local6 != null){ suspendEventHandling(); _local6.removeChild(_local5); resumeEventHandling(); }; }; }; if (_local2.suspendBackgroundProcessing){ UIComponent.resumeBackgroundProcessing(); }; } mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, true); } mx_internal static function setStyle(_arg1:String, _arg2):void{ var _local3:String; _local3 = eventsForEffectTriggers[_arg1]; if (((!((_local3 == null))) && (!((_local3 == ""))))){ _arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT); }; } mx_internal static function getEventForEffectTrigger(_arg1:String):String{ var effectTrigger = _arg1; if (eventsForEffectTriggers){ try { return (eventsForEffectTriggers[effectTrigger]); } catch(e:Error) { return (""); }; }; return (""); } mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{ var trigger:String; var value:Object; var effectClass:Class; var cls:Class; var effectObj:Effect; var doc:Object; var target = _arg1; var type = _arg2; trigger = effectTriggersForEvent[type]; if (trigger == ""){ trigger = (type + "Effect"); }; value = target.getStyle(trigger); if (!value){ return (null); }; if ((value is Class)){ cls = Class(value); return (new cls(target)); }; try { if ((value is String)){ doc = target.parentDocument; if (!doc){ doc = Application.application; }; effectObj = doc[value]; } else { if ((value is Effect)){ effectObj = Effect(value); }; }; if (effectObj){ effectObj.target = target; return (effectObj); }; } catch(e:Error) { }; effectClass = Class(target.systemManager.getDefinitionByName(("mx.effects." + value))); if (effectClass){ return (new effectClass(target)); }; return (null); } public static function resumeEventHandling():void{ eventHandlingSuspendCount--; } mx_internal static function startVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, false); } loadResources(); } }//package mx.effects class EffectNode { public var instance:EffectInstance; public var factory:Effect; private function EffectNode(_arg1:Effect, _arg2:EffectInstance){ this.factory = _arg1; this.instance = _arg2; } }
Section 190
//EffectTargetFilter (mx.effects.EffectTargetFilter) package mx.effects { import mx.effects.effectClasses.*; public class EffectTargetFilter { public var filterFunction:Function; public var filterStyles:Array; public var filterProperties:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function EffectTargetFilter(){ filterFunction = defaultFilterFunction; filterProperties = []; filterStyles = []; super(); } protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; var _local6:Array; var _local7:int; var _local8:int; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ _local6 = filterProperties.concat(filterStyles); _local7 = _local6.length; _local8 = 0; while (_local8 < _local7) { if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){ return (true); }; _local8++; }; }; _local4++; }; return (false); } } }//package mx.effects
Section 191
//Fade (mx.effects.Fade) package mx.effects { import mx.effects.effectClasses.*; public class Fade extends TweenEffect { public var alphaFrom:Number; public var alphaTo:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var AFFECTED_PROPERTIES:Array = ["alpha", "visible"]; public function Fade(_arg1:Object=null){ super(_arg1); instanceClass = FadeInstance; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:FadeInstance; super.initInstance(_arg1); _local2 = FadeInstance(_arg1); _local2.alphaFrom = alphaFrom; _local2.alphaTo = alphaTo; } } }//package mx.effects
Section 192
//IEffectInstance (mx.effects.IEffectInstance) package mx.effects { import flash.events.*; import mx.effects.effectClasses.*; public interface IEffectInstance { function set startDelay(_arg1:int):void; function set triggerEvent(_arg1:Event):void; function get playheadTime():Number; function get triggerEvent():Event; function finishEffect():void; function finishRepeat():void; function initEffect(_arg1:Event):void; function get effect():Effect; function startEffect():void; function get duration():Number; function set repeatDelay(_arg1:int):void; function get target():Object; function get startDelay():int; function end():void; function set propertyChanges(_arg1:PropertyChanges):void; function set effect(_arg1:Effect):void; function get className():String; function get repeatDelay():int; function set target(_arg1:Object):void; function resume():void; function get propertyChanges():PropertyChanges; function set duration(_arg1:Number):void; function reverse():void; function get repeatCount():int; function pause():void; function set repeatCount(_arg1:int):void; function set suspendBackgroundProcessing(_arg1:Boolean):void; function play():void; function get suspendBackgroundProcessing():Boolean; } }//package mx.effects
Section 193
//Move (mx.effects.Move) package mx.effects { import mx.effects.effectClasses.*; public class Move extends TweenEffect { public var xTo:Number; public var yBy:Number; public var xFrom:Number; public var yFrom:Number; public var yTo:Number; public var xBy:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var AFFECTED_PROPERTIES:Array = ["x", "y"]; public function Move(_arg1:Object=null){ super(_arg1); instanceClass = MoveInstance; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:MoveInstance; super.initInstance(_arg1); _local2 = MoveInstance(_arg1); _local2.xFrom = xFrom; _local2.xTo = xTo; _local2.xBy = xBy; _local2.yFrom = yFrom; _local2.yTo = yTo; _local2.yBy = yBy; } } }//package mx.effects
Section 194
//Parallel (mx.effects.Parallel) package mx.effects { import mx.effects.effectClasses.*; public class Parallel extends CompositeEffect { mx_internal static const VERSION:String = "2.0.1.0"; public function Parallel(_arg1:Object=null){ super(_arg1); instanceClass = ParallelInstance; } } }//package mx.effects
Section 195
//Tween (mx.effects.Tween) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import flash.utils.*; public class Tween extends EventDispatcher { private var started:Boolean;// = false public var duration:Number;// = 3000 private var id:int; private var arrayMode:Boolean; private var _isPlaying:Boolean;// = true private var startValue:Object; public var listener:Object; private var userEquation:Function; private var previousUpdateTime:Number; mx_internal var needToLayout:Boolean;// = false private var updateFunction:Function; private var _doSeek:Boolean;// = false mx_internal var startTime:Number; private var endFunction:Function; private var endValue:Object; private var _doReverse:Boolean;// = false private var _playheadTime:Number;// = 0 private var _invertValues:Boolean;// = false private var maxDelay:Number;// = 87.5 mx_internal static const VERSION:String = "2.0.1.0"; private static var timer:Timer = null; private static var interval:Number = 10; private static var activeTweens:Array = []; mx_internal static var intervalTime:Number = NAN; public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){ needToLayout = false; maxDelay = 87.5; _doSeek = false; _isPlaying = true; _doReverse = false; userEquation = defaultEasingFunction; started = false; duration = 3000; _playheadTime = 0; _invertValues = false; super(); if (!_arg1){ return; }; if ((_arg2 is Array)){ arrayMode = true; }; this.listener = _arg1; this.startValue = _arg2; this.endValue = _arg3; if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){ this.duration = _arg4; }; if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){ maxDelay = (1000 / _arg5); }; if (_arg4 == 0){ endTween(); } else { Tween.addTween(this); }; } public function pause():void{ _isPlaying = false; } mx_internal function get playheadTime():Number{ return (_playheadTime); } mx_internal function get playReversed():Boolean{ return (_invertValues); } public function resume():void{ _isPlaying = true; startTime = (intervalTime - _playheadTime); if (_doReverse){ reverse(); _doReverse = false; }; } public function setTweenHandlers(_arg1:Function, _arg2:Function):void{ this.updateFunction = _arg1; this.endFunction = _arg2; } mx_internal function set playReversed(_arg1:Boolean):void{ _invertValues = _arg1; } public function set easingFunction(_arg1:Function):void{ userEquation = _arg1; } private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2)); } public function endTween():void{ var _local1:TweenEvent; var _local2:Object; _local1 = new TweenEvent(TweenEvent.TWEEN_END); _local2 = getCurrentValue(duration); _local1.value = _local2; dispatchEvent(_local1); if (endFunction != null){ endFunction(_local2); } else { listener.onTweenEnd(_local2); }; Tween.removeTweenAt(id); } public function reverse():void{ if (_isPlaying){ _doReverse = false; seek((duration - _playheadTime)); _invertValues = !(_invertValues); } else { _doReverse = !(_doReverse); }; } mx_internal function doInterval():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Object; var _local4:TweenEvent; var _local5:TweenEvent; _local1 = false; previousUpdateTime = intervalTime; if (((_isPlaying) || (_doSeek))){ _local2 = (intervalTime - startTime); _playheadTime = _local2; _local3 = getCurrentValue(_local2); if ((((_local2 >= duration)) && (!(_doSeek)))){ endTween(); _local1 = true; } else { if (!started){ _local5 = new TweenEvent(TweenEvent.TWEEN_START); dispatchEvent(_local5); started = true; }; _local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE); _local4.value = _local3; dispatchEvent(_local4); if (updateFunction != null){ updateFunction(_local3); } else { listener.onTweenUpdate(_local3); }; }; _doSeek = false; }; return (_local1); } public function seek(_arg1:Number):void{ var _local2:Number; _local2 = intervalTime; previousUpdateTime = _local2; startTime = (_local2 - _arg1); _doSeek = true; } mx_internal function getCurrentValue(_arg1:Number):Object{ var _local2:Array; var _local3:int; var _local4:int; if (duration == 0){ return (endValue); }; if (_invertValues){ _arg1 = (duration - _arg1); }; if (arrayMode){ _local2 = []; _local3 = startValue.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration); _local4++; }; return (_local2); //unresolved jump }; return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration)); } mx_internal static function removeTween(_arg1:Tween):void{ removeTweenAt(_arg1.id); } private static function addTween(_arg1:Tween):void{ _arg1.id = activeTweens.length; activeTweens.push(_arg1); if (!timer){ timer = new Timer(interval); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); } else { timer.start(); }; if (isNaN(intervalTime)){ intervalTime = getTimer(); }; _arg1.startTime = (_arg1.previousUpdateTime = intervalTime); } private static function timerHandler(_arg1:TimerEvent):void{ var _local2:Boolean; var _local3:Number; var _local4:int; var _local5:int; var _local6:Tween; _local2 = false; _local3 = intervalTime; intervalTime = getTimer(); _local4 = activeTweens.length; _local5 = _local4; while (_local5 >= 0) { _local6 = Tween(activeTweens[_local5]); if (_local6){ _local6.needToLayout = false; _local6.doInterval(); if (_local6.needToLayout){ _local2 = true; }; }; _local5--; }; if (_local2){ UIComponentGlobals.layoutManager.validateNow(); }; _arg1.updateAfterEvent(); } private static function removeTweenAt(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:Tween; if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){ return; }; activeTweens.splice(_arg1, 1); _local2 = activeTweens.length; _local3 = _arg1; while (_local3 < _local2) { _local4 = Tween(activeTweens[_local3]); _local4.id--; _local3++; }; if (_local2 == 0){ intervalTime = NaN; timer.reset(); }; } } }//package mx.effects
Section 196
//TweenEffect (mx.effects.TweenEffect) package mx.effects { import mx.events.*; import flash.events.*; import mx.effects.effectClasses.*; public class TweenEffect extends Effect { public var easingFunction:Function;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function TweenEffect(_arg1:Object=null){ easingFunction = null; super(_arg1); instanceClass = TweenEffectInstance; } override protected function initInstance(_arg1:IEffectInstance):void{ super.initInstance(_arg1); TweenEffectInstance(_arg1).easingFunction = easingFunction; EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); } protected function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } } }//package mx.effects
Section 197
//Zoom (mx.effects.Zoom) package mx.effects { import mx.effects.effectClasses.*; public class Zoom extends TweenEffect { public var originY:Number; public var zoomWidthFrom:Number; public var zoomWidthTo:Number; public var zoomHeightFrom:Number; public var captureRollEvents:Boolean; public var zoomHeightTo:Number; public var originX:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"]; public function Zoom(_arg1:Object=null){ super(_arg1); instanceClass = ZoomInstance; applyActualDimensions = false; relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"]; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:ZoomInstance; super.initInstance(_arg1); _local2 = ZoomInstance(_arg1); _local2.zoomWidthFrom = zoomWidthFrom; _local2.zoomWidthTo = zoomWidthTo; _local2.zoomHeightFrom = zoomHeightFrom; _local2.zoomHeightTo = zoomHeightTo; _local2.originX = originX; _local2.originY = originY; _local2.captureRollEvents = captureRollEvents; } } }//package mx.effects
Section 198
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent) package mx.events { import flash.events.*; import flash.display.*; public class ChildExistenceChangedEvent extends Event { public var relatedObject:DisplayObject; public static const CHILD_REMOVE:String = "childRemove"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OVERLAY_CREATED:String = "overlayCreated"; public static const CHILD_ADD:String = "childAdd"; public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; } override public function clone():Event{ return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject)); } } }//package mx.events
Section 199
//CollectionEvent (mx.events.CollectionEvent) package mx.events { import flash.events.*; public class CollectionEvent extends Event { public var items:Array; public var kind:String; public var location:int; public var oldLocation:int; mx_internal static const VERSION:String = "2.0.1.0"; public static const COLLECTION_CHANGE:String = "collectionChange"; public function CollectionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:int=-1, _arg6:int=-1, _arg7:Array=null){ super(_arg1, _arg2, _arg3); this.kind = _arg4; this.location = _arg5; this.oldLocation = _arg6; this.items = (_arg7) ? _arg7 : []; } override public function clone():Event{ return (new CollectionEvent(type, bubbles, cancelable, kind, location, oldLocation, items)); } override public function toString():String{ return (formatToString("CollectionEvent", "kind", "location", "oldLocation", "type", "bubbles", "cancelable", "eventPhase")); } } }//package mx.events
Section 200
//CollectionEventKind (mx.events.CollectionEventKind) package mx.events { public final class CollectionEventKind { public static const ADD:String = "add"; public static const REMOVE:String = "remove"; public static const UPDATE:String = "update"; public static const MOVE:String = "move"; mx_internal static const EXPAND:String = "expand"; public static const REPLACE:String = "replace"; mx_internal static const VERSION:String = "2.0.1.0"; public static const REFRESH:String = "refresh"; public static const RESET:String = "reset"; } }//package mx.events
Section 201
//DataGridEvent (mx.events.DataGridEvent) package mx.events { import flash.events.*; import mx.controls.listClasses.*; public class DataGridEvent extends Event { public var reason:String; public var localX:Number; public var rowIndex:int; public var columnIndex:int; public var dataField:String; public var itemRenderer:IListItemRenderer; public static const ITEM_EDIT_BEGIN:String = "itemEditBegin"; public static const ITEM_EDIT_END:String = "itemEditEnd"; public static const ITEM_EDIT_BEGINNING:String = "itemEditBeginning"; public static const HEADER_RELEASE:String = "headerRelease"; mx_internal static const VERSION:String = "2.0.1.0"; public static const ITEM_FOCUS_OUT:String = "itemFocusOut"; public static const COLUMN_STRETCH:String = "columnStretch"; public static const ITEM_FOCUS_IN:String = "itemFocusIn"; public function DataGridEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:String=null, _arg6:int=-1, _arg7:String=null, _arg8:IListItemRenderer=null, _arg9:Number=NaN){ super(_arg1, _arg2, _arg3); this.columnIndex = _arg4; this.dataField = _arg5; this.rowIndex = _arg6; this.reason = _arg7; this.itemRenderer = _arg8; this.localX = _arg9; } override public function clone():Event{ return (new DataGridEvent(type, bubbles, cancelable, columnIndex, dataField, rowIndex, reason, itemRenderer, localX)); } } }//package mx.events
Section 202
//DataGridEventReason (mx.events.DataGridEventReason) package mx.events { public final class DataGridEventReason { public static const OTHER:String = "other"; public static const CANCELLED:String = "cancelled"; public static const NEW_COLUMN:String = "newColumn"; mx_internal static const VERSION:String = "2.0.1.0"; public static const NEW_ROW:String = "newRow"; } }//package mx.events
Section 203
//DragEvent (mx.events.DragEvent) package mx.events { import mx.core.*; import flash.events.*; public class DragEvent extends MouseEvent { public var action:String; public var draggedItem:Object; public var dragSource:DragSource; public var dragInitiator:IUIComponent; public static const DRAG_DROP:String = "dragDrop"; public static const DRAG_COMPLETE:String = "dragComplete"; public static const DRAG_EXIT:String = "dragExit"; public static const DRAG_ENTER:String = "dragEnter"; public static const DRAG_START:String = "dragStart"; mx_internal static const VERSION:String = "2.0.1.0"; public static const DRAG_OVER:String = "dragOver"; public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){ super(_arg1, _arg2, _arg3); this.dragInitiator = _arg4; this.dragSource = _arg5; this.action = _arg6; this.ctrlKey = _arg7; this.altKey = _arg8; this.shiftKey = _arg9; } override public function clone():Event{ var _local1:DragEvent; _local1 = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey); _local1.relatedObject = this.relatedObject; _local1.localX = this.localX; _local1.localY = this.localY; return (_local1); } } }//package mx.events
Section 204
//DropdownEvent (mx.events.DropdownEvent) package mx.events { import flash.events.*; public class DropdownEvent extends Event { public var triggerEvent:Event; mx_internal static const VERSION:String = "2.0.1.0"; public static const OPEN:String = "open"; public static const CLOSE:String = "close"; public function DropdownEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Event=null){ super(_arg1, _arg2, _arg3); this.triggerEvent = _arg4; } override public function clone():Event{ return (new DropdownEvent(type, bubbles, cancelable, triggerEvent)); } } }//package mx.events
Section 205
//DynamicEvent (mx.events.DynamicEvent) package mx.events { import flash.events.*; public dynamic class DynamicEvent extends Event { mx_internal static const VERSION:String = "2.0.1.0"; public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new DynamicEvent(type, bubbles, cancelable)); } } }//package mx.events
Section 206
//EffectEvent (mx.events.EffectEvent) package mx.events { import flash.events.*; import mx.effects.*; public class EffectEvent extends Event { public var effectInstance:IEffectInstance; public static const EFFECT_START:String = "effectStart"; mx_internal static const VERSION:String = "2.0.1.0"; public static const EFFECT_END:String = "effectEnd"; public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){ super(_arg1, _arg2, _arg3); this.effectInstance = _arg4; } override public function clone():Event{ return (new EffectEvent(type, bubbles, cancelable, effectInstance)); } } }//package mx.events
Section 207
//FlexEvent (mx.events.FlexEvent) package mx.events { import mx.core.*; import flash.events.*; public class FlexEvent extends Event { public static const ADD:String = "add"; public static const TRANSFORM_CHANGE:String = "transformChange"; public static const INIT_COMPLETE:String = "initComplete"; public static const REMOVE:String = "remove"; public static const BUTTON_DOWN:String = "buttonDown"; public static const EXIT_STATE:String = "exitState"; public static const CREATION_COMPLETE:String = "creationComplete"; public static const REPEAT:String = "repeat"; public static const LOADING:String = "loading"; public static const REPEAT_START:String = "repeatStart"; public static const INITIALIZE:String = "initialize"; public static const ENTER_STATE:String = "enterState"; public static const URL_CHANGED:String = "urlChanged"; public static const REPEAT_END:String = "repeatEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const HIDE:String = "hide"; public static const ENTER:String = "enter"; public static const PRELOADER_DONE:String = "preloaderDone"; public static const CURSOR_UPDATE:String = "cursorUpdate"; public static const PREINITIALIZE:String = "preinitialize"; public static const INVALID:String = "invalid"; public static const IDLE:String = "idle"; public static const VALID:String = "valid"; public static const DATA_CHANGE:String = "dataChange"; public static const APPLICATION_COMPLETE:String = "applicationComplete"; public static const VALUE_COMMIT:String = "valueCommit"; public static const UPDATE_COMPLETE:String = "updateComplete"; public static const INIT_PROGRESS:String = "initProgress"; public static const SHOW:String = "show"; public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new FlexEvent(type, bubbles, cancelable)); } } }//package mx.events
Section 208
//FlexMouseEvent (mx.events.FlexMouseEvent) package mx.events { import flash.events.*; import flash.display.*; public class FlexMouseEvent extends MouseEvent { public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside"; public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside"; mx_internal static const VERSION:String = "2.0.1.0"; public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11); } override public function clone():Event{ return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta)); } } }//package mx.events
Section 209
//IndexChangedEvent (mx.events.IndexChangedEvent) package mx.events { import flash.events.*; import flash.display.*; public class IndexChangedEvent extends Event { public var triggerEvent:Event; public var relatedObject:DisplayObject; public var newIndex:Number; public var oldIndex:Number; public static const HEADER_SHIFT:String = "headerShift"; public static const CHANGE:String = "change"; mx_internal static const VERSION:String = "2.0.1.0"; public static const CHILD_INDEX_CHANGE:String = "childIndexChange"; public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; this.oldIndex = _arg5; this.newIndex = _arg6; this.triggerEvent = _arg7; } override public function clone():Event{ return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent)); } } }//package mx.events
Section 210
//ItemClickEvent (mx.events.ItemClickEvent) package mx.events { import flash.events.*; import flash.display.*; public class ItemClickEvent extends Event { public var relatedObject:InteractiveObject; public var index:int; public var item:Object; public var label:String; mx_internal static const VERSION:String = "2.0.1.0"; public static const ITEM_CLICK:String = "itemClick"; public function ItemClickEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:int=-1, _arg6:InteractiveObject=null, _arg7:Object=null){ super(_arg1, _arg2, _arg3); this.label = _arg4; this.index = _arg5; this.relatedObject = _arg6; this.item = _arg7; } override public function clone():Event{ return (new ItemClickEvent(type, bubbles, cancelable, label, index, relatedObject, item)); } } }//package mx.events
Section 211
//ListEvent (mx.events.ListEvent) package mx.events { import flash.events.*; import mx.controls.listClasses.*; public class ListEvent extends Event { public var reason:String; public var rowIndex:int; public var columnIndex:int; public var itemRenderer:IListItemRenderer; public static const ITEM_ROLL_OUT:String = "itemRollOut"; public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; public static const ITEM_EDIT_BEGIN:String = "itemEditBegin"; public static const ITEM_ROLL_OVER:String = "itemRollOver"; public static const ITEM_EDIT_END:String = "itemEditEnd"; public static const ITEM_EDIT_BEGINNING:String = "itemEditBeginning"; public static const CHANGE:String = "change"; mx_internal static const VERSION:String = "2.0.1.0"; public static const ITEM_FOCUS_OUT:String = "itemFocusOut"; public static const ITEM_CLICK:String = "itemClick"; public static const ITEM_FOCUS_IN:String = "itemFocusIn"; public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:String=null, _arg7:IListItemRenderer=null){ super(_arg1, _arg2, _arg3); this.columnIndex = _arg4; this.rowIndex = _arg5; this.reason = _arg6; this.itemRenderer = _arg7; } override public function clone():Event{ return (new ListEvent(type, bubbles, cancelable, columnIndex, rowIndex, reason, itemRenderer)); } } }//package mx.events
Section 212
//ListEventReason (mx.events.ListEventReason) package mx.events { public final class ListEventReason { public static const OTHER:String = "other"; public static const CANCELLED:String = "cancelled"; mx_internal static const VERSION:String = "2.0.1.0"; public static const NEW_ROW:String = "newRow"; } }//package mx.events
Section 213
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import mx.core.*; import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "2.0.1.0"; public static var READY:String = "ready"; public static var ERROR:String = "error"; public static var PROGRESS:String = "progress"; public static var SETUP:String = "setup"; public static var UNLOAD:String = "unload"; public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } public function get module():IModuleInfo{ return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 214
//MoveEvent (mx.events.MoveEvent) package mx.events { import flash.events.*; public class MoveEvent extends Event { public var oldY:Number; public var oldX:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static const MOVE:String = "move"; public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldX = _arg4; this.oldY = _arg5; } override public function clone():Event{ return (new MoveEvent(type, bubbles, cancelable, oldX, oldY)); } } }//package mx.events
Section 215
//NumericStepperEvent (mx.events.NumericStepperEvent) package mx.events { import flash.events.*; public class NumericStepperEvent extends Event { public var value:Number; public var triggerEvent:Event; mx_internal static const VERSION:String = "2.0.1.0"; public static const CHANGE:String = "change"; public function NumericStepperEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Event=null){ super(_arg1, _arg2, _arg3); this.value = _arg4; this.triggerEvent = _arg5; } override public function clone():Event{ return (new NumericStepperEvent(type, bubbles, cancelable, value)); } } }//package mx.events
Section 216
//PropertyChangeEvent (mx.events.PropertyChangeEvent) package mx.events { import flash.events.*; public class PropertyChangeEvent extends Event { public var oldValue:Object; public var property:Object; public var source:Object; public var kind:String; public var newValue:Object; mx_internal static const VERSION:String = "2.0.1.0"; public static const PROPERTY_CHANGE:String = "propertyChange"; public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){ super(_arg1, _arg2, _arg3); this.kind = _arg4; this.property = _arg5; this.oldValue = _arg6; this.newValue = _arg7; this.source = _arg8; } override public function clone():Event{ return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source)); } public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{ var _local5:PropertyChangeEvent; _local5 = new PropertyChangeEvent(PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.UPDATE; _local5.oldValue = _arg3; _local5.newValue = _arg4; _local5.source = _arg1; _local5.property = _arg2; return (_local5); } } }//package mx.events
Section 217
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind) package mx.events { public final class PropertyChangeEventKind { mx_internal static const VERSION:String = "2.0.1.0"; public static const UPDATE:String = "update"; public static const DELETE:String = "delete"; } }//package mx.events
Section 218
//ResizeEvent (mx.events.ResizeEvent) package mx.events { import flash.events.*; public class ResizeEvent extends Event { public var oldHeight:Number; public var oldWidth:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static const RESIZE:String = "resize"; public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldWidth = _arg4; this.oldHeight = _arg5; } override public function clone():Event{ return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight)); } } }//package mx.events
Section 219
//RSLEvent (mx.events.RSLEvent) package mx.events { import mx.core.*; import flash.events.*; import flash.net.*; public class RSLEvent extends ProgressEvent { public var errorText:String; public var rslIndex:int; public var rslTotal:int; public var url:URLRequest; public static const RSL_PROGRESS:String = "rslProgress"; public static const RSL_ERROR:String = "rslError"; mx_internal static const VERSION:String = "2.0.1.0"; public static const RSL_COMPLETE:String = "rslComplete"; public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.rslIndex = _arg6; this.rslTotal = _arg7; this.url = _arg8; this.errorText = _arg9; } override public function clone():Event{ return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText)); } } }//package mx.events
Section 220
//ScrollEvent (mx.events.ScrollEvent) package mx.events { import flash.events.*; public class ScrollEvent extends Event { public var detail:String; public var position:Number; public var delta:Number; public var direction:String; mx_internal static const VERSION:String = "2.0.1.0"; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){ super(_arg1, _arg2, _arg3); this.detail = _arg4; this.position = _arg5; this.direction = _arg6; this.delta = _arg7; } override public function clone():Event{ return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta)); } } }//package mx.events
Section 221
//ScrollEventDetail (mx.events.ScrollEventDetail) package mx.events { public final class ScrollEventDetail { public static const LINE_UP:String = "lineUp"; public static const AT_RIGHT:String = "atRight"; public static const PAGE_UP:String = "pageUp"; public static const LINE_DOWN:String = "lineDown"; public static const PAGE_DOWN:String = "pageDown"; public static const AT_LEFT:String = "atLeft"; public static const PAGE_RIGHT:String = "pageRight"; public static const THUMB_POSITION:String = "thumbPosition"; public static const AT_TOP:String = "atTop"; public static const LINE_LEFT:String = "lineLeft"; public static const AT_BOTTOM:String = "atBottom"; public static const LINE_RIGHT:String = "lineRight"; public static const THUMB_TRACK:String = "thumbTrack"; public static const PAGE_LEFT:String = "pageLeft"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.events
Section 222
//ScrollEventDirection (mx.events.ScrollEventDirection) package mx.events { public final class ScrollEventDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.events
Section 223
//StateChangeEvent (mx.events.StateChangeEvent) package mx.events { import flash.events.*; public class StateChangeEvent extends Event { public var oldState:String; public var newState:String; public static const CURRENT_STATE_CHANGING:String = "currentStateChanging"; public static const CURRENT_STATE_CHANGE:String = "currentStateChange"; mx_internal static const VERSION:String = "2.0.1.0"; public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){ super(_arg1, _arg2, _arg3); this.oldState = _arg4; this.newState = _arg5; } override public function clone():Event{ return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState)); } } }//package mx.events
Section 224
//StyleEvent (mx.events.StyleEvent) package mx.events { import mx.core.*; import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "2.0.1.0"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 225
//ToolTipEvent (mx.events.ToolTipEvent) package mx.events { import mx.core.*; import flash.events.*; public class ToolTipEvent extends Event { public var toolTip:IToolTip; public static const TOOL_TIP_SHOWN:String = "toolTipShown"; public static const TOOL_TIP_CREATE:String = "toolTipCreate"; public static const TOOL_TIP_SHOW:String = "toolTipShow"; public static const TOOL_TIP_HIDE:String = "toolTipHide"; public static const TOOL_TIP_END:String = "toolTipEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const TOOL_TIP_START:String = "toolTipStart"; public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){ super(_arg1, _arg2, _arg3); this.toolTip = _arg4; } override public function clone():Event{ return (new ToolTipEvent(type, bubbles, cancelable, toolTip)); } } }//package mx.events
Section 226
//TweenEvent (mx.events.TweenEvent) package mx.events { import flash.events.*; public class TweenEvent extends Event { public var value:Object; public static const TWEEN_END:String = "tweenEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const TWEEN_UPDATE:String = "tweenUpdate"; public static const TWEEN_START:String = "tweenStart"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ super(_arg1, _arg2, _arg3); this.value = _arg4; } override public function clone():Event{ return (new TweenEvent(type, bubbles, cancelable, value)); } } }//package mx.events
Section 227
//ValidationResultEvent (mx.events.ValidationResultEvent) package mx.events { import flash.events.*; public class ValidationResultEvent extends Event { public var results:Array; public var field:String; public static const INVALID:String = "invalid"; mx_internal static const VERSION:String = "2.0.1.0"; public static const VALID:String = "valid"; public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){ super(_arg1, _arg2, _arg3); this.field = _arg4; this.results = _arg5; } public function get message():String{ var _local1:String; var _local2:int; var _local3:int; _local1 = ""; _local2 = results.length; _local3 = 0; while (_local3 < _local2) { if (results[_local3].isError){ _local1 = (_local1 + ((_local1 == "")) ? "" : "\n"); _local1 = (_local1 + results[_local3].errorMessage); }; _local3++; }; return (_local1); } override public function clone():Event{ return (new ValidationResultEvent(type, bubbles, cancelable, field, results)); } } }//package mx.events
Section 228
//GeneratedLocale (mx.generated.GeneratedLocale) package mx.generated { import mx.resources.*; public class GeneratedLocale extends Locale { public function GeneratedLocale(){ super("en_US"); } } }//package mx.generated
Section 229
//GradientBase (mx.graphics.GradientBase) package mx.graphics { import mx.graphics.*; class GradientBase { private var _entries:Array; public var gstops:Object; function GradientBase(){ _entries = []; super(); } public function get entries():Array{ return (_entries); } private function updateGStops():void{ var _local1:Array; var _local2:Array; var _local3:Array; var _local4:Number; var _local5:int; var _local6:int; var _local7:GradientEntry; var _local8:int; var _local9:Number; var _local10:Number; var _local11:int; if (!_entries){ return; }; _local1 = []; _local2 = []; _local3 = []; _local4 = 0xFF; _local6 = _entries.length; _local5 = 0; while (_local5 < _local6) { _local7 = _entries[_local5]; _local1.push(_local7.color); _local3.push(_local7.alpha); _local2.push((_local7.ratio * _local4)); _local5++; }; if (isNaN(_local2[0])){ _local2[0] = 0; }; if (isNaN(_local2[(_local6 - 1)])){ _local2[(_local6 - 1)] = 0xFF; }; _local5 = 1; while (true) { while ((((_local5 < _local6)) && (!(isNaN(_local2[_local5]))))) { _local5++; }; if (_local5 == _local6){ break; }; _local8 = (_local5 - 1); while ((((_local5 < _local6)) && (isNaN(_local2[_local5])))) { _local5++; }; _local9 = _local2[_local8]; _local10 = _local2[_local5]; _local11 = 1; while (_local11 < (_local5 - _local8)) { _local2[_local11] = (_local9 + ((_local11 * (_local10 - _local9)) / (_local5 - _local8))); _local11++; }; }; gstops = {colors:_local1, ratios:_local2, alphas:_local3}; } public function set entries(_arg1:Array):void{ _entries = _arg1; gstops = null; updateGStops(); } } }//package mx.graphics
Section 230
//GradientEntry (mx.graphics.GradientEntry) package mx.graphics { public class GradientEntry { public var color:uint; public var ratio:Number; public var alpha:Number;// = 1 mx_internal static const VERSION:String = "2.0.1.0"; public function GradientEntry(_arg1:uint=0, _arg2:Number=-1, _arg3:Number=1){ alpha = 1; super(); this.color = _arg1; if (_arg2 >= 0){ this.ratio = _arg2; }; this.alpha = _arg3; } } }//package mx.graphics
Section 231
//IFill (mx.graphics.IFill) package mx.graphics { import flash.display.*; import flash.geom.*; public interface IFill { function begin(_arg1:Graphics, _arg2:Rectangle):void; function end(_arg1:Graphics):void; } }//package mx.graphics
Section 232
//IStroke (mx.graphics.IStroke) package mx.graphics { import flash.display.*; public interface IStroke { function set weight(_arg1:Number):void; function get weight():Number; function apply(_arg1:Graphics):void; } }//package mx.graphics
Section 233
//LinearGradient (mx.graphics.LinearGradient) package mx.graphics { import flash.display.*; import flash.geom.*; public class LinearGradient extends GradientBase implements IFill { private var matrix:Matrix; private var _rotation:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function LinearGradient(){ matrix = new Matrix(); _rotation = 0; super(); } public function set angle(_arg1:Number):void{ _rotation = ((_arg1 / 180) * Math.PI); } public function begin(_arg1:Graphics, _arg2:Rectangle):void{ var _local3:Object; if (gstops == null){ return; }; matrix.createGradientBox(_arg2.width, _arg2.height, _rotation, _arg2.left, _arg2.top); _local3 = gstops; _arg1.beginGradientFill(GradientType.LINEAR, _local3.colors, _local3.alphas, _local3.ratios, matrix); } public function get angle():Number{ return (((_rotation / Math.PI) * 180)); } public function end(_arg1:Graphics):void{ _arg1.endFill(); } } }//package mx.graphics
Section 234
//LinearGradientStroke (mx.graphics.LinearGradientStroke) package mx.graphics { import flash.display.*; public class LinearGradientStroke extends GradientBase implements IStroke { public var scaleMode:String;// = "normal" public var pixelHinting:Boolean;// = false private var _weight:Number; private var _rotation:Number;// = 0 public var caps:String;// = null public var interpolationMethod:String;// = "rgb" public var joints:String;// = null public var spreadMethod:String;// = "pad" public var miterLimit:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function LinearGradientStroke(_arg1:Number=0, _arg2:Boolean=false, _arg3:String="normal", _arg4:String=null, _arg5:String=null, _arg6:Number=0){ _rotation = 0; caps = null; interpolationMethod = "rgb"; joints = null; miterLimit = 0; pixelHinting = false; scaleMode = "normal"; spreadMethod = "pad"; super(); this.weight = _arg1; this.pixelHinting = _arg2; this.scaleMode = _arg3; this.caps = _arg4; this.joints = _arg5; this.miterLimit = _arg6; } public function get angle():Number{ return (((_rotation / Math.PI) * 180)); } public function set angle(_arg1:Number):void{ _rotation = ((_arg1 / 180) * Math.PI); } public function set weight(_arg1:Number):void{ _weight = _arg1; } public function apply(_arg1:Graphics):void{ _arg1.lineStyle(weight, 0, 1, pixelHinting, scaleMode, caps, joints, miterLimit); _arg1.lineGradientStyle(GradientType.LINEAR, gstops.colors, gstops.alphas, gstops.ratios, null, spreadMethod, interpolationMethod); } public function get weight():Number{ return (_weight); } } }//package mx.graphics
Section 235
//RadialGradient (mx.graphics.RadialGradient) package mx.graphics { import flash.display.*; import flash.geom.*; public class RadialGradient extends GradientBase implements IFill { private var matrix:Matrix; public var focalPointRatio:Number;// = 0 private var _rotation:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function RadialGradient(){ matrix = new Matrix(); _rotation = 0; focalPointRatio = 0; super(); } public function set angle(_arg1:Number):void{ _rotation = ((_arg1 / 180) * Math.PI); } public function begin(_arg1:Graphics, _arg2:Rectangle):void{ if (gstops == null){ return; }; matrix.createGradientBox(_arg2.width, _arg2.height, _rotation, _arg2.left, _arg2.top); _arg1.beginGradientFill(GradientType.RADIAL, gstops.colors, gstops.alphas, gstops.ratios, matrix, null, null, focalPointRatio); } public function get angle():Number{ return (((_rotation / Math.PI) * 180)); } public function end(_arg1:Graphics):void{ _arg1.endFill(); } } }//package mx.graphics
Section 236
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var _trRadius:Number;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function RectangularDropShadow(){ changed = true; _alpha = 0.4; _angle = 45; _color = 0; _distance = 4; _tlRadius = 0; _trRadius = 0; _blRadius = 0; _brRadius = 0; super(); } public function set trRadius(_arg1:Number):void{ if (_trRadius != _arg1){ _trRadius = _arg1; changed = true; }; } public function get blRadius():Number{ return (_blRadius); } public function set brRadius(_arg1:Number):void{ if (_brRadius != _arg1){ _brRadius = _arg1; changed = true; }; } public function set color(_arg1:int):void{ if (_color != _arg1){ _color = _arg1; changed = true; }; } public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:Number; var _local13:Number; var _local14:Matrix; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; if (changed){ createShadowBitmaps(); changed = false; }; _arg4 = Math.ceil(_arg4); _arg5 = Math.ceil(_arg5); _local6 = (leftShadow) ? leftShadow.width : 0; _local7 = (rightShadow) ? rightShadow.width : 0; _local8 = (topShadow) ? topShadow.height : 0; _local9 = (bottomShadow) ? bottomShadow.height : 0; _local10 = (_local6 + _local7); _local11 = (_local8 + _local9); _local12 = ((_arg5 + _local11) / 2); _local13 = ((_arg4 + _local10) / 2); _local14 = new Matrix(); if (((leftShadow) || (topShadow))){ _local15 = Math.min((tlRadius + _local10), _local13); _local16 = Math.min((tlRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16); _arg1.endFill(); }; if (((rightShadow) || (topShadow))){ _local17 = Math.min((trRadius + _local10), _local13); _local18 = Math.min((trRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18); _arg1.endFill(); }; if (((leftShadow) || (bottomShadow))){ _local19 = Math.min((blRadius + _local10), _local13); _local20 = Math.min((blRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20); _arg1.endFill(); }; if (((rightShadow) || (bottomShadow))){ _local21 = Math.min((brRadius + _local10), _local13); _local22 = Math.min((brRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22); _arg1.endFill(); }; if (leftShadow){ _local14.tx = (_arg2 - _local6); _local14.ty = 0; _arg1.beginBitmapFill(leftShadow, _local14); _arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20)); _arg1.endFill(); }; if (rightShadow){ _local14.tx = (_arg2 + _arg4); _local14.ty = 0; _arg1.beginBitmapFill(rightShadow, _local14); _arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22)); _arg1.endFill(); }; if (topShadow){ _local14.tx = 0; _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(topShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8); _arg1.endFill(); }; if (bottomShadow){ _local14.tx = 0; _local14.ty = (_arg3 + _arg5); _arg1.beginBitmapFill(bottomShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9); _arg1.endFill(); }; } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var _local1:Number; var _local2:Number; var _local3:Shape; var _local4:Graphics; var _local5:BitmapData; var _local6:DropShadowFilter; var _local7:Rectangle; var _local8:Rectangle; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Point; var _local14:Rectangle; _local1 = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); _local2 = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((_local1 < 0)) || ((_local2 < 0)))){ return; }; _local3 = new FlexShape(); _local4 = _local3.graphics; _local4.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius); _local4.endFill(); _local5 = new BitmapData(_local1, _local2, true, 0); _local5.draw(_local3, new Matrix()); _local6 = new DropShadowFilter(distance, angle, color, alpha); _local6.knockout = true; _local7 = new Rectangle(0, 0, _local1, _local2); _local8 = _local5.generateFilterRect(_local7, _local6); _local9 = (_local7.left - _local8.left); _local10 = (_local8.right - _local7.right); _local11 = (_local7.top - _local8.top); _local12 = (_local8.bottom - _local7.bottom); shadow = new BitmapData(_local8.width, _local8.height); shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6); _local13 = new Point(0, 0); _local14 = new Rectangle(); if (_local9 > 0){ _local14.x = 0; _local14.y = ((tlRadius + _local11) + _local12); _local14.width = _local9; _local14.height = 1; leftShadow = new BitmapData(_local9, 1); leftShadow.copyPixels(shadow, _local14, _local13); } else { leftShadow = null; }; if (_local10 > 0){ _local14.x = (shadow.width - _local10); _local14.y = ((trRadius + _local11) + _local12); _local14.width = _local10; _local14.height = 1; rightShadow = new BitmapData(_local10, 1); rightShadow.copyPixels(shadow, _local14, _local13); } else { rightShadow = null; }; if (_local11 > 0){ _local14.x = ((tlRadius + _local9) + _local10); _local14.y = 0; _local14.width = 1; _local14.height = _local11; topShadow = new BitmapData(1, _local11); topShadow.copyPixels(shadow, _local14, _local13); } else { topShadow = null; }; if (_local12 > 0){ _local14.x = ((blRadius + _local9) + _local10); _local14.y = (shadow.height - _local12); _local14.width = 1; _local14.height = _local12; bottomShadow = new BitmapData(1, _local12); bottomShadow.copyPixels(shadow, _local14, _local13); } else { bottomShadow = null; }; } public function get brRadius():Number{ return (_brRadius); } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(_arg1:Number):void{ if (_angle != _arg1){ _angle = _arg1; changed = true; }; } public function set tlRadius(_arg1:Number):void{ if (_tlRadius != _arg1){ _tlRadius = _arg1; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(_arg1:Number):void{ if (_distance != _arg1){ _distance = _arg1; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(_arg1:Number):void{ if (_alpha != _arg1){ _alpha = _arg1; changed = true; }; } public function set blRadius(_arg1:Number):void{ if (_blRadius != _arg1){ _blRadius = _arg1; changed = true; }; } } }//package mx.graphics
Section 237
//RoundedRectangle (mx.graphics.RoundedRectangle) package mx.graphics { import flash.geom.*; import mx.core.*; public class RoundedRectangle extends Rectangle { public var cornerRadius:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ cornerRadius = 0; super(_arg1, _arg2, _arg3, _arg4); this.cornerRadius = _arg5; } } }//package mx.graphics
Section 238
//SolidColor (mx.graphics.SolidColor) package mx.graphics { import flash.display.*; import flash.geom.*; public class SolidColor implements IFill { public var color:uint;// = 0 public var alpha:Number;// = 1 mx_internal static const VERSION:String = "2.0.1.0"; public function SolidColor(_arg1:uint=0, _arg2:Number=1){ alpha = 1; color = 0; super(); this.color = _arg1; this.alpha = _arg2; } public function begin(_arg1:Graphics, _arg2:Rectangle):void{ _arg1.beginFill(color, alpha); } public function end(_arg1:Graphics):void{ _arg1.endFill(); } } }//package mx.graphics
Section 239
//Stroke (mx.graphics.Stroke) package mx.graphics { import flash.display.*; public class Stroke implements IStroke { public var scaleMode:String;// = "normal" public var pixelHinting:Boolean;// = false private var _weight:Number; public var alpha:Number; public var caps:String;// = null public var color:uint;// = 0 public var joints:String;// = null public var miterLimit:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function Stroke(_arg1:uint=0, _arg2:Number=0, _arg3:Number=1, _arg4:Boolean=false, _arg5:String="normal", _arg6:String=null, _arg7:String=null, _arg8:Number=0){ caps = null; color = 0; joints = null; miterLimit = 0; pixelHinting = false; scaleMode = "normal"; super(); this.color = _arg1; this._weight = _arg2; this.alpha = _arg3; this.pixelHinting = _arg4; this.scaleMode = _arg5; this.caps = _arg6; this.joints = _arg7; this.miterLimit = _arg8; } public function set weight(_arg1:Number):void{ _weight = _arg1; } public function apply(_arg1:Graphics):void{ _arg1.lineStyle(weight, color, alpha, pixelHinting, scaleMode, caps, joints, miterLimit); } public function get weight():Number{ return (_weight); } } }//package mx.graphics
Section 240
//DragProxy (mx.managers.dragClasses.DragProxy) package mx.managers.dragClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; public class DragProxy extends UIComponent { private var lastMouseEvent:MouseEvent; public var startY:Number; private var lastKeyEvent:KeyboardEvent; public var startX:Number; public var target:IUIComponent;// = null public var yOffset:Number; public var dragSource:DragSource; public var allowMove:Boolean;// = true public var action:String; private var cursorID:int;// = 0 public var xOffset:Number; public var dragInitiator:IUIComponent; private var cursorClass:Class;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function DragProxy(_arg1:IUIComponent, _arg2:DragSource){ var _local3:ISystemManager; cursorClass = null; cursorID = CursorManager.NO_CURSOR; target = null; allowMove = true; super(); this.dragInitiator = _arg1; this.dragSource = _arg2; _local3 = _arg1.systemManager.topLevelSystemManager; _local3.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); _local3.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); _local3.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); _local3.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ checkKeyEvent(_arg1); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ checkKeyEvent(_arg1); } public function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:DragEvent; var _local3:DisplayObject; var _local4:int; var _local5:Point; var _local6:Point; var _local7:Number; var _local8:Number; var _local9:Array; var _local10:DisplayObject; var _local11:int; var _local12:Boolean; var _local13:IUIComponent; lastMouseEvent = _arg1; _local5 = new Point(); _local6 = new Point(_arg1.localX, _arg1.localY); _local6 = DisplayObject(_arg1.target).localToGlobal(_local6); _local6 = DisplayObject(dragInitiator.systemManager.topLevelSystemManager).globalToLocal(_local6); _local7 = _local6.x; _local8 = _local6.y; x = (_local7 - xOffset); y = (_local8 - yOffset); if (!_arg1){ return; }; _local9 = DisplayObjectContainer(dragInitiator.systemManager.topLevelSystemManager).getObjectsUnderPoint(new Point(_local7, _local8)); _local10 = null; _local11 = (_local9.length - 1); while (_local11 >= 0) { _local10 = _local9[_local11]; if (((!((_local10 == this))) && (!(contains(_local10))))){ break; }; _local11--; }; if (target){ _local12 = false; _local13 = target; _local3 = _local10; while (_local3) { if (_local3 == target){ dispatchDragEvent(DragEvent.DRAG_OVER, _arg1, _local3); _local12 = true; break; } else { dispatchDragEvent(DragEvent.DRAG_ENTER, _arg1, _local3); if (target == _local3){ _local12 = false; break; }; }; _local3 = _local3.parent; }; if (!_local12){ dispatchDragEvent(DragEvent.DRAG_EXIT, _arg1, _local13); if (target == _local13){ target = null; }; }; }; if (!target){ action = DragManager.MOVE; _local3 = _local10; while (_local3) { if (_local3 != this){ dispatchDragEvent(DragEvent.DRAG_ENTER, _arg1, _local3); if (target){ break; }; }; _local3 = _local3.parent; }; if (!target){ action = DragManager.NONE; }; }; showFeedback(); } public function checkKeyEvent(_arg1:KeyboardEvent):void{ var _local2:DragEvent; var _local3:Point; if (target){ if (((((lastKeyEvent) && ((_arg1.type == lastKeyEvent.type)))) && ((_arg1.keyCode == lastKeyEvent.keyCode)))){ return; }; lastKeyEvent = _arg1; _local2 = new DragEvent(DragEvent.DRAG_OVER); _local2.dragInitiator = dragInitiator; _local2.dragSource = dragSource; _local2.action = action; _local2.ctrlKey = _arg1.ctrlKey; _local2.altKey = _arg1.altKey; _local2.shiftKey = _arg1.shiftKey; _local3 = new Point(); _local3.x = lastMouseEvent.localX; _local3.y = lastMouseEvent.localY; _local3 = DisplayObject(lastMouseEvent.target).localToGlobal(_local3); _local3 = DisplayObject(target).globalToLocal(_local3); _local2.localX = _local3.x; _local2.localY = _local3.y; target.dispatchEvent(_local2); showFeedback(); }; } public function mouseUpHandler(_arg1:MouseEvent):void{ var _local2:DragEvent; var _local3:ISystemManager; var _local4:Object; var _local5:Point; var _local6:Move; var _local7:Zoom; var _local8:Move; _local3 = dragInitiator.systemManager.topLevelSystemManager; _local3.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); _local3.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); _local3.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler); _local3.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandler); _local4 = automationDelegate; if (((target) && (!((action == DragManager.NONE))))){ _local2 = new DragEvent(DragEvent.DRAG_DROP); _local2.dragInitiator = dragInitiator; _local2.dragSource = dragSource; _local2.action = action; _local2.ctrlKey = _arg1.ctrlKey; _local2.altKey = _arg1.altKey; _local2.shiftKey = _arg1.shiftKey; _local5 = new Point(); _local5.x = lastMouseEvent.localX; _local5.y = lastMouseEvent.localY; _local5 = DisplayObject(lastMouseEvent.target).localToGlobal(_local5); _local5 = DisplayObject(target).globalToLocal(_local5); _local2.localX = _local5.x; _local2.localY = _local5.y; if (_local4){ _local4.recordAutomatableDragDrop(target, _local2); }; target.dispatchEvent(_local2); } else { action = DragManager.NONE; }; if (action == DragManager.NONE){ _local6 = new Move(this); _local6.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _local6.xFrom = x; _local6.yFrom = y; _local6.xTo = startX; _local6.yTo = startY; _local6.duration = 200; _local6.play(); } else { _local7 = new Zoom(this); new Zoom(this).zoomWidthFrom = (_local7.zoomHeightFrom = 1); _local7.zoomWidthTo = (_local7.zoomHeightTo = 0); _local7.duration = 200; _local7.play(); _local8 = new Move(this); _local8.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _local8.xFrom = x; _local8.yFrom = this.y; _local8.xTo = parent.mouseX; _local8.yTo = parent.mouseY; _local8.duration = 200; _local8.play(); }; _local2 = new DragEvent(DragEvent.DRAG_COMPLETE); _local2.dragInitiator = dragInitiator; _local2.dragSource = dragSource; _local2.relatedObject = InteractiveObject(target); _local2.action = action; _local2.ctrlKey = _arg1.ctrlKey; _local2.altKey = _arg1.altKey; _local2.shiftKey = _arg1.shiftKey; dragInitiator.dispatchEvent(_local2); if (((_local4) && ((action == DragManager.NONE)))){ _local4.recordAutomatableDragCancel(dragInitiator, _local2); }; CursorManager.removeCursor(cursorID); cursorID = CursorManager.NO_CURSOR; this.lastMouseEvent = null; } public function showFeedback():void{ var _local1:Class; var _local2:CSSStyleDeclaration; _local1 = cursorClass; _local2 = StyleManager.getStyleDeclaration("DragManager"); if (action == DragManager.COPY){ _local1 = _local2.getStyle("copyCursor"); } else { if (action == DragManager.LINK){ _local1 = _local2.getStyle("linkCursor"); } else { if (action == DragManager.NONE){ _local1 = _local2.getStyle("rejectCursor"); } else { _local1 = _local2.getStyle("moveCursor"); }; }; }; if (_local1 != cursorClass){ cursorClass = _local1; if (cursorID != CursorManager.NO_CURSOR){ CursorManager.removeCursor(cursorID); }; cursorID = CursorManager.setCursor(cursorClass); }; } public function mouseLeaveHandler(_arg1:Event):void{ mouseUpHandler(lastMouseEvent); } private function effectEndHandler(_arg1:EffectEvent):void{ var _local2 = DragManager; _local2.mx_internal::endDrag(); } private function dispatchDragEvent(_arg1:String, _arg2:MouseEvent, _arg3:Object):void{ var _local4:DragEvent; var _local5:Point; _local4 = new DragEvent(_arg1); _local5 = new Point(); _local4.dragInitiator = dragInitiator; _local4.dragSource = dragSource; _local4.action = action; _local4.ctrlKey = _arg2.ctrlKey; _local4.altKey = _arg2.altKey; _local4.shiftKey = _arg2.shiftKey; _local5.x = lastMouseEvent.localX; _local5.y = lastMouseEvent.localY; _local5 = DisplayObject(lastMouseEvent.target).localToGlobal(_local5); _local5 = DisplayObject(_arg3).globalToLocal(_local5); _local4.localX = _local5.x; _local4.localY = _local5.y; _arg3.dispatchEvent(_local4); } override public function initialize():void{ super.initialize(); stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler); if (!getFocus()){ setFocus(); }; } public function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } } }//package mx.managers.dragClasses
Section 241
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue) package mx.managers.layoutClasses { import mx.core.*; import flash.display.*; import mx.managers.*; public class PriorityQueue { private var maxPriority:int;// = -1 private var arrayOfArrays:Array; private var minPriority:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function PriorityQueue(){ arrayOfArrays = []; minPriority = 0; maxPriority = -1; super(); } public function addObject(_arg1:Object, _arg2:int):void{ if (!arrayOfArrays[_arg2]){ arrayOfArrays[_arg2] = []; }; arrayOfArrays[_arg2].push(_arg1); if (maxPriority < minPriority){ minPriority = (maxPriority = _arg2); } else { if (_arg2 < minPriority){ minPriority = _arg2; }; if (_arg2 > maxPriority){ maxPriority = _arg2; }; }; } public function removeSmallest():Object{ var _local1:Object; _local1 = null; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ return (null); }; }; _local1 = arrayOfArrays[minPriority].shift(); while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ break; }; }; }; return (_local1); } public function removeLargestChild(_arg1:ILayoutManagerClient):Object{ var _local2:Object; var _local3:int; var _local4:int; var _local5:int; _local2 = null; _local3 = maxPriority; _local4 = _arg1.nestLevel; while (_local4 <= _local3) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local5 = 0; while (_local5 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){ _local2 = arrayOfArrays[_local3][_local5]; arrayOfArrays[_local3].splice(_local5, 1); return (_local2); }; _local5++; }; _local3--; } else { if (_local3 == maxPriority){ maxPriority--; }; _local3--; if (_local3 < _local4){ break; }; }; }; return (_local2); } public function isEmpty():Boolean{ return ((minPriority > maxPriority)); } public function removeLargest():Object{ var _local1:Object; _local1 = null; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ return (null); }; }; _local1 = arrayOfArrays[maxPriority].shift(); while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ break; }; }; }; return (_local1); } public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{ var _local2:Object; var _local3:int; var _local4:int; _local2 = null; _local3 = _arg1.nestLevel; while (_local3 <= maxPriority) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local4 = 0; while (_local4 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){ _local2 = arrayOfArrays[_local3][_local4]; arrayOfArrays[_local3].splice(_local4, 1); return (_local2); }; _local4++; }; _local3++; } else { if (_local3 == minPriority){ minPriority++; }; _local3++; if (_local3 > maxPriority){ break; }; }; }; return (_local2); } public function removeAll():void{ arrayOfArrays.splice(0); minPriority = 0; maxPriority = -1; } private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{ var _local3:IChildList; if ((_arg1 is IRawChildrenContainer)){ _local3 = IRawChildrenContainer(_arg1).rawChildren; return (_local3.contains(_arg2)); }; if ((_arg1 is DisplayObjectContainer)){ return (DisplayObjectContainer(_arg1).contains(_arg2)); }; return ((_arg1 == _arg2)); } } }//package mx.managers.layoutClasses
Section 242
//CursorManager (mx.managers.CursorManager) package mx.managers { import mx.core.*; public class CursorManager { public static const NO_CURSOR:int = 0; mx_internal static const VERSION:String = "2.0.1.0"; private static var impl:ICursorManager = (Singleton.getInstance("mx.managers::ICursorManager") as ICursorManager); private static var implClassDependency:CursorManagerImpl; public static function removeCursor(_arg1:int):void{ impl.removeCursor(_arg1); } public static function hideCursor():void{ impl.hideCursor(); } public static function setBusyCursor():void{ impl.setBusyCursor(); } public static function get currentCursorID():int{ return (impl.currentCursorID); } public static function removeBusyCursor():void{ impl.removeBusyCursor(); } mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{ impl.unRegisterToUseBusyCursor(_arg1); } public static function removeAllCursors():void{ impl.removeAllCursors(); } public static function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{ return (impl.setCursor(_arg1, _arg2, _arg3, _arg4)); } public static function showCursor():void{ impl.showCursor(); } public static function set currentCursorYOffset(_arg1:Number):void{ impl.currentCursorYOffset = _arg1; } public static function set currentCursorID(_arg1:int):void{ impl.currentCursorID = _arg1; } public static function get currentCursorXOffset():Number{ return (impl.currentCursorXOffset); } public static function get currentCursorYOffset():Number{ return (impl.currentCursorYOffset); } mx_internal static function registerToUseBusyCursor(_arg1:Object):void{ impl.registerToUseBusyCursor(_arg1); } public static function set currentCursorXOffset(_arg1:Number):void{ impl.currentCursorXOffset = _arg1; } } }//package mx.managers
Section 243
//CursorManagerImpl (mx.managers.CursorManagerImpl) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import mx.styles.*; import flash.text.*; import flash.ui.*; public class CursorManagerImpl implements ICursorManager { private var showSystemCursor:Boolean;// = false private var nextCursorID:int;// = 1 private var systemManager:SystemManager;// = null private var cursorList:Array; private var _currentCursorYOffset:Number;// = 0 private var cursorHolder:Sprite; private var currentCursor:DisplayObject; private var _currentCursorID:int;// = 0 private var showCustomCursor:Boolean;// = false private var initialized:Boolean;// = false private var overTextField:Boolean;// = false private var _currentCursorXOffset:Number;// = 0 private var busyCursorList:Array; private var overLink:Boolean;// = false private var sourceArray:Array; mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:ICursorManager; public function CursorManagerImpl(){ nextCursorID = 1; cursorList = []; busyCursorList = []; initialized = false; overTextField = false; overLink = false; showSystemCursor = false; showCustomCursor = false; systemManager = null; sourceArray = []; _currentCursorID = 0; _currentCursorXOffset = 0; _currentCursorYOffset = 0; super(); if (instance){ throw (new Error("Instance already exists.")); }; } public function get currentCursorXOffset():Number{ return (_currentCursorXOffset); } public function set currentCursorYOffset(_arg1:Number):void{ _currentCursorYOffset = _arg1; } public function get currentCursorID():int{ return (_currentCursorID); } public function removeCursor(_arg1:int):void{ var _local2:Object; var _local3:CursorQueueItem; for (_local2 in cursorList) { _local3 = cursorList[_local2]; if (_local3.cursorID == _arg1){ cursorList.splice(_local2, 1); showCurrentCursor(); break; }; }; } public function removeAllCursors():void{ cursorList.splice(0); showCurrentCursor(); } private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{ if (_arg1.priority < _arg2.priority){ return (-1); }; if (_arg1.priority == _arg2.priority){ return (0); }; return (1); } public function set currentCursorID(_arg1:int):void{ _currentCursorID = _arg1; } public function setBusyCursor():void{ var _local1:CSSStyleDeclaration; var _local2:Class; _local1 = StyleManager.getStyleDeclaration("CursorManager"); _local2 = _local1.getStyle("busyCursor"); busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW)); } public function showCursor():void{ cursorHolder.visible = true; } private function findSource(_arg1:Object):int{ var _local2:int; var _local3:int; _local2 = sourceArray.length; _local3 = 0; while (_local3 < _local2) { if (sourceArray[_local3] === _arg1){ return (_local3); }; _local3++; }; return (-1); } private function showCurrentCursor():void{ var _local1:CursorQueueItem; if (systemManager == null){ systemManager = Application.application.systemManager; }; if (cursorList.length > 0){ if (!initialized){ cursorHolder = new FlexSprite(); cursorHolder.name = "cursorHolder"; cursorHolder.mouseEnabled = false; systemManager.cursorChildren.addChild(cursorHolder); initialized = true; }; _local1 = cursorList[0]; if (currentCursorID == CursorManager.NO_CURSOR){ Mouse.hide(); }; if (_local1.cursorID != currentCursorID){ if (cursorHolder.numChildren > 0){ cursorHolder.removeChildAt(0); }; currentCursor = new _local1.cursorClass(); if (currentCursor){ if ((currentCursor is InteractiveObject)){ InteractiveObject(currentCursor).mouseEnabled = false; }; cursorHolder.addChild(currentCursor); cursorHolder.x = (systemManager.mouseX + _local1.x); cursorHolder.y = (systemManager.mouseY + _local1.y); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT); }; currentCursorID = _local1.cursorID; currentCursorXOffset = _local1.x; currentCursorYOffset = _local1.y; }; } else { if (currentCursorID != CursorManager.NO_CURSOR){ currentCursorID = CursorManager.NO_CURSOR; currentCursorXOffset = 0; currentCursorYOffset = 0; systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); cursorHolder.removeChild(currentCursor); }; Mouse.show(); }; } public function get currentCursorYOffset():Number{ return (_currentCursorYOffset); } public function hideCursor():void{ cursorHolder.visible = false; } public function registerToUseBusyCursor(_arg1:Object):void{ if (((_arg1) && ((_arg1 is EventDispatcher)))){ _arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.addEventListener(Event.COMPLETE, completeHandler); _arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler); }; } private function completeHandler(_arg1:Event):void{ var _local2:int; _local2 = findSource(_arg1.target); if (_local2 != -1){ sourceArray.splice(_local2, 1); removeBusyCursor(); }; } public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{ var _local5:int; var _local6:CursorQueueItem; _local5 = nextCursorID++; _local6 = new CursorQueueItem(); _local6.cursorID = _local5; _local6.cursorClass = _arg1; _local6.priority = _arg2; _local6.x = _arg3; _local6.y = _arg4; cursorList.push(_local6); cursorList.sort(priorityCompare); showCurrentCursor(); return (_local5); } private function progressHandler(_arg1:ProgressEvent):void{ var _local2:int; _local2 = findSource(_arg1.target); if (_local2 == -1){ sourceArray.push(_arg1.target); setBusyCursor(); }; } public function removeBusyCursor():void{ if (busyCursorList.length > 0){ removeCursor(int(busyCursorList.pop())); }; } private function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Object; cursorHolder.x = (systemManager.mouseX + currentCursorXOffset); cursorHolder.y = (systemManager.mouseY + currentCursorYOffset); _local2 = _arg1.target; if (((((!(overTextField)) && ((_local2 is TextField)))) && ((_local2.type == TextFieldType.INPUT)))){ overTextField = true; showSystemCursor = true; } else { if (((overTextField) && (!((((_local2 is TextField)) && ((_local2.type == TextFieldType.INPUT))))))){ overTextField = false; showCustomCursor = true; }; }; if (showSystemCursor){ showSystemCursor = false; cursorHolder.visible = false; Mouse.show(); }; if (showCustomCursor){ showCustomCursor = false; cursorHolder.visible = true; Mouse.hide(); }; } public function unRegisterToUseBusyCursor(_arg1:Object):void{ if (((_arg1) && ((_arg1 is EventDispatcher)))){ _arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.removeEventListener(Event.COMPLETE, completeHandler); _arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler); }; } public function set currentCursorXOffset(_arg1:Number):void{ _currentCursorXOffset = _arg1; } public static function getInstance():ICursorManager{ if (!instance){ instance = new (CursorManagerImpl); }; return (instance); } } }//package mx.managers class CursorQueueItem { public var cursorClass:Class;// = null public var priority:int;// = 2 public var cursorID:int;// = 0 public var x:Number; public var y:Number; mx_internal static const VERSION:String = "2.0.1.0"; private function CursorQueueItem(){ cursorID = CursorManager.NO_CURSOR; cursorClass = null; priority = CursorManagerPriority.MEDIUM; super(); } }
Section 244
//CursorManagerPriority (mx.managers.CursorManagerPriority) package mx.managers { public final class CursorManagerPriority { public static const HIGH:int = 1; public static const MEDIUM:int = 2; mx_internal static const VERSION:String = "2.0.1.0"; public static const LOW:int = 3; } }//package mx.managers
Section 245
//DragManager (mx.managers.DragManager) package mx.managers { import mx.core.*; import flash.events.*; import mx.managers.dragClasses.*; public class DragManager { public static const MOVE:String = "move"; public static const COPY:String = "copy"; mx_internal static const VERSION:String = "2.0.1.0"; public static const LINK:String = "link"; public static const NONE:String = "none"; private static var impl:IDragManager = (Singleton.getInstance("mx.managers::IDragManager") as IDragManager); private static var implClassDependency:DragManagerImpl; mx_internal static function get dragProxy():DragProxy{ return (Object(impl).dragProxy); } public static function showFeedback(_arg1:String):void{ impl.showFeedback(_arg1); } public static function acceptDragDrop(_arg1:IUIComponent):void{ impl.acceptDragDrop(_arg1); } public static function doDrag(_arg1:IUIComponent, _arg2:DragSource, _arg3:MouseEvent, _arg4:IFlexDisplayObject=null, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0.5, _arg8:Boolean=true):void{ impl.doDrag(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } mx_internal static function endDrag():void{ impl.endDrag(); } public static function get isDragging():Boolean{ return (impl.isDragging); } public static function getFeedback():String{ return (impl.getFeedback()); } } }//package mx.managers
Section 246
//DragManagerImpl (mx.managers.DragManagerImpl) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.managers.dragClasses.*; public class DragManagerImpl implements IDragManager { private var bDoingDrag:Boolean;// = false public var dragProxy:DragProxy; private var dragInitiator:IUIComponent; private var mouseIsDown:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:IDragManager; private static var sm:ISystemManager; public function DragManagerImpl(){ bDoingDrag = false; mouseIsDown = false; super(); if (instance){ throw (new Error("Instance already exists.")); }; if (sm.isTopLevel()){ sm.addEventListener(MouseEvent.MOUSE_DOWN, sm_mouseDownHandler); sm.addEventListener(MouseEvent.MOUSE_UP, sm_mouseUpHandler); }; } private function sm_mouseUpHandler(_arg1:MouseEvent):void{ mouseIsDown = false; } public function get isDragging():Boolean{ return (bDoingDrag); } public function doDrag(_arg1:IUIComponent, _arg2:DragSource, _arg3:MouseEvent, _arg4:IFlexDisplayObject=null, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0.5, _arg8:Boolean=true):void{ var _local9:Number; var _local10:Number; var _local11:Point; var _local12:Number; var _local13:Number; var _local14:Point; var _local15:Object; var _local16:CSSStyleDeclaration; var _local17:Class; if (bDoingDrag){ return; }; if (!(((((((_arg3.type == MouseEvent.MOUSE_DOWN)) || ((_arg3.type == MouseEvent.CLICK)))) || (mouseIsDown))) || (_arg3.buttonDown))){ return; }; bDoingDrag = true; this.dragInitiator = _arg1; dragProxy = new DragProxy(_arg1, _arg2); _arg1.systemManager.popUpChildren.addChild(dragProxy); if (!_arg4){ _local16 = StyleManager.getStyleDeclaration("DragManager"); _local17 = _local16.getStyle("defaultDragImageSkin"); _arg4 = new (_local17); dragProxy.addChild(DisplayObject(_arg4)); _local9 = _arg1.width; _local10 = _arg1.height; } else { dragProxy.addChild(DisplayObject(_arg4)); if ((_arg4 is ILayoutManagerClient)){ UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(_arg4), true); }; if ((_arg4 is IUIComponent)){ _local9 = (_arg4 as IUIComponent).getExplicitOrMeasuredWidth(); _local10 = (_arg4 as IUIComponent).getExplicitOrMeasuredHeight(); } else { _local9 = _arg4.measuredWidth; _local10 = _arg4.measuredHeight; }; }; _arg4.setActualSize(_local9, _local10); dragProxy.setActualSize(_local9, _local10); dragProxy.alpha = _arg7; dragProxy.allowMove = _arg8; _local11 = new Point(_arg3.localX, _arg3.localY); _local11 = DisplayObject(_arg3.target).localToGlobal(_local11); _local11 = DisplayObject(_arg1.systemManager.topLevelSystemManager).globalToLocal(_local11); _local12 = _local11.x; _local13 = _local11.y; _local14 = DisplayObject(_arg3.target).localToGlobal(new Point(_arg3.localX, _arg3.localY)); _local14 = DisplayObject(_arg1).globalToLocal(_local14); dragProxy.xOffset = (_local14.x + _arg5); dragProxy.yOffset = (_local14.y + _arg6); dragProxy.x = (_local12 - dragProxy.xOffset); dragProxy.y = (_local13 - dragProxy.yOffset); dragProxy.startX = dragProxy.x; dragProxy.startY = dragProxy.y; if ((_arg4 is DisplayObject)){ DisplayObject(_arg4).cacheAsBitmap = true; }; _local15 = dragProxy.automationDelegate; if (_local15){ _local15.recordAutomatableDragStart(_arg1, _arg3); }; } private function sm_mouseDownHandler(_arg1:MouseEvent):void{ mouseIsDown = true; } public function showFeedback(_arg1:String):void{ if (dragProxy){ if ((((_arg1 == DragManager.MOVE)) && (!(dragProxy.allowMove)))){ _arg1 = DragManager.COPY; }; dragProxy.action = _arg1; }; } public function acceptDragDrop(_arg1:IUIComponent):void{ if (dragProxy){ dragProxy.target = _arg1; }; } public function getFeedback():String{ return ((dragProxy) ? dragProxy.action : DragManager.NONE); } public function endDrag():void{ var _local1:ISystemManager; if (dragProxy){ _local1 = dragInitiator.systemManager; _local1.popUpChildren.removeChild(dragProxy); dragProxy.removeChildAt(0); dragProxy = null; }; dragInitiator = null; bDoingDrag = false; } public static function getInstance():IDragManager{ if (!instance){ sm = SystemManagerGlobals.topLevelSystemManagers[0]; instance = new (DragManagerImpl); }; return (instance); } } }//package mx.managers
Section 247
//FocusManager (mx.managers.FocusManager) package mx.managers { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import flash.text.*; import mx.controls.*; import flash.system.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var _showFocusIndicator:Boolean;// = false private var focusableCandidates:Array; private var LARGE_TAB_INDEX:int;// = 99999 private var browserFocusComponent:InteractiveObject; private var calculateCandidates:Boolean;// = true private var lastAction:String; private var focusableObjects:Array; private var defButton:Button; private var _form:IFocusManagerContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var _focusPane:Sprite; private var lastFocus:IFocusManagerComponent; private var browserMode:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){ LARGE_TAB_INDEX = 99999; calculateCandidates = true; activated = false; _showFocusIndicator = false; _defaultButtonEnabled = true; super(); browserMode = (((Capabilities.playerType == "ActiveX")) && (!(_arg2))); _arg1.focusManager = this; _form = _arg1; focusableObjects = []; focusPane = new FlexSprite(); focusPane.name = "focusPane"; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); _arg1.addEventListener(FlexEvent.SHOW, showHandler); _arg1.addEventListener(FlexEvent.HIDE, hideHandler); if (_arg1 != SystemManager(_arg1.systemManager).application){ _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; _arg1.systemManager.addFocusManager(_arg1); } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var doc:DisplayObjectContainer; var i:int; var rawChildren:IChildList; var o = _arg1; var skipTopLevel = _arg2; if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects.push(o); calculateCandidates = true; }; o.addEventListener("tabEnabledChange", tabEnabledChangeHandler); o.addEventListener("tabIndexChange", tabIndexChangeHandler); }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener("tabChildrenChange", tabChildrenChangeHandler); if (doc.tabChildren){ if ((o is IRawChildrenContainer)){ rawChildren = IRawChildrenContainer(o).rawChildren; i = 0; while (i < rawChildren.numChildren) { try { addFocusables(rawChildren.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; } else { i = 0; while (i < doc.numChildren) { try { addFocusables(doc.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ var parent = _arg1; var child = _arg2; try { return (parent.getChildIndex(child)); } catch(e:Error) { if ((parent is IRawChildrenContainer)){ return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child)); }; throw (e); }; throw (new Error("FocusManager.getChildIndex failed")); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ var _local2:TextField; if ((_arg1.relatedObject is TextField)){ _local2 = (_arg1.relatedObject as TextField); if ((((_local2.type == "input")) || (_local2.selectable))){ return; }; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{ var _local3:int; if ((_arg1 is DisplayObjectContainer)){ if (!_arg2){ _arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler); }; _local3 = 0; while (_local3 < focusableObjects.length) { if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){ if (focusableObjects[_local3] == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler); focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local3, 1); _local3--; calculateCandidates = true; }; _local3++; }; }; } public function getFocus():IFocusManagerComponent{ var _local1:InteractiveObject; _local1 = form.systemManager.stage.focus; return (findFocusManagerComponent(_local1)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2, true); }; } private function sortByDepth(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } mx_internal function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent("click")); } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:int; var _local2:int; var _local3:InteractiveObject; focusableCandidates = []; _local1 = focusableObjects.length; _local2 = 0; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local3); _local2++; }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){ if (browserFocusComponent){ if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){ browserFocusComponent.tabIndex = -1; }; browserFocusComponent = null; return; }; setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function get nextTabIndex():int{ return ((getMaxTabIndex() + 1)); } public function get focusPane():Sprite{ return (_focusPane); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(IFocusManagerComponent(_local2)); }; lastAction = "MOUSEDOWN"; } private function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:SystemManager; var _local3:DisplayObject; var _local4:String; var _local5:int; var _local6:int; var _local7:IFocusManagerGroup; _local2 = SystemManager(form.systemManager); _local2.idleCounter = 0; if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (browserMode){ if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){ _local3 = form.systemManager.stage.focus; _local3 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local3))); _local4 = ""; if ((_local3 is IFocusManagerGroup)){ _local7 = IFocusManagerGroup(_local3); _local4 = _local7.groupName; }; _local5 = getIndexOfFocusedObject(_local3); _local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4); if (_arg1.shiftKey){ if (_local6 >= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = LARGE_TAB_INDEX; }; }; } else { if (_local6 <= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = LARGE_TAB_INDEX; }; }; }; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ defButton.callLater(sendDefaultButtonEvent); }; } public function toString():String{ return ((Object(form).toString() + ".focusManager")); } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (isParent(DisplayObjectContainer(form), _local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } public function deactivate():void{ form.systemManager.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.systemManager.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.systemManager.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.systemManager.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{ if ((_arg1 is IRawChildrenContainer)){ return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2)); }; return (_arg1.contains(_arg2)); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function getMaxTabIndex():int{ var _local1:Number; var _local2:int; var _local3:int; var _local4:Number; _local1 = 0; _local2 = focusableObjects.length; _local3 = 0; while (_local3 < _local2) { _local4 = focusableObjects[_local3].tabIndex; if (!isNaN(_local4)){ _local1 = Math.max(_local1, _local4); }; _local3++; }; return (_local1); } private function showHandler(_arg1:Event):void{ form.systemManager.activate(form); } public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{ while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (IFocusManagerComponent(_arg1)); }; _arg1 = _arg1.parent; }; return (null); } public function setFocus(_arg1:IFocusManagerComponent):void{ _arg1.setFocus(); } mx_internal function set form(_arg1:IFocusManagerContainer):void{ _form = _arg1; } private function sortFocusableObjectsTabIndex():void{ var _local1:int; var _local2:int; var _local3:IFocusManagerComponent; focusableCandidates = []; _local1 = focusableObjects.length; _local2 = 0; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))){ focusableCandidates.push(_local3); }; _local2++; }; focusableCandidates.sort(sortByTabIndex); } public function set defaultButton(_arg1:IUIComponent):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:IFocusManagerComponent; if (focusableObjects.length == 0){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (IUIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function hideHandler(_arg1:Event):void{ form.systemManager.deactivate(form); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is IUIComponent)){ if (!IUIComponent(_arg1).enabled){ return (false); }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function hideFocus():void{ if (showFocusIndicator){ showFocusIndicator = false; if (lastFocus){ lastFocus.drawFocus(false); }; }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } mx_internal function get form():IFocusManagerContainer{ return (_form); } public function set focusPane(_arg1:Sprite):void{ _focusPane = _arg1; } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; _local3 = DisplayObject(_arg1.target); if ((_local3 is IFocusManagerComponent)){ _local2 = 0; while (_local2 < focusableObjects.length) { if (_local3 == focusableObjects[_local2]){ if (_local3 == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; _local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler); _local3.removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local2, 1); calculateCandidates = true; break; }; _local2++; }; }; removeFocusables(_local3, false); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (((lastFocus) && (!(browserMode)))){ lastFocus.setFocus(); }; lastAction = "ACTIVATE"; } public function get defaultButton():IUIComponent{ return (_defaultButton); } public function showFocus():void{ if (!showFocusIndicator){ showFocusIndicator = true; if (lastFocus){ lastFocus.drawFocus(true); }; }; } public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (focusableObjects.length == 0){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.systemManager.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObject; var _local3:DisplayObjectContainer; _local2 = DisplayObject(form.systemManager); if (!_local2){ return (false); }; _local3 = _arg1.parent; while (((_local3) && (!((_local3 == _local2))))) { if (!_local3.tabChildren){ return (false); }; _local3 = _local3.parent; }; return (true); } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } private function sortByTabIndex(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):int{ var _local3:int; var _local4:int; _local3 = _arg1.tabIndex; _local4 = _arg2.tabIndex; if (_local3 == -1){ _local3 = int.MAX_VALUE; }; if (_local4 == -1){ _local4 = int.MAX_VALUE; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.systemManager.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.systemManager.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.systemManager.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.systemManager.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (((DisplayObject(form).visible) && (!(activated)))){ form.systemManager.activate(form); }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:int; var _local4:int; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = focusableObjects.length; _local4 = 0; while (_local4 < _local3) { if (focusableObjects[_local4] == _local2){ break; }; _local4++; }; if (_local2.tabEnabled){ if ((((_local4 == _local3)) && (isTabVisible(_local2)))){ focusableObjects.push(_local2); }; } else { if (_local4 < _local3){ focusableObjects.splice(_local4, 1); }; }; } } }//package mx.managers
Section 248
//HistoryManager (mx.managers.HistoryManager) package mx.managers { import mx.core.*; public class HistoryManager { mx_internal static const VERSION:String = "2.0.1.0"; private static var implClassDependency:HistoryManagerImpl; private static var _impl:IHistoryManager; private static function get impl():IHistoryManager{ if (!_impl){ _impl = (Singleton.getInstance("mx.managers::IHistoryManager") as IHistoryManager); }; return (_impl); } mx_internal static function registered():void{ impl.registered(); } public static function register(_arg1:IHistoryManagerClient):void{ impl.register(_arg1); } mx_internal static function load(_arg1:Object):void{ impl.load(_arg1); } mx_internal static function loadInitialState():void{ impl.loadInitialState(); } mx_internal static function registerHandshake():void{ impl.registerHandshake(); } public static function initialize(_arg1:ISystemManager):void{ } public static function unregister(_arg1:IHistoryManagerClient):void{ impl.unregister(_arg1); } public static function save():void{ impl.save(); } } }//package mx.managers
Section 249
//HistoryManagerGlobals (mx.managers.HistoryManagerGlobals) package mx.managers { import flash.display.*; public class HistoryManagerGlobals { public static var loaderInfo:LoaderInfo; } }//package mx.managers
Section 250
//HistoryManagerImpl (mx.managers.HistoryManagerImpl) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; public class HistoryManagerImpl implements IHistoryManager { private var pendingStates:Object; private var isRegistered:Boolean;// = false private var handshakeTimer:Timer; private var lcinit:InitLocalConnection; private var pendingQueryString:String; private var registrationMap:Dictionary; private var lc:MainLocalConnection; private var registeredObjects:Array; private static const NAME_VALUE_SEPARATOR:String = "="; private static const HANDSHAKE_INTERVAL:int = 500; private static const ID_NAME_SEPARATOR:String = "-"; private static const MAX_HANDSHAKE_TRIES:int = 100; mx_internal static const VERSION:String = "2.0.1.0"; private static const PROPERTY_SEPARATOR:String = "&"; private static var lconID:String; private static var instance:IHistoryManager; private static var appID:String; private static var historyURL:String; private static var systemManager:ISystemManager; public function HistoryManagerImpl(){ var loaderInfo:LoaderInfo; var appURL:String; isRegistered = false; registeredObjects = []; pendingStates = {}; super(); if (instance){ throw (new Error("Instance already exists.")); }; if (appID){ return; }; if (HistoryManagerGlobals.loaderInfo){ loaderInfo = HistoryManagerGlobals.loaderInfo; } else { loaderInfo = DisplayObject(systemManager).loaderInfo; }; lconID = loaderInfo.parameters.lconid; historyURL = loaderInfo.parameters.historyUrl; if (((!(lconID)) || (!(historyURL)))){ return; }; if (HistoryManagerGlobals.loaderInfo){ appURL = HistoryManagerGlobals.loaderInfo.url; } else { appURL = DisplayObject(systemManager).loaderInfo.url; }; appID = calcCRC(appURL); lc = new MainLocalConnection(); lc.allowDomain("~", "localhost"); lc.addEventListener(StatusEvent.STATUS, statusHandler); lc.connect((appID + lconID)); lcinit = new InitLocalConnection(); lcinit.addEventListener(StatusEvent.STATUS, statusHandler); lcinit.allowDomain("~", "localhost"); try { lcinit.connect(("init" + lconID)); } catch(error:Error) { }; handshakeTimer = new Timer(HANDSHAKE_INTERVAL, MAX_HANDSHAKE_TRIES); handshakeTimer.addEventListener(TimerEvent.TIMER, initHandshake); handshakeTimer.start(); } public function registered():void{ if (!isRegistered){ isRegistered = true; handshakeTimer.reset(); handshakeTimer = null; }; } private function updateCRC(_arg1:uint, _arg2:uint):uint{ var _local3:uint; var _local4:uint; var _local5:int; var _local6:Boolean; _local3 = 4129; _local4 = 128; _local5 = 0; while (_local5 < 8) { _local6 = !(((_arg1 & 0x8000) == 0)); _arg1 = (_arg1 << 1); _arg1 = (_arg1 & 0xFFFF); if ((_arg2 & _local4) != 0){ _arg1++; }; if (_local6){ _arg1 = (_arg1 ^ _local3); }; _local4 = (_local4 >> 1); _local5++; }; return (_arg1); } private function submitQuery():void{ var _local1:String; if (pendingQueryString){ _local1 = ((historyURL + "&") + pendingQueryString); navigateToURL(new URLRequest(_local1), "_history"); pendingQueryString = null; Application.application.resetHistory = true; }; } public function registerHandshake():void{ lc.send(("history" + lconID), "registered"); } private function getPath(_arg1:IHistoryManagerClient):String{ return (_arg1.toString()); } public function save():void{ var _local1:Boolean; var _local2:String; var _local3:int; var _local4:int; var _local5:IHistoryManagerClient; var _local6:Object; var _local7:String; var _local8:String; var _local9:Object; if (!isRegistered){ return; }; _local1 = false; _local2 = ("app=" + appID); _local3 = registeredObjects.length; _local4 = 0; while (_local4 < _local3) { _local5 = registeredObjects[_local4]; _local6 = _local5.saveState(); _local7 = getRegistrationInfo(_local5).crc; for (_local8 in _local6) { _local9 = _local6[_local8]; if (_local2.length > 0){ _local2 = (_local2 + PROPERTY_SEPARATOR); }; _local2 = (_local2 + _local7); _local2 = (_local2 + ID_NAME_SEPARATOR); _local2 = (_local2 + escape(_local8)); _local2 = (_local2 + NAME_VALUE_SEPARATOR); _local2 = (_local2 + escape(_local9.toString())); _local1 = true; }; _local4++; }; if (_local1){ pendingQueryString = _local2; Application.application.callLater(this.submitQuery); }; } public function load(_arg1:Object):void{ var _local2:String; var _local3:String; var _local4:Object; var _local5:int; var _local6:int; var _local7:int; var _local8:String; var _local9:Object; var _local10:IHistoryManagerClient; if (Application.application.resetHistory){ Application.application.resetHistory = false; return; }; _local4 = {}; for (_local2 in _arg1) { _local7 = _local2.indexOf(ID_NAME_SEPARATOR); if (_local7 > -1){ _local3 = _local2.substr(0, _local7); _local8 = _local2.substr((_local7 + 1), _local2.length); _local9 = _arg1[_local2]; if (!_local4[_local3]){ _local4[_local3] = {}; }; _local4[_local3][_local8] = _local9; }; }; _local5 = registeredObjects.length; _local6 = 0; while (_local6 < _local5) { _local10 = registeredObjects[_local6]; _local3 = getRegistrationInfo(_local10).crc; _local10.loadState(_local4[_local3]); delete _local4[_local3]; _local6++; }; for (_local2 in _local4) { pendingStates[_local2] = _local4[_local2]; }; } private function depthCompare(_arg1:Object, _arg2:Object):int{ var _local3:RegistrationInfo; var _local4:RegistrationInfo; _local3 = getRegistrationInfo(IHistoryManagerClient(_arg1)); _local4 = getRegistrationInfo(IHistoryManagerClient(_arg2)); if (((!(_local3)) || (!(_local4)))){ return (0); }; if (_local3.depth > _local4.depth){ return (1); }; if (_local3.depth < _local4.depth){ return (-1); }; return (0); } private function initHandshake(_arg1:TimerEvent):void{ lc.send(("history" + lconID), "register", (appID + lconID)); } private function calcDepth(_arg1:String):int{ return (_arg1.split(".").length); } private function statusHandler(_arg1:StatusEvent):void{ } public function loadInitialState():void{ if (!Application.application.resetHistory){ load({}); }; Application.application.resetHistory = false; } public function register(_arg1:IHistoryManagerClient):void{ var _local2:String; var _local3:String; var _local4:int; unregister(_arg1); registeredObjects.push(_arg1); _local2 = getPath(_arg1); _local3 = calcCRC(_local2); _local4 = calcDepth(_local2); if (!registrationMap){ registrationMap = new Dictionary(); }; registrationMap[_arg1] = new RegistrationInfo(_local3, _local4); registeredObjects.sort(depthCompare); if (pendingStates[_local3]){ _arg1.loadState(pendingStates[_local3]); delete pendingStates[_local3]; }; } public function unregister(_arg1:IHistoryManagerClient):void{ var _local2:int; var _local3:int; var _local4:int; _local2 = -1; _local3 = registeredObjects.length; _local4 = 0; while (_local4 < _local3) { if (registeredObjects[_local4] == _arg1){ _local2 = _local4; break; }; _local4++; }; if (_local2 >= 0){ registeredObjects.splice(_local2, 1); }; if (((_arg1) && (registrationMap))){ delete registrationMap[_arg1]; }; } private function getRegistrationInfo(_arg1:IHistoryManagerClient):RegistrationInfo{ return ((registrationMap) ? registrationMap[_arg1] : null); } private function calcCRC(_arg1:String):String{ var _local2:uint; var _local3:int; var _local4:int; var _local5:uint; var _local6:uint; var _local7:uint; _local2 = 0xFFFF; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1.charCodeAt(_local4); _local6 = (_local5 & 0xFF); _local7 = (_local5 >> 8); if (_local7 != 0){ _local2 = updateCRC(_local2, _local7); }; _local2 = updateCRC(_local2, _local6); _local4++; }; _local2 = updateCRC(_local2, 0); _local2 = updateCRC(_local2, 0); return (_local2.toString(16)); } public static function getInstance():IHistoryManager{ if (!instance){ systemManager = SystemManagerGlobals.topLevelSystemManagers[0]; instance = new (HistoryManagerImpl); }; return (instance); } } }//package mx.managers class RegistrationInfo { public var crc:String; public var depth:int; mx_internal static const VERSION:String = "2.0.1.0"; private function RegistrationInfo(_arg1:String, _arg2:int){ this.crc = _arg1; this.depth = _arg2; } }
Section 251
//ICursorManager (mx.managers.ICursorManager) package mx.managers { public interface ICursorManager { function removeAllCursors():void; function removeBusyCursor():void; function registerToUseBusyCursor(_arg1:Object):void; function unRegisterToUseBusyCursor(_arg1:Object):void; function removeCursor(_arg1:int):void; function get currentCursorID():int; function set currentCursorXOffset(_arg1:Number):void; function setBusyCursor():void; function showCursor():void; function set currentCursorID(_arg1:int):void; function hideCursor():void; function set currentCursorYOffset(_arg1:Number):void; function get currentCursorXOffset():Number; function get currentCursorYOffset():Number; function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int; } }//package mx.managers
Section 252
//IDragManager (mx.managers.IDragManager) package mx.managers { import mx.core.*; import flash.events.*; public interface IDragManager { function showFeedback(_arg1:String):void; function get isDragging():Boolean; function getFeedback():String; function acceptDragDrop(_arg1:IUIComponent):void; function endDrag():void; function doDrag(_arg1:IUIComponent, _arg2:DragSource, _arg3:MouseEvent, _arg4:IFlexDisplayObject=null, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0.5, _arg8:Boolean=true):void; } }//package mx.managers
Section 253
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import flash.display.*; import mx.core.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function hideFocus():void; function set defaultButton(_arg1:IUIComponent):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function set focusPane(_arg1:Sprite):void; function get nextTabIndex():int; function get defaultButton():IUIComponent; function get showFocusIndicator():Boolean; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:IFocusManagerComponent):void; function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent; function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 254
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package mx.managers
Section 255
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.display.*; import flash.events.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(_arg1:IFocusManager):void; function get focusManager():IFocusManager; function get systemManager():ISystemManager; function contains(_arg1:DisplayObject):Boolean; } }//package mx.managers
Section 256
//IFocusManagerGroup (mx.managers.IFocusManagerGroup) package mx.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package mx.managers
Section 257
//IHistoryManager (mx.managers.IHistoryManager) package mx.managers { public interface IHistoryManager { function registered():void; function register(_arg1:IHistoryManagerClient):void; function registerHandshake():void; function load(_arg1:Object):void; function loadInitialState():void; function unregister(_arg1:IHistoryManagerClient):void; function save():void; } }//package mx.managers
Section 258
//IHistoryManagerClient (mx.managers.IHistoryManagerClient) package mx.managers { public interface IHistoryManagerClient { function saveState():Object; function loadState(_arg1:Object):void; function toString():String; } }//package mx.managers
Section 259
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function invalidateDisplayList(_arg1:ILayoutManagerClient):void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function invalidateProperties(_arg1:ILayoutManagerClient):void; function isInvalid():Boolean; function validateNow():void; function set usePhasedInstantiation(_arg1:Boolean):void; function invalidateSize(_arg1:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; } }//package mx.managers
Section 260
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function set updateCompletePendingFlag(_arg1:Boolean):void; function set initialized(_arg1:Boolean):void; function validateProperties():void; function get nestLevel():int; function get updateCompletePendingFlag():Boolean; function validateDisplayList():void; function set processedDescriptors(_arg1:Boolean):void; function get processedDescriptors():Boolean; function validateSize(_arg1:Boolean=false):void; function set nestLevel(_arg1:int):void; function get initialized():Boolean; } }//package mx.managers
Section 261
//InitLocalConnection (mx.managers.InitLocalConnection) package mx.managers { import mx.core.*; import mx.managers.*; import flash.net.*; class InitLocalConnection extends LocalConnection { mx_internal static const VERSION:String = "2.0.1.0"; public function loadInitialState():void{ var _local1 = HistoryManager; _local1.mx_internal::loadInitialState(); } } }//package mx.managers
Section 262
//IPopUpManager (mx.managers.IPopUpManager) package mx.managers { import mx.core.*; import flash.display.*; public interface IPopUpManager { function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject; function centerPopUp(_arg1:IFlexDisplayObject):void; function removePopUp(_arg1:IFlexDisplayObject):void; function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void; function bringToFront(_arg1:IFlexDisplayObject):void; } }//package mx.managers
Section 263
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function get toolTipChildren():IChildList; function get numModalWindows():int; function isTopLevel():Boolean; function isFontFaceEmbedded(_arg1:TextFormat):Boolean; function removeFocusManager(_arg1:IFocusManagerContainer):void; function get document():Object; function get topLevelSystemManager():ISystemManager; function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function set focusPane(_arg1:Sprite):void; function get rawChildren():IChildList; function get popUpChildren():IChildList; function get screen():Rectangle; function deactivate(_arg1:IFocusManagerContainer):void; function getDefinitionByName(_arg1:String):Object; function activate(_arg1:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(_arg1:Object):void; function get embeddedFontList():Object; function addFocusManager(_arg1:IFocusManagerContainer):void; function get stage():Stage; function set numModalWindows(_arg1:int):void; } }//package mx.managers
Section 264
//IToolTipManager (mx.managers.IToolTipManager) package mx.managers { import mx.core.*; import flash.display.*; import mx.effects.*; public interface IToolTipManager { function registerToolTip(_arg1:DisplayObject, _arg2:String):void; function set enabled(_arg1:Boolean):void; function get showDelay():Number; function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip; function get enabled():Boolean; function destroyToolTip(_arg1:IToolTip):void; function set showDelay(_arg1:Number):void; function set hideDelay(_arg1:Number):void; function get scrubDelay():Number; function get toolTipClass():Class; function registerErrorString(_arg1:DisplayObject, _arg2:String):void; function sizeTip(_arg1:IToolTip):void; function set currentTarget(_arg1:DisplayObject):void; function set showEffect(_arg1:Effect):void; function get hideDelay():Number; function set currentToolTip(_arg1:IToolTip):void; function set hideEffect(_arg1:Effect):void; function set scrubDelay(_arg1:Number):void; function get currentToolTip():IToolTip; function get showEffect():Effect; function get currentTarget():DisplayObject; function get hideEffect():Effect; function set toolTipClass(_arg1:Class):void; } }//package mx.managers
Section 265
//IToolTipManagerClient (mx.managers.IToolTipManagerClient) package mx.managers { import mx.core.*; public interface IToolTipManagerClient extends IFlexDisplayObject { function set toolTip(_arg1:String):void; function get toolTip():String; } }//package mx.managers
Section 266
//LayoutManager (mx.managers.LayoutManager) package mx.managers { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.layoutClasses.*; public class LayoutManager extends EventDispatcher implements ILayoutManager { private var invalidateClientSizeFlag:Boolean;// = false private var invalidateSizeQueue:PriorityQueue; private var updateCompleteQueue:PriorityQueue; private var originalFrameRate:Number; private var _usePhasedInstantiation:Boolean;// = false private var callLaterObject:UIComponent; private var invalidateClientPropertiesFlag:Boolean;// = false private var invalidateDisplayListQueue:PriorityQueue; private var invalidateDisplayListFlag:Boolean;// = false private var invalidatePropertiesFlag:Boolean;// = false private var invalidatePropertiesQueue:PriorityQueue; private var invalidateSizeFlag:Boolean;// = false private var callLaterPending:Boolean;// = false private var targetLevel:int;// = 2147483647 mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:LayoutManager; public function LayoutManager(){ updateCompleteQueue = new PriorityQueue(); invalidatePropertiesQueue = new PriorityQueue(); invalidatePropertiesFlag = false; invalidateClientPropertiesFlag = false; invalidateSizeQueue = new PriorityQueue(); invalidateSizeFlag = false; invalidateClientSizeFlag = false; invalidateDisplayListQueue = new PriorityQueue(); invalidateDisplayListFlag = false; callLaterPending = false; targetLevel = int.MAX_VALUE; _usePhasedInstantiation = false; super(); } private function waitAFrame():void{ callLaterObject.callLater(doPhasedInstantiation); } public function get usePhasedInstantiation():Boolean{ return (_usePhasedInstantiation); } public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{ var _local3:ILayoutManagerClient; var _local4:int; var _local5:Boolean; var _local6:int; _local4 = 0; _local5 = false; _local6 = targetLevel; if (targetLevel == int.MAX_VALUE){ targetLevel = _arg1.nestLevel; }; while (!(_local5)) { _local5 = true; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateProperties(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; invalidateClientPropertiesFlag = false; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); while (_local3) { _local3.validateSize(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; invalidateClientSizeFlag = false; }; if (!_arg2){ _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateDisplayList(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; if (invalidateClientSizeFlag){ _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); if (_local3){ invalidateSizeQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; }; }; if (_local6 == int.MAX_VALUE){ targetLevel = int.MAX_VALUE; if (!_arg2){ _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); while (_local3) { if (!_local3.initialized){ _local3.initialized = true; }; _local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local3.updateCompletePendingFlag = false; _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); }; }; }; } private function validateDisplayList():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); while (_local1) { _local1.validateDisplayList(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; } private function validateSize():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); while (_local1) { _local1.validateSize(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; }; } public function invalidateProperties(_arg1:ILayoutManagerClient):void{ if (((!(invalidatePropertiesFlag)) && (Application.application.systemManager))){ invalidatePropertiesFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientPropertiesFlag = true; }; invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel); } public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{ if (((!(invalidateDisplayListFlag)) && (Application.application.systemManager))){ invalidateDisplayListFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel); } public function validateNow():void{ var _local1:int; if (!usePhasedInstantiation){ _local1 = 0; while (((callLaterPending) && ((_local1 < 100)))) { doPhasedInstantiation(); }; }; } public function invalidateSize(_arg1:ILayoutManagerClient):void{ if (((!(invalidateSizeFlag)) && (Application.application.systemManager))){ invalidateSizeFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientSizeFlag = true; }; invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel); } public function isInvalid():Boolean{ return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))); } private function validateProperties():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); while (_local1) { _local1.validateProperties(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; }; } private function doPhasedInstantiation():void{ var _local1:ILayoutManagerClient; if (usePhasedInstantiation){ if (invalidatePropertiesFlag){ validateProperties(); Application.application.dispatchEvent(new Event("validatePropertiesComplete")); } else { if (invalidateSizeFlag){ validateSize(); Application.application.dispatchEvent(new Event("validateSizeComplete")); } else { if (invalidateDisplayListFlag){ validateDisplayList(); Application.application.dispatchEvent(new Event("validateDisplayListComplete")); }; }; }; } else { if (invalidatePropertiesFlag){ validateProperties(); }; if (invalidateSizeFlag){ validateSize(); }; if (invalidateDisplayListFlag){ validateDisplayList(); }; }; if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){ callLaterObject.callLater(doPhasedInstantiation); } else { usePhasedInstantiation = false; callLaterPending = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); while (_local1) { if (((!(_local1.initialized)) && (_local1.processedDescriptors))){ _local1.initialized = true; }; _local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local1.updateCompletePendingFlag = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); }; dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); }; } public function set usePhasedInstantiation(_arg1:Boolean):void{ var _local2:Stage; if (_usePhasedInstantiation != _arg1){ _usePhasedInstantiation = _arg1; _local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage; if (_arg1){ originalFrameRate = _local2.frameRate; _local2.frameRate = 1000; } else { _local2.frameRate = originalFrameRate; }; }; } public static function getInstance():LayoutManager{ if (!instance){ instance = new (LayoutManager); }; return (instance); } } }//package mx.managers
Section 267
//MainLocalConnection (mx.managers.MainLocalConnection) package mx.managers { import mx.core.*; import mx.managers.*; import flash.net.*; class MainLocalConnection extends LocalConnection { mx_internal static const VERSION:String = "2.0.1.0"; public function registered():void{ var _local1 = HistoryManager; _local1.mx_internal::registered(); } public function loadState(_arg1:Object):void{ var _local2 = HistoryManager; _local2.mx_internal::load(_arg1); } public function register():void{ var _local1 = HistoryManager; _local1.mx_internal::registerHandshake(); } } }//package mx.managers
Section 268
//PopUpManager (mx.managers.PopUpManager) package mx.managers { import mx.core.*; import flash.display.*; public class PopUpManager { mx_internal static const VERSION:String = "2.0.1.0"; private static var impl:IPopUpManager = (Singleton.getInstance("mx.managers::IPopUpManager") as IPopUpManager); private static var implClassDependency:PopUpManagerImpl; public static function removePopUp(_arg1:IFlexDisplayObject):void{ impl.removePopUp(_arg1); } public static function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void{ impl.addPopUp(_arg1, _arg2, _arg3, _arg4); } public static function bringToFront(_arg1:IFlexDisplayObject):void{ impl.bringToFront(_arg1); } public static function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject{ return (impl.createPopUp(_arg1, _arg2, _arg3, _arg4)); } public static function centerPopUp(_arg1:IFlexDisplayObject):void{ impl.centerPopUp(_arg1); } } }//package mx.managers
Section 269
//PopUpManagerChildList (mx.managers.PopUpManagerChildList) package mx.managers { public final class PopUpManagerChildList { public static const PARENT:String = "parent"; public static const APPLICATION:String = "application"; mx_internal static const VERSION:String = "2.0.1.0"; public static const POPUP:String = "popup"; } }//package mx.managers
Section 270
//PopUpManagerImpl (mx.managers.PopUpManagerImpl) package mx.managers { import mx.core.*; import mx.events.*; import mx.automation.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; public class PopUpManagerImpl implements IPopUpManager { private var popupInfo:Array; mx_internal var modalWindowClass:Class; mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:IPopUpManager; private function showModalWindow(_arg1:PopUpData):void{ var _local2:IStyleClient; var _local3:Number; var _local4:Fade; var _local5:Number; var _local6:Blur; _local2 = (_arg1.owner as IStyleClient); _local3 = 0; if (_local2){ _local3 = _local2.getStyle("modalTransparencyDuration"); }; endEffects(_arg1); if (_local3){ _local4 = new Fade(_arg1.modalWindow); _local4.alphaFrom = 0; _local4.alphaTo = _local2.getStyle("modalTransparency"); _local4.duration = _local3; _local4.addEventListener(EffectEvent.EFFECT_END, fadeInEffectEndHandler); _arg1.modalWindow.alpha = 0; _arg1.modalWindow.visible = true; _arg1.fade = _local4; IUIComponent(_arg1.owner).setVisible(false, true); _local4.play(); _local5 = _local2.getStyle("modalTransparencyBlur"); if (_local5){ _local6 = new Blur(Application.application); new Blur(Application.application).blurXFrom = (_local6.blurYFrom = 0); _local6.blurXTo = (_local6.blurYTo = _local5); _local6.duration = _local3; _local6.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _arg1.blur = _local6; _local6.play(); }; } else { IUIComponent(_arg1.owner).setVisible(true, true); _arg1.modalWindow.visible = true; }; } public function bringToFront(_arg1:IFlexDisplayObject):void{ var _local2:PopUpData; var _local3:ISystemManager; if (((_arg1) && (_arg1.parent))){ _local2 = findPopupInfoByOwner(_arg1); if (_local2){ _local3 = ISystemManager(_arg1.parent); if (_local2.topMost){ _local3.popUpChildren.setChildIndex(DisplayObject(_arg1), (_local3.popUpChildren.numChildren - 1)); } else { _local3.setChildIndex(DisplayObject(_arg1), (_local3.numChildren - 1)); }; }; }; } private function popupShowHandler(_arg1:FlexEvent):void{ var _local2:PopUpData; _local2 = findPopupInfoByOwner(_arg1.target); if (_local2){ showModalWindow(_local2); }; } private function fadeOutDestroyEffectEndHandler(_arg1:EffectEvent):void{ var _local2:DisplayObject; var _local3:ISystemManager; effectEndHandler(_arg1); _local2 = DisplayObject(_arg1.effectInstance.target); if ((_local2.parent is ISystemManager)){ _local3 = ISystemManager(_local2.parent); if (_local3.popUpChildren.contains(_local2)){ _local3.popUpChildren.removeChild(_local2); } else { _local3.removeChild(_local2); }; } else { _local2.parent.removeChild(_local2); }; } private function fadeInEffectEndHandler(_arg1:EffectEvent):void{ var _local2:int; var _local3:int; var _local4:PopUpData; effectEndHandler(_arg1); _local2 = popupInfo.length; _local3 = 0; while (_local3 < _local2) { _local4 = popupInfo[_local3]; if (_local4.modalWindow == _arg1.effectInstance.target){ IUIComponent(_local4.owner).setVisible(true, true); break; }; _local3++; }; } private function popupRemovedHandler(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:PopUpData; var _local5:DisplayObject; var _local6:DisplayObject; var _local7:DisplayObject; var _local8:ISystemManager; _local2 = popupInfo.length; _local3 = 0; while (_local3 < _local2) { _local4 = popupInfo[_local3]; _local5 = _local4.owner; if (_local5 == _arg1.target){ _local6 = _local4.parent; _local7 = _local4.modalWindow; _local8 = ((_local6 is ISystemManager)) ? ISystemManager(_local6) : IUIComponent(_local6).systemManager; if ((_local5 is IUIComponent)){ IUIComponent(_local5).isPopUp = false; }; if ((_local5 is IFocusManagerContainer)){ _local8.removeFocusManager(IFocusManagerContainer(_local5)); }; _local5.removeEventListener(Event.REMOVED, popupRemovedHandler); if (_local7){ _local7.removeEventListener(MouseEvent.MOUSE_DOWN, _local4.mouseDownOutsideHandler); _local7.removeEventListener(MouseEvent.MOUSE_WHEEL, _local4.mouseWheelOutsideHandler, true); _local8.removeEventListener(Event.RESIZE, resizeHandler); _local5.removeEventListener(FlexEvent.SHOW, popupShowHandler); _local5.removeEventListener(FlexEvent.HIDE, popupHideHandler); hideModalWindow(_local4, true); _local8.numModalWindows--; } else { _local8.removeEventListener(MouseEvent.MOUSE_DOWN, _local4.mouseDownOutsideHandler); _local8.removeEventListener(MouseEvent.MOUSE_WHEEL, _local4.mouseWheelOutsideHandler, true); }; popupInfo.splice(_local3, 1); break; }; _local3++; }; } private function hideModalWindow(_arg1:PopUpData, _arg2:Boolean=false):void{ var _local3:IStyleClient; var _local4:Number; var _local5:Fade; var _local6:Number; var _local7:Blur; _local3 = (_arg1.owner as IStyleClient); _local4 = 0; if (_local3){ _local4 = _local3.getStyle("modalTransparencyDuration"); }; endEffects(_arg1); if (_local4){ _local5 = new Fade(_arg1.modalWindow); _local5.alphaFrom = _arg1.modalWindow.alpha; _local5.alphaTo = 0; _local5.duration = _local4; _local5.addEventListener(EffectEvent.EFFECT_END, (_arg2) ? fadeOutDestroyEffectEndHandler : fadeOutCloseEffectEndHandler); _arg1.modalWindow.visible = true; _arg1.fade = _local5; _local5.play(); _local6 = _local3.getStyle("modalTransparencyBlur"); if (_local6){ _local7 = new Blur(Application.application); new Blur(Application.application).blurXFrom = (_local7.blurYFrom = _local6); _local7.blurXTo = (_local7.blurYTo = 0); _local7.duration = _local4; _local7.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _arg1.blur = _local7; _local7.play(); }; } else { _arg1.modalWindow.visible = false; }; } private function popupHideHandler(_arg1:FlexEvent):void{ var _local2:PopUpData; _local2 = findPopupInfoByOwner(_arg1.target); if (_local2){ hideModalWindow(_local2); }; } private function effectEndHandler(_arg1:EffectEvent):void{ var _local2:int; var _local3:int; var _local4:PopUpData; var _local5:Effect; _local2 = popupInfo.length; _local3 = 0; while (_local3 < _local2) { _local4 = popupInfo[_local3]; _local5 = _arg1.effectInstance.effect; if (_local5 == _local4.fade){ _local4.fade = null; } else { if (_local5 == _local4.blur){ _local4.blur = null; }; }; _local3++; }; } private function createModalWindow(_arg1:DisplayObject, _arg2:PopUpData, _arg3:IChildList, _arg4:Boolean):void{ var _local5:IFlexDisplayObject; var _local6:IStyleClient; var _local7:Number; var _local8:Sprite; var _local9:ISystemManager; var _local10:Rectangle; var _local11:Graphics; var _local12:Number; _local5 = IFlexDisplayObject(_arg2.owner); _local6 = (_local5 as IStyleClient); _local7 = 0; if (modalWindowClass){ _local8 = new modalWindowClass(); } else { _local8 = new FlexSprite(); _local8.name = "modalWindow"; }; _local9 = IUIComponent(_arg1).systemManager; _local9.numModalWindows++; _arg3.addChildAt(_local8, _arg3.getChildIndex(DisplayObject(_local5))); if ((_local5 is IAutomationObject)){ IAutomationObject(_local5).showInAutomationHierarchy = true; }; if (_local6){ _local8.alpha = _local6.getStyle("modalTransparency"); }; _local8.tabEnabled = false; _local10 = _local9.screen; _local11 = _local8.graphics; _local12 = 0xFFFFFF; if (_local6){ _local12 = _local6.getStyle("modalTransparencyColor"); }; _local11.clear(); _local11.beginFill(_local12, 100); _local11.drawRect(_local10.x, _local10.y, _local10.width, _local10.height); _local11.endFill(); _arg2.modalWindow = _local8; _arg2._mouseDownOutsideHandler = dispatchMouseDownOutsideEvent; _arg2._mouseWheelOutsideHandler = dispatchMouseWheelOutsideEvent; _local8.addEventListener(MouseEvent.MOUSE_DOWN, _arg2.mouseDownOutsideHandler); _local8.addEventListener(MouseEvent.MOUSE_WHEEL, _arg2.mouseWheelOutsideHandler, true); _local9.addEventListener(Event.RESIZE, resizeHandler); _local5.addEventListener(FlexEvent.SHOW, popupShowHandler); _local5.addEventListener(FlexEvent.HIDE, popupHideHandler); if (_arg4){ showModalWindow(_arg2); } else { _local5.visible = _arg4; }; } private function findPopupInfoByOwner(_arg1:Object):PopUpData{ var _local2:int; var _local3:int; var _local4:PopUpData; _local2 = popupInfo.length; _local3 = 0; while (_local3 < _local2) { _local4 = popupInfo[_local3]; if (_local4.owner == _arg1){ return (_local4); }; _local3++; }; return (null); } private function fadeOutCloseEffectEndHandler(_arg1:EffectEvent):void{ effectEndHandler(_arg1); DisplayObject(_arg1.effectInstance.target).visible = false; } private function endEffects(_arg1:PopUpData):void{ if (_arg1.fade){ _arg1.fade.end(); _arg1.fade = null; }; if (_arg1.blur){ _arg1.blur.end(); _arg1.blur = null; }; } public function addPopUp(_arg1:IFlexDisplayObject, _arg2:DisplayObject, _arg3:Boolean=false, _arg4:String=null):void{ var _local5:Boolean; var _local6:DisplayObjectContainer; var _local7:ISystemManager; var _local8:IChildList; var _local9:Boolean; var _local10:PopUpData; _local5 = _arg1.visible; _local6 = DisplayObjectContainer(_arg2.root); if (((!(_local6)) && ((_arg2 is IUIComponent)))){ _local6 = DisplayObjectContainer(IUIComponent(_arg2).systemManager); }; if ((_local6 is ISystemManager)){ _local7 = ISystemManager(_local6); if (!_local7.isTopLevel()){ _local7 = _local7.topLevelSystemManager; }; } else { return; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).isPopUp = true; }; if (((!(_arg4)) || ((_arg4 == PopUpManagerChildList.PARENT)))){ _local9 = _local7.popUpChildren.contains(_arg2); } else { _local9 = (_arg4 == PopUpManagerChildList.POPUP); }; _local8 = (_local9) ? _local7.popUpChildren : _local7; _local8.addChild(DisplayObject(_arg1)); _arg1.visible = false; if (!popupInfo){ popupInfo = []; }; _local10 = new PopUpData(); _local10.owner = DisplayObject(_arg1); _local10.topMost = _local9; popupInfo.push(_local10); if ((_arg1 is IFocusManagerContainer)){ if (IFocusManagerContainer(_arg1).focusManager){ _local7.addFocusManager(IFocusManagerContainer(_arg1)); } else { IFocusManagerContainer(_arg1).focusManager = new FocusManager(IFocusManagerContainer(_arg1), true); }; }; if ((_arg1 is IAutomationObject)){ IAutomationObject(_arg1).showInAutomationHierarchy = true; }; if ((_arg1 is ILayoutManagerClient)){ UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(_arg1), true); }; _local10.parent = _arg2; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).setActualSize(IUIComponent(_arg1).getExplicitOrMeasuredWidth(), IUIComponent(_arg1).getExplicitOrMeasuredHeight()); }; if (_arg3){ this.createModalWindow(_arg2, _local10, _local8, _local5); } else { _local10._mouseDownOutsideHandler = nonmodalMouseDownOutsideHandler; _local10._mouseWheelOutsideHandler = nonmodalMouseWheelOutsideHandler; _local7.addEventListener(MouseEvent.MOUSE_DOWN, _local10.mouseDownOutsideHandler); _local7.addEventListener(MouseEvent.MOUSE_WHEEL, _local10.mouseWheelOutsideHandler, true); _arg1.visible = _local5; }; _arg1.addEventListener(Event.REMOVED, popupRemovedHandler); if ((((_arg1 is IFocusManagerContainer)) && (_local5))){ _local7.activate(IFocusManagerContainer(_arg1)); }; } public function removePopUp(_arg1:IFlexDisplayObject):void{ var _local2:PopUpData; var _local3:ISystemManager; if (((_arg1) && (_arg1.parent))){ _local2 = findPopupInfoByOwner(_arg1); if (_local2){ _local3 = ISystemManager(_arg1.parent); if (_local2.topMost){ _local3.popUpChildren.removeChild(DisplayObject(_arg1)); } else { _local3.removeChild(DisplayObject(_arg1)); }; }; }; } public function createPopUp(_arg1:DisplayObject, _arg2:Class, _arg3:Boolean=false, _arg4:String=null):IFlexDisplayObject{ var _local5:IUIComponent; _local5 = new (_arg2); addPopUp(_local5, _arg1, _arg3, _arg4); return (_local5); } private function resizeHandler(_arg1:Event):void{ var _local2:Rectangle; var _local3:int; var _local4:int; var _local5:PopUpData; _local2 = ISystemManager(DisplayObject(_arg1.target).root).screen; _local3 = popupInfo.length; _local4 = 0; while (_local4 < _local3) { _local5 = popupInfo[_local4]; if (((_local5.modalWindow) && ((_local5.owner.stage == DisplayObject(_arg1.target).stage)))){ _local5.modalWindow.width = _local2.width; _local5.modalWindow.height = _local2.height; _local5.modalWindow.x = _local2.x; _local5.modalWindow.y = _local2.y; }; _local4++; }; } public function centerPopUp(_arg1:IFlexDisplayObject):void{ var _local2:PopUpData; var _local3:Point; if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).validateNow(); }; _local2 = findPopupInfoByOwner(_arg1); if (((_local2) && (_local2.parent))){ _local3 = new Point(0, 0); _local3 = _local2.parent.localToGlobal(_local3); _local3 = _arg1.parent.globalToLocal(_local3); _arg1.move((Math.round(((_local2.parent.width - _arg1.width) / 2)) + _local3.x), (Math.round(((_local2.parent.height - _arg1.height) / 2)) + _local3.y)); }; } private static function nonmodalMouseWheelOutsideHandler(_arg1:DisplayObject, _arg2:MouseEvent):void{ if (_arg1.hitTestPoint(_arg2.stageX, _arg2.stageY, true)){ } else { dispatchMouseWheelOutsideEvent(_arg1, _arg2); }; } private static function dispatchMouseWheelOutsideEvent(_arg1:DisplayObject, _arg2:MouseEvent):void{ var _local3:MouseEvent; var _local4:Point; _local3 = new FlexMouseEvent(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE); _local4 = _arg1.globalToLocal(new Point(_arg2.stageX, _arg2.stageY)); _local3.localX = _local4.x; _local3.localY = _local4.y; _local3.buttonDown = _arg2.buttonDown; _local3.shiftKey = _arg2.shiftKey; _local3.altKey = _arg2.altKey; _local3.ctrlKey = _arg2.ctrlKey; _local3.delta = _arg2.delta; _local3.relatedObject = InteractiveObject(_arg2.target); _arg1.dispatchEvent(_local3); } private static function dispatchMouseDownOutsideEvent(_arg1:DisplayObject, _arg2:MouseEvent):void{ var _local3:MouseEvent; var _local4:Point; _local3 = new FlexMouseEvent(FlexMouseEvent.MOUSE_DOWN_OUTSIDE); _local4 = _arg1.globalToLocal(new Point(_arg2.stageX, _arg2.stageY)); _local3.localX = _local4.x; _local3.localY = _local4.y; _local3.buttonDown = _arg2.buttonDown; _local3.shiftKey = _arg2.shiftKey; _local3.altKey = _arg2.altKey; _local3.ctrlKey = _arg2.ctrlKey; _local3.delta = _arg2.delta; _local3.relatedObject = InteractiveObject(_arg2.target); _arg1.dispatchEvent(_local3); } public static function getInstance():IPopUpManager{ if (!instance){ instance = new (PopUpManagerImpl); }; return (instance); } private static function nonmodalMouseDownOutsideHandler(_arg1:DisplayObject, _arg2:MouseEvent):void{ if (_arg1.hitTestPoint(_arg2.stageX, _arg2.stageY, true)){ } else { dispatchMouseDownOutsideEvent(_arg1, _arg2); }; } } }//package mx.managers import flash.events.*; import flash.display.*; import mx.effects.*; class PopUpData { public var parent:DisplayObject; public var _mouseDownOutsideHandler:Function; public var blur:Effect; public var _mouseWheelOutsideHandler:Function; public var owner:DisplayObject; public var topMost:Boolean; public var fade:Effect; public var modalWindow:DisplayObject; private function PopUpData(){ } public function mouseWheelOutsideHandler(_arg1:MouseEvent):void{ _mouseWheelOutsideHandler(owner, _arg1); } public function mouseDownOutsideHandler(_arg1:MouseEvent):void{ _mouseDownOutsideHandler(owner, _arg1); } }
Section 271
//SystemChildrenList (mx.managers.SystemChildrenList) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; public class SystemChildrenList implements IChildList { private var lowerBoundReference:QName; private var upperBoundReference:QName; private var owner:SystemManager; mx_internal static const VERSION:String = "2.0.1.0"; public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){ this.owner = _arg1; this.lowerBoundReference = _arg2; this.upperBoundReference = _arg3; } public function getChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1)); return (_local2); } public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2 = owner; _local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]); _local2 = owner; var _local3 = upperBoundReference; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; return (_arg1); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference])); var _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; return (_local2); } public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); _local2 = (_local2 - owner[lowerBoundReference]); return (_local2); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3 = owner; _local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2)); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; return (_arg1); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2)); } public function get numChildren():int{ return ((owner[upperBoundReference] - owner[lowerBoundReference])); } public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; if (owner.mx_internal::rawChildren_contains(_arg1)){ while (_arg1.parent != owner) { _arg1 = _arg1.parent; }; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){ return (true); }; }; return (false); } public function removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){ var _local3 = owner; _local3.mx_internal::rawChildren_removeChild(_arg1); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; }; return (_arg1); } } }//package mx.managers
Section 272
//SystemManager (mx.managers.SystemManager) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; import mx.events.*; import mx.styles.*; import mx.preloaders.*; import flash.system.*; import flash.utils.*; import mx.messaging.config.*; public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager { mx_internal var nestLevel:int;// = 0 private var forms:Array; private var mouseCatcher:Sprite; private var _height:Number; private var preloader:Preloader; private var _topLevelSystemManager:ISystemManager; private var _rawChildren:SystemRawChildrenList; private var _toolTipIndex:int;// = 0 private var _explicitHeight:Number; private var _document:Object; private var form:IFocusManagerContainer; private var _width:Number; private var _toolTipChildren:SystemChildrenList; private var initialized:Boolean;// = false private var _focusPane:Sprite; private var isStageRoot:Boolean;// = true private var rslSizes:Array;// = null private var _fontList:Object;// = null private var nextFrameTimer:Timer;// = null private var topLevel:Boolean;// = true private var _popUpChildren:SystemChildrenList; private var _cursorIndex:int;// = 0 private var _topMostIndex:int;// = 0 mx_internal var _mouseX; mx_internal var _mouseY; private var _numModalWindows:int;// = 0 private var _screen:Rectangle; mx_internal var idleCounter:int;// = 0 private var initCallbackFunctions:Array; private var _cursorChildren:SystemChildrenList; private var _noTopMostIndex:int;// = 0 private var _applicationIndex:int;// = 1 private var idleTimer:Timer; private var doneExecutingInitCallbacks:Boolean;// = false private var _explicitWidth:Number; mx_internal var topLevelWindow:IUIComponent; private static const IDLE_THRESHOLD:Number = 1000; private static const IDLE_INTERVAL:Number = 100; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var lastSystemManager:SystemManager; mx_internal static var allSystemManagers:Dictionary = new Dictionary(true); public function SystemManager(){ doneExecutingInitCallbacks = false; initCallbackFunctions = []; initialized = false; topLevel = true; isStageRoot = true; nestLevel = 0; rslSizes = null; forms = []; idleCounter = 0; nextFrameTimer = null; _applicationIndex = 1; _cursorIndex = 0; _fontList = null; _noTopMostIndex = 0; _numModalWindows = 0; _toolTipIndex = 0; _topMostIndex = 0; super(); if (stage){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; }; if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){ topLevel = false; }; if (!stage){ isStageRoot = false; }; if (topLevel){ SystemManagerGlobals.topLevelSystemManagers.push(this); }; lastSystemManager = this; executeCallbacks(); stop(); if (((topLevel) && (!((currentFrame == 1))))){ throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782."))); }; root.loaderInfo.addEventListener(Event.INIT, initHandler); } mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:int; var _local3:Class; var _local4:DisplayObjectContainer; _local2 = 1; if (!topLevel){ _local4 = parent.parent; while (_local4) { if ((_local4 is ILayoutManagerClient)){ _local2 = (ILayoutManagerClient(_local4).nestLevel + 1); break; }; _local4 = _local4.parent; }; }; nestLevel = _local2; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).systemManager = this; }; _local3 = Class(getDefinitionByName("mx.core.UIComponent")); if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = document; }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).initThemeColor(); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).stylesInitialized(); }; } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ addingChild(_arg1); super.addChild(_arg1); childAdded(_arg1); return (_arg1); } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:Boolean; var _local4:int; var _local5:int; var _local6:IStyleClient; _local3 = false; _local4 = rawChildren.numChildren; _local5 = 0; while (_local5 < _local4) { _local6 = (rawChildren.getChildAt(_local5) as IStyleClient); if (_local6){ _local6.styleChanged(_arg1); _local6.notifyStyleChangeInChildren(_arg1, _arg2); }; if (isTopLevelWindow(DisplayObject(_local6))){ _local3 = true; }; _local4 = rawChildren.numChildren; _local5++; }; if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).styleChanged(_arg1); IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2); }; } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } override public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; var _local3:int; var _local4:DisplayObject; if (super.contains(_arg1)){ if (_arg1.parent == this){ _local2 = super.getChildIndex(_arg1); if (_local2 < noTopMostIndex){ return (true); }; } else { _local3 = 0; while (_local3 < noTopMostIndex) { _local4 = super.getChildAt(_local3); if ((_local4 is IRawChildrenContainer)){ if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){ return (true); }; }; if ((_local4 is DisplayObjectContainer)){ if (DisplayObjectContainer(_local4).contains(_arg1)){ return (true); }; }; _local3++; }; }; }; return (false); } private function idleTimer_timerHandler(_arg1:TimerEvent):void{ idleCounter++; if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){ dispatchEvent(new FlexEvent(FlexEvent.IDLE)); }; } private function initHandler(_arg1:Event):void{ var _local2:int; var _local3:int; allSystemManagers[this] = this.loaderInfo.url; root.loaderInfo.removeEventListener(Event.INIT, initHandler); _local2 = ((totalFrames)==1) ? 0 : 1; addFrameScript(_local2, docFrameHandler); _local3 = (_local2 + 1); while (_local3 < totalFrames) { addFrameScript(_local3, extraFrameHandler); _local3++; }; initialize(); } public function getDefinitionByName(_arg1:String):Object{ var _local2:ApplicationDomain; var _local3:Object; _local2 = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain); if (_local2.hasDefinition(_arg1)){ _local3 = _local2.getDefinition(_arg1); }; return (_local3); } public function get embeddedFontList():Object{ var _local1:Object; var _local2:String; var _local3:Object; if (_fontList == null){ _fontList = {}; _local1 = info()["fonts"]; for (_local2 in _local1) { _fontList[_local2] = _local1[_local2]; }; if (((!(topLevel)) && (_topLevelSystemManager))){ _local3 = _topLevelSystemManager.embeddedFontList; for (_local2 in _local3) { _fontList[_local2] = _local3[_local2]; }; }; }; return (_fontList); } mx_internal function set cursorIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _cursorIndex); _cursorIndex = _arg1; } override public function getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt((applicationIndex + _arg1))); } public function set document(_arg1:Object):void{ _document = _arg1; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){ idleTimer = new Timer(IDLE_INTERVAL); idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler); idleTimer.start(); addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); }; super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } override public function get mouseX():Number{ if (_mouseX === undefined){ return (super.mouseX); }; return (_mouseX); } override public function get mouseY():Number{ if (_mouseY === undefined){ return (super.mouseY); }; return (_mouseY); } public function removeFocusManager(_arg1:IFocusManagerContainer):void{ var _local2:int; var _local3:int; _local2 = forms.length; _local3 = 0; while (_local3 < _local2) { if (forms[_local3] == _arg1){ if (form == _arg1){ deactivate(_arg1); }; forms.splice(_local3, 1); return; }; _local3++; }; } private function mouseMoveHandler(_arg1:MouseEvent):void{ idleCounter = 0; } public function get rawChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.rawChildren); }; if (!_rawChildren){ _rawChildren = new SystemRawChildrenList(this); }; return (_rawChildren); } public function get focusPane():Sprite{ return (_focusPane); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:IChildList; idleCounter = 0; if (numModalWindows == 0){ if (forms.length > 1){ _local2 = forms.length; _local3 = DisplayObject(_arg1.target); _local4 = document.rawChildren.contains(_local3); while (_local3) { _local5 = 0; while (_local5 < _local2) { if (forms[_local5] == _local3){ _local6 = 0; if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){ activate(IFocusManagerContainer(_local3)); }; if (popUpChildren.contains(_local3)){ _local9 = popUpChildren; } else { _local9 = this; }; _local7 = _local9.getChildIndex(_local3); _local8 = _local7; _local2 = forms.length; _local6 = 0; while (_local6 < _local2) { if (_local9.contains(forms[_local6])){ if (_local9.getChildIndex(forms[_local6]) > _local7){ _local8 = _local9.getChildIndex(forms[_local6]); }; }; _local6++; }; if ((((_local8 > _local7)) && (!(_local4)))){ _local9.setChildIndex(_local3, _local8); }; return; }; _local5++; }; _local3 = _local3.parent; }; }; }; } public function get screen():Rectangle{ if (!_screen){ Stage_resizeHandler(); }; return (_screen); } public function get preloaderBackgroundSize():String{ return (info()["backgroundSize"]); } private function docFrameHandler(_arg1:Event=null):void{ var _local2:Array; var _local3:int; var _local4:int; var _local5:Class; Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl"))); Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl"))); Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl"))); Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager"))); Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl"))); Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl"))); Singleton.registerClass("mx.managers::IToolTipManager", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl"))); executeCallbacks(); doneExecutingInitCallbacks = true; _local2 = info()["mixins"]; if (((_local2) && ((_local2.length > 0)))){ _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local5 = Class(getDefinitionByName(_local2[_local4])); var _local6 = _local5; _local6["init"](this); _local4++; }; }; initializeTopLevelWindow(null); deferredNextFrame(); } private function Stage_resizeHandler(_arg1:Event=null):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; _local2 = stage.stageWidth; _local3 = stage.stageHeight; _local4 = loaderInfo.width; _local5 = loaderInfo.height; _local6 = ((_local4 - _local2) / 2); _local7 = ((_local5 - _local3) / 2); _local8 = stage.align; if (_local8 == StageAlign.TOP){ _local7 = 0; } else { if (_local8 == StageAlign.BOTTOM){ _local7 = (_local5 - _local3); } else { if (_local8 == StageAlign.LEFT){ _local6 = 0; } else { if (_local8 == StageAlign.RIGHT){ _local6 = (_local4 - _local2); } else { if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){ _local7 = 0; _local6 = 0; } else { if (_local8 == StageAlign.TOP_RIGHT){ _local7 = 0; _local6 = (_local4 - _local2); } else { if (_local8 == StageAlign.BOTTOM_LEFT){ _local7 = (_local5 - _local3); _local6 = 0; } else { if (_local8 == StageAlign.BOTTOM_RIGHT){ _local7 = (_local5 - _local3); _local6 = (_local4 - _local2); }; }; }; }; }; }; }; }; if (!_screen){ _screen = new Rectangle(); }; _screen.x = _local6; _screen.y = _local7; _screen.width = _local2; _screen.height = _local3; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; }; if (_arg1){ resizeMouseCatcher(); dispatchEvent(_arg1); }; } public function get explicitHeight():Number{ return (_explicitHeight); } mx_internal function set topMostIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _topMostIndex); _topMostIndex = _arg1; toolTipIndex = (toolTipIndex + _local2); } override public function getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2))); } public function isTopLevel():Boolean{ return (topLevel); } public function deactivate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; var _local3:int; var _local4:int; var _local5:IFocusManagerContainer; if (form){ if ((((form == _arg1)) && ((forms.length > 1)))){ form.focusManager.deactivate(); _local3 = forms.length; _local4 = 0; while (_local4 < _local3) { _local5 = forms[_local4]; if (_local5 == _arg1){ _local4 = (_local4 + 1); while (_local4 < _local3) { _local5 = forms[_local4]; if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; _local4++; }; form = _local2; break; } else { if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; }; _local4++; }; if (form){ form.focusManager.activate(); }; }; }; } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function info():Object{ return ({}); } public function get measuredWidth():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width); } mx_internal function get toolTipIndex():int{ return (_toolTipIndex); } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (isStageRoot){ return; }; _width = _arg1; _height = _arg2; if (mouseCatcher){ mouseCatcher.width = _arg1; mouseCatcher.height = _arg2; }; dispatchEvent(new Event(Event.RESIZE)); } mx_internal function set applicationIndex(_arg1:int):void{ _applicationIndex = _arg1; } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } private function executeCallbacks():void{ var _local1:Function; if (!parent){ return; }; while (initCallbackFunctions.length > 0) { _local1 = initCallbackFunctions.shift(); _local1(this); }; } override public function addChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1))); } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } override public function removeChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChild(_arg1)); } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); super.removeChild(_arg1); childRemoved(_arg1); return (_arg1); } final mx_internal function get $numChildren():int{ return (super.numChildren); } override public function get stage():Stage{ var _local1:Stage; _local1 = super.stage; if (_local1){ return (_local1); }; if (((!(topLevel)) && (_topLevelSystemManager))){ return (_topLevelSystemManager.stage); }; return (null); } public function create(... _args):Object{ var _local2:String; var _local3:Class; var _local4:String; var _local5:int; var _local6:int; _local2 = info()["mainClassName"]; if (_local2 == null){ _local4 = loaderInfo.loaderURL; _local5 = _local4.lastIndexOf("."); _local6 = _local4.lastIndexOf("/"); _local2 = _local4.substring((_local6 + 1), _local5); }; _local3 = Class(getDefinitionByName(_local2)); return ((_local3) ? new (_local3) : null); } override public function getChildIndex(_arg1:DisplayObject):int{ return ((super.getChildIndex(_arg1) - applicationIndex)); } public function get popUpChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.popUpChildren); }; if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; return (_popUpChildren); } public function activate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; if (form){ if (((!((form == _arg1))) && ((forms.length > 1)))){ _local2 = form; _local2.focusManager.deactivate(); }; }; form = _arg1; if (_arg1.focusManager){ _arg1.focusManager.activate(); }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, (applicationIndex + _arg2)); } public function get toolTipChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.toolTipChildren); }; if (!_toolTipChildren){ _toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex")); }; return (_toolTipChildren); } private function deferredNextFrame():void{ if ((currentFrame + 1) > totalFrames){ return; }; if ((currentFrame + 1) <= framesLoaded){ nextFrame(); } else { nextFrameTimer = new Timer(100); nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.start(); }; } mx_internal function get cursorIndex():int{ return (_cursorIndex); } override public function getObjectsUnderPoint(_arg1:Point):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:DisplayObject; var _local6:Array; _local2 = []; _local3 = topMostIndex; _local4 = 0; while (_local4 < _local3) { _local5 = super.getChildAt(_local4); if ((_local5 is DisplayObjectContainer)){ _local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1); if (_local6){ _local2 = _local2.concat(_local6); }; }; _local4++; }; return (_local2); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } public function get document():Object{ return (_document); } private function resizeMouseCatcher():void{ var _local1:Graphics; if (mouseCatcher){ _local1 = mouseCatcher.graphics; _local1.clear(); _local1.beginFill(0, 0); _local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight); _local1.endFill(); }; } override public function get height():Number{ return (_height); } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } mx_internal function get topMostIndex():int{ return (_topMostIndex); } public function addFocusManager(_arg1:IFocusManagerContainer):void{ forms.push(_arg1); } mx_internal function set noTopMostIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _noTopMostIndex); _noTopMostIndex = _arg1; topMostIndex = (topMostIndex + _local2); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, _arg2); } private function mouseUpHandler(_arg1:MouseEvent):void{ idleCounter = 0; } mx_internal function childAdded(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; } public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{ var _local2:String; var _local3:Array; var _local4:int; var _local5:Object; var _local6:Font; var _local7:String; _local2 = _arg1.font; _local3 = Font.enumerateFonts(); _local4 = 0; while (_local4 < _local3.length) { _local6 = Font(_local3[_local4]); if (_local6.fontName == _local2){ _local7 = "regular"; if (((_arg1.bold) && (_arg1.italic))){ _local7 = "boldItalic"; } else { if (_arg1.bold){ _local7 = "bold"; } else { if (_arg1.italic){ _local7 = "italic"; }; }; }; if (_local6.fontStyle == _local7){ return (true); }; }; _local4++; }; if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){ return (false); }; _local5 = embeddedFontList[_local2]; return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular))))))); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_arg1 == FlexEvent.IDLE){ super.removeEventListener(_arg1, _arg2, _arg3); if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){ idleTimer.stop(); idleTimer = null; removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); }; } else { super.removeEventListener(_arg1, _arg2, _arg3); }; } override public function removeChildAt(_arg1:int):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChildAt((applicationIndex + _arg1))); } private function extraFrameHandler(_arg1:Event=null):void{ var _local2:Object; var _local3:Class; _local2 = info()["frames"]; if (((_local2) && (_local2[currentLabel]))){ _local3 = Class(getDefinitionByName(_local2[currentLabel])); var _local4 = _local3; _local4["frame"](this); }; deferredNextFrame(); } public function get application():IUIComponent{ return (IUIComponent(_document)); } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = super.getChildAt(_arg1); removingChild(_local2); super.removeChildAt(_arg1); childRemoved(_local2); return (_local2); } mx_internal function removingChild(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); } mx_internal function get applicationIndex():int{ return (_applicationIndex); } mx_internal function set toolTipIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _toolTipIndex); _toolTipIndex = _arg1; cursorIndex = (cursorIndex + _local2); } public function get cursorChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.cursorChildren); }; if (!_cursorChildren){ _cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex")); }; return (_cursorChildren); } public function get preloaderBackgroundImage():Object{ return (info()["backgroundImage"]); } public function set numModalWindows(_arg1:int):void{ _numModalWindows = _arg1; } public function get preloaderBackgroundAlpha():Number{ return (info()["backgroundAlpha"]); } private function preloader_preloaderDoneHandler(_arg1:Event):void{ var _local2:IUIComponent; _local2 = topLevelWindow; preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); _popUpChildren.removeChild(preloader); mouseCatcher = new FlexSprite(); mouseCatcher.name = "mouseCatcher"; noTopMostIndex++; super.addChildAt(mouseCatcher, 0); resizeMouseCatcher(); if (!topLevel){ mouseCatcher.visible = false; mask = mouseCatcher; }; noTopMostIndex++; super.addChildAt(DisplayObject(_local2), 1); _local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } mx_internal function initialize():void{ var _local1:Array; var _local2:Array; var _local3:Array; var _local4:int; var _local5:Boolean; var _local6:Class; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; } else { _width = loaderInfo.width; _height = loaderInfo.height; }; preloader = new Preloader(); preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; _popUpChildren.addChild(preloader); _local1 = []; _local2 = []; _local3 = info()["rsls"]; _local4 = 0; while (((_local3) && ((_local4 < _local3.length)))) { _local1[_local4] = _local3[_local4].url; _local2[_local4] = _local3[_local4].size; _local4++; }; _local5 = true; if (info()["usePreloader"] != undefined){ _local5 = info()["usePreloader"]; }; _local6 = (info()["preloader"] as Class); if (((_local5) && (!(_local6)))){ _local6 = DownloadProgressBar; }; preloader.initialize(_local5, _local6, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, _local1, _local2); } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ var _local2:DisplayObjectContainer; if (((!(topLevel)) && (parent))){ _local2 = parent.parent; while (_local2) { if ((_local2 is IInvalidating)){ IInvalidating(_local2).invalidateSize(); IInvalidating(_local2).invalidateDisplayList(); return; }; _local2 = _local2.parent; }; }; } public function get measuredHeight():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height); } mx_internal function regenerateStyleCache(_arg1:Boolean):void{ var _local2:Boolean; var _local3:int; var _local4:int; var _local5:IStyleClient; _local2 = false; _local3 = rawChildren.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (rawChildren.getChildAt(_local4) as IStyleClient); if (_local5){ _local5.regenerateStyleCache(_arg1); }; if (isTopLevelWindow(DisplayObject(_local5))){ _local2 = true; }; _local3 = rawChildren.numChildren; _local4++; }; if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).regenerateStyleCache(_arg1); }; } public function get topLevelSystemManager():ISystemManager{ if (topLevel){ return (this); }; return (_topLevelSystemManager); } private function nextFrameTimerHandler(_arg1:TimerEvent):void{ if ((currentFrame + 1) <= framesLoaded){ nextFrame(); nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.reset(); }; } public function get preloaderBackgroundColor():uint{ var _local1:*; _local1 = info()["backgroundColor"]; if (_local1 == undefined){ return (4294967295); }; return (uint(_local1)); } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(null); }; } override public function get numChildren():int{ return ((noTopMostIndex - applicationIndex)); } mx_internal function get noTopMostIndex():int{ return (_noTopMostIndex); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ addingChild(_arg1); super.addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } public function get numModalWindows():int{ return (_numModalWindows); } private function initializeTopLevelWindow(_arg1:Event):void{ var _local2:IUIComponent; var _local3:DisplayObjectContainer; initialized = true; if (!parent){ return; }; if (!topLevel){ _local3 = parent.parent; if (!_local3){ return; }; while (_local3) { if ((_local3 is IUIComponent)){ _topLevelSystemManager = IUIComponent(_local3).systemManager; break; }; _local3 = _local3.parent; }; }; addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true); if (((topLevel) && (stage))){ stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true); }; _local2 = (topLevelWindow = IUIComponent(create())); document = _local2; if (document){ IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); if (((topLevel) && (stage))){ LoaderConfig._url = loaderInfo.url; LoaderConfig._parameters = loaderInfo.parameters; _width = stage.stageWidth; _height = stage.stageHeight; IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight); } else { IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height); }; preloader.registerApplication(_local2); addingChild(DisplayObject(_local2)); childAdded(DisplayObject(_local2)); } else { document = this; }; } override public function get width():Number{ return (_width); } public function isTopLevelWindow(_arg1:DisplayObject):Boolean{ return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow)))); } public function move(_arg1:Number, _arg2:Number):void{ } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } private function preloader_initProgressHandler(_arg1:Event):void{ preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); deferredNextFrame(); } public function get explicitWidth():Number{ return (_explicitWidth); } public static function getSWFRoot(_arg1:Object):DisplayObject{ var className:String; var p:*; var sm:SystemManager; var domain:ApplicationDomain; var cls:Class; var object = _arg1; className = getQualifiedClassName(object); for (p in allSystemManagers) { sm = (p as SystemManager); domain = sm.loaderInfo.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (sm); }; } catch(e:Error) { }; }; return (null); } mx_internal static function registerInitCallback(_arg1:Function):void{ var _local2:SystemManager; if (((!(allSystemManagers)) || (!(lastSystemManager)))){ return; }; _local2 = lastSystemManager; if (_local2.doneExecutingInitCallbacks){ _arg1(_local2); } else { _local2.initCallbackFunctions.push(_arg1); }; } } }//package mx.managers
Section 273
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var bootstrapLoaderInfoURL:String; } }//package mx.managers
Section 274
//SystemRawChildrenList (mx.managers.SystemRawChildrenList) package mx.managers { import flash.display.*; import flash.geom.*; import mx.core.*; public class SystemRawChildrenList implements IChildList { private var owner:SystemManager; mx_internal static const VERSION:String = "2.0.1.0"; public function SystemRawChildrenList(_arg1:SystemManager){ this.owner = _arg1; } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } } }//package mx.managers
Section 275
//ToolTipManager (mx.managers.ToolTipManager) package mx.managers { import mx.core.*; import flash.events.*; import flash.display.*; import mx.effects.*; public class ToolTipManager extends EventDispatcher { mx_internal static const VERSION:String = "2.0.1.0"; private static var impl:IToolTipManager = (Singleton.getInstance("mx.managers::IToolTipManager") as IToolTipManager); private static var implClassDependency:ToolTipManagerImpl; public static function get enabled():Boolean{ return (impl.enabled); } public static function set enabled(_arg1:Boolean):void{ impl.enabled = _arg1; } mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String):void{ impl.registerToolTip(_arg1, _arg2); } public static function set hideDelay(_arg1:Number):void{ impl.hideDelay = _arg1; } public static function set showDelay(_arg1:Number):void{ impl.showDelay = _arg1; } public static function get showDelay():Number{ return (impl.showDelay); } public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5)); } public static function destroyToolTip(_arg1:IToolTip):void{ return (impl.destroyToolTip(_arg1)); } public static function get scrubDelay():Number{ return (impl.scrubDelay); } public static function get toolTipClass():Class{ return (impl.toolTipClass); } mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String):void{ impl.registerErrorString(_arg1, _arg2); } mx_internal static function sizeTip(_arg1:IToolTip):void{ impl.sizeTip(_arg1); } public static function set currentTarget(_arg1:DisplayObject):void{ impl.currentTarget = _arg1; } public static function set showEffect(_arg1:Effect):void{ impl.showEffect = _arg1; } public static function get hideDelay():Number{ return (impl.hideDelay); } public static function set hideEffect(_arg1:Effect):void{ impl.hideEffect = _arg1; } public static function set scrubDelay(_arg1:Number):void{ impl.scrubDelay = _arg1; } public static function get currentToolTip():IToolTip{ return (impl.currentToolTip); } public static function set currentToolTip(_arg1:IToolTip):void{ impl.currentToolTip = _arg1; } public static function get showEffect():Effect{ return (impl.showEffect); } public static function get currentTarget():DisplayObject{ return (impl.currentTarget); } public static function get hideEffect():Effect{ return (impl.hideEffect); } public static function set toolTipClass(_arg1:Class):void{ impl.toolTipClass = _arg1; } } }//package mx.managers
Section 276
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl) package mx.managers { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.effects.*; import mx.controls.*; import flash.utils.*; import mx.validators.*; public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager { private var _enabled:Boolean;// = true private var _showDelay:Number;// = 500 private var _hideEffect:Effect; private var hideTimer:Timer; private var _toolTipClass:Class; private var _scrubDelay:Number;// = 100 private var showTimer:Timer; private var _currentToolTip:IToolTip; private var currentText:String; private var scrubTimer:Timer; private var previousTarget:DisplayObject; private var _currentTarget:DisplayObject; private var _showEffect:Effect; private var initialized:Boolean;// = false private var _hideDelay:Number;// = 10000 private var isError:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:IToolTipManager; public function ToolTipManagerImpl(){ initialized = false; _enabled = true; _hideDelay = 10000; _scrubDelay = 100; _showDelay = 500; _toolTipClass = ToolTip; super(); if (instance){ throw (new Error("Instance already exists.")); }; } private function toolTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } private function showTimer_timerHandler(_arg1:TimerEvent):void{ if (currentTarget){ createTip(); initializeTip(); positionTip(); showTip(); }; } private function systemManager_mouseDownHandler(_arg1:MouseEvent):void{ reset(); } public function set showDelay(_arg1:Number):void{ _showDelay = _arg1; } private function hideEffectEnded():void{ var _local1:ToolTipEvent; reset(); if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; } public function set scrubDelay(_arg1:Number):void{ _scrubDelay = _arg1; } public function get currentToolTip():IToolTip{ return (_currentToolTip); } private function toolTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } public function get enabled():Boolean{ return (_enabled); } public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ var _local6:ToolTip; var _local7:ISystemManager; _local6 = new ToolTip(); _local7 = (_arg5) ? _arg5.systemManager : Application.application.systemManager; _local7.toolTipChildren.addChild(_local6); if (_arg4){ _local6.setStyle("styleName", "errorTip"); _local6.setStyle("borderStyle", _arg4); }; _local6.text = _arg1; sizeTip(_local6); _local6.move(_arg2, _arg3); return ((_local6 as IToolTip)); } private function reset():void{ var _local1:ISystemManager; showTimer.reset(); hideTimer.reset(); if (currentToolTip){ if (((showEffect) || (hideEffect))){ currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; EffectManager.endEffectsForTarget(currentToolTip); _local1 = getSystemManager(previousTarget); _local1.toolTipChildren.removeChild(DisplayObject(currentToolTip)); currentToolTip = null; scrubTimer.delay = scrubDelay; scrubTimer.reset(); if (scrubDelay > 0){ scrubTimer.delay = scrubDelay; scrubTimer.start(); }; }; } public function set currentToolTip(_arg1:IToolTip):void{ _currentToolTip = _arg1; } private function showTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); if (isError){ currentTarget.addEventListener("change", changeHandler); } else { _local2 = getSystemManager(currentTarget); _local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; currentToolTip.visible = true; if (!showEffect){ showEffectEnded(); }; } private function effectEndHandler(_arg1:EffectEvent):void{ if (_arg1.effectInstance.effect == showEffect){ showEffectEnded(); } else { if (_arg1.effectInstance.effect == hideEffect){ hideEffectEnded(); }; }; } public function get hideDelay():Number{ return (_hideDelay); } public function get toolTipClass():Class{ return (_toolTipClass); } public function get currentTarget():DisplayObject{ return (_currentTarget); } public function get hideEffect():Effect{ return (_hideEffect); } private function showEffectEnded():void{ var _local1:ToolTipEvent; if (hideDelay == 0){ hideTip(); } else { if (hideDelay < Infinity){ hideTimer.delay = hideDelay; hideTimer.start(); }; }; if (currentTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); }; } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; } private function errorTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } public function get scrubDelay():Number{ return (_scrubDelay); } public function get showDelay():Number{ return (_showDelay); } public function registerErrorString(_arg1:DisplayObject, _arg2:String):void{ var _local3:String; _local3 = IValidatorListener(_arg1).errorString; if (((!(_local3)) && (_arg2))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); } else { if (((_local3) && (!(_arg2)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); }; }; } private function initialize():void{ if (!showTimer){ showTimer = new Timer(0, 1); showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler); }; if (!hideTimer){ hideTimer = new Timer(0, 1); hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler); }; if (!scrubTimer){ scrubTimer = new Timer(0, 1); }; initialized = true; } public function destroyToolTip(_arg1:IToolTip):void{ var _local2:ISystemManager; _local2 = _arg1.systemManager; _local2.toolTipChildren.removeChild(DisplayObject(_arg1)); } private function checkIfTargetChanged(_arg1:DisplayObject):void{ if (!enabled){ return; }; findTarget(_arg1); if (currentTarget != previousTarget){ targetChanged(); previousTarget = currentTarget; }; } private function changeHandler(_arg1:Event):void{ reset(); } public function set toolTipClass(_arg1:Class):void{ _toolTipClass = _arg1; } private function getGlobalBounds(_arg1:DisplayObject):Rectangle{ var _local2:Point; _local2 = new Point(0, 0); _local2 = _arg1.localToGlobal(_local2); return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height)); } private function positionTip():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Rectangle; var _local6:Point; var _local7:IToolTip; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _local3 = currentToolTip.screen.width; _local4 = currentToolTip.screen.height; if (isError){ _local5 = getGlobalBounds(currentTarget); _local1 = (_local5.right + 4); _local2 = (_local5.top - 1); if ((_local1 + currentToolTip.width) > _local3){ _local8 = NaN; _local9 = NaN; _local1 = (_local5.left - 2); if (((_local1 + currentToolTip.width) + 4) > _local3){ _local8 = ((_local3 - _local1) - 4); _local9 = Object(toolTipClass).maxWidth; Object(toolTipClass).maxWidth = _local8; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; Object(toolTipClass).maxWidth = _local9; } else { if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; }; if ((currentToolTip.height + 2) < _local5.top){ _local2 = (_local5.top - (currentToolTip.height + 2)); } else { _local2 = (_local5.bottom + 2); if (!isNaN(_local8)){ Object(toolTipClass).maxWidth = _local8; }; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow"); }; currentToolTip["text"] = currentToolTip["text"]; if (!isNaN(_local9)){ Object(toolTipClass).maxWidth = _local9; }; }; }; sizeTip(currentToolTip); _local6 = new Point(_local1, _local2); _local7 = currentToolTip; _local6 = DisplayObject(_local7).root.globalToLocal(_local6); _local1 = _local6.x; _local2 = _local6.y; } else { _local1 = (Application.application.mouseX + 11); _local2 = (Application.application.mouseY + 22); _local10 = currentToolTip.width; if ((_local1 + _local10) > _local3){ _local1 = (_local3 - _local10); }; _local11 = currentToolTip.height; if ((_local2 + _local11) > _local4){ _local2 = (_local4 - _local11); }; }; currentToolTip.move(_local1, _local2); } private function errorTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } private function findTarget(_arg1:DisplayObject):void{ while (_arg1) { if ((_arg1 is IValidatorListener)){ currentText = IValidatorListener(_arg1).errorString; if (((!((currentText == null))) && (!((currentText == ""))))){ currentTarget = _arg1; isError = true; return; }; }; if ((_arg1 is IToolTipManagerClient)){ currentText = IToolTipManagerClient(_arg1).toolTip; if (currentText != null){ currentTarget = _arg1; isError = false; return; }; }; _arg1 = _arg1.parent; }; currentText = null; currentTarget = null; } public function registerToolTip(_arg1:DisplayObject, _arg2:String):void{ var _local3:String; if ((_arg1 is IToolTipManagerClient)){ _local3 = IToolTipManagerClient(_arg1).toolTip; }; if (((!(_local3)) && (_arg2))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); } else { if (((_local3) && (!(_arg2)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); }; }; } public function set hideDelay(_arg1:Number):void{ _hideDelay = _arg1; } private function getSystemManager(_arg1:DisplayObject):ISystemManager{ return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null); } public function set currentTarget(_arg1:DisplayObject):void{ _currentTarget = _arg1; } public function set showEffect(_arg1:Effect):void{ _showEffect = _arg1; } public function sizeTip(_arg1:IToolTip):void{ if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).validateNow(); }; _arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight()); } public function set hideEffect(_arg1:Effect):void{ _hideEffect = _arg1; } private function hideTimer_timerHandler(_arg1:TimerEvent):void{ hideTip(); } private function targetChanged():void{ var _local1:ToolTipEvent; if (!initialized){ initialize(); }; if (((previousTarget) && (currentToolTip))){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; reset(); if (currentTarget){ if (currentText == ""){ return; }; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START); currentTarget.dispatchEvent(_local1); if ((((showDelay == 0)) || (scrubTimer.running))){ createTip(); initializeTip(); positionTip(); showTip(); } else { showTimer.delay = showDelay; showTimer.start(); }; }; } private function initializeTip():void{ if ((currentToolTip is ToolTip)){ ToolTip(currentToolTip).text = currentText; }; if (((isError) && ((currentToolTip is IStyleClient)))){ IStyleClient(currentToolTip).setStyle("styleName", "errorTip"); }; sizeTip(currentToolTip); if ((currentToolTip is IStyleClient)){ if (showEffect){ IStyleClient(currentToolTip).setStyle("showEffect", showEffect); }; if (hideEffect){ IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect); }; }; if (((showEffect) || (hideEffect))){ currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; } public function get showEffect():Effect{ return (_showEffect); } private function hideTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; if (currentToolTip){ currentToolTip.visible = false; }; if (isError){ if (currentTarget){ currentTarget.removeEventListener("change", changeHandler); }; } else { if (previousTarget){ _local2 = getSystemManager(previousTarget); _local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; }; if (!hideEffect){ hideEffectEnded(); }; } private function createTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE); currentTarget.dispatchEvent(_local1); if (_local1.toolTip){ currentToolTip = _local1.toolTip; } else { currentToolTip = new toolTipClass(); }; currentToolTip.visible = false; _local2 = getSystemManager(currentTarget); _local2.toolTipChildren.addChild(DisplayObject(currentToolTip)); } public static function getInstance():IToolTipManager{ if (!instance){ instance = new (ToolTipManagerImpl); }; return (instance); } } }//package mx.managers
Section 277
//LoaderConfig (mx.messaging.config.LoaderConfig) package mx.messaging.config { import mx.core.*; public class LoaderConfig { mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var _url:String = null; mx_internal static var _parameters:Object; public static function get url():String{ return (_url); } public static function get parameters():Object{ return (_parameters); } } }//package mx.messaging.config
Section 278
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import mx.core.*; import flash.events.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function get error():Boolean; function get factory():IFlexModuleFactory; function release():void; function get data():Object; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void; function get url():String; function set data(_arg1:Object):void; function get setup():Boolean; function publish(_arg1:IFlexModuleFactory):void; function unload():void; } }//package mx.modules
Section 279
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "2.0.1.0"; public static function getModule(_arg1:String):IModuleInfo{ return (getSingleton().getModule(_arg1)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(_arg1)); } } }//package mx.modules import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import flash.net.*; import flash.system.*; import flash.utils.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(_arg1:ModuleInfo){ referenced = false; super(); this.info = _arg1; _arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler); _arg1.addEventListener(ModuleEvent.READY, moduleEventHandler); _arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler); _arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } public function get loaded():Boolean{ return (info.loaded); } public function get error():Boolean{ return (info.error); } public function set data(_arg1:Object):void{ _data = _arg1; } public function publish(_arg1:IFlexModuleFactory):void{ info.publish(_arg1); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get ready():Boolean{ return (info.ready); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ var _local3:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ _local3 = new ModuleEvent(ModuleEvent.PROGRESS); _local3.bytesLoaded = info.size; _local3.bytesTotal = info.size; dispatchEvent(_local3); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(_arg1, _arg2); }; }; } public function get data():Object{ return (_data); } private function moduleEventHandler(_arg1:ModuleEvent):void{ dispatchEvent(_arg1); } public function get url():String{ return (info.url); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(_arg1:String):IModuleInfo{ var _local2:ModuleInfo; _local2 = (moduleList[_arg1] as _slot3); if (!_local2){ _local2 = new ModuleInfo(_arg1); moduleList[_arg1] = _local2; }; return (new ModuleInfoProxy(_local2)); } public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ var className:String; var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = _arg1; className = getQualifiedClassName(object); for each (m in moduleList) { info = (m as _slot3); if (!info.ready){ } else { domain = info.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; } catch(error:Error) { }; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _setup:Boolean;// = false private function ModuleInfo(_arg1:String){ numReferences = 0; _error = false; _loaded = false; _ready = false; _setup = false; super(); _url = _arg1; } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function publish(_arg1:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = _arg1; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(_arg1:Event):void{ var moduleEvent:ModuleEvent; var event = _arg1; factoryInfo = new FactoryInfo(); try { factoryInfo.factory = (loader.content as IFlexModuleFactory); } catch(error:Error) { }; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); try { factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; } catch(error:Error) { }; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var _local1:Object; if (((!(factoryInfo)) && (limbo))){ for (_local1 in limbo) { factoryInfo = (_local1 as _slot4); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(_arg1:ErrorEvent):void{ var _local2:ModuleEvent; _error = true; _local2 = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = 0; _local2.bytesTotal = 0; _local2.errorText = _arg1.text; dispatchEvent(_local2); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function readyHandler(_arg1:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; try { if (loader.content){ loader.content.removeEventListener("ready", readyHandler); }; } catch(error:Error) { }; if (_loaded){ try { loader.close(); } catch(error:Error) { }; }; try { loader.unload(); } catch(error:Error) { }; loader = null; }; } public function progressHandler(_arg1:ProgressEvent):void{ var _local2:ModuleEvent; _local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ var _local3:URLRequest; var _local4:LoaderContext; if (_loaded){ return; }; _loaded = true; limbo = null; if (_url.indexOf("published://") == 0){ return; }; _local3 = new URLRequest(_url); _local4 = new LoaderContext(); _local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); _local4.securityDomain = _arg2; if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){ _local4.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(_local3, _local4); } public function completeHandler(_arg1:Event):void{ var _local2:ModuleEvent; _local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; _local2.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(_local2); } public function get url():String{ return (_url); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ bytesTotal = 0; super(); } }
Section 280
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; } }//package mx.modules
Section 281
//DownloadProgressBar (mx.preloaders.DownloadProgressBar) package mx.preloaders { import flash.display.*; import flash.geom.*; import mx.core.*; import flash.text.*; import flash.events.*; import mx.events.*; import mx.graphics.*; import flash.net.*; import flash.system.*; import flash.utils.*; public class DownloadProgressBar extends Sprite implements IPreloaderDisplay { private var _stageHeight:Number;// = 375 private var _percentRect:Rectangle; private var _percentObj:TextField; private var _backgroundSize:String;// = "" private var _showLabel:Boolean;// = true private var _value:Number;// = 0 private var _backgroundAlpha:Number;// = 1 private var _backgroundImage:Object; private var _backgroundColor:uint; protected var DOWNLOAD_PERCENTAGE:uint;// = 60 private var _labelObj:TextField; private var _barFrameSprite:Sprite; private var _maximum:Number;// = 0 private var _startTime:int; private var _preloader:Sprite; private var _displayTime:int; protected var MINIMUM_DISPLAY_TIME:uint;// = 0 private var _stageWidth:Number;// = 500 private var _downloadingLabel:String;// = "Loading" private var _showProgressBar:Boolean;// = true private var _yOffset:Number;// = 20 private var _initProgressCount:uint;// = 0 private var _barSprite:Sprite; private var _visible:Boolean;// = false private var _barRect:RoundedRectangle; private var _showingDisplay:Boolean;// = false private var _initProgressTotal:uint;// = 12 private var _startedInit:Boolean;// = false private var _labelRect:Rectangle; private var _showPercentage:Boolean;// = false private var _startedLoading:Boolean;// = false private var _displayStartCount:uint;// = 0 private var _borderRect:RoundedRectangle; private var _xOffset:Number;// = 20 private var _label:String;// = "" private var _barFrameRect:RoundedRectangle; mx_internal static const VERSION:String = "2.0.1.0"; private static var _initializingLabel:String = "Initializing"; public function DownloadProgressBar(){ MINIMUM_DISPLAY_TIME = 0; DOWNLOAD_PERCENTAGE = 60; _showProgressBar = true; _labelRect = labelRect; _percentRect = percentRect; _borderRect = borderRect; _barFrameRect = barFrameRect; _barRect = barRect; _xOffset = 20; _yOffset = 20; _maximum = 0; _value = 0; _startedLoading = false; _startedInit = false; _showingDisplay = false; _displayStartCount = 0; _initProgressCount = 0; _initProgressTotal = 12; _visible = false; _backgroundAlpha = 1; _backgroundSize = ""; _stageHeight = 375; _stageWidth = 500; _downloadingLabel = "Loading"; _label = ""; _showLabel = true; _showPercentage = false; super(); } private function calcScale():void{ var _local1:Number; if ((((stageWidth < 160)) || ((stageHeight < 120)))){ scaleX = 1; scaleY = 1; } else { if ((((stageWidth < 240)) || ((stageHeight < 150)))){ createChildren(); _local1 = Math.min((stageWidth / 240), (stageHeight / 150)); scaleX = _local1; scaleY = _local1; } else { createChildren(); }; }; } protected function get labelFormat():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.color = 0x333333; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } protected function rslCompleteHandler(_arg1:RSLEvent):void{ label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal); } protected function set showLabel(_arg1:Boolean):void{ _showLabel = _arg1; draw(); } private function calcBackgroundSize():Number{ var _local1:Number; var _local2:int; _local1 = NaN; if (backgroundSize){ _local2 = backgroundSize.indexOf("%"); if (_local2 != -1){ _local1 = Number(backgroundSize.substr(0, _local2)); }; }; return (_local1); } protected function rslErrorHandler(_arg1:RSLEvent):void{ _preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler); _preloader.removeEventListener(Event.COMPLETE, completeHandler); _preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); if (!_showingDisplay){ show(); _showingDisplay = true; }; label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal); } protected function get barFrameRect():RoundedRectangle{ return (new RoundedRectangle(14, 40, 154, 4)); } private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{ } protected function get borderRect():RoundedRectangle{ return (new RoundedRectangle(0, 0, 182, 60, 4)); } protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{ return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2))))); } private function timerHandler(_arg1:Event=null):void{ dispatchEvent(new Event(Event.COMPLETE)); } protected function progressHandler(_arg1:ProgressEvent):void{ var _local2:uint; var _local3:uint; var _local4:int; _local2 = _arg1.bytesLoaded; _local3 = _arg1.bytesTotal; _local4 = (getTimer() - _startTime); if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){ if (!_startedLoading){ show(); label = downloadingLabel; _startedLoading = true; }; setProgress(_arg1.bytesLoaded, _arg1.bytesTotal); }; } public function get backgroundSize():String{ return (_backgroundSize); } override public function get visible():Boolean{ return (_visible); } protected function center(_arg1:Number, _arg2:Number):void{ _xOffset = Math.floor(((_arg1 - _borderRect.width) / 2)); _yOffset = Math.floor(((_arg2 - _borderRect.height) / 2)); } protected function get barRect():RoundedRectangle{ return (new RoundedRectangle(14, 39, 154, 6, 0)); } protected function rslProgressHandler(_arg1:RSLEvent):void{ } public function set backgroundSize(_arg1:String):void{ _backgroundSize = _arg1; } private function initCompleteHandler(_arg1:Event):void{ var _local2:int; var _local3:Timer; _local2 = (getTimer() - _displayTime); if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){ _local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1); _local3.addEventListener(TimerEvent.TIMER, timerHandler); _local3.start(); } else { timerHandler(); }; } protected function get percentFormat():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.align = "right"; _local1.color = 0; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } private function calcY(_arg1:Number):Number{ return ((_arg1 + _yOffset)); } protected function setProgress(_arg1:Number, _arg2:Number):void{ if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){ _value = Number(_arg1); _maximum = Number(_arg2); draw(); }; } protected function get downloadingLabel():String{ return (_downloadingLabel); } private function calcX(_arg1:Number):Number{ return ((_arg1 + _xOffset)); } protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{ return ((((_arg1 > 300)) && ((_arg2 == 2)))); } private function drawProgressBar(_arg1:Number):void{ var _local2:Graphics; var _local3:Array; var _local4:Array; var _local5:Matrix; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _local2 = _barSprite.graphics; _local2.clear(); _local3 = [0xFFFFFF, 0xFFFFFF]; _local4 = [0, 0xFF]; _local5 = new Matrix(); _local6 = ((_barRect.width * _arg1) / 100); _local7 = (_local6 / 2); _local8 = (_barRect.height - 4); _local9 = calcX(_barRect.x); _local10 = (calcY(_barRect.y) + 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, _local8); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, _local8); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = calcY(_barRect.y); _local11 = ((_local10 + _local8) - 1); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = (calcY(_barRect.y) + 1); _local11 = ((calcY(_barRect.y) + _local8) - 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); } public function get backgroundImage():Object{ return (_backgroundImage); } public function set stageWidth(_arg1:Number):void{ _stageWidth = _arg1; } public function get backgroundAlpha():Number{ if (!isNaN(_backgroundAlpha)){ return (_backgroundAlpha); }; return (1); } public function set preloader(_arg1:Sprite):void{ _preloader = _arg1; _arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.addEventListener(Event.COMPLETE, completeHandler); _arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); } public function get backgroundColor():uint{ return (_backgroundColor); } protected function set showPercentage(_arg1:Boolean):void{ _showPercentage = _arg1; draw(); } override public function set visible(_arg1:Boolean):void{ if (((!(_visible)) && (_arg1))){ show(); } else { if (((_visible) && (!(_arg1)))){ hide(); }; }; _visible = _arg1; } protected function get labelRect():Rectangle{ return (new Rectangle(14, 17, 100, 16)); } private function show():void{ _showingDisplay = true; calcScale(); draw(); _displayTime = getTimer(); } protected function createChildren():void{ var _local1:Graphics; var _local2:TextField; var _local3:TextField; var _local4:Graphics; var _local5:Matrix; var _local6:RectangularDropShadow; _local1 = graphics; if (backgroundImage != null){ loadBackgroundImage(backgroundImage); }; _barFrameSprite = new Sprite(); _barSprite = new Sprite(); addChild(_barFrameSprite); addChild(_barSprite); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2)); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); _local4 = _barFrameSprite.graphics; _local5 = new Matrix(); _local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y)); _local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5); _local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.endFill(); _labelObj = new TextField(); _labelObj.x = calcX(_labelRect.x); _labelObj.y = calcY(_labelRect.y); _labelObj.width = _labelRect.width; _labelObj.height = _labelRect.height; _labelObj.selectable = false; _labelObj.defaultTextFormat = labelFormat; addChild(_labelObj); _percentObj = new TextField(); _percentObj.x = calcX(_percentRect.x); _percentObj.y = calcY(_percentRect.y); _percentObj.width = _percentRect.width; _percentObj.height = _percentRect.height; _percentObj.selectable = false; _percentObj.defaultTextFormat = percentFormat; addChild(_percentObj); _local6 = new RectangularDropShadow(); _local6.color = 0; _local6.angle = 90; _local6.alpha = 0.6; _local6.distance = 2; _local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius))); _local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height); _local1.lineStyle(1, 0xFFFFFF, 0.3); _local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y)); _local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y)); } private function loadBackgroundImage(_arg1:Object):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var classOrString = _arg1; if (((classOrString) && ((classOrString as Class)))){ cls = Class(classOrString); initBackgroundImage(new (cls)); } else { if (((classOrString) && ((classOrString is String)))){ try { cls = Class(getDefinitionByName(String(classOrString))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(classOrString)), loaderContext); }; }; }; } private function hide():void{ } private function draw():void{ var _local1:Number; if (_startedLoading){ if (!_startedInit){ _local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100)); } else { _local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE)); }; } else { _local1 = getPercentLoaded(_value, _maximum); }; if (_labelObj){ _labelObj.text = _label; }; if (_percentObj){ if (!_showPercentage){ _percentObj.visible = false; _percentObj.text = ""; } else { _percentObj.text = (String(_local1) + "%"); }; }; if (((_barSprite) && (_barFrameSprite))){ if (!_showProgressBar){ _barSprite.visible = false; _barFrameSprite.visible = false; } else { drawProgressBar(_local1); }; }; } protected function initProgressHandler(_arg1:Event):void{ var _local2:int; var _local3:Number; _local2 = (getTimer() - _startTime); _initProgressCount++; if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){ _displayStartCount = _initProgressCount; show(); } else { if (_showingDisplay){ if (!_startedInit){ _startedInit = true; label = initializingLabel; }; _local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount)); setProgress(_local3, 100); }; }; } protected function get label():String{ return (_label); } protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{ var _local3:Number; if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){ return (0); }; _local3 = ((100 * _arg1) / _arg2); if (((isNaN(_local3)) || ((_local3 <= 0)))){ return (0); }; if (_local3 > 99){ return (99); }; return (Math.round(_local3)); } protected function set downloadingLabel(_arg1:String):void{ _downloadingLabel = _arg1; } public function get stageWidth():Number{ return (_stageWidth); } public function set stageHeight(_arg1:Number):void{ _stageHeight = _arg1; } protected function get showPercentage():Boolean{ return (_showPercentage); } public function initialize():void{ _startTime = getTimer(); center(stageWidth, stageHeight); } private function initBackgroundImage(_arg1:DisplayObject):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; addChildAt(_arg1, 0); _local2 = _arg1.width; _local3 = _arg1.height; _local4 = calcBackgroundSize(); if (isNaN(_local4)){ _local7 = 1; _local8 = 1; } else { _local9 = (_local4 * 0.01); _local7 = ((_local9 * stageWidth) / _local2); _local8 = ((_local9 * stageHeight) / _local3); }; _arg1.scaleX = _local7; _arg1.scaleY = _local8; _local5 = Math.round((0.5 * (stageWidth - (_local2 * _local7)))); _local6 = Math.round((0.5 * (stageHeight - (_local3 * _local8)))); _arg1.x = _local5; _arg1.y = _local6; if (!isNaN(backgroundAlpha)){ _arg1.alpha = backgroundAlpha; }; } public function set backgroundImage(_arg1:Object):void{ _backgroundImage = _arg1; } public function set backgroundAlpha(_arg1:Number):void{ _backgroundAlpha = _arg1; } public function set backgroundColor(_arg1:uint):void{ _backgroundColor = _arg1; } private function loader_completeHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); } public function get stageHeight():Number{ return (_stageHeight); } protected function get percentRect():Rectangle{ return (new Rectangle(108, 4, 34, 16)); } protected function completeHandler(_arg1:Event):void{ } protected function set label(_arg1:String):void{ if (!(_arg1 is Function)){ _label = _arg1; }; draw(); } protected function get showLabel():Boolean{ return (_showLabel); } public static function get initializingLabel():String{ return (_initializingLabel); } public static function set initializingLabel(_arg1:String):void{ _initializingLabel = _arg1; } } }//package mx.preloaders
Section 282
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay) package mx.preloaders { import flash.display.*; import flash.events.*; public interface IPreloaderDisplay extends IEventDispatcher { function get stageHeight():Number; function set backgroundAlpha(_arg1:Number):void; function get stageWidth():Number; function set backgroundColor(_arg1:uint):void; function set preloader(_arg1:Sprite):void; function get backgroundAlpha():Number; function get backgroundColor():uint; function get backgroundSize():String; function set stageWidth(_arg1:Number):void; function set stageHeight(_arg1:Number):void; function set backgroundImage(_arg1:Object):void; function get backgroundImage():Object; function set backgroundSize(_arg1:String):void; function initialize():void; } }//package mx.preloaders
Section 283
//Preloader (mx.preloaders.Preloader) package mx.preloaders { import flash.display.*; import mx.core.*; import flash.events.*; import mx.events.*; import flash.net.*; import flash.system.*; import flash.utils.*; public class Preloader extends Sprite { private var showDisplay:Boolean; private var timer:Timer; private var rslIndex:int;// = 0 private var rslDone:Boolean;// = false private var rslLibs:Array; private var displayClass:IPreloaderDisplay;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function Preloader(){ displayClass = null; rslIndex = 0; rslDone = false; super(); } mx_internal function rslCompleteHandler(_arg1:Event, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_COMPLETE); _local3.bytesLoaded = _arg2.total; _local3.bytesTotal = _arg2.total; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; dispatchEvent(_local3); loadRSL(++rslIndex); } private function appProgressHandler(_arg1:Event):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); } mx_internal function rslErrorHandler(_arg1:ErrorEvent, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_ERROR); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; _local3.errorText = _arg1.text; dispatchEvent(_local3); } private function displayClassCompleteHandler(_arg1:Event):void{ dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE)); } private function timerHandler(_arg1:TimerEvent):void{ var _local2:Object; var _local3:int; var _local4:int; if (!root){ return; }; _local2 = getByteValues(); _local3 = _local2.loaded; _local4 = _local2.total; dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4)); if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.reset(); dispatchEvent(new Event(Event.COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); }; } private function getByteValues():Object{ var _local1:LoaderInfo; var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local1 = root.loaderInfo; _local2 = _local1.bytesLoaded; _local3 = _local1.bytesTotal; _local4 = (rslLibs) ? rslLibs.length : 0; _local5 = 0; while (_local5 < _local4) { _local2 = (_local2 + rslLibs[_local5].loaded); _local3 = (_local3 + rslLibs[_local5].total); _local5++; }; return ({loaded:_local2, total:_local3}); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ } public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null):void{ var _local11:int; var _local12:int; var _local13:URLRequest; var _local14:int; var _local15:RSLNode; root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); if (((_arg9) && ((_arg9.length > 0)))){ rslLibs = []; _local11 = _arg9.length; _local12 = 0; while (_local12 < _local11) { _local13 = new URLRequest(_arg9[_local12]); _local14 = 0; if (((_arg10) && ((_arg10.length == _arg9.length)))){ _local14 = _arg10[_local12]; }; _local15 = new RSLNode(_local13, _local12, _local14, this); rslLibs.push(_local15); _local12++; }; loadRSL(0); } else { rslDone = true; }; this.showDisplay = _arg1; timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); if (_arg1){ displayClass = new (_arg2); displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler); addChild(DisplayObject(displayClass)); displayClass.backgroundColor = _arg3; displayClass.backgroundAlpha = _arg4; displayClass.backgroundImage = _arg5; displayClass.backgroundSize = _arg6; displayClass.stageWidth = _arg7; displayClass.stageHeight = _arg8; displayClass.initialize(); displayClass.preloader = this; }; } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ dispatchAppEndEvent(); } mx_internal function rslProgressHandler(_arg1:ProgressEvent, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_PROGRESS); _local3.bytesLoaded = _arg1.bytesLoaded; _local3.bytesTotal = _arg1.bytesTotal; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; dispatchEvent(_local3); } private function loadRSL(_arg1:int):void{ var _local2:RSLNode; var _local3:Loader; var _local4:LoaderContext; if (_arg1 < rslLibs.length){ _local2 = rslLibs[_arg1]; _local3 = new Loader(); _local3.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _local2.progressHandler); _local3.contentLoaderInfo.addEventListener(Event.COMPLETE, _local2.completeHandler); _local3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _local2.errorHandler); _local3.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _local2.errorHandler); _local4 = new LoaderContext(); _local4.applicationDomain = ApplicationDomain.currentDomain; _local3.load(_local2.url, _local4); } else { rslDone = true; }; } public function registerApplication(_arg1:IEventDispatcher):void{ _arg1.addEventListener("validatePropertiesComplete", appProgressHandler); _arg1.addEventListener("validateSizeComplete", appProgressHandler); _arg1.addEventListener("validateDisplayListComplete", appProgressHandler); _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); } private function dispatchAppEndEvent(_arg1:Object=null):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE)); if (!showDisplay){ displayClassCompleteHandler(null); }; } } }//package mx.preloaders import mx.core.*; import flash.events.*; import flash.net.*; class RSLNode { public var completed:Boolean;// = false public var loaded:uint;// = 0 public var total:uint;// = 0 public var index:int; public var errorText:String; public var url:URLRequest; public var owner:Preloader; private function RSLNode(_arg1:URLRequest, _arg2:int, _arg3:int, _arg4:Preloader){ total = 0; loaded = 0; completed = false; super(); this.url = _arg1; this.index = _arg2; this.total = _arg3; this.owner = _arg4; } public function errorHandler(_arg1:ErrorEvent):void{ errorText = _arg1.text; completed = true; loaded = 0; total = 0; var _local2 = owner; _local2.mx_internal::rslErrorHandler(_arg1, this); } public function progressHandler(_arg1:ProgressEvent):void{ loaded = _arg1.bytesLoaded; total = _arg1.bytesTotal; var _local2 = owner; _local2.mx_internal::rslProgressHandler(_arg1, this); } public function completeHandler(_arg1:Event):void{ completed = true; var _local2 = owner; _local2.mx_internal::rslCompleteHandler(_arg1, this); } }
Section 284
//Locale (mx.resources.Locale) package mx.resources { import mx.managers.*; public class Locale { private var _language:String; private var _variant:String; private var _country:String; private var localeStr:String; mx_internal static const VERSION:String = "2.0.1.0"; private static var currentLocale:Locale; public function Locale(_arg1:String){ var _local2:Array; super(); this.localeStr = _arg1; _local2 = _arg1.split("_"); if (_local2.length > 0){ _language = _local2[0]; }; if (_local2.length > 1){ _country = _local2[1]; }; if (_local2.length > 2){ _variant = _local2[2]; }; } public function get variant():String{ return (_variant); } public function get country():String{ return (_country); } public function get language():String{ return (_language); } public function toString():String{ return (localeStr); } public static function getCurrent(_arg1:ISystemManager):Locale{ var _local2:Class; if (!currentLocale){ _local2 = Class(_arg1.getDefinitionByName("mx.generated.GeneratedLocale")); if (_local2){ currentLocale = new (_local2); }; }; return (currentLocale); } } }//package mx.resources
Section 285
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle { private var content:Object; private var bundleName:String; mx_internal static const VERSION:String = "2.0.1.0"; protected function getContent():Object{ return (null); } public function getStringArray(_arg1:String):Array{ var _local2:Array; var _local3:int; var _local4:int; _local2 = getObject(_arg1).split(","); _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = StringUtil.trim(_local2[_local4]); _local4++; }; return (_local2); } public function getString(_arg1:String):String{ return (String(getObject(_arg1))); } private function initialize(_arg1:String):void{ bundleName = _arg1; content = getContent(); if (!content){ throw (new Error(("No content found in resource bundle " + bundleName))); }; } public function getObject(_arg1:String):Object{ var _local2:Object; _local2 = content[_arg1]; if (!_local2){ throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName))); }; return (_local2); } public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{ var _local3:String; _local3 = getObject(_arg1).toLowerCase(); if (_local3 == "false"){ return (false); }; if (_local3 == "true"){ return (true); }; return (_arg2); } public function getNumber(_arg1:String):Number{ return (Number(getObject(_arg1))); } private static function getDefinitionByName(_arg1:String, _arg2:ApplicationDomain):Object{ var _local3:Object; if (_arg2.hasDefinition(_arg1)){ _local3 = _arg2.getDefinition(_arg1); }; return (_local3); } public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{ var _local3:Class; var _local4:Object; var _local5:ResourceBundle; if (_arg2 == null){ _arg2 = ApplicationDomain.currentDomain; }; _local3 = Class(getDefinitionByName((_arg1 + "_properties"), _arg2)); if (!_local3){ _local3 = Class(getDefinitionByName(String(_arg1), _arg2)); }; if (_local3){ _local4 = new (_local3); if ((_local4 is ResourceBundle)){ _local5 = ResourceBundle(_local4); _local5.initialize(String(_arg1)); return (_local5); }; }; throw (new Error(("Could not find resource bundle " + _arg1))); } } }//package mx.resources
Section 286
//IResponder (mx.rpc.IResponder) package mx.rpc { public interface IResponder { function fault(_arg1:Object):void; function result(_arg1:Object):void; } }//package mx.rpc
Section 287
//AccordionHeaderSkin (mx.skins.halo.AccordionHeaderSkin) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class AccordionHeaderSkin extends Border { private var _borderMetrics:EdgeMetrics; mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; public function AccordionHeaderSkin(){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); super(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:uint; var _local9:Array; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Object; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("fillAlphas"); _local5 = getStyle("fillColors"); StyleManager.getColorNames(_local5); _local6 = getStyle("highlightAlphas"); _local7 = getStyle("selectedFillColors"); _local8 = getStyle("themeColor"); _local9 = []; _local9[0] = ColorUtil.adjustBrightness2(_local5[0], -8); _local9[1] = ColorUtil.adjustBrightness2(_local5[1], -10); _local10 = ColorUtil.adjustBrightness2(_local3, -15); _local11 = ColorUtil.adjustBrightness2(_local5[0], -4); _local12 = ColorUtil.adjustBrightness2(_local5[1], -6); if (!_local7){ _local7 = []; _local7[0] = ColorUtil.adjustBrightness2(_local5[0], 5); _local7[1] = ColorUtil.adjustBrightness2(_local5[1], 15); }; _local13 = calcDerivedStyles(_local8, _local3, _local9[0], _local9[1], _local5[0], _local5[1]); graphics.clear(); switch (name){ case "upSkin": case "disabledSkin": case "selectedDisabledSkin": _local14 = [_local9[0], _local9[1]]; _local15 = [_local4[0], _local4[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local14, _local15, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); drawRoundRect(1, (_arg2 - 2), (_arg1 - 2), 1, 0, _local3, 0.1); break; case "overSkin": if (_local5.length > 2){ _local16 = [ColorUtil.adjustBrightness2(_local5[2], -4), ColorUtil.adjustBrightness2(_local5[3], -6)]; } else { _local16 = [_local11, _local12]; }; if (_local4.length > 2){ _local17 = [_local4[2], _local4[3]]; } else { _local17 = [_local4[0], _local4[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local13.themeColDrk1], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local16, _local17, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); drawRoundRect(1, (_arg2 - 2), (_arg1 - 2), 1, 0, _local3, 0.1); break; case "downSkin": drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local13.themeColDrk1], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local13.fillColorPress1, _local13.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "selectedUpSkin": case "selectedOverSkin": case "selectedDownSkin": _local18 = [_local4[0], _local4[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local7[0], _local7[1]], _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), 0, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); drawRoundRect(1, (_arg2 - 2), (_arg1 - 2), 1, 0, _local3, 0.05); break; }; } override public function get measuredWidth():Number{ return (10); } override public function get measuredHeight():Number{ return (22); } override public function get borderMetrics():EdgeMetrics{ return (_borderMetrics); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:uint):Object{ var _local7:String; var _local8:Object; _local7 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); if (!cache[_local7]){ _local8 = (cache[_local7] = {}); HaloColors.addHaloColors(_local8, _arg1, _arg5, _arg6); }; return (cache[_local7]); } } }//package mx.skins.halo
Section 288
//ApplicationBackground (mx.skins.halo.ApplicationBackground) package mx.skins.halo { import flash.display.*; import mx.utils.*; import mx.skins.*; public class ApplicationBackground extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; override public function get measuredWidth():Number{ return (8); } override public function get measuredHeight():Number{ return (8); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; var _local4:Array; var _local5:Array; var _local6:uint; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local4 = getStyle("backgroundGradientColors"); _local5 = getStyle("backgroundGradientAlphas"); if (!_local4){ _local6 = getStyle("backgroundColor"); if (isNaN(_local6)){ _local6 = 0xFFFFFF; }; _local4 = []; _local4[0] = ColorUtil.adjustBrightness(_local6, 15); _local4[1] = ColorUtil.adjustBrightness(_local6, -25); }; if (!_local5){ _local5 = [1, 1]; }; _local3.clear(); drawRoundRect(0, 0, _arg1, _arg2, 0, _local4, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); } } }//package mx.skins.halo
Section 289
//BusyCursor (mx.skins.halo.BusyCursor) package mx.skins.halo { import mx.core.*; import flash.events.*; import flash.display.*; import mx.styles.*; public class BusyCursor extends FlexSprite { private var hourHand:Shape; private var minuteHand:Shape; mx_internal static const VERSION:String = "2.0.1.0"; public function BusyCursor(){ var _local1:CSSStyleDeclaration; var _local2:Class; var _local3:DisplayObject; var _local4:Number; var _local5:Number; var _local6:Graphics; super(); _local1 = StyleManager.getStyleDeclaration("CursorManager"); _local2 = _local1.getStyle("busyCursorBackground"); _local3 = new (_local2); if ((_local3 is InteractiveObject)){ InteractiveObject(_local3).mouseEnabled = false; }; addChild(_local3); _local4 = -0.5; _local5 = -0.5; minuteHand = new FlexShape(); minuteHand.name = "minuteHand"; _local6 = minuteHand.graphics; _local6.beginFill(0); _local6.moveTo(_local4, _local5); _local6.lineTo((1 + _local4), (0 + _local5)); _local6.lineTo((1 + _local4), (5 + _local5)); _local6.lineTo((0 + _local4), (5 + _local5)); _local6.lineTo((0 + _local4), (0 + _local5)); _local6.endFill(); addChild(minuteHand); hourHand = new FlexShape(); hourHand.name = "hourHand"; _local6 = hourHand.graphics; _local6.beginFill(0); _local6.moveTo(_local4, _local5); _local6.lineTo((4 + _local4), (0 + _local5)); _local6.lineTo((4 + _local4), (1 + _local5)); _local6.lineTo((0 + _local4), (1 + _local5)); _local6.lineTo((0 + _local4), (0 + _local5)); _local6.endFill(); addChild(hourHand); addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function enterFrameHandler(_arg1:Event):void{ minuteHand.rotation = (minuteHand.rotation + 12); hourHand.rotation = (hourHand.rotation + 1); } } }//package mx.skins.halo
Section 290
//ButtonSkin (mx.skins.halo.ButtonSkin) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; import mx.controls.*; import mx.utils.*; import mx.skins.*; public class ButtonSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:uint; var _local9:Object; var _local10:Number; var _local11:Number; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; var _local21:Array; var _local22:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("cornerRadius"); _local5 = getStyle("fillAlphas"); _local6 = getStyle("fillColors"); StyleManager.getColorNames(_local6); _local7 = getStyle("highlightAlphas"); _local8 = getStyle("themeColor"); _local9 = calcDerivedStyles(_local8, _local6[0], _local6[1]); _local10 = ColorUtil.adjustBrightness2(_local3, -50); _local11 = ColorUtil.adjustBrightness2(_local8, -25); _local12 = false; if ((parent is Button)){ _local12 = Button(parent).emphasized; }; _local13 = Math.max(0, _local4); _local14 = Math.max(0, (_local4 - 1)); _local15 = Math.max(0, (_local4 - 2)); graphics.clear(); switch (name){ case "selectedUpSkin": case "selectedOverSkin": drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local6[1], _local6[1]], 1, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); break; case "upSkin": _local17 = [_local6[0], _local6[1]]; _local18 = [_local5[0], _local5[1]]; if (_local12){ drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:2, y:2, w:(_arg1 - 4), h:(_arg2 - 4), r:(_local4 - 2)}); drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _local15, _local17, _local18, verticalGradientMatrix(2, 2, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); } else { drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local17, _local18, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); }; break; case "overSkin": if (_local6.length > 2){ _local19 = [_local6[2], _local6[3]]; } else { _local19 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local20 = [_local5[2], _local5[3]]; } else { _local20 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local19, _local20, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "downSkin": case "selectedDownSkin": drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local8, _local11], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(2, 2, (_arg1 - 4), ((_arg2 - 4) / 2), {tl:_local15, tr:_local15, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "disabledSkin": case "selectedDisabledSkin": _local21 = [_local6[0], _local6[1]]; _local22 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))]; drawRoundRect(0, 0, _arg1, _arg2, _local13, [_local3, _local10], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:(_local4 - 1)}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local14, _local21, _local22, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); break; }; } override public function get measuredWidth():Number{ return (UIComponent.DEFAULT_MEASURED_MIN_WIDTH); } override public function get measuredHeight():Number{ return (UIComponent.DEFAULT_MEASURED_MIN_HEIGHT); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint):Object{ var _local4:String; var _local5:Object; _local4 = HaloColors.getCacheKey(_arg1, _arg2, _arg3); if (!cache[_local4]){ _local5 = (cache[_local4] = {}); HaloColors.addHaloColors(_local5, _arg1, _arg2, _arg3); }; return (cache[_local4]); } } }//package mx.skins.halo
Section 291
//ComboBoxArrowSkin (mx.skins.halo.ComboBoxArrowSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ComboBoxArrowSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Number; var _local5:Number; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:uint; var _local10:uint; var _local11:Object; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Object; var _local16:Object; var _local17:Boolean; var _local18:Graphics; var _local19:Array; var _local20:Array; var _local21:Array; var _local22:Array; var _local23:Array; var _local24:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("cornerRadius"); _local5 = getStyle("dropdownBorderColor"); _local6 = getStyle("fillAlphas"); _local7 = getStyle("fillColors"); StyleManager.getColorNames(_local7); _local8 = getStyle("highlightAlphas"); _local9 = getStyle("themeColor"); _local10 = 0x111111; if (!isNaN(_local5)){ _local3 = _local5; }; _local11 = calcDerivedStyles(_local9, _local3, _local7[0], _local7[1]); _local12 = ColorUtil.adjustBrightness2(_local3, -50); _local13 = ColorUtil.adjustBrightness2(_local9, -25); _local14 = Math.max((_local4 - 1), 0); _local15 = {tl:0, tr:_local4, bl:0, br:_local4}; _local16 = {tl:0, tr:_local14, bl:0, br:_local14}; _local17 = true; if (name.indexOf("editable") < 0){ _local17 = false; _local15.tl = (_local15.bl = _local4); _local16.tl = (_local16.bl = _local14); }; _local18 = graphics; _local18.clear(); switch (name){ case "upSkin": case "editableUpSkin": _local19 = [_local7[0], _local7[1]]; _local20 = [_local6[0], _local6[1]]; drawRoundRect(0, 0, _arg1, _arg2, _local15, [_local3, _local12], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local16}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local16, _local19, _local20, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local8, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); if (!_local17){ drawRoundRect((_arg1 - 22), 4, 1, (_arg2 - 8), 0, _local3, 1); drawRoundRect((_arg1 - 21), 4, 1, (_arg2 - 8), 0, 0xFFFFFF, 0.2); }; break; case "overSkin": case "editableOverSkin": if (_local7.length > 2){ _local21 = [_local7[2], _local7[3]]; } else { _local21 = [_local7[0], _local7[1]]; }; if (_local6.length > 2){ _local22 = [_local6[2], _local6[3]]; } else { _local22 = [_local6[0], _local6[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, _local15, [_local9, _local13], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local16}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local16, _local21, _local22, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local8, verticalGradientMatrix(0, 0, (_arg1 - 2), ((_arg2 - 2) / 2))); if (!_local17){ drawRoundRect((_arg1 - 22), 4, 1, (_arg2 - 8), 0, _local11.themeColDrk2, 1); drawRoundRect((_arg1 - 21), 4, 1, (_arg2 - 8), 0, 0xFFFFFF, 0.2); }; break; case "downSkin": case "editableDownSkin": drawRoundRect(0, 0, _arg1, _arg2, _local15, [_local9, _local13], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local16, [_local11.fillColorPress1, _local11.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local14, tr:_local14, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local8, verticalGradientMatrix(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2))); if (!_local17){ drawRoundRect((_arg1 - 22), 4, 1, (_arg2 - 8), 0, _local13, 1); drawRoundRect((_arg1 - 21), 4, 1, (_arg2 - 8), 0, 0xFFFFFF, 0.2); }; break; case "disabledSkin": case "editableDisabledSkin": _local23 = [_local7[0], _local7[1]]; _local24 = [Math.max(0, (_local6[0] - 0.15)), Math.max(0, (_local6[1] - 0.15))]; drawRoundRect(0, 0, _arg1, _arg2, _local15, [_local3, _local12], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local16}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local16, _local23, _local24, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); if (!_local17){ drawRoundRect((_arg1 - 22), 4, 1, (_arg2 - 8), 0, 0x999999, 0.5); }; _local10 = 9542041; break; }; _local18.beginFill(_local10); _local18.moveTo((_arg1 - 11.5), ((_arg2 / 2) + 3)); _local18.lineTo((_arg1 - 15), ((_arg2 / 2) - 2)); _local18.lineTo((_arg1 - 8), ((_arg2 / 2) - 2)); _local18.lineTo((_arg1 - 11.5), ((_arg2 / 2) + 3)); _local18.endFill(); } override public function get measuredWidth():Number{ return (22); } override public function get measuredHeight():Number{ return (22); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 292
//DataGridColumnDropIndicator (mx.skins.halo.DataGridColumnDropIndicator) package mx.skins.halo { import flash.display.*; import mx.utils.*; import mx.skins.*; public class DataGridColumnDropIndicator extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local3.lineStyle(1, getStyle("rollOverColor")); _local3.moveTo(0, 0); _local3.lineTo(0, _arg2); _local3.lineStyle(1, ColorUtil.adjustBrightness(getStyle("themeColor"), -75)); _local3.moveTo(1, 0); _local3.lineTo(1, _arg2); _local3.lineStyle(1, getStyle("rollOverColor")); _local3.moveTo(2, 0); _local3.lineTo(2, _arg2); } } }//package mx.skins.halo
Section 293
//DataGridColumnResizeSkin (mx.skins.halo.DataGridColumnResizeSkin) package mx.skins.halo { import flash.display.*; import mx.skins.*; public class DataGridColumnResizeSkin extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; override public function get measuredWidth():Number{ return (2); } override public function get measuredHeight():Number{ return (10); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local3.beginFill(0, 0.4); _local3.drawRect(0, 0, _arg1, _arg2); _local3.endFill(); } } }//package mx.skins.halo
Section 294
//DataGridHeaderSeparator (mx.skins.halo.DataGridHeaderSeparator) package mx.skins.halo { import flash.display.*; import mx.skins.*; public class DataGridHeaderSeparator extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; override public function get measuredWidth():Number{ return (2); } override public function get measuredHeight():Number{ return (10); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local3.lineStyle(1, 0xFFFFFF, 0.5); _local3.moveTo(0, 0); _local3.lineTo(0, _arg2); _local3.lineStyle(1, getStyle("borderColor")); _local3.moveTo(1, 0); _local3.lineTo(1, _arg2); } } }//package mx.skins.halo
Section 295
//DataGridSortArrow (mx.skins.halo.DataGridSortArrow) package mx.skins.halo { import flash.display.*; import mx.skins.*; public class DataGridSortArrow extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; override public function get measuredWidth():Number{ return (6); } override public function get measuredHeight():Number{ return (6); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local3.beginFill(0x111111); _local3.moveTo(0, 0); _local3.lineTo(_arg1, 0); _local3.lineTo((_arg1 / 2), _arg2); _local3.lineTo(0, 0); _local3.endFill(); } } }//package mx.skins.halo
Section 296
//DefaultDragImage (mx.skins.halo.DefaultDragImage) package mx.skins.halo { import mx.core.*; import flash.display.*; public class DefaultDragImage extends SpriteAsset implements IFlexDisplayObject { mx_internal static const VERSION:String = "2.0.1.0"; public function DefaultDragImage(){ draw(10, 10); super(); } private function draw(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; _local3 = graphics; _local3.clear(); _local3.beginFill(0xEEEEEE); _local3.lineStyle(1, 8433818); _local3.drawRect(0, 0, _arg1, _arg2); _local3.endFill(); } override public function get measuredWidth():Number{ return (10); } override public function get measuredHeight():Number{ return (10); } override public function setActualSize(_arg1:Number, _arg2:Number):void{ draw(_arg1, _arg2); } override public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.skins.halo
Section 297
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; import mx.graphics.*; import mx.utils.*; import mx.skins.*; public class HaloBorder extends RectangularBorder { private var _borderMetrics:EdgeMetrics; private var dropShadow:RectangularDropShadow; mx_internal static const VERSION:String = "2.0.1.0"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ BORDER_WIDTHS["default"] = 3; } override public function get borderMetrics():EdgeMetrics{ var _local1:Number; var _local2:String; var _local3:String; if (_borderMetrics){ return (_borderMetrics); }; _local2 = getStyle("borderStyle"); if ((((_local2 == "default")) || ((_local2 == "alert")))){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (_local2 == "solid"){ _local1 = getStyle("borderThickness"); if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); _local3 = getStyle("borderSides"); if (_local3 != "left top right bottom"){ if (_local3.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (_local3.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (_local3.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (_local3.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { _local1 = BORDER_WIDTHS[_local2]; if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); }; }; }; return (_borderMetrics); } private function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local9:Number; var _local10:String; var _local11:Number; var _local12:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){ return; }; _local9 = getStyle("shadowDistance"); _local10 = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ _local12 = getStyle("docked"); _local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10); _local9 = Math.abs(_local9); } else { _local11 = getDropShadowAngle(_local9, _local10); _local9 = (Math.abs(_local9) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = _local9; dropShadow.angle = _local11; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = _arg5; dropShadow.trRadius = _arg6; dropShadow.blRadius = _arg8; dropShadow.brRadius = _arg7; dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4); } private function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Number; var _local8:Number; var _local9:Graphics; _local7 = width; _local8 = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); _local9 = graphics; _local9.beginFill(_arg1); _local9.drawRect(0, 0, _local7, _local8); _local9.drawRect(1, 0, (_local7 - 2), _local8); _local9.endFill(); _local9.beginFill(_arg2); _local9.drawRect(1, 0, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg3); _local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg4); _local9.drawRect(1, 1, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg5); _local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg6); _local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4)); _local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4)); _local9.endFill(); } private function getBackgroundColor():Object{ var _local1:IUIComponent; var _local2:Object; _local1 = (parent as IUIComponent); if (((_local1) && (!(_local1.enabled)))){ _local2 = getStyle("backgroundDisabledColor"); if (_local2){ return (_local2); }; }; return (getStyle("backgroundColor")); } override public function styleChanged(_arg1:String):void{ if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } private function getDropShadowAngle(_arg1:Number, _arg2:String):Number{ if (_arg2 == "left"){ return (((_arg1 >= 0)) ? 135 : 225); //unresolved jump }; if (_arg2 == "right"){ return (((_arg1 >= 0)) ? 45 : 315); //unresolved jump }; return (((_arg1 >= 0)) ? 90 : 270); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:Object; var _local5:Array; var _local6:Number; var _local7:String; var _local8:Object; var _local9:uint; var _local10:uint; var _local11:String; var _local12:Number; var _local13:uint; var _local14:Boolean; var _local15:uint; var _local16:Array; var _local17:Array; var _local18:uint; var _local19:uint; var _local20:uint; var _local21:uint; var _local22:Boolean; var _local23:Number; var _local24:Object; var _local25:Boolean; var _local26:Object; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Object; var _local31:Graphics; var _local32:Number; var _local33:Number; var _local34:Container; var _local35:EdgeMetrics; var _local36:Boolean; var _local37:Number; var _local38:Array; var _local39:uint; var _local40:Boolean; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:EdgeMetrics; var _local45:Number; var _local46:Number; if (((isNaN(_arg1)) || (isNaN(_arg2)))){ return; }; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderStyle"); _local4 = getBackgroundColor(); _local5 = getStyle("highlightAlphas"); _local7 = "backgroundAlpha"; _local23 = 0; _local24 = null; _local25 = false; _local31 = graphics; _local31.clear(); if (_local3){ switch (_local3){ case "none": break; case "inset": _local10 = getStyle("borderColor"); _local27 = ColorUtil.adjustBrightness2(_local10, -40); _local28 = ColorUtil.adjustBrightness2(_local10, 25); _local29 = ColorUtil.adjustBrightness2(_local10, 40); _local30 = _local4; if ((((_local30 === null)) || ((_local30 === "")))){ _local30 = _local10; }; draw3dBorder(_local28, _local27, _local29, Number(_local30), Number(_local30), Number(_local30)); break; case "outset": _local10 = getStyle("borderColor"); _local27 = ColorUtil.adjustBrightness2(_local10, -40); _local28 = ColorUtil.adjustBrightness2(_local10, -25); _local29 = ColorUtil.adjustBrightness2(_local10, 40); _local30 = _local4; if ((((_local30 === null)) || ((_local30 === "")))){ _local30 = _local10; }; draw3dBorder(_local28, _local29, _local27, Number(_local30), Number(_local30), Number(_local30)); break; case "alert": case "default": _local32 = getStyle("backgroundAlpha"); _local6 = getStyle("borderAlpha"); _local7 = "borderAlpha"; _local23 = getStyle("cornerRadius"); _local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local33 = (_local25) ? _local23 : 0; drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local33, _local33); if (!_local25){ _local24 = {}; }; _local34 = (parent as Container); if (_local34){ _local35 = _local34.viewMetrics; _local8 = {x:_local35.left, y:_local35.top, w:Math.max(0, ((_arg1 - _local35.left) - _local35.right)), h:Math.max(0, ((_arg2 - _local35.top) - _local35.bottom)), r:0}; if ((((_local8.w > 0)) && ((_local8.h > 0)))){ if (_local32 != _local6){ drawDropShadow(_local8.x, _local8.y, _local8.w, _local8.h, 0, 0, 0, 0); }; _local31.beginFill(Number(_local4), _local32); _local31.drawRect(_local8.x, _local8.y, _local8.w, _local8.h); _local31.endFill(); }; }; _local4 = getStyle("borderColor"); break; case "dropdown": _local15 = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); if (!isNaN(_local15)){ drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local15, 0.5); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); }; _local4 = null; break; case "menuBorder": _local10 = getStyle("borderColor"); drawRoundRect(0, 0, _arg1, _arg2, 0, _local10, 1); drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((_arg1 == 0)) || ((_arg2 == 0)))){ _local4 = null; break; }; _local17 = getStyle("footerColors"); _local36 = !((_local17 == null)); _local37 = getStyle("borderAlpha"); if (_local36){ _local31.lineStyle(0, ((_local17.length > 0)) ? _local17[1] : _local17[0], _local37); _local31.moveTo(0, 0); _local31.lineTo(_arg1, 0); _local31.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ _local23 = IStyleClient(parent.parent).getStyle("cornerRadius"); _local37 = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(_local23)){ _local23 = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ _local23 = 0; }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2)); if ((((_local17.length > 1)) && (!((_local17[0] == _local17[1]))))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(_local23 - 1), br:(_local23 - 1)}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; }; _local4 = null; break; case "applicationControlBar": _local16 = getStyle("fillColors"); _local6 = getStyle("backgroundAlpha"); _local5 = getStyle("highlightAlphas"); _local38 = getStyle("fillAlphas"); _local14 = getStyle("docked"); _local39 = uint(_local4); _local23 = getStyle("cornerRadius"); if (!_local23){ _local23 = 0; }; drawDropShadow(0, 1, _arg1, (_arg2 - 1), _local23, _local23, _local23, _local23); if (_local4){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local39, _local6, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local16, _local38, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:_local23, tr:_local23, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1))); drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:_local23, tr:_local23, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:_local23, tr:_local23, bl:0, br:0}}); _local4 = null; break; default: _local10 = getStyle("borderColor"); _local12 = getStyle("borderThickness"); _local11 = getStyle("borderSides"); _local40 = true; _local23 = getStyle("cornerRadius"); _local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local41 = Math.max((_local23 - _local12), 0); _local26 = {x:_local12, y:_local12, w:(_arg1 - (_local12 * 2)), h:(_arg2 - (_local12 * 2)), r:_local41}; if (!_local25){ _local24 = {tl:_local23, tr:_local23, bl:0, br:0}; _local26.r = {tl:_local41, tr:_local41, bl:0, br:0}; }; if (_local11 != "left top right bottom"){ _local26.r = {tl:_local41, tr:_local41, bl:(_local25) ? _local41 : 0, br:(_local25) ? _local41 : 0}; _local24 = {tl:_local23, tr:_local23, bl:(_local25) ? _local23 : 0, br:(_local25) ? _local23 : 0}; _local11 = _local11.toLowerCase(); if (_local11.indexOf("left") == -1){ _local26.x = 0; _local26.w = (_local26.w + _local12); _local26.r.tl = 0; _local26.r.bl = 0; _local24.tl = 0; _local24.bl = 0; _local40 = false; }; if (_local11.indexOf("top") == -1){ _local26.y = 0; _local26.h = (_local26.h + _local12); _local26.r.tl = 0; _local26.r.tr = 0; _local24.tl = 0; _local24.tr = 0; _local40 = false; }; if (_local11.indexOf("right") == -1){ _local26.w = (_local26.w + _local12); _local26.r.tr = 0; _local26.r.br = 0; _local24.tr = 0; _local24.br = 0; _local40 = false; }; if (_local11.indexOf("bottom") == -1){ _local26.h = (_local26.h + _local12); _local26.r.bl = 0; _local26.r.br = 0; _local24.bl = 0; _local24.br = 0; _local40 = false; }; }; if ((((_local23 == 0)) && (_local40))){ drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0); _local31.beginFill(_local10); _local31.drawRect(0, 0, _arg1, _arg2); _local31.drawRect(_local12, _local12, (_arg1 - (2 * _local12)), (_arg2 - (2 * _local12))); _local31.endFill(); } else { if (_local24){ drawDropShadow(0, 0, _arg1, _arg2, _local24.tl, _local24.tr, _local24.br, _local24.bl); drawRoundRect(0, 0, _arg1, _arg2, _local24, _local10, 1, null, null, null, _local26); _local24.tl = Math.max((_local23 - _local12), 0); _local24.tr = Math.max((_local23 - _local12), 0); _local24.bl = (_local25) ? Math.max((_local23 - _local12), 0) : 0; _local24.br = (_local25) ? Math.max((_local23 - _local12), 0) : 0; } else { drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local23, _local23); drawRoundRect(0, 0, _arg1, _arg2, _local23, _local10, 1, null, null, null, _local26); _local23 = Math.max((getStyle("cornerRadius") - _local12), 0); }; }; }; }; if (((((((!((_local4 === null))) && (!((_local4 === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ _local42 = Number(_local4); _local43 = 1; _local44 = borderMetrics; if (((((isNaN(_local42)) || ((_local4 === "")))) || ((_local4 === null)))){ _local43 = 0; _local42 = 0xFFFFFF; } else { _local43 = getStyle(_local7); }; if (((!((_local23 == 0))) || (_local8))){ _local45 = _local44.bottom; if (_local24){ _local46 = (_local25) ? _local23 : 0; _local24 = {tl:_local23, tr:_local23, bl:_local46, br:_local46}; drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local24, _local42, _local43, null, GradientType.LINEAR, null, _local8); } else { drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local23, _local42, _local43, null, GradientType.LINEAR, null, _local8); }; } else { _local31.beginFill(_local42, _local43); _local31.drawRect(_local44.left, _local44.top, ((_arg1 - _local44.right) - _local44.left), ((_arg2 - _local44.bottom) - _local44.top)); _local31.endFill(); }; }; } } }//package mx.skins.halo
Section 298
//HaloColors (mx.skins.halo.HaloColors) package mx.skins.halo { import mx.utils.*; public class HaloColors { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; public static function getCacheKey(... _args):String{ return (_args.join(",")); } public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{ var _local5:String; var _local6:Object; _local5 = getCacheKey(_arg2, _arg3, _arg4); _local6 = cache[_local5]; if (!_local6){ _local6 = (cache[_local5] = {}); _local6.themeColLgt = ColorUtil.adjustBrightness(_arg2, 100); _local6.themeColDrk1 = ColorUtil.adjustBrightness(_arg2, -75); _local6.themeColDrk2 = ColorUtil.adjustBrightness(_arg2, -25); _local6.fillColorBright1 = ColorUtil.adjustBrightness2(_arg3, 15); _local6.fillColorBright2 = ColorUtil.adjustBrightness2(_arg4, 15); _local6.fillColorPress1 = ColorUtil.adjustBrightness2(_arg2, 85); _local6.fillColorPress2 = ColorUtil.adjustBrightness2(_arg2, 60); _local6.bevelHighlight1 = ColorUtil.adjustBrightness2(_arg3, 40); _local6.bevelHighlight2 = ColorUtil.adjustBrightness2(_arg4, 40); }; _arg1.themeColLgt = _local6.themeColLgt; _arg1.themeColDrk1 = _local6.themeColDrk1; _arg1.themeColDrk2 = _local6.themeColDrk2; _arg1.fillColorBright1 = _local6.fillColorBright1; _arg1.fillColorBright2 = _local6.fillColorBright2; _arg1.fillColorPress1 = _local6.fillColorPress1; _arg1.fillColorPress2 = _local6.fillColorPress2; _arg1.bevelHighlight1 = _local6.bevelHighlight1; _arg1.bevelHighlight2 = _local6.bevelHighlight2; } } }//package mx.skins.halo
Section 299
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function regenerateStyleCache(_arg1:Boolean):void{ } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(_arg1:String):void{ if (_arg1 == "focusColor"){ _focusColor = NaN; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "focusColor"){ _focusColor = _arg2; }; } public function set nonInheritingStyles(_arg1:Object):void{ } public function set inheritingStyles(_arg1:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function registerEffects(_arg1:Array):void{ } public function getClassStyleDeclarations():Array{ return ([]); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; var _local9:Number; var _local10:Number; var _local11:Graphics; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("focusBlendMode"); _local4 = getStyle("focusAlpha"); _local5 = getStyle("focusColor"); _local6 = getStyle("cornerRadius"); _local7 = getStyle("focusThickness"); _local8 = getStyle("focusRoundedCorners"); _local9 = getStyle("themeColor"); _local10 = _local5; if (!_local10){ _local10 = _local9; }; _local11 = graphics; _local11.clear(); blendMode = _local3; if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){ _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = (_local6 + _local7); if (_local8.indexOf("tl") >= 0){ _local12 = _local16; }; if (_local8.indexOf("tr") >= 0){ _local14 = _local16; }; if (_local8.indexOf("bl") >= 0){ _local13 = _local16; }; if (_local8.indexOf("br") >= 0){ _local15 = _local16; }; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); _local16 = (_local6 + (_local7 / 2)); _local12 = (_local12) ? _local16 : 0; _local14 = (_local14) ? _local16 : 0; _local13 = (_local13) ? _local16 : 0; _local15 = (_local15) ? _local16 : 0; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); } else { _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2); _local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2); _local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); }; } override public function getStyle(_arg1:String){ return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1)); } } }//package mx.skins.halo
Section 300
//ListDropIndicator (mx.skins.halo.ListDropIndicator) package mx.skins.halo { import flash.display.*; import mx.skins.*; public class ListDropIndicator extends ProgrammaticSkin { public var direction:String;// = "horizontal" mx_internal static const VERSION:String = "2.0.1.0"; public function ListDropIndicator(){ direction = "horizontal"; super(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = graphics; _local3.clear(); _local3.lineStyle(2, 2831164); if (direction == "horizontal"){ _local3.moveTo(0, 0); _local3.lineTo(_arg1, 0); } else { _local3.moveTo(0, 0); _local3.lineTo(0, _arg2); }; } } }//package mx.skins.halo
Section 301
//NumericStepperDownSkin (mx.skins.halo.NumericStepperDownSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class NumericStepperDownSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:Object; var _local10:Object; var _local11:Object; var _local12:Graphics; var _local13:Array; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("cornerRadius"); _local5 = getStyle("fillAlphas"); _local6 = getStyle("fillColors"); StyleManager.getColorNames(_local6); _local7 = getStyle("themeColor"); _local8 = 0x111111; _local9 = calcDerivedStyles(_local7, _local3, _local6[0], _local6[1]); _local10 = {tl:0, tr:0, bl:0, br:_local4}; _local11 = {tl:0, tr:0, bl:0, br:Math.max((_local4 - 1), 0)}; _local12 = graphics; _local12.clear(); switch (name){ case "downArrowUpSkin": _local13 = [_local6[0], _local6[1]]; _local14 = [_local5[0], _local5[1]]; drawRoundRect(0, 0, _arg1, _arg2, _local10, [_local9.borderColorDrk2, _local9.borderColorDrk1], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:0, w:(_arg1 - 2), h:(_arg2 - 1), r:_local11}); drawRoundRect(1, 0, (_arg1 - 2), (_arg2 - 1), _local11, _local13, _local14, verticalGradientMatrix(1, (1 - _arg2), (_arg1 - 2), ((2 * _arg2) - 2))); break; case "downArrowOverSkin": if (_local6.length > 2){ _local15 = [_local6[2], _local6[3]]; } else { _local15 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local16 = [_local5[2], _local5[3]]; } else { _local16 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, _local10, [_local9.themeColDrk2, _local9.themeColDrk1], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:0, w:(_arg1 - 2), h:(_arg2 - 1), r:_local11}); drawRoundRect(1, 0, (_arg1 - 2), (_arg2 - 1), _local11, _local15, _local16, verticalGradientMatrix(1, (1 - _arg2), (_arg1 - 2), ((2 * _arg2) - 2))); break; case "downArrowDownSkin": drawRoundRect(0, 0, _arg1, _arg2, _local10, [_local9.themeColDrk2, _local9.themeColDrk1], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 0, (_arg1 - 2), (_arg2 - 1), _local11, [_local9.fillColorPress1, _local9.fillColorPress2], 1, verticalGradientMatrix(1, (1 - _arg2), (_arg1 - 2), ((2 * _arg2) - 2))); break; case "downArrowDisabledSkin": _local17 = [_local6[0], _local6[1]]; _local18 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))]; drawRoundRect(0, 0, _arg1, _arg2, _local10, [_local9.borderColorDrk2, _local9.borderColorDrk1], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:0, w:(_arg1 - 2), h:(_arg2 - 1), r:_local11}); drawRoundRect(1, 0, (_arg1 - 2), (_arg2 - 1), _local11, _local17, _local18, verticalGradientMatrix(1, (1 - _arg2), (_arg1 - 2), ((2 * _arg2) - 2))); _local8 = 0x999999; break; }; _local12.beginFill(_local8); _local12.moveTo((_arg1 / 2), ((_arg2 / 2) + 1.5)); _local12.lineTo(((_arg1 / 2) - 3.5), ((_arg2 / 2) - 2.5)); _local12.lineTo(((_arg1 / 2) + 3.5), ((_arg2 / 2) - 2.5)); _local12.lineTo((_arg1 / 2), ((_arg2 / 2) + 1.5)); _local12.endFill(); } override public function get measuredWidth():Number{ return (19); } override public function get measuredHeight():Number{ return (11); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50); _local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -25); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 302
//NumericStepperUpSkin (mx.skins.halo.NumericStepperUpSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class NumericStepperUpSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:uint; var _local9:uint; var _local10:Object; var _local11:Object; var _local12:Object; var _local13:Graphics; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; var _local19:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("cornerRadius"); _local5 = getStyle("fillAlphas"); _local6 = getStyle("fillColors"); StyleManager.getColorNames(_local6); _local7 = getStyle("highlightAlphas"); _local8 = getStyle("themeColor"); _local9 = 0x111111; _local10 = calcDerivedStyles(_local8, _local3, _local6[0], _local6[1]); _local11 = {tl:0, tr:_local4, bl:0, br:0}; _local12 = {tl:0, tr:Math.max((_local4 - 1), 0), bl:0, br:0}; _local13 = graphics; _local13.clear(); switch (name){ case "upArrowUpSkin": _local14 = [_local6[0], _local6[1]]; _local15 = [_local5[0], _local5[1]]; drawRoundRect(0, 0, _arg1, _arg2, _local11, [_local3, _local10.borderColorDrk2], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local12}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local12, _local14, _local15, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 * 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 3), _local12, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 3))); break; case "upArrowOverSkin": if (_local6.length > 2){ _local16 = [_local6[2], _local6[3]]; } else { _local16 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local17 = [_local5[2], _local5[3]]; } else { _local17 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, _local11, [_local8, _local10.themeColDrk2], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local12}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local12, [_local10.fillColorBright1, _local10.fillColorBright2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 * 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local12, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 * 2))); break; case "upArrowDownSkin": drawRoundRect(0, 0, _arg1, _arg2, _local11, [_local8, _local10.themeColDrk2], 1, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local12, [_local10.fillColorPress1, _local10.fillColorPress2], 1, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 * 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 3), _local12, [0xFFFFFF, 0xFFFFFF], _local7, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 3))); break; case "upArrowDisabledSkin": _local18 = [_local6[0], _local6[1]]; _local19 = [Math.max(0, (_local5[0] - 0.15)), Math.max(0, (_local5[1] - 0.15))]; drawRoundRect(0, 0, _arg1, _arg2, _local11, [_local3, _local10.borderColorDrk2], 0.5, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:_local12}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _local12, _local18, _local19, verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 * 2))); _local9 = 0x999999; break; }; _local13.beginFill(_local9); _local13.moveTo((_arg1 / 2), ((_arg2 / 2) - 2.5)); _local13.lineTo(((_arg1 / 2) - 3.5), ((_arg2 / 2) + 1.5)); _local13.lineTo(((_arg1 / 2) + 3.5), ((_arg2 / 2) + 1.5)); _local13.lineTo((_arg1 / 2), ((_arg2 / 2) - 2.5)); _local13.endFill(); } override public function get measuredWidth():Number{ return (19); } override public function get measuredHeight():Number{ return (11); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50); _local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -25); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 303
//RadioButtonIcon (mx.skins.halo.RadioButtonIcon) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class RadioButtonIcon extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:uint; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:Object; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:Graphics; var _local18:Array; var _local19:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderColor"); _local4 = getStyle("fillAlphas"); _local5 = getStyle("fillColors"); StyleManager.getColorNames(_local5); _local6 = getStyle("highlightAlphas"); _local7 = getStyle("themeColor"); _local8 = 2831164; _local9 = calcDerivedStyles(_local7, _local3, _local5[0], _local5[1]); _local10 = ColorUtil.adjustBrightness2(_local3, -50); _local11 = ColorUtil.adjustBrightness2(_local7, -25); _local12 = (width / 2); _local17 = graphics; _local17.clear(); switch (name){ case "upIcon": _local13 = [_local5[0], _local5[1]]; _local14 = [_local4[0], _local4[1]]; _local17.beginGradientFill(GradientType.LINEAR, [_local3, _local10], [100, 100], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, _local13, _local14, [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local12, tr:_local12, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(0, 0, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "overIcon": if (_local5.length > 2){ _local18 = [_local5[2], _local5[3]]; } else { _local18 = [_local5[0], _local5[1]]; }; if (_local4.length > 2){ _local19 = [_local4[2], _local4[3]]; } else { _local19 = [_local4[0], _local4[1]]; }; _local17.beginGradientFill(GradientType.LINEAR, [_local7, _local11], [100, 100], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, _local18, _local19, [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local12, tr:_local12, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(0, 0, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "downIcon": _local17.beginGradientFill(GradientType.LINEAR, [_local7, _local11], [100, 100], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, [_local9.fillColorPress1, _local9.fillColorPress2], [100, 100], [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local12, tr:_local12, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(0, 0, (_arg1 - 2), ((_arg2 - 2) / 2))); break; case "disabledIcon": _local15 = [_local5[0], _local5[1]]; _local16 = [Math.max(0, (_local4[0] - 0.15)), Math.max(0, (_local4[1] - 0.15))]; _local17.beginGradientFill(GradientType.LINEAR, [_local3, _local10], [0.5, 0.5], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, _local15, _local16, [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); break; case "selectedUpIcon": case "selectedOverIcon": case "selectedDownIcon": _local13 = [_local5[0], _local5[1]]; _local14 = [_local4[0], _local4[1]]; _local17.beginGradientFill(GradientType.LINEAR, [_local3, _local10], [100, 100], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, _local13, _local14, [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); drawRoundRect(1, 1, (_arg1 - 2), ((_arg2 - 2) / 2), {tl:_local12, tr:_local12, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local6, verticalGradientMatrix(0, 0, (_arg1 - 2), ((_arg2 - 2) / 2))); _local17.beginFill(_local8); _local17.drawCircle(_local12, _local12, 2); _local17.endFill(); break; case "selectedDisabledIcon": _local15 = [_local5[0], _local5[1]]; _local16 = [Math.max(0, (_local4[0] - 0.15)), Math.max(0, (_local4[1] - 0.15))]; _local17.beginGradientFill(GradientType.LINEAR, [_local3, _local10], [0.5, 0.5], [0, 0xFF], verticalGradientMatrix(0, 0, _arg1, _arg2)); _local17.drawCircle(_local12, _local12, _local12); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginGradientFill(GradientType.LINEAR, _local15, _local16, [0, 0xFF], verticalGradientMatrix(1, 1, (_arg1 - 2), (_arg2 - 2))); _local17.drawCircle(_local12, _local12, (_local12 - 1)); _local17.endFill(); _local17.beginFill(0x999999); _local17.drawCircle(_local12, _local12, 2); _local17.endFill(); break; }; } override public function get measuredWidth():Number{ return (14); } override public function get measuredHeight():Number{ return (14); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -60); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 304
//ScrollArrowSkin (mx.skins.halo.ScrollArrowSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.controls.scrollClasses.*; import mx.utils.*; import mx.skins.*; public class ScrollArrowSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:uint; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:uint; var _local9:Boolean; var _local10:uint; var _local11:Object; var _local12:Boolean; var _local13:Array; var _local14:Graphics; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("backgroundColor"); _local4 = getStyle("borderColor"); _local5 = getStyle("fillAlphas"); _local6 = getStyle("fillColors"); StyleManager.getColorNames(_local6); _local7 = getStyle("highlightAlphas"); _local8 = getStyle("themeColor"); _local9 = (name.charAt(0) == "u"); _local10 = 0x111111; _local11 = calcDerivedStyles(_local8, _local4, _local6[0], _local6[1]); _local12 = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0)))); if (((_local9) && (!(_local12)))){ _local13 = [_local4, _local11.borderColorDrk1]; } else { _local13 = [_local11.borderColorDrk1, _local11.borderColorDrk2]; }; _local14 = graphics; _local14.clear(); if (isNaN(_local3)){ _local3 = 0xFFFFFF; }; if (name.indexOf("Disabled") == -1){ drawRoundRect(0, 0, _arg1, _arg2, 0, _local3, 1); }; switch (name){ case "upArrowUpSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowUpSkin": _local15 = [_local6[0], _local6[1]]; _local16 = [_local5[0], _local5[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; case "upArrowOverSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowOverSkin": if (_local6.length > 2){ _local17 = [_local6[2], _local6[3]]; } else { _local17 = [_local6[0], _local6[1]]; }; if (_local5.length > 2){ _local18 = [_local5[2], _local5[3]]; } else { _local18 = [_local5[0], _local5[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 1); drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; case "upArrowDownSkin": if (!_local12){ drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local12) ? horizontalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8) : verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0}); }; case "downArrowDownSkin": drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2))); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2)))); break; default: drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); return; }; _local14.beginFill(_local10); if (_local9){ _local14.moveTo((_arg1 / 2), 6); _local14.lineTo((_arg1 - 5), (_arg2 - 6)); _local14.lineTo(5, (_arg2 - 6)); _local14.lineTo((_arg1 / 2), 6); } else { _local14.moveTo((_arg1 / 2), (_arg2 - 6)); _local14.lineTo((_arg1 - 5), 6); _local14.lineTo(5, 6); _local14.lineTo((_arg1 / 2), (_arg2 - 6)); }; _local14.endFill(); } override public function get measuredWidth():Number{ return (ScrollBar.THICKNESS); } override public function get measuredHeight():Number{ return (ScrollBar.THICKNESS); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -25); _local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -50); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 305
//ScrollThumbSkin (mx.skins.halo.ScrollThumbSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ScrollThumbSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; private static var cache:Object = {}; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:uint; var _local5:Number; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:uint; var _local10:uint; var _local11:Object; var _local12:Number; var _local13:Object; var _local14:Object; var _local15:Boolean; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("backgroundColor"); _local4 = getStyle("borderColor"); _local5 = getStyle("cornerRadius"); _local6 = getStyle("fillAlphas"); _local7 = getStyle("fillColors"); StyleManager.getColorNames(_local7); _local8 = getStyle("highlightAlphas"); _local9 = getStyle("themeColor"); _local10 = 7305079; _local11 = calcDerivedStyles(_local9, _local4, _local7[0], _local7[1]); _local12 = Math.max((_local5 - 1), 0); _local13 = {tl:0, tr:_local12, bl:0, br:_local12}; _local12 = Math.max((_local12 - 1), 0); _local14 = {tl:0, tr:_local12, bl:0, br:_local12}; _local15 = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0)))); if (isNaN(_local3)){ _local3 = 0xFFFFFF; }; graphics.clear(); drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, _local3, 1); switch (name){ case "thumbUpSkin": default: _local17 = [_local7[0], _local7[1]]; _local18 = [_local6[0], _local6[1]]; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local4, _local11.borderColorDrk1], 1, (_local15) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local17, _local18, (_local15) ? horizontalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2))); if (_local15){ drawRoundRect(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2), 0, [0xFFFFFF, 0xFFFFFF], _local8, horizontalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2))); } else { drawRoundRect(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2), _local14, [0xFFFFFF, 0xFFFFFF], _local8, (_local15) ? horizontalGradientMatrix(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2)) : verticalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2))); }; break; case "thumbOverSkin": if (_local7.length > 2){ _local19 = [_local7[2], _local7[3]]; } else { _local19 = [_local7[0], _local7[1]]; }; if (_local6.length > 2){ _local20 = [_local6[2], _local6[3]]; } else { _local20 = [_local6[0], _local6[1]]; }; drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk1], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local19, _local20, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2)); break; case "thumbDownSkin": if (_local15){ drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local13, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); } else { drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}}); }; drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14}); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2)); break; case "thumbDisabledSkin": drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0); drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, 0x999999, 0.5); drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, 0xFFFFFF, 0.5); break; }; _local16 = Math.floor(((_arg1 / 2) - 4)); drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 4)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor((_arg2 / 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 2)), 5, 1, 0, 0, 0.4); drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 4)), 5, 1, 0, 0, 0.4); } override public function get measuredWidth():Number{ return (15); } override public function get measuredHeight():Number{ return (11); } private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{ var _local5:String; var _local6:Object; _local5 = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4); if (!cache[_local5]){ _local6 = (cache[_local5] = {}); HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4); _local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50); }; return (cache[_local5]); } } }//package mx.skins.halo
Section 306
//ScrollTrackSkin (mx.skins.halo.ScrollTrackSkin) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.utils.*; import mx.skins.*; public class ScrollTrackSkin extends Border { mx_internal static const VERSION:String = "2.0.1.0"; override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Array; var _local4:uint; var _local5:uint; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("trackColors"); StyleManager.getColorNames(_local3); _local4 = ColorUtil.adjustBrightness2(getStyle("borderColor"), -20); _local5 = ColorUtil.adjustBrightness2(_local4, -30); graphics.clear(); drawRoundRect(0, 0, _arg1, _arg2, 0, [_local4, _local5], 1, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0}); drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local3, 1, horizontalGradientMatrix(1, 1, ((_arg1 / 3) * 2), (_arg2 - 2))); } override public function get measuredWidth():Number{ return (16); } override public function get measuredHeight():Number{ return (1); } } }//package mx.skins.halo
Section 307
//ToolTipBorder (mx.skins.halo.ToolTipBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.graphics.*; import mx.skins.*; import flash.filters.*; public class ToolTipBorder extends RectangularBorder { private var _borderMetrics:EdgeMetrics; private var dropShadow:RectangularDropShadow; mx_internal static const VERSION:String = "2.0.1.0"; override public function get borderMetrics():EdgeMetrics{ var _local1:String; if (_borderMetrics){ return (_borderMetrics); }; _local1 = getStyle("borderStyle"); switch (_local1){ case "errorTipRight": _borderMetrics = new EdgeMetrics(15, 1, 3, 3); break; case "errorTipAbove": _borderMetrics = new EdgeMetrics(3, 1, 3, 15); break; case "errorTipBelow": _borderMetrics = new EdgeMetrics(3, 13, 3, 3); break; default: _borderMetrics = new EdgeMetrics(3, 1, 3, 3); break; }; return (_borderMetrics); } override public function styleChanged(_arg1:String):void{ if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ _borderMetrics = null; }; invalidateDisplayList(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:uint; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:uint; var _local9:Number; var _local10:Graphics; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderStyle"); _local4 = getStyle("backgroundColor"); _local5 = getStyle("backgroundAlpha"); _local6 = getStyle("borderColor"); _local7 = getStyle("cornerRadius"); _local8 = getStyle("shadowColor"); _local9 = 0.1; _local10 = graphics; _local10.clear(); filters = []; switch (_local3){ case "toolTip": drawRoundRect(3, 1, (_arg1 - 6), (_arg2 - 4), _local7, _local4, _local5); if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = 3; dropShadow.angle = 90; dropShadow.color = 0; dropShadow.alpha = 0.4; dropShadow.tlRadius = (_local7 + 2); dropShadow.trRadius = (_local7 + 2); dropShadow.blRadius = (_local7 + 2); dropShadow.brRadius = (_local7 + 2); dropShadow.drawShadow(graphics, 3, 0, (_arg1 - 6), (_arg2 - 4)); break; case "errorTipRight": drawRoundRect(11, 0, (_arg1 - 11), (_arg2 - 2), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(11, 7); _local10.lineTo(0, 13); _local10.lineTo(11, 19); _local10.moveTo(11, 7); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; case "errorTipAbove": drawRoundRect(0, 0, _arg1, (_arg2 - 13), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(9, (_arg2 - 13)); _local10.lineTo(15, (_arg2 - 2)); _local10.lineTo(21, (_arg2 - 13)); _local10.moveTo(9, (_arg2 - 13)); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; case "errorTipBelow": drawRoundRect(0, 11, _arg1, (_arg2 - 13), 3, _local6, _local5); _local10.beginFill(_local6, _local5); _local10.moveTo(9, 11); _local10.lineTo(15, 0); _local10.lineTo(21, 11); _local10.moveTo(10, 11); _local10.endFill(); filters = [new DropShadowFilter(2, 90, 0, 0.4)]; break; }; } } }//package mx.skins.halo
Section 308
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 309
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient { private var _initialized:Boolean;// = false private var invalidateDisplayListFlag:Boolean;// = false private var _height:Number; private var _styleName:IStyleClient; private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; private var _nestLevel:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ invalidateDisplayListFlag = false; _initialized = false; _nestLevel = 0; _processedDescriptors = false; _updateCompletePendingFlag = true; super(); _width = measuredWidth; _height = measuredHeight; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function invalidateSize():void{ } public function getStyle(_arg1:String){ return (_styleName.getStyle(_arg1)); } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ _nestLevel = _arg1; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90)); } public function validateSize(_arg1:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } override public function set height(_arg1:Number):void{ _height = _arg1; invalidateDisplayList(); } protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0)); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } override public function set width(_arg1:Number):void{ _width = _arg1; invalidateDisplayList(); } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{ var _local12:Graphics; var _local13:Number; var _local14:Array; var _local15:Object; _local12 = graphics; if ((((_arg3 == 0)) || ((_arg4 == 0)))){ return; }; if (_arg6 !== null){ if ((_arg6 is uint)){ _local12.beginFill(uint(_arg6), Number(_arg7)); } else { if ((_arg6 is Array)){ _local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7]; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8); }; }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local15 = _arg11.r; if ((_local15 is Number)){ _local13 = (Number(_local15) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function get measuredHeight():Number{ return (0); } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(_arg1:Object):void{ if (_styleName != _arg1){ _styleName = (_arg1 as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_width != _arg1){ _width = _arg1; _local3 = true; }; if (_height != _arg2){ _height = _arg2; _local3 = true; }; if (_local3){ invalidateDisplayList(); }; } override public function get width():Number{ return (_width); } public function styleChanged(_arg1:String):void{ invalidateDisplayList(); } public function invalidateProperties():void{ } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{ tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2); return (tempMatrix); } public function get styleName():Object{ return (_styleName); } public function validateProperties():void{ } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } } }//package mx.skins
Section 310
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import mx.core.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.resources.*; import flash.utils.*; import mx.utils.*; import flash.net.*; import flash.system.*; public class RectangularBorder extends Border { private var backgroundImageWidth:Number; private var backgroundImageStyle:Object; mx_internal var loader:Loader; private var backgroundMask:Shape; private var backgroundImageHeight:Number; private var _backgroundImageRect:Rectangle; private var backgroundImage:DisplayObject; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceNotLoaded:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("skins", ApplicationDomain.currentDomain); public function RectangularBorder(){ addEventListener(Event.REMOVED, removedHandler); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var newStyle:Object; var cls:Class; var imgParent:DisplayObjectContainer; var childrenList:IChildList; var newStyleObj:DisplayObject; var loaderContext:LoaderContext; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if (!parent){ return; }; newStyle = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ backgroundImageStyle = newStyle; if (backgroundImage){ imgParent = backgroundImage.parent; childrenList = ((imgParent is Container)) ? Container(imgParent).rawChildren : IChildList(imgParent); childrenList.removeChild(backgroundImage); }; backgroundImage = null; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ try { cls = Class(getDefinitionByName(String(newStyle))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ throw (new Error(StringUtil.substitute(resourceNotLoaded, newStyle))); }; }; }; }; if (backgroundImage){ adjustBackgroundImage(); }; } private function completeEventHandler(_arg1:Event):void{ var _local2:DisplayObject; if (!parent){ return; }; _local2 = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); adjustBackgroundImage(); dispatchEvent(_arg1.clone()); } mx_internal function get backgroundImageRect():Rectangle{ return (_backgroundImageRect); } private function getBackgroundSize():Number{ var _local1:Number; var _local2:Object; var _local3:int; _local1 = NaN; _local2 = getStyle("backgroundSize"); if (((_local2) && ((_local2 is String)))){ _local3 = _local2.indexOf("%"); if (_local3 != -1){ _local1 = Number(_local2.substr(0, _local3)); }; }; return (_local1); } mx_internal function adjustBackgroundImage():void{ var _local1:DisplayObject; var _local2:EdgeMetrics; var _local3:Boolean; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Graphics; _local1 = parent; _local2 = ((_local1 is Container)) ? Container(_local1).viewMetrics : borderMetrics; _local3 = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageRect){ _local9 = _backgroundImageRect.width; _local10 = _backgroundImageRect.height; } else { _local9 = ((width - _local2.left) - _local2.right); _local10 = ((height - _local2.top) - _local2.bottom); }; _local4 = getBackgroundSize(); if (isNaN(_local4)){ _local11 = 1; _local12 = 1; } else { _local13 = (_local4 * 0.01); _local11 = ((_local13 * _local9) / backgroundImageWidth); _local12 = ((_local13 * _local10) / backgroundImageHeight); }; backgroundImage.scaleX = _local11; backgroundImage.scaleY = _local12; _local5 = Math.round((0.5 * (_local9 - (backgroundImageWidth * _local11)))); _local6 = Math.round((0.5 * (_local10 - (backgroundImageHeight * _local12)))); backgroundImage.x = _local2.left; backgroundImage.y = _local2.top; backgroundMask.x = _local2.left; backgroundMask.y = _local2.top; if (((_local3) && ((_local1 is Container)))){ _local5 = (_local5 - Container(_local1).horizontalScrollPosition); _local6 = (_local6 - Container(_local1).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + _local5); backgroundImage.y = (backgroundImage.y + _local6); _local7 = ((width - _local2.left) - _local2.right); _local8 = ((height - _local2.top) - _local2.bottom); if (((!((backgroundMask.width == _local7))) || (!((backgroundMask.height == _local8))))){ _local14 = backgroundMask.graphics; _local14.clear(); _local14.beginFill(0xFFFFFF); _local14.drawRect(0, 0, _local7, _local8); _local14.endFill(); }; } private function errorEventHandler(_arg1:Event):void{ } private function initBackgroundImage(_arg1:DisplayObject):void{ var _local2:IChildList; var _local3:int; backgroundImage = _arg1; if ((_arg1 is Loader)){ backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width; backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = styleName; }; }; _local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent); backgroundMask = new FlexShape(); backgroundMask.name = "backgroundMask"; backgroundMask.x = 0; backgroundMask.y = 0; _local2.addChild(backgroundMask); _local3 = _local2.getChildIndex(this); _local2.addChildAt(backgroundImage, (_local3 + 1)); backgroundImage.mask = backgroundMask; } mx_internal function set backgroundImageRect(_arg1:Rectangle):void{ _backgroundImageRect = _arg1; invalidateDisplayList(); } mx_internal function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function removedHandler(_arg1:Event):void{ var _local2:IChildList; _local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent); if (backgroundImage){ _local2.removeChild(backgroundImage); backgroundImage = null; }; if (backgroundMask){ _local2.removeChild(backgroundMask); backgroundMask = null; }; } private static function loadResources():void{ resourceNotLoaded = packageResources.getString("notLoaded"); } loadResources(); } }//package mx.skins
Section 311
//IOverride (mx.states.IOverride) package mx.states { import mx.core.*; public interface IOverride { function initialize():void; function remove(_arg1:UIComponent):void; function apply(_arg1:UIComponent):void; } }//package mx.states
Section 312
//State (mx.states.State) package mx.states { import mx.events.*; import flash.events.*; public class State extends EventDispatcher { public var name:String; private var initialized:Boolean;// = false public var overrides:Array; public var basedOn:String; mx_internal static const VERSION:String = "2.0.1.0"; public function State(){ initialized = false; overrides = []; super(); } mx_internal function initialize():void{ var _local1:int; if (!initialized){ initialized = true; _local1 = 0; while (_local1 < overrides.length) { IOverride(overrides[_local1]).initialize(); _local1++; }; }; } mx_internal function dispatchExitState():void{ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); } mx_internal function dispatchEnterState():void{ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } } }//package mx.states
Section 313
//Transition (mx.states.Transition) package mx.states { import mx.effects.*; public class Transition { public var effect:Effect; public var toState:String;// = "*" public var fromState:String;// = "*" mx_internal static const VERSION:String = "2.0.1.0"; public function Transition(){ fromState = "*"; toState = "*"; super(); } } }//package mx.states
Section 314
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.display.*; import mx.core.*; import mx.managers.*; import flash.events.*; import flash.utils.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; public var defaultFactory:Function; public var factory:Function; protected var overrides:Object; private var clones:Dictionary; mx_internal var selectorRefCount:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; private static const NOT_A_COLOR:uint = 4294967295; private static var styleManager:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager); public function CSSStyleDeclaration(_arg1:String=null){ clones = new Dictionary(true); selectorRefCount = 0; super(); if (_arg1){ StyleManager.setStyleDeclaration(_arg1, this, false); }; } mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject):Object{ var nodeAddedToChain:Boolean; var p:String; var emptyObjectFactory:Function; var chain = _arg1; var target = _arg2; nodeAddedToChain = false; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(_arg1:String){ var _local2:*; var _local3:*; if (overrides){ if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){ return (undefined); }; _local3 = overrides[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (factory != null){ factory.prototype = {}; _local2 = new factory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; _local2 = new defaultFactory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; return (undefined); } mx_internal function createProtoChainRoot():Object{ var _local1:Object; _local1 = {}; if (defaultFactory != null){ defaultFactory.prototype = _local1; _local1 = new defaultFactory(); }; if (factory != null){ factory.prototype = _local1; _local1 = new factory(); }; clones[_local1] = 1; return (_local1); } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:Boolean; var _local5:Array; var _local6:int; var _local7:int; var _local8:Object; _local3 = getStyle(_arg1); _local4 = false; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){ _local4 = true; }; if (_arg2 !== undefined){ setStyle(_arg1, _arg2); } else { if (_arg2 == _local3){ return; }; setStyle(_arg1, _arg2); }; _local5 = SystemManagerGlobals.topLevelSystemManagers; _local6 = _local5.length; if (_local4){ _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.regenerateStyleCache(true); _local7++; }; }; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.notifyStyleChangeInChildren(_arg1, true); _local7++; }; } private function clearStyleAttr(_arg1:String):void{ var _local2:*; if (!overrides){ overrides = {}; }; overrides[_arg1] = undefined; for (_local2 in clones) { delete _local2[_arg1]; }; } mx_internal function clearOverride(_arg1:String):void{ if (((overrides) && (overrides[_arg1]))){ delete overrides[_arg1]; }; } mx_internal function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:*; var _local5:Number; if (_arg2 === undefined){ clearStyleAttr(_arg1); return; }; if ((_arg2 is String)){ _local5 = StyleManager.getColorName(_arg2); if (_local5 != NOT_A_COLOR){ _arg2 = _local5; }; }; if (defaultFactory != null){ _local3 = new defaultFactory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if (factory != null){ _local3 = new factory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; }; for (_local4 in clones) { _local4[_arg1] = _arg2; }; } } }//package mx.styles
Section 315
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function styleChanged(_arg1:String):void; function set styleName(_arg1:Object):void; function get styleName():Object; } }//package mx.styles
Section 316
//IStyleClient (mx.styles.IStyleClient) package mx.styles { public interface IStyleClient extends ISimpleStyleClient { function regenerateStyleCache(_arg1:Boolean):void; function clearStyle(_arg1:String):void; function getClassStyleDeclarations():Array; function get styleDeclaration():CSSStyleDeclaration; function get className():String; function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void; function set nonInheritingStyles(_arg1:Object):void; function get inheritingStyles():Object; function set inheritingStyles(_arg1:Object):void; function get nonInheritingStyles():Object; function set styleDeclaration(_arg1:CSSStyleDeclaration):void; function getStyle(_arg1:String); function setStyle(_arg1:String, _arg2):void; function registerEffects(_arg1:Array):void; } }//package mx.styles
Section 317
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isParentSizeInvalidatingStyle(_arg1:String):Boolean; function registerParentDisplayListInvalidatingStyle(_arg1:String):void; function set stylesRoot(_arg1:Object):void; function get inheritingStyles():Object; function styleDeclarationsChanged():void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean; function registerInheritingStyle(_arg1:String):void; function get typeSelectorCache():Object; function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void; function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher; function isSizeInvalidatingStyle(_arg1:String):Boolean; function getColorName(_arg1:Object):uint; function isValidStyleValue(_arg1):Boolean; function getColorNames(_arg1:Array):void; function isColorName(_arg1:String):Boolean; function isInheritingStyle(_arg1:String):Boolean; function set inheritingStyles(_arg1:Object):void; function get stylesRoot():Object; function initProtoChainRoots():void; function set typeSelectorCache(_arg1:Object):void; function registerParentSizeInvalidatingStyle(_arg1:String):void; function registerColorName(_arg1:String, _arg2:uint):void; function registerSizeInvalidatingStyle(_arg1:String):void; function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void; function isInheritingTextFormatStyle(_arg1:String):Boolean; function getStyleDeclaration(_arg1:String):CSSStyleDeclaration; } }//package mx.styles
Section 318
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 319
//StyleManager (mx.styles.StyleManager) package mx.styles { import mx.core.*; import flash.events.*; public class StyleManager { mx_internal static const VERSION:String = "2.0.1.0"; public static const NOT_A_COLOR:uint = 4294967295; private static var impl:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager); private static var implClassDependency:StyleManagerImpl; public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(_arg1)); } public static function registerInheritingStyle(_arg1:String):void{ impl.registerInheritingStyle(_arg1); } mx_internal static function set stylesRoot(_arg1:Object):void{ impl.stylesRoot = _arg1; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ impl.setStyleDeclaration(_arg1, _arg2, _arg3); } public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ impl.registerParentDisplayListInvalidatingStyle(_arg1); } public static function isSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isSizeInvalidatingStyle(_arg1)); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(_arg1:Object):void{ impl.inheritingStyles = _arg1; } public static function isColorName(_arg1:String):Boolean{ return (impl.isColorName(_arg1)); } public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(_arg1)); } public static function getColorName(_arg1:Object):uint{ return (impl.getColorName(_arg1)); } mx_internal static function set typeSelectorCache(_arg1:Object):void{ impl.typeSelectorCache = _arg1; } public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ impl.unloadStyleDeclarations(_arg1, _arg2); } public static function getColorNames(_arg1:Array):void{ impl.getColorNames(_arg1); } public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ return (impl.loadStyleDeclarations(_arg1, _arg2, _arg3)); } public static function isValidStyleValue(_arg1):Boolean{ return (impl.isValidStyleValue(_arg1)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(_arg1:String):Boolean{ return (impl.isInheritingStyle(_arg1)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(_arg1:String):void{ impl.registerParentSizeInvalidatingStyle(_arg1); } public static function registerSizeInvalidatingStyle(_arg1:String):void{ impl.registerSizeInvalidatingStyle(_arg1); } public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ impl.clearStyleDeclaration(_arg1, _arg2); } public static function registerColorName(_arg1:String, _arg2:uint):void{ impl.registerColorName(_arg1, _arg2); } public static function isInheritingTextFormatStyle(_arg1:String):Boolean{ return (impl.isInheritingTextFormatStyle(_arg1)); } public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(_arg1)); } } }//package mx.styles
Section 320
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import mx.core.*; import mx.managers.*; import flash.events.*; import mx.events.*; import mx.modules.*; import mx.resources.*; import flash.system.*; import flash.utils.*; import mx.utils.*; public class StyleManagerImpl implements IStyleManager { private var resourceUnableToLoad:String;// = null private var _stylesRoot:Object; private var styleModules:Object; private var packageResources:ResourceBundle; private var _inheritingStyles:Object; private var _typeSelectorCache:Object; private var selectors:Object; mx_internal static const VERSION:String = "2.0.1.0"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ packageResources = ResourceBundle.getResourceBundle("styles", ApplicationDomain.currentDomain); resourceUnableToLoad = null; selectors = {}; styleModules = {}; _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ _arg2.selectorRefCount++; selectors[_arg1] = _arg2; typeSelectorCache = new Object(); if (_arg3){ styleDeclarationsChanged(); }; } public function registerSizeInvalidatingStyle(_arg1:String):void{ sizeInvalidatingStyles[_arg1] = true; } public function isColorName(_arg1:String):Boolean{ return (!((colorNames[_arg1.toLowerCase()] === undefined))); } public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ parentDisplayListInvalidatingStyles[_arg1] = true; } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getColorNames(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:uint; if (!_arg1){ return; }; _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){ _local4 = getColorName(_arg1[_local3]); if (_local4 != StyleManager.NOT_A_COLOR){ _arg1[_local3] = _local4; }; }; _local3++; }; } public function isInheritingTextFormatStyle(_arg1:String):Boolean{ return ((inheritingTextFormatStyles[_arg1] == true)); } public function set typeSelectorCache(_arg1:Object):void{ _typeSelectorCache = _arg1; } public function registerParentSizeInvalidatingStyle(_arg1:String):void{ parentSizeInvalidatingStyles[_arg1] = true; } public function registerColorName(_arg1:String, _arg2:uint):void{ colorNames[_arg1.toLowerCase()] = _arg2; } public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return ((parentSizeInvalidatingStyles[_arg1] == true)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return ((parentDisplayListInvalidatingStyles[_arg1] == true)); } public function isSizeInvalidatingStyle(_arg1:String):Boolean{ return ((sizeInvalidatingStyles[_arg1] == true)); } public function set stylesRoot(_arg1:Object):void{ _stylesRoot = _arg1; } public function styleDeclarationsChanged():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:SystemManager; _local1 = SystemManagerGlobals.topLevelSystemManagers; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local4 = SystemManager(_local1[_local3]); _local4.regenerateStyleCache(true); _local4.notifyStyleChangeInChildren(null, true); _local3++; }; } public function isValidStyleValue(_arg1):Boolean{ return (!((_arg1 === undefined))); } public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ var module:IModuleInfo; var readyHandler:Function; var styleEventDispatcher:StyleEventDispatcher; var errorHandler:Function; var timer:Timer; var timerHandler:Function; var url = _arg1; var update = _arg2; var trustContent = _arg3; module = ModuleManager.getModule(url); readyHandler = function (_arg1:ModuleEvent):void{ var _local2:IStyleModule; _local2 = IStyleModule(_arg1.module.factory.create()); styleModules[_arg1.module.url].styleModule = _local2; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); errorHandler = function (_arg1:ModuleEvent):void{ var _local2:String; var _local3:StyleEvent; if (resourceUnableToLoad == null){ loadResources(); }; _local2 = StringUtil.substitute(resourceUnableToLoad, _arg1.errorText, url); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ _local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; styleEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); if (trustContent){ module.load(ApplicationDomain.currentDomain, SecurityDomain.currentDomain); } else { module.load(); }; }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerInheritingStyle(_arg1:String):void{ inheritingStyles[_arg1] = true; } public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ var _local3:StyleModuleInfo; var _local4:IModuleInfo; _local3 = styleModules[_arg1]; if (_local3){ _local3.styleModule.unload(); _local4 = _local3.module; _local4.unload(); _local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler); _local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler); styleModules[_arg1] = null; }; if (_arg2){ styleDeclarationsChanged(); }; } private function loadResources():void{ resourceUnableToLoad = packageResources.getString("unableToLoad"); } public function isInheritingStyle(_arg1:String):Boolean{ return ((inheritingStyles[_arg1] == true)); } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function get stylesRoot():Object{ return (_stylesRoot); } public function getColorName(_arg1:Object):uint{ var _local2:Number; var _local3:*; if ((_arg1 is String)){ if (_arg1.charAt(0) == "#"){ _local2 = Number(("0x" + _arg1.slice(1))); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){ _local2 = Number(_arg1); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; _local3 = colorNames[_arg1.toLowerCase()]; if (_local3 === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(_local3)); }; return (uint(_arg1)); } public function initProtoChainRoots():void{ if (!stylesRoot){ stylesRoot = selectors["global"].addStyleToProtoChain({}, null); }; } public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ var _local3:CSSStyleDeclaration; _local3 = getStyleDeclaration(_arg1); if (((_local3) && ((_local3.selectorRefCount > 0)))){ _local3.selectorRefCount--; }; delete selectors[_arg1]; if (_arg2){ styleDeclarationsChanged(); }; } public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ var _local2:int; if (_arg1.charAt(0) != "."){ _local2 = _arg1.lastIndexOf("."); if (_local2 != -1){ _arg1 = _arg1.substr((_local2 + 1)); }; }; return (selectors[_arg1]); } public static function getInstance():IStyleManager{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.events.*; import mx.modules.*; class StyleEventDispatcher extends EventDispatcher { private function StyleEventDispatcher(_arg1:IModuleInfo){ _arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.COMPLETE); dispatchEvent(_local2); } private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; _local2.errorText = _arg1.errorText; dispatchEvent(_local2); } private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } } class StyleModuleInfo { public var errorHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; public var readyHandler:Function; private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){ this.module = _arg1; this.readyHandler = _arg2; this.errorHandler = _arg3; } }
Section 321
//StyleProtoChain (mx.styles.StyleProtoChain) package mx.styles { import mx.core.*; import flash.display.*; public class StyleProtoChain { mx_internal static const VERSION:String = "2.0.1.0"; public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{ var _local2:IStyleClient; var _local3:Object; var _local4:Object; var _local5:Array; var _local6:int; var _local7:int; var _local8:CSSStyleDeclaration; _local2 = IStyleClient(_arg1.styleName); _local3 = _local2.nonInheritingStyles; if (((!(_local3)) || ((_local3 == UIComponent.STYLE_UNINITIALIZED)))){ _local3 = StyleManager.stylesRoot; if (_local3.effects){ _arg1.registerEffects(_local3.effects); }; }; _local4 = _local2.inheritingStyles; if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){ _local4 = StyleManager.stylesRoot; }; _local5 = _arg1.getClassStyleDeclarations(); _local6 = _local5.length; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local4 = _local8.addStyleToProtoChain(_local4, DisplayObject(_arg1)); _local4 = addProperties(_local4, _local2, true); _local3 = _local8.addStyleToProtoChain(_local3, DisplayObject(_arg1)); _local3 = addProperties(_local3, _local2, false); if (_local8.effects){ _arg1.registerEffects(_local8.effects); }; _local7++; }; _arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, DisplayObject(_arg1)) : _local4; _arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local3, DisplayObject(_arg1)) : _local3; } private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{ var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:CSSStyleDeclaration; var _local9:CSSStyleDeclaration; _local4 = _arg2.getClassStyleDeclarations(); _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local8 = _local4[_local6]; _arg1 = _local8.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); if (_local8.effects){ _arg2.registerEffects(_local8.effects); }; _local6++; }; _local7 = _arg2.styleName; if (_local7){ if (typeof(_local7) == "object"){ if ((_local7 is CSSStyleDeclaration)){ _local9 = CSSStyleDeclaration(_local7); } else { _arg1 = addProperties(_arg1, IStyleClient(_local7), _arg3); }; } else { _local9 = StyleManager.getStyleDeclaration(("." + _local7)); }; if (_local9){ _arg1 = _local9.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); if (_local9.effects){ _arg2.registerEffects(_local9.effects); }; }; }; if (_arg2.styleDeclaration){ _arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); }; return (_arg1); } public static function initTextField(_arg1:UITextField):void{ var _local2:Object; var _local3:CSSStyleDeclaration; var _local4:Object; var _local5:Object; _local2 = _arg1.styleName; if (_local2){ if (typeof(_local2) == "object"){ if ((_local2 is CSSStyleDeclaration)){ _local3 = CSSStyleDeclaration(_local2); } else { _arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles; _arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles; return; }; } else { _local3 = StyleManager.getStyleDeclaration(("." + _local2)); }; }; _local4 = IStyleClient(_arg1.parent).inheritingStyles; _local5 = StyleManager.stylesRoot; if (!_local4){ _local4 = StyleManager.stylesRoot; }; if (_local3){ _local4 = _local3.addStyleToProtoChain(_local4, _arg1); _local5 = _local3.addStyleToProtoChain(_local5, _arg1); }; _arg1.inheritingStyles = _local4; _arg1.nonInheritingStyles = _local5; } } }//package mx.styles
Section 322
//ArrayUtil (mx.utils.ArrayUtil) package mx.utils { public class ArrayUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function getItemIndex(_arg1:Object, _arg2:Array):int{ var _local3:int; var _local4:int; _local3 = _arg2.length; _local4 = 0; while (_local4 < _local3) { if (_arg2[_local4] === _arg1){ return (_local4); }; _local4++; }; return (-1); } public static function toArray(_arg1:Object):Array{ if (!_arg1){ return ([]); }; if ((_arg1 is Array)){ return ((_arg1 as Array)); }; return ([_arg1]); } } }//package mx.utils
Section 323
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; if (_arg2 == 0){ return (_arg1); }; if (_arg2 < 0){ _arg2 = ((100 + _arg2) / 100); _local3 = (((_arg1 >> 16) & 0xFF) * _arg2); _local4 = (((_arg1 >> 8) & 0xFF) * _arg2); _local5 = ((_arg1 & 0xFF) * _arg2); } else { _arg2 = (_arg2 / 100); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local3 = (_local3 + ((0xFF - _local3) * _arg2)); _local4 = (_local4 + ((0xFF - _local4) * _arg2)); _local5 = (_local5 + ((0xFF - _local5) * _arg2)); _local3 = Math.min(_local3, 0xFF); _local4 = Math.min(_local4, 0xFF); _local5 = Math.min(_local5, 0xFF); }; return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local6 = ((_arg2 >> 16) & 0xFF); _local7 = ((_arg2 >> 8) & 0xFF); _local8 = (_arg2 & 0xFF); return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF))); } public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0); _local4 = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0); _local5 = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0); return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } } }//package mx.utils
Section 324
//DescribeTypeCache (mx.utils.DescribeTypeCache) package mx.utils { import mx.binding.*; import flash.utils.*; public class DescribeTypeCache { mx_internal static const VERSION:String = "2.0.1.0"; private static var cacheHandlers:Object = {}; private static var typeCache:Object = {}; public static function describeType(_arg1):DescribeTypeCacheRecord{ var _local2:String; var _local3:XML; var _local4:DescribeTypeCacheRecord; if ((_arg1 is String)){ _local2 = _arg1; } else { _local2 = getQualifiedClassName(_arg1); }; if ((_local2 in typeCache)){ return (typeCache[_local2]); }; if ((_arg1 is String)){ _arg1 = getDefinitionByName(_arg1); }; _local3 = describeType(_arg1); _local4 = new DescribeTypeCacheRecord(); _local4.typeDescription = _local3; _local4.typeName = _local2; typeCache[_local2] = _local4; return (_local4); } public static function registerCacheHandler(_arg1:String, _arg2:Function):void{ cacheHandlers[_arg1] = _arg2; } static function extractValue(_arg1:String, _arg2:DescribeTypeCacheRecord){ if ((_arg1 in cacheHandlers)){ return (cacheHandlers[_arg1](_arg2)); }; return (undefined); } private static function bindabilityInfoHandler(_arg1:DescribeTypeCacheRecord){ return (new BindabilityInfo(_arg1.typeDescription)); } registerCacheHandler("bindabilityInfo", bindabilityInfoHandler); } }//package mx.utils
Section 325
//DescribeTypeCacheRecord (mx.utils.DescribeTypeCacheRecord) package mx.utils { import flash.utils.*; public dynamic class DescribeTypeCacheRecord extends Proxy { private var cache:Object; public var typeDescription:XML; public var typeName:String; public function DescribeTypeCacheRecord(){ cache = {}; super(); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var _local2:*; _local2 = cache[_arg1]; if (_local2 === undefined){ _local2 = DescribeTypeCache.extractValue(_arg1, this); cache[_arg1] = _local2; }; return (_local2); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ var _local2:*; if ((_arg1 in cache)){ return (true); }; _local2 = DescribeTypeCache.extractValue(_arg1, this); if (_local2 === undefined){ return (false); }; cache[_arg1] = _local2; return (true); } } }//package mx.utils
Section 326
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; import mx.core.*; public class GraphicsUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local10 = (_arg2 + _arg4); _local11 = (_arg3 + _arg5); _local12 = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2); _arg6 = ((_arg6 < _local12)) ? _arg6 : _local12; _arg7 = ((_arg7 < _local12)) ? _arg7 : _local12; _arg8 = ((_arg8 < _local12)) ? _arg8 : _local12; _arg9 = ((_arg9 < _local12)) ? _arg9 : _local12; _local13 = (_arg9 * 0.292893218813453); _local14 = (_arg9 * 0.585786437626905); _arg1.moveTo(_local10, (_local11 - _arg9)); _arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13)); _arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11); _local13 = (_arg8 * 0.292893218813453); _local14 = (_arg8 * 0.585786437626905); _arg1.lineTo((_arg2 + _arg8), _local11); _arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13)); _arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8)); _local13 = (_arg6 * 0.292893218813453); _local14 = (_arg6 * 0.585786437626905); _arg1.lineTo(_arg2, (_arg3 + _arg6)); _arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13)); _arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3); _local13 = (_arg7 * 0.292893218813453); _local14 = (_arg7 * 0.585786437626905); _arg1.lineTo((_local10 - _arg7), _arg3); _arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13)); _arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7)); _arg1.lineTo(_local10, (_local11 - _arg9)); } } }//package mx.utils
Section 327
//IXMLNotifiable (mx.utils.IXMLNotifiable) package mx.utils { public interface IXMLNotifiable { function xmlNotification(_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void; } }//package mx.utils
Section 328
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "2.0.1.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local3:DisplayObject; var _local4:String; var _local5:Array; _local3 = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ var _local2:String; var _local3:int; var _local4:int; if (!_arg1){ return (null); }; _local2 = getQualifiedClassName(_arg1); _local3 = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; _local4 = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 329
//object_proxy (mx.utils.object_proxy) package mx.utils { public namespace object_proxy = "http://www.adobe.com/2006/actionscript/flash/objectproxy"; }//package mx.utils
Section 330
//ObjectProxy (mx.utils.ObjectProxy) package mx.utils { import mx.core.*; import mx.events.*; import flash.events.*; import flash.utils.*; public dynamic class ObjectProxy extends Proxy implements IExternalizable, IPropertyChangeNotifier { protected var notifiers:Object; protected var propertyList:Array; private var _proxyLevel:int; protected var dispatcher:EventDispatcher; protected var proxyClass:Class; private var _item:Object; private var _id:String; public function ObjectProxy(_arg1:Object=null, _arg2:String=null, _arg3:int=-1){ proxyClass = ObjectProxy; super(); if (!_arg1){ _arg1 = {}; }; _item = _arg1; _proxyLevel = _arg3; notifiers = {}; dispatcher = new EventDispatcher(this); if (_arg2){ _id = _arg2; } else { _id = UIDUtil.createUID(); }; } public function dispatchEvent(_arg1:Event):Boolean{ return (dispatcher.dispatchEvent(_arg1)); } public function willTrigger(_arg1:String):Boolean{ return (dispatcher.willTrigger(_arg1)); } public function readExternal(_arg1:IDataInput):void{ var _local2:Object; _local2 = _arg1.readObject(); _item = _local2; } public function writeExternal(_arg1:IDataOutput):void{ _arg1.writeObject(_item); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ var _local2:Object; _local2 = null; if (notifiers[_arg1.toString()]){ return (notifiers[_arg1]); }; _local2 = _item[_arg1]; if (_local2){ if ((((_proxyLevel == 0)) || (ObjectUtil.isSimple(_local2)))){ return (_local2); }; _local2 = getComplexProperty(_arg1, _local2); }; return (_local2); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ return ((_arg1 in _item)); } public function get uid():String{ return (_id); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ if (_arg1 == 0){ setupPropertyList(); }; if (_arg1 < propertyList.length){ return ((_arg1 + 1)); }; return (0); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:*; var _local4:IPropertyChangeNotifier; var _local5:PropertyChangeEvent; _local3 = _item[_arg1]; if (_local3 !== _arg2){ _item[_arg1] = _arg2; _local4 = IPropertyChangeNotifier(notifiers[_arg1]); if (_local4){ _local4.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); delete notifiers[_arg1]; }; if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){ if ((_arg1 is QName)){ _arg1 = QName(_arg1).localName; }; _local5 = PropertyChangeEvent.createUpdateEvent(this, _arg1.toString(), _local3, _arg2); dispatcher.dispatchEvent(_local5); }; }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (propertyList[(_arg1 - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ var _local2:IPropertyChangeNotifier; var _local3:Object; var _local4:Boolean; var _local5:PropertyChangeEvent; _local2 = IPropertyChangeNotifier(notifiers[_arg1]); if (_local2){ _local2.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); delete notifiers[_arg1]; }; _local3 = _item[_arg1]; _local4 = delete _item[_arg1]; if (dispatcher.hasEventListener(PropertyChangeEvent.PROPERTY_CHANGE)){ _local5 = new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE); _local5.kind = PropertyChangeEventKind.DELETE; _local5.property = _arg1; _local5.oldValue = _local3; _local5.source = this; dispatcher.dispatchEvent(_local5); }; return (_local4); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){ return (_item[_arg1].apply(_item, _args)); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ dispatcher.removeEventListener(_arg1, _arg2, _arg3); } protected function setupPropertyList():void{ var _local1:String; if (getQualifiedClassName(_item) == "Object"){ propertyList = []; for (_local1 in _item) { propertyList.push(_local1); }; } else { propertyList = ObjectUtil.getClassInfo(_item, null, {includeReadOnly:true, uris:["*"]}).properties; }; } object_proxy function getComplexProperty(_arg1, _arg2){ if ((_arg2 is IPropertyChangeNotifier)){ _arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); notifiers[_arg1] = _arg2; return (_arg2); }; if (getQualifiedClassName(_arg2) == "Object"){ _arg2 = new proxyClass(_item[_arg1], null, ((_proxyLevel > 0)) ? (_proxyLevel - 1) : _proxyLevel); _arg2.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); notifiers[_arg1] = _arg2; return (_arg2); }; return (_arg2); } public function set uid(_arg1:String):void{ _id = _arg1; } public function hasEventListener(_arg1:String):Boolean{ return (dispatcher.hasEventListener(_arg1)); } public function propertyChangeHandler(_arg1:PropertyChangeEvent):void{ dispatcher.dispatchEvent(_arg1); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextValue(_arg1:int){ return (_item[propertyList[(_arg1 - 1)]]); } object_proxy function get object():Object{ return (_item); } } }//package mx.utils
Section 331
//ObjectUtil (mx.utils.ObjectUtil) package mx.utils { import mx.collections.*; import flash.utils.*; import flash.xml.*; public class ObjectUtil { mx_internal static const VERSION:String = "2.0.1.0"; private static var refCount:int = 0; private static var CLASS_INFO_CACHE:Object = {}; private static function recordMetadata(_arg1:XMLList):Object{ var result:Object; var prop:XML; var propName:String; var metadataList:XMLList; var metadata:Object; var md:XML; var mdName:String; var argsList:XMLList; var value:Object; var arg:XML; var existing:Object; var argKey:String; var argValue:String; var existingArray:Array; var properties = _arg1; result = null; try { for each (prop in properties) { propName = prop.attribute("name").toString(); metadataList = prop.metadata; if (metadataList.length() > 0){ if (result == null){ result = {}; }; metadata = {}; result[propName] = metadata; for each (md in metadataList) { mdName = md.attribute("name").toString(); argsList = md.arg; value = {}; for each (arg in argsList) { argKey = arg.attribute("key").toString(); if (argKey != null){ argValue = arg.attribute("value").toString(); value[argKey] = argValue; }; }; existing = metadata[mdName]; if (existing != null){ if ((existing is Array)){ existingArray = (existing as Array); } else { existingArray = []; }; existingArray.push(value); existing = existingArray; } else { existing = value; }; metadata[mdName] = existing; }; }; }; } catch(e:Error) { }; return (result); } public static function hasMetadata(_arg1:Object, _arg2:String, _arg3:String, _arg4:Array=null, _arg5:Object=null):Boolean{ var _local6:Object; var _local7:Object; _local6 = getClassInfo(_arg1, _arg4, _arg5); _local7 = _local6["metadata"]; return (internalHasMetadata(_local7, _arg2, _arg3)); } private static function byteArrayCompare(_arg1:ByteArray, _arg2:ByteArray):int{ var _local3:int; var _local4:int; _local3 = 0; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local3 = -1; } else { _local3 = 1; }; } else { _arg1.position = 0; _arg2.position = 0; _local4 = 0; while (_local4 < _arg1.length) { _local3 = numericCompare(_arg1.readByte(), _arg2.readByte()); if (_local3 != 0){ _local4 = _arg1.length; }; _local4++; }; }; return (_local3); } private static function arrayCompare(_arg1:Array, _arg2:Array, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local6:int; var _local7:int; _local6 = 0; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local6 = -1; } else { _local6 = 1; }; } else { _local7 = 0; while (_local7 < _arg1.length) { _local6 = internalCompare(_arg1[_local7], _arg2[_local7], _arg3, _arg4, _arg5); if (_local6 != 0){ _local7 = _arg1.length; }; _local7++; }; }; return (_local6); } public static function compare(_arg1:Object, _arg2:Object, _arg3:int=-1):int{ return (internalCompare(_arg1, _arg2, 0, _arg3, new Dictionary(true))); } private static function listCompare(_arg1:IList, _arg2:IList, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local6:int; var _local7:int; _local6 = 0; if (_arg1.length != _arg2.length){ if (_arg1.length < _arg2.length){ _local6 = -1; } else { _local6 = 1; }; } else { _local7 = 0; while (_local7 < _arg1.length) { _local6 = internalCompare(_arg1.getItemAt(_local7), _arg2.getItemAt(_local7), (_arg3 + 1), _arg4, _arg5); if (_local6 != 0){ _local7 = _arg1.length; }; _local7++; }; }; return (_local6); } private static function internalCompare(_arg1:Object, _arg2:Object, _arg3:int, _arg4:int, _arg5:Dictionary):int{ var _local6:String; var _local7:String; var _local8:int; var _local9:int; var _local10:Boolean; var _local11:Boolean; var _local12:Array; var _local13:Array; var _local14:QName; var _local15:Object; var _local16:Object; var _local17:int; if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; if ((_arg1 is ObjectProxy)){ _arg1 = ObjectProxy(_arg1).object_proxy::object; }; if ((_arg2 is ObjectProxy)){ _arg2 = ObjectProxy(_arg2).object_proxy::object; }; _local6 = typeof(_arg1); _local7 = typeof(_arg2); _local8 = 0; if (_local6 == _local7){ switch (_local6){ case "boolean": _local8 = numericCompare(Number(_arg1), Number(_arg2)); break; case "number": _local8 = numericCompare((_arg1 as Number), (_arg2 as Number)); break; case "string": _local8 = stringCompare((_arg1 as String), (_arg2 as String)); break; case "object": _local9 = ((_arg4 > 0)) ? (_arg4 - 1) : _arg4; _local10 = _arg5[_arg1]; _local11 = _arg5[_arg2]; if (((_local10) && (!(_local11)))){ return (1); }; if (((_local11) && (!(_local10)))){ return (-1); }; if (((_local11) && (_local10))){ return (0); }; _arg5[_arg1] = true; _arg5[_arg2] = true; if (((!((_arg4 == -1))) && ((_arg3 > _arg4)))){ _local8 = stringCompare(_arg1.toString(), _arg2.toString()); } else { if ((((_arg1 is Array)) && ((_arg2 is Array)))){ _local8 = arrayCompare((_arg1 as Array), (_arg2 as Array), _arg3, _arg4, _arg5); } else { if ((((_arg1 is Date)) && ((_arg2 is Date)))){ _local8 = dateCompare((_arg1 as Date), (_arg2 as Date)); } else { if ((((_arg1 is IList)) && ((_arg2 is IList)))){ _local8 = listCompare((_arg1 as IList), (_arg2 as IList), _arg3, _arg4, _arg5); } else { if ((((_arg1 is ByteArray)) && ((_arg2 is ByteArray)))){ _local8 = byteArrayCompare((_arg1 as ByteArray), (_arg2 as ByteArray)); } else { if (getQualifiedClassName(_arg1) == getQualifiedClassName(_arg2)){ _local12 = getClassInfo(_arg1).properties; if (getQualifiedClassName(_arg1) == "Object"){ _local13 = getClassInfo(_arg2).properties; _local8 = arrayCompare(_local12, _local13, _arg3, _local9, _arg5); }; if (_local8 != 0){ return (_local8); }; _local17 = 0; while (_local17 < _local12.length) { _local14 = _local12[_local17]; _local15 = _arg1[_local14]; _local16 = _arg2[_local14]; _local8 = internalCompare(_local15, _local16, (_arg3 + 1), _local9, _arg5); if (_local8 != 0){ _local17 = _local12.length; }; _local17++; }; } else { return (1); }; }; }; }; }; }; break; }; } else { return (stringCompare(_local6, _local7)); }; return (_local8); } private static function internalToString(_arg1:Object, _arg2:int=0, _arg3:Dictionary=null, _arg4:Array=null, _arg5:Array=null):String{ var _local6:String; var _local7:String; var _local8:Object; var _local9:Array; var _local10:Object; var _local11:Boolean; var _local12:*; var _local13:int; _local7 = ((_arg1 == null)) ? "null" : typeof(_arg1); switch (_local7){ case "boolean": case "number": return (_arg1.toString()); case "string": return ((("\"" + _arg1.toString()) + "\"")); case "object": if ((_arg1 is Date)){ return (_arg1.toString()); }; if ((_arg1 is XMLNode)){ return (_arg1.toString()); }; if ((_arg1 is Class)){ return ((("(" + getQualifiedClassName(_arg1)) + ")")); }; _local8 = getClassInfo(_arg1, _arg5, {includeReadOnly:true, uris:_arg4}); _local9 = _local8.properties; _local6 = (("(" + _local8.name) + ")"); if (_arg3 == null){ _arg3 = new Dictionary(true); }; _local10 = _arg3[_arg1]; if (_local10 != null){ _local6 = (_local6 + ("#" + int(_local10))); return (_local6); }; if (_arg1 != null){ _local6 = (_local6 + ("#" + refCount.toString())); _arg3[_arg1] = refCount; refCount++; }; _local11 = (_arg1 is Array); _arg2 = (_arg2 + 2); _local13 = 0; while (_local13 < _local9.length) { _local6 = newline(_local6, _arg2); _local12 = _local9[_local13]; if (_local11){ _local6 = (_local6 + "["); }; _local6 = (_local6 + _local12.toString()); if (_local11){ _local6 = (_local6 + "] "); } else { _local6 = (_local6 + " = "); }; _local6 = (_local6 + internalToString(_arg1[_local12], _arg2, _arg3, _arg4, _arg5)); _local13++; }; _arg2 = (_arg2 - 2); return (_local6); case "xml": return (_arg1.toString()); default: return ((("(" + _local7) + ")")); }; } public static function toString(_arg1:Object, _arg2:Array=null, _arg3:Array=null):String{ refCount = 0; return (internalToString(_arg1, 0, null, _arg2, _arg3)); } public static function getClassInfo(_arg1:Object, _arg2:Array=null, _arg3:Object=null):Object{ var n:int; var i:int; var result:Object; var propertyNames:Array; var cacheKey:String; var className:String; var classAlias:String; var properties:XMLList; var prop:XML; var dynamic:Boolean; var metadataInfo:Object; var excludeObject:Object; var isArray:Boolean; var classInfo:XML; var numericIndex:Boolean; var p:String; var pi:Number; var uris:Array; var uri:String; var qName:QName; var j:int; var obj = _arg1; var excludes = _arg2; var options = _arg3; if ((obj is ObjectProxy)){ obj = ObjectProxy(obj).object_proxy::object; }; if (options == null){ options = {includeReadOnly:true, uris:null, includeTransient:true}; }; propertyNames = []; dynamic = false; if (typeof(obj) == "xml"){ className = "XML"; properties = obj.text(); if (properties.length()){ propertyNames.push("*"); }; properties = obj.attributes(); } else { classInfo = DescribeTypeCache.describeType(obj).typeDescription; className = classInfo.@name.toString(); classAlias = classInfo.@alias.toString(); dynamic = (classInfo.@isDynamic.toString() == "true"); if (options.includeReadOnly){ properties = (classInfo..accessor.(@access != "writeonly") + classInfo..variable); } else { properties = (classInfo..accessor.(@access == "readwrite") + classInfo..variable); }; numericIndex = false; }; if (!dynamic){ cacheKey = getCacheKey(obj, excludes, options); result = CLASS_INFO_CACHE[cacheKey]; if (result != null){ return (result); }; }; result = {}; result["name"] = className; result["alias"] = classAlias; result["properties"] = propertyNames; result["dynamic"] = dynamic; var _local5 = recordMetadata(properties); metadataInfo = _local5; result["metadata"] = _local5; excludeObject = {}; if (excludes){ n = excludes.length; i = 0; while (i < n) { excludeObject[excludes[i]] = 1; i = (i + 1); }; }; isArray = (className == "Array"); if (dynamic){ for (p in obj) { if (excludeObject[p] != 1){ if (isArray){ pi = parseInt(p); if (isNaN(pi)){ propertyNames.push(new QName("", p)); } else { propertyNames.push(pi); }; } else { propertyNames.push(new QName("", p)); }; }; }; numericIndex = ((isArray) && (!(isNaN(Number(p))))); }; if ((((className == "Object")) || (isArray))){ } else { if (className == "XML"){ n = properties.length(); i = 0; while (i < n) { p = properties[i].name(); if (excludeObject[p] != 1){ propertyNames.push(new QName("", ("@" + p))); }; i = (i + 1); }; } else { n = properties.length(); uris = options.uris; i = 0; while (i < n) { prop = properties[i]; p = prop.@name.toString(); uri = prop.@uri.toString(); if (excludeObject[p] == 1){ } else { if (((!(options.includeTransient)) && (internalHasMetadata(metadataInfo, p, "Transient")))){ } else { if (uris != null){ if ((((uris.length == 1)) && ((uris[0] == "*")))){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(); } catch(e:Error) { }; } else { j = 0; while (j < uris.length) { uri = uris[j]; if (prop.@uri.toString() == uri){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(qName); } catch(e:Error) { }; }; j = (j + 1); }; }; } else { if (uri.length == 0){ qName = new QName(uri, p); try { obj[qName]; propertyNames.push(qName); } catch(e:Error) { }; }; }; }; }; i = (i + 1); }; }; }; propertyNames.sort((Array.CASEINSENSITIVE | (numericIndex) ? Array.NUMERIC : 0)); i = 0; while (i < (propertyNames.length - 1)) { if (propertyNames[i].toString() == propertyNames[(i + 1)].toString()){ propertyNames.splice(i, 1); i = (i - 1); }; i = (i + 1); }; if (!dynamic){ cacheKey = getCacheKey(obj, excludes, options); CLASS_INFO_CACHE[cacheKey] = result; }; return (result); } private static function internalHasMetadata(_arg1:Object, _arg2:String, _arg3:String):Boolean{ var _local4:Object; if (_arg1 != null){ _local4 = _arg1[_arg2]; if (_local4 != null){ if (_local4[_arg3] != null){ return (true); }; }; }; return (false); } private static function newline(_arg1:String, _arg2:int=0):String{ var _local3:String; var _local4:int; _local3 = _arg1; _local3 = (_local3 + "\n"); _local4 = 0; while (_local4 < _arg2) { _local3 = (_local3 + " "); _local4++; }; return (_local3); } public static function copy(_arg1:Object):Object{ var _local2:ByteArray; var _local3:Object; _local2 = new ByteArray(); _local2.writeObject(_arg1); _local2.position = 0; _local3 = _local2.readObject(); return (_local3); } public static function dateCompare(_arg1:Date, _arg2:Date):int{ var _local3:Number; var _local4:Number; if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; _local3 = _arg1.getTime(); _local4 = _arg2.getTime(); if (_local3 < _local4){ return (-1); }; if (_local3 > _local4){ return (1); }; return (0); } private static function getCacheKey(_arg1:Object, _arg2:Array=null, _arg3:Object=null):String{ var _local4:String; var _local5:uint; var _local6:String; var _local7:String; var _local8:String; _local4 = getQualifiedClassName(_arg1); if (_arg2 != null){ _local5 = 0; while (_local5 < _arg2.length) { _local6 = (_arg2[_local5] as String); if (_local6 != null){ _local4 = (_local4 + _local6); }; _local5++; }; }; if (_arg3 != null){ for (_local7 in _arg3) { _local4 = (_local4 + _local7); _local8 = (_arg3[_local7] as String); if (_local8 != null){ _local4 = (_local4 + _local8); }; }; }; return (_local4); } public static function stringCompare(_arg1:String, _arg2:String, _arg3:Boolean=false):int{ var _local4:int; if ((((_arg1 == null)) && ((_arg2 == null)))){ return (0); }; if (_arg1 == null){ return (1); }; if (_arg2 == null){ return (-1); }; if (_arg3){ _arg1 = _arg1.toLocaleLowerCase(); _arg2 = _arg2.toLocaleLowerCase(); }; _local4 = _arg1.localeCompare(_arg2); if (_local4 < -1){ _local4 = -1; } else { if (_local4 > 1){ _local4 = 1; }; }; return (_local4); } public static function isSimple(_arg1:Object):Boolean{ var _local2:String; _local2 = typeof(_arg1); switch (_local2){ case "number": case "string": case "boolean": return (true); case "object": return ((((_arg1 is Date)) || ((_arg1 is Array)))); }; return (false); } public static function numericCompare(_arg1:Number, _arg2:Number):int{ if (((isNaN(_arg1)) && (isNaN(_arg2)))){ return (0); }; if (isNaN(_arg1)){ return (1); }; if (isNaN(_arg2)){ return (-1); }; if (_arg1 < _arg2){ return (-1); }; if (_arg1 > _arg2){ return (1); }; return (0); } } }//package mx.utils
Section 332
//StringUtil (mx.utils.StringUtil) package mx.utils { import mx.core.*; public class StringUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function trim(_arg1:String):String{ var _local2:int; var _local3:int; _local2 = 0; while (isWhitespace(_arg1.charAt(_local2))) { _local2++; }; _local3 = (_arg1.length - 1); while (isWhitespace(_arg1.charAt(_local3))) { _local3--; }; if (_local3 >= _local2){ return (_arg1.slice(_local2, (_local3 + 1))); }; return (""); } public static function isWhitespace(_arg1:String):Boolean{ switch (_arg1){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(_arg1:String, ... _args):String{ var _local3:uint; var _local4:Array; var _local5:int; _local3 = _args.length; if ((((_local3 == 1)) && ((_args[0] is Array)))){ _local4 = (_args[0] as Array); _local3 = _local4.length; } else { _local4 = _args; }; _local5 = 0; while (_local5 < _local3) { _arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]); _local5++; }; return (_arg1); } public static function trimArrayElements(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:int; var _local5:int; if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ _local3 = _arg1.split(_arg2); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local3[_local5] = StringUtil.trim(_local3[_local5]); _local5++; }; if (_local4 > 0){ _arg1 = _local3.join(_arg2); }; }; return (_arg1); } } }//package mx.utils
Section 333
//UIDUtil (mx.utils.UIDUtil) package mx.utils { import mx.core.*; import flash.utils.*; public class UIDUtil { mx_internal static const VERSION:String = "2.0.1.0"; private static const ALPHA_CHARS:String = "0123456789ABCDEF"; private static var uidDictionary:Dictionary = new Dictionary(true); public static function createUID():String{ var _local1:String; var _local2:int; var _local3:int; var _local4:Number; _local1 = ""; _local2 = 0; while (_local2 < 8) { _local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15)))); _local2++; }; _local2 = 0; while (_local2 < 3) { _local1 = (_local1 + "-"); _local3 = 0; while (_local3 < 4) { _local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15)))); _local3++; }; _local2++; }; _local1 = (_local1 + "-"); _local4 = new Date().getTime(); _local1 = (_local1 + ("0000000" + _local4.toString(16).toUpperCase()).substr(-8)); _local2 = 0; while (_local2 < 4) { _local1 = (_local1 + ALPHA_CHARS.charAt(Math.round((Math.random() * 15)))); _local2++; }; return (_local1); } public static function getUID(_arg1:Object):String{ var result:String; var xitem:XML; var nodeKind:String; var notificationFunction:Function; var item = _arg1; result = null; if (item == null){ return (result); }; if ((item is IUID)){ result = IUID(item).uid; if ((((result == null)) || ((result.length == 0)))){ result = createUID(); IUID(item).uid = result; }; } else { if ((((item is IPropertyChangeNotifier)) && (!((item is IUIComponent))))){ result = IPropertyChangeNotifier(item).uid; if ((((result == null)) || ((result.length == 0)))){ result = createUID(); IPropertyChangeNotifier(item).uid = result; }; } else { if ((item is String)){ return ((item as String)); }; try { if ((((item is XMLList)) && ((item.length == 1)))){ item = item[0]; }; if ((item is XML)){ xitem = XML(item); nodeKind = xitem.nodeKind(); if ((((nodeKind == "text")) || ((nodeKind == "attribute")))){ return (xitem.toString()); }; notificationFunction = xitem.notification(); if (!(notificationFunction is Function)){ notificationFunction = XMLNotifier.initializeXMLForNotification(xitem); }; if (notificationFunction["uid"] == undefined){ result = (notificationFunction["uid"] = createUID()); }; result = notificationFunction["uid"]; } else { if (("mx_internal_uid" in item)){ return (item.mx_internal_uid); }; if (("uid" in item)){ return (item.uid); }; result = uidDictionary[item]; if (!result){ result = createUID(); try { item.mx_internal_uid = result; } catch(e:Error) { uidDictionary[item] = result; }; }; }; } catch(e:Error) { result = item.toString(); }; }; }; return (result); } } }//package mx.utils
Section 334
//XMLNotifier (mx.utils.XMLNotifier) package mx.utils { import flash.utils.*; public class XMLNotifier { mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:XMLNotifier; public function XMLNotifier(_arg1:XMLNotifierSingleton){ } public function watchXML(_arg1:Object, _arg2:IXMLNotifiable):void{ var _local3:XML; var _local4:Object; var _local5:Dictionary; _local3 = XML(_arg1); _local4 = _local3.notification(); if (!(_local4 is Function)){ _local4 = initializeXMLForNotification(_local3); }; if (_local4["watched"] == undefined){ _local5 = new Dictionary(true); _local4["watched"] = _local5; } else { _local5 = _local4["watched"]; }; _local5[_arg2] = true; } public function unwatchXML(_arg1:Object, _arg2:IXMLNotifiable):void{ var _local3:XML; var _local4:Object; var _local5:Dictionary; _local3 = XML(_arg1); _local4 = _local3.notification(); if (!(_local4 is Function)){ _local4 = initializeXMLForNotification(_local3); }; if (_local4["watched"] != undefined){ _local5 = _local4["watched"]; delete _local5[_arg2]; }; } public static function getInstance():XMLNotifier{ if (!instance){ instance = new XMLNotifier(new XMLNotifierSingleton()); }; return (instance); } mx_internal static function initializeXMLForNotification(_arg1:XML):Function{ var notificationFunction:Function; var node = _arg1; notificationFunction = function (_arg1:Object, _arg2:String, _arg3:Object, _arg4:Object, _arg5:Object):void{ var _local7:Dictionary; var _local8:Object; _local7 = arguments.callee.watched; if (_local7 != null){ for (_local8 in _local7) { IXMLNotifiable(_local8).xmlNotification(_arg1, _arg2, _arg3, _arg4, _arg5); }; }; }; node.setNotification(notificationFunction); return (notificationFunction); } } }//package mx.utils class XMLNotifierSingleton { private function XMLNotifierSingleton(){ } }
Section 335
//IValidatorListener (mx.validators.IValidatorListener) package mx.validators { import mx.events.*; public interface IValidatorListener { function set errorString(_arg1:String):void; function get validationSubField():String; function validationResultHandler(_arg1:ValidationResultEvent):void; function set validationSubField(_arg1:String):void; function get errorString():String; } }//package mx.validators
Section 336
//ValidationResult (mx.validators.ValidationResult) package mx.validators { public class ValidationResult { public var errorCode:String; public var errorMessage:String; public var subField:String; public var isError:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){ this.isError = _arg1; this.subField = _arg2; this.errorMessage = _arg4; this.errorCode = _arg3; } } }//package mx.validators
Section 337
//IUnits (units.IUnits) package units { public interface IUnits { function isValid():Boolean; function getTextArray():Array; function convertNumberToString(_arg1:Number, _arg2:Number, _arg3:Number):String; function getSolutionArray(_arg1:String):Array; function getValue(_arg1:String):Number; function getDescription():String; function setValue(_arg1:Number, _arg2:String):void; } }//package units
Section 338
//Length (units.Length) package units { public class Length extends Unit { public function Length(_arg1:String):void{ var _local2:Array; var _local3:Array; _local2 = ["meter", "attometer", "centimeter", "chain", "dekameter", "decimeter", "exameter", "femtometer", "foot", "gigameter", "hectometer", "inch", "kilometer", "light year", "link", "megameter", "micrometer", "mile", "millimeter", "nanometer", "petameter", "picometer", "rod", "terameter", "yard"]; _local3 = [1, 1E-18, 0.01, 20.1168, 10, 0.1, 1E18, 1E-15, 0.3048, 1000000000, 100, 0.0254, 1000, 9.46052840488E15, 0.2017, 1000000, 1E-6, 1609.344, 0.001, 1E-9, 1E15, 1E-12, 5.0292, 1000000000000, 0.9144]; super(_local2, _local3, _arg1); } } }//package units
Section 339
//Length3 (units.Length3) package units { public class Length3 extends Unit { public function Length3(_arg1:String):void{ var _local2:Array; var _local3:Array; _local2 = ["meter^3", "barrel UK", "barrel US dry", "barrel US federal", "barrel US liquid", "barrel US oil petroleum", "bushel UK", "bushel US dry", "centimeter^3", "cord firewood", "cord foot wood", "cup Canada", "cup metric", "cup US", "deciliter", "foot^3", "gallon UK", "gallon US liquid", "inch^3", "kilometer^3", "liter", "milliliter", "ounce UK fluid", "ounce US fluid", "pint US", "quart US", "stere", "tablespoon US", "teaspoon US", "yard^3"]; _local3 = [1, 0.16365924, 0.115627124, 0.117347765, 0.119240471, 0.158987294928, 0.036368735, 0.035239072, 1E-6, 3.624556416, 0.453069552, 0.000227305, 0.00025, 0.000236588238, 0.0001, 0.028316846592, 0.004546092, 0.003785411784, 1.6387064E-5, 1000000000, 0.001, 1E-6, 2.84130742E-5, 2.95735295625E-5, 0.000473176473, 0.000946352946, 1, 1.47867647813E-5, 4.92892159375E-6, 0.764554857984]; super(_local2, _local3, _arg1); } } }//package units
Section 340
//Unit (units.Unit) package units { public class Unit implements IUnits { public var description:String; public var unitText:Array; public var setLookUp:Object; public var value:Number;// = 0 public var valid:Boolean;// = false public function Unit(_arg1:Array, _arg2:Array, _arg3:String):void{ var _local4:int; value = 0; valid = false; description = new String(); unitText = [0]; setLookUp = new Object(); super(); _local4 = 0; _local4 = 0; while (_local4 < _arg1.length) { this.unitText[_local4] = _arg1[_local4]; this.setLookUp[_arg1[_local4]] = _arg2[_local4]; _local4++; }; this.description = _arg3; } public function getValue(_arg1:String):Number{ var _local2:Number; _local2 = 0; _local2 = (this.value / this.setLookUp[_arg1]); return (_local2); } public function getDescription():String{ var _local1:String; _local1 = new String(); _local1 = this.description; return (_local1); } public function convertNumberToString(_arg1:Number, _arg2:Number, _arg3:Number):String{ var _local4:String; if ((((((((_arg1 > (-1 * Math.pow(10, (-1 * _arg3))))) && ((_arg1 < Math.pow(10, (-1 * _arg3)))))) || ((_arg1 < (-1 * Math.pow(10, _arg3)))))) || ((_arg1 > Math.pow(10, _arg3))))){ _local4 = _arg1.toExponential(_arg2); } else { _local4 = _arg1.toPrecision(_arg2); }; return (_local4); } public function setValue(_arg1:Number, _arg2:String):void{ this.value = (_arg1 * this.setLookUp[_arg2]); } public function isValid():Boolean{ return (this.valid); } public function getSolutionArrayPrecision(_arg1:String, _arg2:Number, _arg3:Number):Array{ var _local4:Array; var _local5:int; _local4 = new Array(); _local5 = 0; if (_arg1 == "none"){ _local5 = 0; while (_local5 < unitText.length) { _local4[_local5] = {Name:description, Value:convertNumberToString(getValue(unitText[_local5]), _arg2, _arg3), Unit:unitText[_local5]}; _local5++; }; } else { _local4[0] = {Name:description, Value:getValue(_arg1).toPrecision(_arg2), Unit:_arg1}; _local4[1] = {Name:"OTHER UNITS:", Value:" ", Unit:" "}; _local5 = 0; while (_local5 < unitText.length) { _local4[(_local5 + 2)] = {Name:description, Value:getValue(unitText[_local5]).toPrecision(_arg2), Unit:unitText[_local5]}; _local5++; }; }; return (_local4); } public function getSolutionArray(_arg1:String):Array{ var _local2:Array; var _local3:int; _local2 = new Array(); _local3 = 0; if (_arg1 == "none"){ _local3 = 0; while (_local3 < unitText.length) { _local2[_local3] = {Name:description, Value:getValue(unitText[_local3]), Unit:unitText[_local3]}; _local3++; }; } else { _local2[0] = {Name:description, Value:getValue(_arg1), Unit:_arg1}; _local2[1] = {Name:"OTHER UNITS:", Value:" ", Unit:" "}; _local3 = 0; while (_local3 < unitText.length) { _local2[(_local3 + 2)] = {Name:description, Value:getValue(unitText[_local3]), Unit:unitText[_local3]}; _local3++; }; }; return (_local2); } public function getTextArray():Array{ var _local1:Array; _local1 = new Array(); _local1 = this.unitText; return (_local1); } } }//package units
Section 341
//_AccordionHeaderStyle (_AccordionHeaderStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _AccordionHeaderStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("AccordionHeader"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("AccordionHeader", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.downSkin = AccordionHeaderSkin; this.overSkin = AccordionHeaderSkin; this.selectedDisabledSkin = AccordionHeaderSkin; this.selectedUpSkin = AccordionHeaderSkin; this.fontSize = "10"; this.paddingLeft = 5; this.paddingRight = 5; this.upSkin = AccordionHeaderSkin; this.fontWeight = "bold"; this.selectedDownSkin = AccordionHeaderSkin; this.textAlign = "left"; this.disabledSkin = AccordionHeaderSkin; this.horizontalGap = 2; this.selectedOverSkin = AccordionHeaderSkin; }; }; } } }//package
Section 342
//_AccordionStyle (_AccordionStyle) package { import mx.core.*; import mx.styles.*; public class _AccordionStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("Accordion"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Accordion", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "solid"; this.paddingTop = -1; this.backgroundColor = 0xFFFFFF; this.verticalGap = -1; this.paddingLeft = -1; this.paddingBottom = -1; this.paddingRight = -1; }; }; } } }//package
Section 343
//_activeButtonStyleStyle (_activeButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".activeButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 344
//_activeTabStyleStyle (_activeTabStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeTabStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".activeTabStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeTabStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 345
//_alertButtonStyleStyle (_alertButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _alertButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".alertButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".alertButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 734012; }; }; } } }//package
Section 346
//_ApplicationStyle (_ApplicationStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ApplicationStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("Application"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Application", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.backgroundSize = "100%"; this.paddingTop = 24; this.backgroundColor = 8821927; this.backgroundImage = ApplicationBackground; this.horizontalAlign = "center"; this.backgroundGradientAlphas = [1, 1]; this.paddingLeft = 24; this.paddingBottom = 24; this.paddingRight = 24; }; }; } } }//package
Section 347
//_ButtonStyle (_ButtonStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ButtonStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("Button"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Button", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.downSkin = ButtonSkin; this.overSkin = ButtonSkin; this.selectedDisabledSkin = ButtonSkin; this.cornerRadius = 4; this.selectedUpSkin = ButtonSkin; this.verticalGap = 2; this.paddingLeft = 3; this.paddingRight = 3; this.upSkin = ButtonSkin; this.fontWeight = "bold"; this.selectedDownSkin = ButtonSkin; this.textAlign = "center"; this.disabledSkin = ButtonSkin; this.horizontalGap = 2; this.selectedOverSkin = ButtonSkin; }; }; } } }//package
Section 348
//_ComboBoxStyle (_ComboBoxStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ComboBoxStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("ComboBox"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ComboBox", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.downSkin = ComboBoxArrowSkin; this.overSkin = ComboBoxArrowSkin; this.editableDownSkin = ComboBoxArrowSkin; this.cornerRadius = 5; this.editableDisabledSkin = ComboBoxArrowSkin; this.paddingLeft = 5; this.paddingRight = 5; this.upSkin = ComboBoxArrowSkin; this.fontWeight = "bold"; this.editableUpSkin = ComboBoxArrowSkin; this.leading = 0; this.editableOverSkin = ComboBoxArrowSkin; this.arrowButtonWidth = 22; this.dropDownStyleName = "comboDropDown"; this.disabledSkin = ComboBoxArrowSkin; }; }; } } }//package
Section 349
//_comboDropDownStyle (_comboDropDownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropDownStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".comboDropDown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropDown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; }; }; } } }//package
Section 350
//_ContainerStyle (_ContainerStyle) package { import mx.core.*; import mx.styles.*; public class _ContainerStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("Container"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("Container", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "none"; }; }; } } }//package
Section 351
//_CursorManagerStyle (_CursorManagerStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _CursorManagerStyle { private static var _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126:Class = _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126; public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("CursorManager"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("CursorManager", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.busyCursor = BusyCursor; this.busyCursorBackground = _embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126; }; }; } } }//package
Section 352
//_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126 (_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126) package { import mx.core.*; public class _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126 extends SpriteAsset { } }//package
Section 353
//_DataGridItemRendererStyle (_DataGridItemRendererStyle) package { import mx.core.*; import mx.styles.*; public class _DataGridItemRendererStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("DataGridItemRenderer"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("DataGridItemRenderer", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingLeft = 5; }; }; } } }//package
Section 354
//_DataGridStyle (_DataGridStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _DataGridStyle { private static var _embed_css_Assets_swf_cursorStretch_2118006141:Class = _DataGridStyle__embed_css_Assets_swf_cursorStretch_2118006141; public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("DataGrid"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("DataGrid", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.sortArrowSkin = DataGridSortArrow; this.columnDropIndicatorSkin = DataGridColumnDropIndicator; this.columnResizeSkin = DataGridColumnResizeSkin; this.stretchCursor = _embed_css_Assets_swf_cursorStretch_2118006141; this.alternatingItemColors = [0xF7F7F7, 0xFFFFFF]; this.headerStyleName = "dataGridStyles"; this.headerSeparatorSkin = DataGridHeaderSeparator; this.headerColors = [0xFFFFFF, 0xE6E6E6]; this.headerDragProxyStyleName = "headerDragProxyStyle"; this.verticalGridLineColor = 0xCCCCCC; }; }; } } }//package
Section 355
//_DataGridStyle__embed_css_Assets_swf_cursorStretch_2118006141 (_DataGridStyle__embed_css_Assets_swf_cursorStretch_2118006141) package { import mx.core.*; public class _DataGridStyle__embed_css_Assets_swf_cursorStretch_2118006141 extends SpriteAsset { } }//package
Section 356
//_dataGridStylesStyle (_dataGridStylesStyle) package { import mx.core.*; import mx.styles.*; public class _dataGridStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".dataGridStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dataGridStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 357
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 358
//_DragManagerStyle (_DragManagerStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _DragManagerStyle { private static var _embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119:Class = _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119; private static var _embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336:Class = _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336; private static var _embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108:Class = _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108; private static var _embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654:Class = _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654; public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("DragManager"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("DragManager", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.copyCursor = _embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108; this.moveCursor = _embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336; this.rejectCursor = _embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654; this.linkCursor = _embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119; this.defaultDragImageSkin = DefaultDragImage; }; }; } } }//package
Section 359
//_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108 (_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108) package { import mx.core.*; public class _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108 extends SpriteAsset { } }//package
Section 360
//_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119 (_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119) package { import mx.core.*; public class _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119 extends SpriteAsset { } }//package
Section 361
//_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336 (_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336) package { import mx.core.*; public class _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336 extends SpriteAsset { } }//package
Section 362
//_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654 (_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654) package { import mx.core.*; public class _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654 extends SpriteAsset { } }//package
Section 363
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 364
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.cornerRadius = 0; this.modalTransparencyColor = 0xDDDDDD; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 365
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 366
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle) package { import mx.core.*; import mx.styles.*; public class _headerDragProxyStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".headerDragProxyStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 367
//_ListBaseStyle (_ListBaseStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ListBaseStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("ListBase"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ListBase", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "solid"; this.paddingTop = 2; this.backgroundColor = 0xFFFFFF; this.backgroundDisabledColor = 0xDDDDDD; this.dropIndicatorSkin = ListDropIndicator; this.paddingLeft = 2; this.paddingBottom = 2; this.paddingRight = 0; }; }; } } }//package
Section 368
//_NumericStepperStyle (_NumericStepperStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _NumericStepperStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("NumericStepper"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("NumericStepper", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.upArrowUpSkin = NumericStepperUpSkin; this.downArrowUpSkin = NumericStepperDownSkin; this.upArrowOverSkin = NumericStepperUpSkin; this.downArrowDownSkin = NumericStepperDownSkin; this.cornerRadius = 5; this.upArrowDownSkin = NumericStepperUpSkin; this.downArrowDisabledSkin = NumericStepperDownSkin; this.upArrowDisabledSkin = NumericStepperUpSkin; this.focusRoundedCorners = "tr br"; this.downArrowOverSkin = NumericStepperDownSkin; }; }; } } }//package
Section 369
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 370
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 371
//_RadioButtonStyle (_RadioButtonStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _RadioButtonStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("RadioButton"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("RadioButton", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.downSkin = null; this.overSkin = null; this.disabledIcon = RadioButtonIcon; this.selectedDisabledSkin = null; this.upIcon = RadioButtonIcon; this.cornerRadius = 7; this.selectedDownIcon = RadioButtonIcon; this.selectedUpSkin = null; this.overIcon = RadioButtonIcon; this.upSkin = null; this.fontWeight = "normal"; this.selectedDownSkin = null; this.selectedUpIcon = RadioButtonIcon; this.selectedOverIcon = RadioButtonIcon; this.selectedDisabledIcon = RadioButtonIcon; this.textAlign = "left"; this.disabledSkin = null; this.selectedOverSkin = null; this.downIcon = RadioButtonIcon; }; }; } } }//package
Section 372
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle) package { import mx.core.*; import mx.styles.*; public class _richTextEditorTextAreaStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 373
//_ScrollBarStyle (_ScrollBarStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ScrollBarStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("ScrollBar"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ScrollBar", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.downArrowUpSkin = ScrollArrowSkin; this.thumbDownSkin = ScrollThumbSkin; this.upArrowOverSkin = ScrollArrowSkin; this.borderColor = 12040892; this.thumbOverSkin = ScrollThumbSkin; this.cornerRadius = 4; this.thumbUpSkin = ScrollThumbSkin; this.upArrowDisabledSkin = ScrollArrowSkin; this.upArrowUpSkin = ScrollArrowSkin; this.trackColors = [9738651, 0xE7E7E7]; this.trackSkin = ScrollTrackSkin; this.downArrowDownSkin = ScrollArrowSkin; this.upArrowDownSkin = ScrollArrowSkin; this.downArrowDisabledSkin = ScrollArrowSkin; this.downArrowOverSkin = ScrollArrowSkin; }; }; } } }//package
Section 374
//_subwoofer_FlexInit (_subwoofer_FlexInit) package { import mx.core.*; import mx.styles.*; import mx.effects.*; import mx.collections.*; import mx.utils.*; import flash.net.*; public class _subwoofer_FlexInit { public static function init(_arg1:IFlexModuleFactory):void{ var _local2:Array; var _local3:int; var _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("addedEffect", "added"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("creationCompleteEffect", "creationComplete"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("focusInEffect", "focusIn"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("focusOutEffect", "focusOut"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("hideDataEffect", "hideData"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("hideEffect", "hide"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("mouseDownEffect", "mouseDown"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("mouseUpEffect", "mouseUp"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("moveEffect", "move"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("removedEffect", "removed"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("resizeEffect", "resize"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("rollOutEffect", "rollOut"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("rollOverEffect", "rollOver"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("showDataEffect", "showData"); _local4 = EffectManager; _local4.mx_internal::registerEffectTrigger("showEffect", "show"); registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection); registerClassAlias("flex.messaging.io.ArrayList", ArrayList); registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy); _local2 = ["fontAntiAliasType", "errorColor", "horizontalGridLineColor", "kerning", "backgroundDisabledColor", "modalTransparencyColor", "textRollOverColor", "textIndent", "verticalGridLineColor", "themeColor", "markerWidth", "modalTransparency", "markerHeight", "headerColors", "fontThickness", "textAlign", "fontFamily", "labelPlacement", "textSelectedColor", "selectionDisabledColor", "fontGridFitType", "letterSpacing", "rollOverColor", "fontStyle", "dropShadowColor", "fontSize", "shadowColor", "selectionColor", "disabledColor", "dropdownBorderColor", "fontWeight", "modalTransparencyBlur", "color", "alternatingItemColors", "axisTitleStyleName", "fontSharpness", "barColor", "modalTransparencyDuration"]; _local3 = 0; while (_local3 < _local2.length) { StyleManager.registerInheritingStyle(_local2[_local3]); _local3++; }; } } }//package
Section 375
//_subwoofer_mx_managers_SystemManager (_subwoofer_mx_managers_SystemManager) package { import mx.core.*; import mx.managers.*; import flash.system.*; public class _subwoofer_mx_managers_SystemManager extends SystemManager implements IFlexModuleFactory { override public function info():Object{ return ({currentDomain:ApplicationDomain.currentDomain, creationComplete:"runInit();", creationPolicy:"all", height:"800", layout:"absolute", mainClassName:"subwoofer", mixins:["_subwoofer_FlexInit", "_richTextEditorTextAreaStyleStyle", "_AccordionHeaderStyle", "_alertButtonStyleStyle", "_textAreaVScrollBarStyleStyle", "_headerDateTextStyle", "_comboDropDownStyle", "_globalStyle", "_ListBaseStyle", "_todayStyleStyle", "_AccordionStyle", "_windowStylesStyle", "_ApplicationStyle", "_ToolTipStyle", "_CursorManagerStyle", "_opaquePanelStyle", "_TextInputStyle", "_errorTipStyle", "_dateFieldPopupStyle", "_ComboBoxStyle", "_dataGridStylesStyle", "_DataGridStyle", "_headerDragProxyStyleStyle", "_activeTabStyleStyle", "_DragManagerStyle", "_NumericStepperStyle", "_ContainerStyle", "_windowStatusStyle", "_ScrollBarStyle", "_TextAreaStyle", "_RadioButtonStyle", "_textAreaHScrollBarStyleStyle", "_plainStyle", "_activeButtonStyleStyle", "_ButtonStyle", "_DataGridItemRendererStyle", "_weekDayStyleStyle", "_subwooferWatcherSetupUtil"], width:"600"}); } override public function create(... _args):Object{ var _local2:String; var _local3:Class; var _local4:Object; if ((((_args.length == 0)) || ((_args[0] is String)))){ _local2 = null; if (_args.length == 0){ _local2 = "subwoofer"; } else { _local2 = String(_args[0]); }; _local3 = Class(getDefinitionByName(_local2)); if (_local3 != null){ _local4 = new (_local3); if ((_local4 is IFlexModule)){ IFlexModule(_local4).moduleFactory = this; }; return (_local4); } else { return (null); }; //unresolved jump }; return (super.create.apply(this, _args)); } } }//package
Section 376
//_subwooferWatcherSetupUtil (_subwooferWatcherSetupUtil) package { import mx.core.*; import flash.display.*; import mx.binding.*; public class _subwooferWatcherSetupUtil extends Sprite implements IWatcherSetupUtil { public function setup(_arg1:Object, _arg2:Function, _arg3:Array, _arg4:Array):void{ var _local5:Watcher; _arg4[5] = new PropertyWatcher("linechart1", {propertyChange:true}); _arg4[1] = new PropertyWatcher("acVolumeUnits", {propertyChange:true}); _arg4[3] = new PropertyWatcher("acResultTable", {propertyChange:true}); _arg4[2] = new PropertyWatcher("acLengthUnits", {propertyChange:true}); _arg4[4] = new PropertyWatcher("acDBmag", {propertyChange:true}); _arg4[5].addListener(_arg3[6]); _arg4[5].propertyGetter = _arg2; _arg4[5].updateParent(_arg1); _local5 = _arg4[1]; _local5.addListener(_arg3[0]); _local5.addListener(_arg3[2]); _arg4[1].propertyGetter = _arg2; _arg4[1].updateParent(_arg1); _arg4[3].addListener(_arg3[4]); _arg4[3].propertyGetter = _arg2; _arg4[3].updateParent(_arg1); _local5 = _arg4[2]; _local5.addListener(_arg3[1]); _local5.addListener(_arg3[3]); _arg4[2].propertyGetter = _arg2; _arg4[2].updateParent(_arg1); _arg4[4].addListener(_arg3[5]); _arg4[4].propertyGetter = _arg2; _arg4[4].updateParent(_arg1); _arg3[0].uiComponentWatcher = 1; _arg3[0].execute(); _arg3[1].uiComponentWatcher = 2; _arg3[1].execute(); _arg3[2].uiComponentWatcher = 1; _arg3[2].execute(); _arg3[3].uiComponentWatcher = 2; _arg3[3].execute(); _arg3[4].uiComponentWatcher = 3; _arg3[4].execute(); _arg3[5].uiComponentWatcher = 4; _arg3[5].execute(); _arg3[6].uiComponentWatcher = 5; _arg3[6].execute(); } public static function init(_arg1:IFlexModuleFactory):void{ subwoofer.watcherSetupUtil = new (_subwooferWatcherSetupUtil); } } }//package
Section 377
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaHScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 378
//_TextAreaStyle (_TextAreaStyle) package { import mx.core.*; import mx.styles.*; public class _TextAreaStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("TextArea"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("TextArea", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "solid"; this.verticalScrollBarStyleName = "textAreaVScrollBarStyle"; this.backgroundColor = 0xFFFFFF; this.horizontalScrollBarStyleName = "textAreaHScrollBarStyle"; }; }; } } }//package
Section 379
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaVScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 380
//_TextInputStyle (_TextInputStyle) package { import mx.core.*; import mx.styles.*; public class _TextInputStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("TextInput"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("TextInput", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.backgroundColor = 0xFFFFFF; }; }; } } }//package
Section 381
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 382
//_ToolTipStyle (_ToolTipStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _ToolTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("ToolTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("ToolTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "toolTip"; this.paddingTop = 2; this.borderColor = 9542041; this.backgroundColor = 16777164; this.borderSkin = ToolTipBorder; this.cornerRadius = 2; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 2; this.backgroundAlpha = 0.95; this.paddingRight = 4; }; }; } } }//package
Section 383
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 384
//_windowStatusStyle (_windowStatusStyle) package { import mx.core.*; import mx.styles.*; public class _windowStatusStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".windowStatus"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStatus", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0x666666; }; }; } } }//package
Section 385
//_windowStylesStyle (_windowStylesStyle) package { import mx.core.*; import mx.styles.*; public class _windowStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".windowStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 386
//BandpassParameters (BandpassParameters) package { public class BandpassParameters { public var nQts:Number; public var bCheckS5:Boolean; public var bCheckS6:Boolean; public var nVasLiter:Number; public var nGain:Number; public var nPdCentimeter:Number; public var nNumberPorts:Number; public var bCheckS7:Boolean; public var nFs:Number; public function calculateBandpass():Object{ var _local1:Array; var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:Number; var _local13:Array; var _local14:Array; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = new Array(); _local2 = new Object(); _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local8 = new Array(); _local9 = new Array(); _local10 = new Array(); _local11 = new Array(); _local12 = 0; _local13 = new Array(); _local14 = new Array(); _local15 = 0; _local16 = 0; _local17 = 0; _local18 = 0; _local19 = 0; _local20 = 0; if (bCheckS5 == true){ _local4 = 0.5; _local3 = 1.2712; _local5 = 1.25; }; if (bCheckS6 == true){ _local4 = 0.6; _local3 = 0.956; _local5 = 0.35; }; if (bCheckS7 == true){ _local4 = 0.7; _local3 = 0.7206; _local5 = 0; }; _local7 = Math.pow(((Math.pow(10, ((-1 * nGain) / 40)) * 2) * _local4), (-1 * 1)); _local15 = ((((-1 * _local3) + Math.pow((Math.pow(_local3, 2) + (4 * Math.pow(_local7, 2))), 0.5)) / 2) * (nFs / nQts)); _local16 = (_local15 + ((_local3 * nFs) / nQts)); _local17 = ((_local7 * nFs) / nQts); _local18 = (Math.pow(((2 * _local4) * nQts), 2) * nVasLiter); _local19 = (nVasLiter / (Math.pow((_local7 / nQts), 2) - 1)); _local20 = ((((23562.5 * Math.pow(nPdCentimeter, 2)) * nNumberPorts) / (Math.pow(_local17, 2) * _local18)) - (0.732 * nPdCentimeter)); _local12 = (((nVasLiter / _local19) + 1) * Math.pow(nFs, 2)); _local6 = 10; while (_local6 < 1000) { _local8[(_local6 - 10)] = (Math.pow((1 / _local17), 2) * Math.pow(_local6, 4)); _local9[(_local6 - 10)] = ((((1 / 10000) + ((nFs / _local17) / nQts)) / _local17) * Math.pow(_local6, 3)); _local10[(_local6 - 10)] = (((((((((1 + (nVasLiter / _local19)) + (nVasLiter / _local18)) * nFs) / _local17) + ((1 / nQts) / 10000)) * nFs) / _local17) + 1) * Math.pow(_local6, 2)); _local11[(_local6 - 10)] = ((((1 / nQts) + (((nFs / _local17) / 10000) * ((nVasLiter / _local19) + 1))) * nFs) * _local6); _local13[(_local6 - 10)] = ((_local8[(_local6 - 10)] - _local10[(_local6 - 10)]) + _local12); _local14[(_local6 - 10)] = ((-1 * _local9[(_local6 - 10)]) + _local11[(_local6 - 10)]); _local1[(_local6 - 10)] = ((20 * Math.LOG10E) * Math.log((Math.pow(_local6, 2) / Math.pow((Math.pow(_local13[(_local6 - 10)], 2) + Math.pow(_local14[(_local6 - 10)], 2)), 0.5)))); _local6++; }; _local2 = {nFh:_local16, nFl:_local15, nFb:_local17, nVfLiter:_local18, nVrLiter:_local19, aDBmag:_local1, nPlCentimeter:_local20}; return (_local2); } } }//package
Section 387
//collections_properties (collections_properties) package { import mx.resources.*; public class collections_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["findCondition"] = "Find criteria must contain all sort fields leading up to ''{0}''."; _local1["noComparatorSortField"] = "Cannot determine comparator for SortField with name ''{0}''."; _local1["outOfBounds"] = "Index '{0}' specified is out of bounds."; _local1["invalidBookmark"] = "Invalid bookmark."; _local1["nonUnique"] = "Non-unique values in items."; _local1["incorrectAddition"] = "Attempt to add an item already in the view."; _local1["findRestriction"] = "Find criteria must contain at least one sort field value."; _local1["invalidType"] = "Incorrect type. Must be of type XML or a XMLList that contains one XML object. "; _local1["unknownMode"] = "Unknown find mode."; _local1["invalidIndex"] = "Invalid index: '{0}'."; _local1["invalidRemove"] = "Cannot remove when current is beforeFirst or afterLast."; _local1["unknownProperty"] = "Unknown Property: '{0}'."; _local1["invalidInsert"] = "Cannot insert when current is beforeFirst."; _local1["itemNotFound"] = "Cannot find when view is not sorted."; _local1["bookmarkInvalid"] = "Bookmark no longer valid."; _local1["noComparator"] = "Cannot determine comparator for '{0}'."; _local1["invalidCursor"] = "Cursor no longer valid."; _local1["noItems"] = "No items to search."; _local1["bookmarkNotFound"] = "Bookmark is not from this view."; return (_local1); } } }//package
Section 388
//controls_properties (controls_properties) package { import mx.resources.*; public class controls_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["undefinedParameter"] = "CuePoint parameter undefined."; _local1["nullURL"] = "Null URL sent to VideoPlayer.load."; _local1["incorrectType"] = "Type must be 0, 1 or 2."; _local1["okLabel"] = "OK"; _local1["unsortedCuePoint"] = "Unsorted cuePoint found after time: '{0}'."; _local1["noLabel"] = "No"; _local1["wrongNumParams"] = "Num params must be number."; _local1["wrongDisabled"] = "Disabled must be number."; _local1["wrongTime"] = "Time must be number."; _local1["dayNamesShortest"] = "S, M, T, W, T, F, S"; _local1["cannotSwitchRTMP"] = "Cannot switch between multiple absolute RTMP URLs. Must use meta tag base attribute."; _local1["wrongType"] = "Type must be number."; _local1["unhandledEvent"] = "Unhandled MenuEvent."; _local1["firstDayOfWeek"] = "0"; _local1["rootNotSMIL"] = "URL: \"'{0}'\" Root node not smil: '{1}'."; _local1["nameNotFound"] = "Base RTMP URL must include application name: '{0}'."; _local1["errorMessages"] = "No bitrate match, must be no Cannot delete default VideoPlayer."; _local1["missingParameter"] = "Fpad URL must include uri parameter: '{0}'."; _local1["rootNotFound"] = "URL: \"'{0}'\" No root node found; if file is an flv, it must have a .flv extension."; _local1["unexpectedEnd"] = "Unexpected end of cuePoint param string."; _local1["errWrongContainer"] = "ERROR: The dataProvider of '{0}' must not contain objects of type flash.display.DisplayObject."; _local1["invalidCall"] = "Cannot call reconnect on an http connection."; _local1["cancelLabel"] = "Cancel"; _local1["errWrongType"] = "ERROR: The dataProvider of '{0}' must be String, ViewStack, Array, or IList."; _local1["badArgs"] = "Bad args to _play."; _local1["missingRoot"] = "URL: \"'{0}'\" No root node found; if URL is for an flv, it must have a .flv extension and take no parameters."; _local1["notLoadable"] = "Unable to load '{0}'."; _local1["wrongName"] = "Name cannot be undefined or null."; _local1["wrongTimeName"] = "Time must be number and/or name must not be undefined or null."; _local1["yesLabel"] = "Yes"; _local1["wrongURL"] = "When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes."; _local1["undefinedArray"] = "CuePoint.array undefined."; _local1["missingProxy"] = "URL: \"'{0}'\" fpad xml requires proxy tag."; _local1["unknownInput"] = "Unknown inputType '{0}'."; _local1["missingAttributeSrc"] = "URL: \"'{0}'\" Attribute src is required in '{1}' tag."; _local1["yearSymbol"] = " "; _local1["outOfRange"] = "Index out of range."; _local1["wrongIndex"] = "CuePoint.index must be number between -1 and cuePoint.array.length."; _local1["notImplemented"] = "'{0}' not implemented yet."; _local1["label"] = "LOADING %3%%"; _local1["wrongFormat"] = "Unexpected cuePoint parameter format."; _local1["tagNotFound"] = "URL: \"'{0}'\" At least one video of ref tag is required."; _local1["cannotSwitchFPAD"] = "Cannot switch between multiple absolute fpad URLs. Must use meta tag base attribute."; _local1["unsupportedMode"] = "IMEMode:{0} not supported."; _local1["cannotDisable"] = "Cannot disable actionscript cue points."; _local1["missingAttributes"] = "URL: \"'{0}'\" Tag '{1}' requires attributes id, width, and height. Width and height must be numbers greater than or equal to 0."; _local1["notfpad"] = "URL: \"'{0}'\" Root node not fpad."; _local1["wrongParameter"] = "Fpad URL uri parameter must be rtmp URL: '{0}'."; _local1["illegalAttributes"] = "Illegal meta tag base attribute: '{0}'."; return (_local1); } } }//package
Section 389
//core_properties (core_properties) package { import mx.resources.*; public class core_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["multipleChildSets_ClassAndInstance"] = "Multiple sets of visual children have been specified for this component (component definition and component instance)."; _local1["multipleChildSets_ClassAndSubclass"] = "Multiple sets of visual children have been specified for this component (base component definition and derived component definition)."; _local1["notExecuting"] = "Repeater is not executing."; _local1["truncationIndicator"] = "..."; _local1["stateUndefined"] = "Undefined state '{0}'."; _local1["scrollDirection"] = "Unknown scroll direction '{0}'."; _local1["viewSource"] = "View Source"; return (_local1); } } }//package
Section 390
//effects_properties (effects_properties) package { import mx.resources.*; public class effects_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["incorrectTrigger"] = "The Zoom effect can not be triggered by a moveEffect trigger."; _local1["incorrectSource"] = "Source property must be a Class or String."; return (_local1); } } }//package
Section 391
//PortedParameters (PortedParameters) package { public class PortedParameters { public var nQts:Number; public var nPdCentimeter:Number; public var bCheckSBB4:Boolean; public var nVasLiter:Number; public var nNumberPorts:Number; public var nFs:Number; public var bCheckQB3:Boolean; public var bCheckSC4:Boolean; public function calculatePorted():Object{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Array; var _local24:Number; var _local25:Object; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = 0; _local12 = true; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = 0; _local17 = new Array(); _local18 = new Array(); _local19 = 0; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = new Array(); _local24 = 0; _local25 = new Object(); if (bCheckSBB4 == true){ if ((((nQts >= 0.2)) && ((nQts < 0.21)))){ _local1 = 0.2; _local2 = 0.21; _local4 = 1; _local5 = 1; _local7 = 5.898; _local8 = 5.3339; _local10 = 3.3686; _local11 = 3.1518; } else { if ((((nQts >= 0.21)) && ((nQts < 0.22)))){ _local1 = 0.21; _local2 = 0.22; _local4 = 1; _local5 = 1; _local7 = 5.3339; _local8 = 4.8457; _local10 = 3.1518; _local11 = 2.9521; } else { if ((((nQts >= 0.22)) && ((nQts < 0.23)))){ _local1 = 0.22; _local2 = 0.23; _local4 = 1; _local5 = 1; _local7 = 4.8457; _local8 = 4.4204; _local10 = 2.9521; _local11 = 2.7674; } else { if ((((nQts >= 0.23)) && ((nQts < 0.24)))){ _local1 = 0.23; _local2 = 0.24; _local4 = 1; _local5 = 1; _local7 = 4.4204; _local8 = 4.0478; _local10 = 2.7674; _local11 = 2.596; } else { if ((((nQts >= 0.24)) && ((nQts < 0.25)))){ _local1 = 0.24; _local2 = 0.25; _local4 = 1; _local5 = 1; _local7 = 4.0478; _local8 = 3.7114; _local10 = 2.596; _local11 = 2.4366; } else { if ((((nQts >= 0.25)) && ((nQts < 0.26)))){ _local1 = 0.25; _local2 = 0.26; _local4 = 1; _local5 = 1; _local7 = 3.7114; _local8 = 3.4286; _local10 = 2.4366; _local11 = 2.2883; } else { if ((((nQts >= 0.26)) && ((nQts < 0.27)))){ _local1 = 0.26; _local2 = 0.27; _local4 = 1; _local5 = 1; _local7 = 3.4286; _local8 = 3.1699; _local10 = 2.2883; _local11 = 2.1503; } else { if ((((nQts >= 0.27)) && ((nQts < 0.28)))){ _local1 = 0.27; _local2 = 0.28; _local4 = 1; _local5 = 1; _local7 = 3.1699; _local8 = 2.9388; _local10 = 2.1503; _local11 = 2.022; } else { if ((((nQts >= 0.28)) && ((nQts < 0.29)))){ _local1 = 0.28; _local2 = 0.29; _local4 = 1; _local5 = 1; _local7 = 2.9388; _local8 = 2.7315; _local10 = 2.022; _local11 = 1.9031; } else { if ((((nQts >= 0.29)) && ((nQts < 0.3)))){ _local1 = 0.29; _local2 = 0.3; _local4 = 1; _local5 = 1; _local7 = 2.7315; _local8 = 2.5448; _local10 = 1.9031; _local11 = 1.7932; } else { if ((((nQts >= 0.3)) && ((nQts < 0.31)))){ _local1 = 0.3; _local2 = 0.31; _local4 = 1; _local5 = 1; _local7 = 2.5448; _local8 = 2.3761; _local10 = 1.7932; _local11 = 1.6922; } else { if ((((nQts >= 0.31)) && ((nQts < 0.32)))){ _local1 = 0.31; _local2 = 0.32; _local4 = 1; _local5 = 1; _local7 = 2.3761; _local8 = 2.2233; _local10 = 1.6922; _local11 = 1.6; } else { if ((((nQts >= 0.32)) && ((nQts < 0.33)))){ _local1 = 0.32; _local2 = 0.33; _local4 = 1; _local5 = 1; _local7 = 2.2233; _local8 = 2.0843; _local10 = 1.6; _local11 = 1.5162; } else { if ((((nQts >= 0.33)) && ((nQts < 0.34)))){ _local1 = 0.33; _local2 = 0.34; _local4 = 1; _local5 = 1; _local7 = 2.0843; _local8 = 1.9576; _local10 = 1.5162; _local11 = 1.4406; } else { if ((((nQts >= 0.34)) && ((nQts < 0.35)))){ _local1 = 0.34; _local2 = 0.35; _local4 = 1; _local5 = 1; _local7 = 1.9576; _local8 = 1.8419; _local10 = 1.4406; _local11 = 1.3728; } else { if ((((nQts >= 0.35)) && ((nQts < 0.36)))){ _local1 = 0.35; _local2 = 0.36; _local4 = 1; _local5 = 1; _local7 = 1.8419; _local8 = 1.7357; _local10 = 1.3728; _local11 = 1.3122; } else { if ((((nQts >= 0.36)) && ((nQts < 0.37)))){ _local1 = 0.36; _local2 = 0.37; _local4 = 1; _local5 = 1; _local7 = 1.7357; _local8 = 1.6392; _local10 = 1.3122; _local11 = 1.2583; } else { if ((((nQts >= 0.37)) && ((nQts < 0.38)))){ _local1 = 0.37; _local2 = 0.38; _local4 = 1; _local5 = 1; _local7 = 1.6392; _local8 = 1.5484; _local10 = 1.2583; _local11 = 1.2104; } else { if ((((nQts >= 0.38)) && ((nQts < 0.39)))){ _local1 = 0.38; _local2 = 0.39; _local4 = 1; _local5 = 1; _local7 = 1.5484; _local8 = 1.4656; _local10 = 1.2104; _local11 = 1.1679; } else { if ((((nQts >= 0.39)) && ((nQts < 0.4)))){ _local1 = 0.39; _local2 = 0.4; _local4 = 1; _local5 = 1; _local7 = 1.4656; _local8 = 1.389; _local10 = 1.1679; _local11 = 1.1302; } else { if ((((nQts >= 0.4)) && ((nQts < 0.41)))){ _local1 = 0.4; _local2 = 0.41; _local4 = 1; _local5 = 1; _local7 = 1.389; _local8 = 1.3181; _local10 = 1.1302; _local11 = 1.0966; } else { if ((((nQts >= 0.41)) && ((nQts < 0.42)))){ _local1 = 0.41; _local2 = 0.42; _local4 = 1; _local5 = 1; _local7 = 1.3181; _local8 = 1.2523; _local10 = 1.0966; _local11 = 1.0667; } else { if ((((nQts >= 0.42)) && ((nQts < 0.43)))){ _local1 = 0.42; _local2 = 0.43; _local4 = 1; _local5 = 1; _local7 = 1.2523; _local8 = 1.1911; _local10 = 1.0667; _local11 = 1.0399; } else { if ((((nQts >= 0.43)) && ((nQts < 0.44)))){ _local1 = 0.43; _local2 = 0.44; _local4 = 1; _local5 = 1; _local7 = 1.1911; _local8 = 1.1341; _local10 = 1.0399; _local11 = 1.016; } else { if ((((nQts >= 0.44)) && ((nQts < 0.45)))){ _local1 = 0.44; _local2 = 0.45; _local4 = 1; _local5 = 1; _local7 = 1.1341; _local8 = 1.0809; _local10 = 1.016; _local11 = 0.9944; } else { if ((((nQts >= 0.45)) && ((nQts < 0.46)))){ _local1 = 0.45; _local2 = 0.46; _local4 = 1; _local5 = 1; _local7 = 1.0809; _local8 = 1.0313; _local10 = 0.9944; _local11 = 0.975; } else { if ((((nQts >= 0.46)) && ((nQts < 0.47)))){ _local1 = 0.46; _local2 = 0.47; _local4 = 1; _local5 = 1; _local7 = 1.0313; _local8 = 0.9849; _local10 = 0.975; _local11 = 0.9574; } else { if ((((nQts >= 0.47)) && ((nQts < 0.48)))){ _local1 = 0.47; _local2 = 0.48; _local4 = 1; _local5 = 1; _local7 = 0.9849; _local8 = 0.9414; _local10 = 0.9574; _local11 = 0.9415; } else { if ((((nQts >= 0.48)) && ((nQts < 0.49)))){ _local1 = 0.48; _local2 = 0.49; _local4 = 1; _local5 = 1; _local7 = 0.9414; _local8 = 0.9006; _local10 = 0.9415; _local11 = 0.927; } else { if ((((nQts >= 0.49)) && ((nQts < 0.5)))){ _local1 = 0.49; _local2 = 0.5; _local4 = 1; _local5 = 1; _local7 = 0.9006; _local8 = 0.8622; _local10 = 0.927; _local11 = 0.9137; } else { if ((((nQts >= 0.5)) && ((nQts < 0.51)))){ _local1 = 0.5; _local2 = 0.51; _local4 = 1; _local5 = 1; _local7 = 0.8622; _local8 = 0.8262; _local10 = 0.9137; _local11 = 0.9015; } else { if ((((nQts >= 0.51)) && ((nQts < 0.52)))){ _local1 = 0.51; _local2 = 0.52; _local4 = 1; _local5 = 1; _local7 = 0.8262; _local8 = 0.7923; _local10 = 0.9015; _local11 = 0.8904; } else { if ((((nQts >= 0.52)) && ((nQts < 0.53)))){ _local1 = 0.52; _local2 = 0.53; _local4 = 1; _local5 = 1; _local7 = 0.7923; _local8 = 0.7603; _local10 = 0.8904; _local11 = 0.8807; } else { if ((((nQts >= 0.53)) && ((nQts < 0.54)))){ _local1 = 0.53; _local2 = 0.54; _local4 = 1; _local5 = 1; _local7 = 0.7603; _local8 = 0.7302; _local10 = 0.8807; _local11 = 0.8706; } else { if ((((nQts >= 0.54)) && ((nQts < 0.55)))){ _local1 = 0.54; _local2 = 0.55; _local4 = 1; _local5 = 1; _local7 = 0.7302; _local8 = 0.7017; _local10 = 0.8706; _local11 = 0.8619; } else { if ((((nQts >= 0.55)) && ((nQts < 0.56)))){ _local1 = 0.55; _local2 = 0.56; _local4 = 1; _local5 = 1; _local7 = 0.7017; _local8 = 0.6747; _local10 = 0.8619; _local11 = 0.8537; } else { if ((((nQts >= 0.56)) && ((nQts < 0.57)))){ _local1 = 0.56; _local2 = 0.57; _local4 = 1; _local5 = 1; _local7 = 0.6747; _local8 = 0.6493; _local10 = 0.8537; _local11 = 0.8462; } else { if ((((nQts >= 0.57)) && ((nQts < 0.58)))){ _local1 = 0.57; _local2 = 0.58; _local4 = 1; _local5 = 1; _local7 = 0.6493; _local8 = 0.6251; _local10 = 0.8462; _local11 = 0.8391; } else { if ((((nQts >= 0.58)) && ((nQts < 0.59)))){ _local1 = 0.58; _local2 = 0.59; _local4 = 1; _local5 = 1; _local7 = 0.6251; _local8 = 0.6022; _local10 = 0.8391; _local11 = 0.8325; } else { if ((((nQts >= 0.59)) && ((nQts < 0.6)))){ _local1 = 0.59; _local2 = 0.6; _local4 = 1; _local5 = 1; _local7 = 0.6022; _local8 = 0.5805; _local10 = 0.8325; _local11 = 0.8264; } else { if ((((nQts >= 0.6)) && ((nQts < 0.61)))){ _local1 = 0.6; _local2 = 0.61; _local4 = 1; _local5 = 1; _local7 = 0.5805; _local8 = 0.5599; _local10 = 0.8264; _local11 = 0.8206; } else { if ((((nQts >= 0.61)) && ((nQts < 0.62)))){ _local1 = 0.61; _local2 = 0.62; _local4 = 1; _local5 = 1; _local7 = 0.5599; _local8 = 0.5403; _local10 = 0.8206; _local11 = 0.8152; } else { if ((((nQts >= 0.62)) && ((nQts < 0.63)))){ _local1 = 0.62; _local2 = 0.63; _local4 = 1; _local5 = 1; _local7 = 0.5403; _local8 = 0.5216; _local10 = 0.8152; _local11 = 0.8102; } else { if ((((nQts >= 0.63)) && ((nQts < 0.64)))){ _local1 = 0.63; _local2 = 0.64; _local4 = 1; _local5 = 1; _local7 = 0.5216; _local8 = 0.5038; _local10 = 0.8102; _local11 = 0.8054; } else { if ((((nQts >= 0.64)) && ((nQts < 0.65)))){ _local1 = 0.64; _local2 = 0.65; _local4 = 1; _local5 = 1; _local7 = 0.5038; _local8 = 0.4969; _local10 = 0.8054; _local11 = 0.8009; } else { if ((((nQts >= 0.65)) && ((nQts < 0.66)))){ _local1 = 0.65; _local2 = 0.66; _local4 = 1; _local5 = 1; _local7 = 0.4969; _local8 = 0.4708; _local10 = 0.8009; _local11 = 0.7967; } else { if ((((nQts >= 0.66)) && ((nQts < 0.67)))){ _local1 = 0.66; _local2 = 0.67; _local4 = 1; _local5 = 1; _local7 = 0.4708; _local8 = 0.4554; _local10 = 0.7967; _local11 = 0.7926; } else { if ((((nQts >= 0.67)) && ((nQts < 0.68)))){ _local1 = 0.67; _local2 = 0.68; _local4 = 1; _local5 = 1; _local7 = 0.4554; _local8 = 0.4407; _local10 = 0.7926; _local11 = 0.7889; } else { if ((((nQts >= 0.68)) && ((nQts < 0.69)))){ _local1 = 0.68; _local2 = 0.69; _local4 = 1; _local5 = 1; _local7 = 0.4407; _local8 = 0.4267; _local10 = 0.7889; _local11 = 0.7853; } else { if ((((nQts >= 0.69)) && ((nQts < 0.7)))){ _local1 = 0.69; _local2 = 0.7; _local4 = 1; _local5 = 1; _local7 = 0.4267; _local8 = 0.4133; _local10 = 0.7853; _local11 = 0.7819; } else { _local12 = false; _local3 = 1; _local6 = (((((((2544.2068 * Math.pow(nQts, 6)) - (7756.2945 * Math.pow(nQts, 5))) + (9800.9112 * Math.pow(nQts, 4))) - (6606.9759 * Math.pow(nQts, 3))) + (2532.7115 * Math.pow(nQts, 2))) - (534.8106 * Math.pow(nQts, 1))) + 51.0309976594); _local6 = (((((((2544.20689113 * Math.pow(nQts, 6)) - (7756.29450593 * Math.pow(nQts, 5))) + (9800.91125087 * Math.pow(nQts, 4))) - (6606.97594998 * Math.pow(nQts, 3))) + (2532.71157962 * Math.pow(nQts, 2))) - (534.81064955 * Math.pow(nQts, 1))) + 51.03099766); _local9 = (((((((-519.0338 * Math.pow(nQts, 6)) + (1464.1628 * Math.pow(nQts, 5))) - (1592.6361 * Math.pow(nQts, 4))) + (793.7431 * Math.pow(nQts, 3))) - (139.9874 * Math.pow(nQts, 2))) - (20.45855 * Math.pow(nQts, 1))) + 8.8166046797); _local9 = (((((((-519.03387667 * Math.pow(nQts, 6)) + (1464.16288978 * Math.pow(nQts, 5))) - (1592.63619372 * Math.pow(nQts, 4))) + (793.74310834 * Math.pow(nQts, 3))) - (139.98740067 * Math.pow(nQts, 2))) - (20.45855771 * Math.pow(nQts, 1))) + 8.81660468); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if (bCheckQB3 == true){ if ((((nQts >= 0.1)) && ((nQts < 0.11)))){ _local1 = 0.1; _local2 = 0.11; _local4 = 3.8416; _local5 = 3.4947; _local7 = 34.3925; _local8 = 28.2341; _local10 = 5.2233; _local11 = 4.7386; } else { if ((((nQts >= 0.11)) && ((nQts < 0.12)))){ _local1 = 0.11; _local2 = 0.12; _local4 = 3.4947; _local5 = 3.2058; _local7 = 28.2341; _local8 = 23.5499; _local10 = 4.7386; _local11 = 4.3337; } else { if ((((nQts >= 0.12)) && ((nQts < 0.13)))){ _local1 = 0.12; _local2 = 0.13; _local4 = 3.2058; _local5 = 2.9615; _local7 = 23.5499; _local8 = 19.9046; _local10 = 4.3337; _local11 = 3.9902; } else { if ((((nQts >= 0.13)) && ((nQts < 0.14)))){ _local1 = 0.13; _local2 = 0.14; _local4 = 2.9615; _local5 = 2.7525; _local7 = 19.9046; _local8 = 17.015; _local10 = 3.9902; _local11 = 3.6949; } else { if ((((nQts >= 0.14)) && ((nQts < 0.15)))){ _local1 = 0.14; _local2 = 0.15; _local4 = 2.7525; _local5 = 2.5712; _local7 = 17.015; _local8 = 14.6784; _local10 = 3.6949; _local11 = 3.4381; } else { if ((((nQts >= 0.15)) && ((nQts < 0.16)))){ _local1 = 0.15; _local2 = 0.16; _local4 = 2.5712; _local5 = 2.4129; _local7 = 14.6784; _local8 = 12.7685; _local10 = 3.4381; _local11 = 3.2126; } else { if ((((nQts >= 0.16)) && ((nQts < 0.17)))){ _local1 = 0.16; _local2 = 0.17; _local4 = 2.4129; _local5 = 2.2743; _local7 = 12.7685; _local8 = 11.1855; _local10 = 3.2126; _local11 = 3.0128; } else { if ((((nQts >= 0.17)) && ((nQts < 0.18)))){ _local1 = 0.17; _local2 = 0.18; _local4 = 2.2743; _local5 = 2.1495; _local7 = 11.1855; _local8 = 9.8589; _local10 = 3.0128; _local11 = 2.8345; } else { if ((((nQts >= 0.18)) && ((nQts < 0.19)))){ _local1 = 0.18; _local2 = 0.19; _local4 = 2.1495; _local5 = 2.0388; _local7 = 9.8589; _local8 = 8.7361; _local10 = 2.8345; _local11 = 2.6741; } else { if ((((nQts >= 0.19)) && ((nQts < 0.2)))){ _local1 = 0.19; _local2 = 0.2; _local4 = 2.0388; _local5 = 1.9393; _local7 = 8.7361; _local8 = 7.7775; _local10 = 2.6741; _local11 = 2.5289; } else { if ((((nQts >= 0.2)) && ((nQts < 0.21)))){ _local1 = 0.2; _local2 = 0.21; _local4 = 1.9393; _local5 = 1.8494; _local7 = 7.7775; _local8 = 6.9524; _local10 = 2.5289; _local11 = 2.3968; } else { if ((((nQts >= 0.21)) && ((nQts < 0.22)))){ _local1 = 0.21; _local2 = 0.22; _local4 = 1.8494; _local5 = 1.7678; _local7 = 6.9524; _local8 = 6.2372; _local10 = 2.3968; _local11 = 2.2759; } else { if ((((nQts >= 0.22)) && ((nQts < 0.23)))){ _local1 = 0.22; _local2 = 0.23; _local4 = 1.7678; _local5 = 1.6935; _local7 = 6.2372; _local8 = 5.6132; _local10 = 2.2759; _local11 = 2.1647; } else { if ((((nQts >= 0.23)) && ((nQts < 0.24)))){ _local1 = 0.23; _local2 = 0.24; _local4 = 1.6935; _local5 = 1.6254; _local7 = 5.6132; _local8 = 5.0655; _local10 = 2.1647; _local11 = 2.062; } else { if ((((nQts >= 0.24)) && ((nQts < 0.25)))){ _local1 = 0.24; _local2 = 0.25; _local4 = 1.6254; _local5 = 1.5629; _local7 = 5.0655; _local8 = 4.5822; _local10 = 2.062; _local11 = 1.9667; } else { if ((((nQts >= 0.25)) && ((nQts < 0.26)))){ _local1 = 0.25; _local2 = 0.26; _local4 = 1.5629; _local5 = 1.5054; _local7 = 4.5822; _local8 = 4.1535; _local10 = 1.9667; _local11 = 1.8778; } else { if ((((nQts >= 0.26)) && ((nQts < 0.27)))){ _local1 = 0.26; _local2 = 0.27; _local4 = 1.5054; _local5 = 1.4522; _local7 = 4.1535; _local8 = 3.7714; _local10 = 1.8778; _local11 = 1.7946; } else { if ((((nQts >= 0.27)) && ((nQts < 0.28)))){ _local1 = 0.27; _local2 = 0.28; _local4 = 1.4522; _local5 = 1.4029; _local7 = 3.7714; _local8 = 3.4295; _local10 = 1.7946; _local11 = 1.7165; } else { if ((((nQts >= 0.28)) && ((nQts < 0.29)))){ _local1 = 0.28; _local2 = 0.29; _local4 = 1.4029; _local5 = 1.3571; _local7 = 3.4295; _local8 = 3.1223; _local10 = 1.7165; _local11 = 1.6429; } else { if ((((nQts >= 0.29)) && ((nQts < 0.3)))){ _local1 = 0.29; _local2 = 0.3; _local4 = 1.3571; _local5 = 1.3145; _local7 = 3.1223; _local8 = 2.8421; _local10 = 1.6429; _local11 = 1.5732; } else { if ((((nQts >= 0.3)) && ((nQts < 0.31)))){ _local1 = 0.3; _local2 = 0.31; _local4 = 1.3145; _local5 = 1.2748; _local7 = 2.8421; _local8 = 2.5944; _local10 = 1.5732; _local11 = 1.507; } else { if ((((nQts >= 0.31)) && ((nQts < 0.32)))){ _local1 = 0.31; _local2 = 0.32; _local4 = 1.2748; _local5 = 1.2376; _local7 = 2.5944; _local8 = 2.3667; _local10 = 1.507; _local11 = 1.4439; } else { if ((((nQts >= 0.32)) && ((nQts < 0.33)))){ _local1 = 0.32; _local2 = 0.33; _local4 = 1.2376; _local5 = 1.2028; _local7 = 2.3667; _local8 = 2.1594; _local10 = 1.4439; _local11 = 1.3836; } else { if ((((nQts >= 0.33)) && ((nQts < 0.34)))){ _local1 = 0.33; _local2 = 0.34; _local4 = 1.2028; _local5 = 1.1702; _local7 = 2.1594; _local8 = 1.9699; _local10 = 1.3836; _local11 = 1.3258; } else { if ((((nQts >= 0.34)) && ((nQts < 0.35)))){ _local1 = 0.34; _local2 = 0.35; _local4 = 1.1702; _local5 = 1.1395; _local7 = 1.9699; _local8 = 1.7964; _local10 = 1.3258; _local11 = 1.2702; } else { if ((((nQts >= 0.35)) && ((nQts < 0.36)))){ _local1 = 0.35; _local2 = 0.36; _local4 = 1.1395; _local5 = 1.1106; _local7 = 1.7964; _local8 = 1.6371; _local10 = 1.2702; _local11 = 1.2167; } else { if ((((nQts >= 0.36)) && ((nQts < 0.37)))){ _local1 = 0.36; _local2 = 0.37; _local4 = 1.1106; _local5 = 1.0834; _local7 = 1.6371; _local8 = 1.4905; _local10 = 1.2167; _local11 = 1.1651; } else { if ((((nQts >= 0.37)) && ((nQts < 0.38)))){ _local1 = 0.37; _local2 = 0.38; _local4 = 1.0834; _local5 = 1.0578; _local7 = 1.4905; _local8 = 1.3552; _local10 = 1.1651; _local11 = 1.1153; } else { if ((((nQts >= 0.38)) && ((nQts < 0.39)))){ _local1 = 0.38; _local2 = 0.39; _local4 = 1.0578; _local5 = 1.0335; _local7 = 1.3552; _local8 = 1.23; _local10 = 1.1153; _local11 = 1.0674; } else { if ((((nQts >= 0.39)) && ((nQts < 0.4)))){ _local1 = 0.39; _local2 = 0.4; _local4 = 1.0335; _local5 = 1.0106; _local7 = 1.23; _local8 = 1.1141; _local10 = 1.0674; _local11 = 1.0214; } else { if ((((nQts >= 0.4)) && ((nQts < 0.41)))){ _local1 = 0.4; _local2 = 0.41; _local4 = 1.0106; _local5 = 0.9889; _local7 = 1.1141; _local8 = 1.0065; _local10 = 1.0214; _local11 = 0.9776; } else { if ((((nQts >= 0.41)) && ((nQts < 0.42)))){ _local1 = 0.41; _local2 = 0.42; _local4 = 0.9889; _local5 = 0.9683; _local7 = 1.0065; _local8 = 0.9064; _local10 = 0.9776; _local11 = 0.9362; } else { if ((((nQts >= 0.42)) && ((nQts < 0.43)))){ _local1 = 0.42; _local2 = 0.43; _local4 = 0.9683; _local5 = 0.9488; _local7 = 0.9064; _local8 = 0.8131; _local10 = 0.9362; _local11 = 0.8975; } else { if ((((nQts >= 0.43)) && ((nQts < 0.44)))){ _local1 = 0.43; _local2 = 0.44; _local4 = 0.9488; _local5 = 0.9303; _local7 = 0.8131; _local8 = 0.726; _local10 = 0.8975; _local11 = 0.8618; } else { if ((((nQts >= 0.44)) && ((nQts < 0.45)))){ _local1 = 0.44; _local2 = 0.45; _local4 = 0.9303; _local5 = 0.9128; _local7 = 0.726; _local8 = 0.6445; _local10 = 0.8618; _local11 = 0.8294; } else { if ((((nQts >= 0.45)) && ((nQts < 0.46)))){ _local1 = 0.45; _local2 = 0.46; _local4 = 0.9128; _local5 = 0.8961; _local7 = 0.6445; _local8 = 0.5682; _local10 = 0.8294; _local11 = 0.8001; } else { if ((((nQts >= 0.46)) && ((nQts < 0.47)))){ _local1 = 0.46; _local2 = 0.47; _local4 = 0.8961; _local5 = 0.8802; _local7 = 0.5682; _local8 = 0.4966; _local10 = 0.8001; _local11 = 0.7741; } else { if ((((nQts >= 0.47)) && ((nQts < 0.48)))){ _local1 = 0.47; _local2 = 0.48; _local4 = 0.8802; _local5 = 0.8651; _local7 = 0.4966; _local8 = 0.4294; _local10 = 0.7741; _local11 = 0.751; } else { if ((((nQts >= 0.48)) && ((nQts < 0.49)))){ _local1 = 0.48; _local2 = 0.49; _local4 = 0.8651; _local5 = 0.8507; _local7 = 0.4294; _local8 = 0.3661; _local10 = 0.751; _local11 = 0.7307; } else { if ((((nQts >= 0.49)) && ((nQts < 0.5)))){ _local1 = 0.49; _local2 = 0.5; _local4 = 0.8507; _local5 = 0.837; _local7 = 0.3661; _local8 = 0.3065; _local10 = 0.7307; _local11 = 0.7129; } else { if ((((nQts >= 0.5)) && ((nQts < 0.51)))){ _local1 = 0.5; _local2 = 0.51; _local4 = 0.837; _local5 = 0.824; _local7 = 0.3065; _local8 = 0.2503; _local10 = 0.7129; _local11 = 0.6972; } else { if ((((nQts >= 0.51)) && ((nQts < 0.52)))){ _local1 = 0.51; _local2 = 0.52; _local4 = 0.824; _local5 = 0.8116; _local7 = 0.2503; _local8 = 0.1971; _local10 = 0.6972; _local11 = 0.6835; } else { if ((((nQts >= 0.52)) && ((nQts < 0.53)))){ _local1 = 0.52; _local2 = 0.53; _local4 = 0.8116; _local5 = 0.7998; _local7 = 0.1971; _local8 = 0.1468; _local10 = 0.6835; _local11 = 0.6715; } else { if ((((nQts >= 0.53)) && ((nQts < 0.54)))){ _local1 = 0.53; _local2 = 0.54; _local4 = 0.7998; _local5 = 0.7886; _local7 = 0.1468; _local8 = 0.0992; _local10 = 0.6715; _local11 = 0.661; } else { if ((((nQts >= 0.54)) && ((nQts < 0.55)))){ _local1 = 0.54; _local2 = 0.55; _local4 = 0.7886; _local5 = 0.7779; _local7 = 0.0992; _local8 = 0.054; _local10 = 0.661; _local11 = 0.6518; } else { if ((((nQts >= 0.55)) && ((nQts < 0.56)))){ _local1 = 0.55; _local2 = 0.56; _local4 = 0.7779; _local5 = 0.7677; _local7 = 0.054; _local8 = 0.0111; _local10 = 0.6518; _local11 = 0.6438; } else { _local12 = false; _local3 = (((((((2992.79913867 * Math.pow(nQts, 6)) - (6768.64717259 * Math.pow(nQts, 5))) + (6292.87551226 * Math.pow(nQts, 4))) - (3101.62680742 * Math.pow(nQts, 3))) + (870.62211165 * Math.pow(nQts, 2))) - (138.30405763 * Math.pow(nQts, 1))) + 11.48972317); _local6 = (((((((85662.12858836 * Math.pow(nQts, 6)) - (190422.44971479 * Math.pow(nQts, 5))) + (172762.10561481 * Math.pow(nQts, 4))) - (82086.87734404 * Math.pow(nQts, 3))) + (21699.9665203 * Math.pow(nQts, 2))) - (3082.00973196 * Math.pow(nQts, 1))) + 191.7705421); _local9 = (((((((3128.08149876 * Math.pow(nQts, 6)) - (7413.74439869 * Math.pow(nQts, 5))) + (7251.71487354 * Math.pow(nQts, 4))) - (3753.4549581 * Math.pow(nQts, 3))) + (1099.14738827 * Math.pow(nQts, 2))) - (181.58341981 * Math.pow(nQts, 1))) + 15.46904758); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if (bCheckSC4 == true){ if ((((nQts >= 0.25)) && ((nQts < 0.26)))){ _local1 = 0.25; _local2 = 0.26; _local4 = 1.0338; _local5 = 1.0534; _local7 = 3.8961; _local8 = 3.6755; _local10 = 2.3949; _local11 = 2.2282; } else { if ((((nQts >= 0.26)) && ((nQts < 0.27)))){ _local1 = 0.26; _local2 = 0.27; _local4 = 1.0534; _local5 = 1.0703; _local7 = 3.6755; _local8 = 3.4551; _local10 = 2.2282; _local11 = 2.0784; } else { if ((((nQts >= 0.27)) && ((nQts < 0.28)))){ _local1 = 0.27; _local2 = 0.28; _local4 = 1.0703; _local5 = 1.0842; _local7 = 3.4551; _local8 = 3.236; _local10 = 2.0784; _local11 = 1.9439; } else { if ((((nQts >= 0.28)) && ((nQts < 0.29)))){ _local1 = 0.28; _local2 = 0.29; _local4 = 1.0842; _local5 = 1.0951; _local7 = 3.236; _local8 = 3.0193; _local10 = 1.9439; _local11 = 1.8229; } else { if ((((nQts >= 0.29)) && ((nQts < 0.3)))){ _local1 = 0.29; _local2 = 0.3; _local4 = 1.0951; _local5 = 1.1028; _local7 = 3.0193; _local8 = 2.8062; _local10 = 1.8229; _local11 = 1.7137; } else { if ((((nQts >= 0.3)) && ((nQts < 0.31)))){ _local1 = 0.3; _local2 = 0.31; _local4 = 1.1028; _local5 = 1.1073; _local7 = 2.8062; _local8 = 2.5977; _local10 = 1.7137; _local11 = 1.6149; } else { if ((((nQts >= 0.31)) && ((nQts < 0.32)))){ _local1 = 0.31; _local2 = 0.32; _local4 = 1.1073; _local5 = 1.1086; _local7 = 2.5977; _local8 = 2.3952; _local10 = 1.6149; _local11 = 1.5251; } else { if ((((nQts >= 0.32)) && ((nQts < 0.33)))){ _local1 = 0.32; _local2 = 0.33; _local4 = 1.1086; _local5 = 1.1065; _local7 = 2.3952; _local8 = 2.1997; _local10 = 1.5251; _local11 = 1.4431; } else { if ((((nQts >= 0.33)) && ((nQts < 0.34)))){ _local1 = 0.33; _local2 = 0.34; _local4 = 1.1065; _local5 = 1.1012; _local7 = 2.1997; _local8 = 2.0125; _local10 = 1.4431; _local11 = 1.3679; } else { if ((((nQts >= 0.34)) && ((nQts < 0.35)))){ _local1 = 0.34; _local2 = 0.35; _local4 = 1.1012; _local5 = 1.0926; _local7 = 2.0125; _local8 = 1.8347; _local10 = 1.3679; _local11 = 1.2986; } else { if ((((nQts >= 0.35)) && ((nQts < 0.36)))){ _local1 = 0.35; _local2 = 0.36; _local4 = 1.0926; _local5 = 1.081; _local7 = 1.8347; _local8 = 1.6672; _local10 = 1.2986; _local11 = 1.2345; } else { if ((((nQts >= 0.36)) && ((nQts < 0.37)))){ _local1 = 0.36; _local2 = 0.37; _local4 = 1.081; _local5 = 1.0667; _local7 = 1.6672; _local8 = 1.5109; _local10 = 1.2345; _local11 = 1.1751; } else { if ((((nQts >= 0.37)) && ((nQts < 0.38)))){ _local1 = 0.37; _local2 = 0.38; _local4 = 1.0667; _local5 = 1.0498; _local7 = 1.5109; _local8 = 1.3665; _local10 = 1.1751; _local11 = 1.12; } else { if ((((nQts >= 0.38)) && ((nQts < 0.39)))){ _local1 = 0.38; _local2 = 0.39; _local4 = 1.0498; _local5 = 1.0309; _local7 = 1.3665; _local8 = 1.2343; _local10 = 1.12; _local11 = 1.0689; } else { if ((((nQts >= 0.39)) && ((nQts < 0.4)))){ _local1 = 0.39; _local2 = 0.4; _local4 = 1.0309; _local5 = 1.0103; _local7 = 1.2343; _local8 = 1.1146; _local10 = 1.0689; _local11 = 1.0215; } else { if ((((nQts >= 0.4)) && ((nQts < 0.41)))){ _local1 = 0.4; _local2 = 0.41; _local4 = 1.0103; _local5 = 0.9886; _local7 = 1.1146; _local8 = 1.007; _local10 = 1.0215; _local11 = 0.9777; } else { if ((((nQts >= 0.41)) && ((nQts < 0.42)))){ _local1 = 0.41; _local2 = 0.42; _local4 = 0.9886; _local5 = 0.9662; _local7 = 1.007; _local8 = 0.9113; _local10 = 0.9777; _local11 = 0.9373; } else { if ((((nQts >= 0.42)) && ((nQts < 0.43)))){ _local1 = 0.42; _local2 = 0.43; _local4 = 0.9662; _local5 = 0.9436; _local7 = 0.9113; _local8 = 0.8266; _local10 = 0.9373; _local11 = 0.9001; } else { if ((((nQts >= 0.43)) && ((nQts < 0.44)))){ _local1 = 0.43; _local2 = 0.44; _local4 = 0.9436; _local5 = 0.9212; _local7 = 0.8266; _local8 = 0.7521; _local10 = 0.9001; _local11 = 0.866; } else { if ((((nQts >= 0.44)) && ((nQts < 0.45)))){ _local1 = 0.44; _local2 = 0.45; _local4 = 0.9212; _local5 = 0.8992; _local7 = 0.7521; _local8 = 0.6868; _local10 = 0.866; _local11 = 0.8348; } else { if ((((nQts >= 0.45)) && ((nQts < 0.46)))){ _local1 = 0.45; _local2 = 0.46; _local4 = 0.8992; _local5 = 0.878; _local7 = 0.6868; _local8 = 0.6297; _local10 = 0.8348; _local11 = 0.8064; } else { if ((((nQts >= 0.46)) && ((nQts < 0.47)))){ _local1 = 0.46; _local2 = 0.47; _local4 = 0.878; _local5 = 0.8578; _local7 = 0.6297; _local8 = 0.5798; _local10 = 0.8064; _local11 = 0.7804; } else { if ((((nQts >= 0.47)) && ((nQts < 0.48)))){ _local1 = 0.47; _local2 = 0.48; _local4 = 0.8578; _local5 = 0.8385; _local7 = 0.5798; _local8 = 0.5361; _local10 = 0.7804; _local11 = 0.7567; } else { if ((((nQts >= 0.48)) && ((nQts < 0.49)))){ _local1 = 0.48; _local2 = 0.49; _local4 = 0.8385; _local5 = 0.8203; _local7 = 0.5361; _local8 = 0.4978; _local10 = 0.7567; _local11 = 0.7351; } else { if ((((nQts >= 0.49)) && ((nQts < 0.5)))){ _local1 = 0.49; _local2 = 0.5; _local4 = 0.8203; _local5 = 0.8031; _local7 = 0.4978; _local8 = 0.4642; _local10 = 0.7351; _local11 = 0.7155; } else { if ((((nQts >= 0.5)) && ((nQts < 0.51)))){ _local1 = 0.5; _local2 = 0.51; _local4 = 0.8031; _local5 = 0.787; _local7 = 0.4642; _local8 = 0.4345; _local10 = 0.7155; _local11 = 0.6975; } else { if ((((nQts >= 0.51)) && ((nQts < 0.52)))){ _local1 = 0.51; _local2 = 0.52; _local4 = 0.787; _local5 = 0.7719; _local7 = 0.4345; _local8 = 0.4083; _local10 = 0.6975; _local11 = 0.681; } else { if ((((nQts >= 0.52)) && ((nQts < 0.53)))){ _local1 = 0.52; _local2 = 0.53; _local4 = 0.7719; _local5 = 0.7578; _local7 = 0.4083; _local8 = 0.3849; _local10 = 0.681; _local11 = 0.6659; } else { if ((((nQts >= 0.53)) && ((nQts < 0.54)))){ _local1 = 0.53; _local2 = 0.54; _local4 = 0.7578; _local5 = 0.7445; _local7 = 0.3849; _local8 = 0.364; _local10 = 0.6659; _local11 = 0.652; } else { if ((((nQts >= 0.54)) && ((nQts < 0.55)))){ _local1 = 0.54; _local2 = 0.55; _local4 = 0.7445; _local5 = 0.7321; _local7 = 0.364; _local8 = 0.3453; _local10 = 0.652; _local11 = 0.6393; } else { if ((((nQts >= 0.55)) && ((nQts < 0.56)))){ _local1 = 0.55; _local2 = 0.56; _local4 = 0.7321; _local5 = 0.7205; _local7 = 0.3453; _local8 = 0.3284; _local10 = 0.6393; _local11 = 0.6275; } else { if ((((nQts >= 0.56)) && ((nQts < 0.57)))){ _local1 = 0.56; _local2 = 0.57; _local4 = 0.7205; _local5 = 0.7096; _local7 = 0.3284; _local8 = 0.3131; _local10 = 0.6275; _local11 = 0.6166; } else { if ((((nQts >= 0.57)) && ((nQts < 0.58)))){ _local1 = 0.57; _local2 = 0.58; _local4 = 0.7096; _local5 = 0.6993; _local7 = 0.3131; _local8 = 0.2992; _local10 = 0.6166; _local11 = 0.6065; } else { if ((((nQts >= 0.58)) && ((nQts < 0.59)))){ _local1 = 0.58; _local2 = 0.59; _local4 = 0.6993; _local5 = 0.6896; _local7 = 0.2992; _local8 = 0.2865; _local10 = 0.6065; _local11 = 0.5971; } else { if ((((nQts >= 0.59)) && ((nQts < 0.6)))){ _local1 = 0.59; _local2 = 0.6; _local4 = 0.6896; _local5 = 0.6805; _local7 = 0.2865; _local8 = 0.2749; _local10 = 0.5971; _local11 = 0.5883; } else { if ((((nQts >= 0.6)) && ((nQts < 0.61)))){ _local1 = 0.6; _local2 = 0.61; _local4 = 0.6805; _local5 = 0.6719; _local7 = 0.2749; _local8 = 0.2641; _local10 = 0.5883; _local11 = 0.5802; } else { if ((((nQts >= 0.61)) && ((nQts < 0.62)))){ _local1 = 0.61; _local2 = 0.62; _local4 = 0.6719; _local5 = 0.6638; _local7 = 0.2641; _local8 = 0.2542; _local10 = 0.5802; _local11 = 0.5726; } else { if ((((nQts >= 0.62)) && ((nQts < 0.63)))){ _local1 = 0.62; _local2 = 0.63; _local4 = 0.6638; _local5 = 0.6561; _local7 = 0.2542; _local8 = 0.2449; _local10 = 0.5726; _local11 = 0.5654; } else { if ((((nQts >= 0.63)) && ((nQts < 0.64)))){ _local1 = 0.63; _local2 = 0.64; _local4 = 0.6561; _local5 = 0.6488; _local7 = 0.2449; _local8 = 0.2363; _local10 = 0.5654; _local11 = 0.5587; } else { if ((((nQts >= 0.64)) && ((nQts < 0.65)))){ _local1 = 0.64; _local2 = 0.65; _local4 = 0.6488; _local5 = 0.6418; _local7 = 0.2363; _local8 = 0.2283; _local10 = 0.5587; _local11 = 0.5524; } else { if ((((nQts >= 0.65)) && ((nQts < 0.66)))){ _local1 = 0.65; _local2 = 0.66; _local4 = 0.6418; _local5 = 0.6353; _local7 = 0.2283; _local8 = 0.2208; _local10 = 0.5524; _local11 = 0.5465; } else { if ((((nQts >= 0.66)) && ((nQts < 0.67)))){ _local1 = 0.66; _local2 = 0.67; _local4 = 0.6353; _local5 = 0.6289; _local7 = 0.2208; _local8 = 0.2136; _local10 = 0.5465; _local11 = 0.5409; } else { if ((((nQts >= 0.67)) && ((nQts < 0.68)))){ _local1 = 0.67; _local2 = 0.68; _local4 = 0.6289; _local5 = 0.6229; _local7 = 0.2136; _local8 = 0.2069; _local10 = 0.5409; _local11 = 0.5355; } else { if ((((nQts >= 0.68)) && ((nQts < 0.69)))){ _local1 = 0.68; _local2 = 0.69; _local4 = 0.6229; _local5 = 0.6171; _local7 = 0.2069; _local8 = 0.2006; _local10 = 0.5355; _local11 = 0.5305; } else { if ((((nQts >= 0.69)) && ((nQts < 0.7)))){ _local1 = 0.69; _local2 = 0.7; _local4 = 0.6171; _local5 = 0.6116; _local7 = 0.2006; _local8 = 0.1946; _local10 = 0.5305; _local11 = 0.5258; } else { _local12 = false; _local3 = (((((((1333.7213 * Math.pow(nQts, 6)) - (3848.5728 * Math.pow(nQts, 5))) + (4454.492 * Math.pow(nQts, 4))) - (2615.6367 * Math.pow(nQts, 3))) + (807.9729 * Math.pow(nQts, 2))) - (122.6026 * Math.pow(nQts, 1))) + 8.0876442506); _local6 = (((((((-1915.5966 * Math.pow(nQts, 6)) + (6513.2785 * Math.pow(nQts, 5))) - (8932.4801 * Math.pow(nQts, 4))) + (6255.4123 * Math.pow(nQts, 3))) - (2307.6748 * Math.pow(nQts, 2))) + (402.9947 * Math.pow(nQts, 1))) - 21.3742547511); _local9 = (((((((1156.5244 * Math.pow(nQts, 6)) - (3530.667 * Math.pow(nQts, 5))) + (4465.3166 * Math.pow(nQts, 4))) - (3019.0642 * Math.pow(nQts, 3))) + (1169.0174 * Math.pow(nQts, 2))) - (252.81 * Math.pow(nQts, 1))) + 25.4282667785); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if (_local12 == true){ _local3 = (((-1 * ((_local1 - nQts) / (_local1 - _local2))) * (_local4 - _local5)) + _local4); _local6 = (((-1 * ((_local1 - nQts) / (_local1 - _local2))) * (_local7 - _local8)) + _local7); _local9 = (((-1 * ((_local1 - nQts) / (_local1 - _local2))) * (_local10 - _local11)) + _local10); }; _local14 = (nVasLiter / _local6); _local15 = (_local3 * nFs); _local16 = (_local9 * nFs); _local13 = ((((23562.5 * Math.pow(nPdCentimeter, 2)) * nNumberPorts) / (Math.pow(_local15, 2) * _local14)) - (0.732 * nPdCentimeter)); _local19 = Math.pow((_local15 / nFs), 2); _local20 = ((_local19 / nQts) + (_local15 / (nFs * 7))); _local21 = (((1 + _local19) + (nVasLiter / _local14)) + (_local15 / ((nFs * nQts) * 7))); _local22 = ((1 / nQts) + (_local15 / (nFs * 7))); _local24 = 10; while (_local24 < 1000) { _local17[(_local24 - 10)] = Math.pow((_local24 / nFs), 2); _local18[(_local24 - 10)] = Math.pow(_local17[(_local24 - 10)], 2); _local23[(_local24 - 10)] = ((10 * Math.LOG10E) * Math.log((Math.pow(_local18[(_local24 - 10)], 2) / (Math.pow(((_local18[(_local24 - 10)] - (_local21 * _local17[(_local24 - 10)])) + _local19), 2) + (_local17[(_local24 - 10)] * Math.pow(((_local22 * _local17[(_local24 - 10)]) - _local20), 2)))))); _local24++; }; _local25 = {nVbLiter:_local14, nFb:_local15, nF3:_local16, aDBmag:_local23, nPlCentimeter:_local13}; return (_local25); } } }//package
Section 392
//SealedParameters (SealedParameters) package { public class SealedParameters { public var nQts:Number; public var nVasLiter:Number; public var nQtc:Number; public var nFs:Number; public function calculateSealed():Object{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Array; var _local7:Array; var _local8:Number; var _local9:Object; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = new Array(); _local7 = new Array(); _local8 = 0; _local9 = new Object(); _local1 = (nQtc / nQts); _local2 = ((_local1 * _local1) - 1); _local3 = (nVasLiter / _local2); _local4 = (_local1 * nFs); _local5 = (_local4 * Math.sqrt(((((1 / (nQtc * nQtc)) - 2) + Math.sqrt(((((1 / (nQtc * nQtc)) - 2) * ((1 / (nQtc * nQtc)) - 2)) + 4))) / 2))); _local8 = 10; while (_local8 < 1000) { _local6[(_local8 - 10)] = ((_local8 / _local4) * (_local8 / _local4)); _local7[(_local8 - 10)] = ((10 * Math.LOG10E) * Math.log((Math.pow(_local6[(_local8 - 10)], 2) / (Math.pow((_local6[(_local8 - 10)] - 1), 2) + (_local6[(_local8 - 10)] / Math.pow(nQtc, 2)))))); _local8++; }; _local9 = {nVbLiter:_local3, nFb:_local4, nF3:_local5, aDBmag:_local7}; return (_local9); } } }//package
Section 393
//skins_properties (skins_properties) package { import mx.resources.*; public class skins_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["notLoaded"] = "Unable to load '{0}'."; return (_local1); } } }//package
Section 394
//styles_properties (styles_properties) package { import mx.resources.*; public class styles_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["unableToLoad"] = "Unable to load style({0}): {1}."; return (_local1); } } }//package
Section 395
//subwoofer (subwoofer) package { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import flash.text.*; import mx.binding.*; import mx.charts.*; import mx.controls.*; import mx.controls.dataGridClasses.*; import mx.charts.series.*; import mx.containers.*; import mx.collections.*; import flash.accessibility.*; import flash.utils.*; import units.*; import flash.net.*; import flash.system.*; import flash.ui.*; import flash.external.*; import flash.debugger.*; import flash.errors.*; import flash.filters.*; import flash.media.*; import flash.printing.*; import flash.profiler.*; import flash.xml.*; public class subwoofer extends Application { private var _3389810nsFs:NumericStepper; private var _1675943889acResultTable:ArrayCollection; public var _bindingsByDestination:Object; public var aDBmag:Array; private var _3492980rbS7:RadioButton; private var _2012286221acVolumeUnits:ArrayCollection; private var _216155035_Legend1:Legend; private var _3559241tiPd:TextInput; private var _112675rbS:RadioButtonGroup; public var aVolumeUnits:Array; public var _bindingsBeginWithWord:Object; private var _108282804rbSC4:RadioButton; private var _108280850rbQB3:RadioButton; private var _684913059cbSolutionVolumeUnits:ComboBox; private var _2141785924nsNumberPorts:NumericStepper; private var _505960894copyText:TextArea; private var _3492979rbS6:RadioButton; private var _1828862481cbSolutionLengthUnits:ComboBox; private var _bindings:Array; private var _3492978rbS5:RadioButton; private var _259722503linechart1:LineChart; private var _1207296717acDBmag:ArrayCollection; private var _1873087982rgPortedAlignment:RadioButtonGroup; private var _3541524tVas:Text; public var aLengthUnits:Array; private var _938200847rbSBB4:RadioButton; private var _94433865cbVas:ComboBox; private var _877022224text03:Text; public var aUnitlessUnits:Array; private var _3045707cbDp:ComboBox; private var _1122770096acUnitlessUnits:ArrayCollection; public var aResultTable:Array; private var _110342259tiVas:TextInput; private var _1037344028nsGain:NumericStepper; private var _105094827nsQts:NumericStepper; private var _129454722_DataGrid1:DataGrid; private var _501489319acLengthUnits:ArrayCollection; private var _1967800070aSolution:Accordion; private var _watchers:Array; private var _documentDescriptor_:UIComponentDescriptor; private var _105094811nsQtc:NumericStepper; private static var _watcherSetupUtil:IWatcherSetupUtil; mx_internal static var _subwoofer_StylesInit_done:Boolean = false; public function subwoofer(){ _documentDescriptor_ = new UIComponentDescriptor({type:Application, propertiesFactory:function ():Object{ return ({width:600, creationPolicy:"all", height:800, childDescriptors:[new UIComponentDescriptor({type:Accordion, stylesFactory:function ():void{ this.color = 0; this.fillColors = [4227200, 0xC0C0C0]; }, propertiesFactory:function ():Object{ return ({x:0, y:0, width:600, height:250, childDescriptors:[new UIComponentDescriptor({type:Canvas, stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({label:"Subwoofer Box Design Software", percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Grid, propertiesFactory:function ():Object{ return ({x:20, y:30, childDescriptors:[new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, id:"tVas", propertiesFactory:function ():Object{ return ({text:"Vas", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, stylesFactory:function ():void{ this.paddingLeft = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:TextInput, id:"tiVas", events:{change:"__tiVas_change"}, propertiesFactory:function ():Object{ return ({text:"186.16", width:100}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:ComboBox, id:"cbVas", events:{change:"__cbVas_change"}})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"Qts", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:NumericStepper, id:"nsQts", events:{change:"__nsQts_change"}, propertiesFactory:function ():Object{ return ({value:0.342, minimum:0.01, maximum:10, width:100, stepSize:0.001}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"unitless"}); }})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, id:"text03", propertiesFactory:function ():Object{ return ({text:"fs", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:NumericStepper, id:"nsFs", events:{change:"__nsFs_change"}, propertiesFactory:function ():Object{ return ({width:100, value:24, minimum:0.1, maximum:20000, stepSize:0.1}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"hertz"}); }})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({height:17, text:"Qtc"}); }})]}); }}), new UIComponentDescriptor({type:GridItem, stylesFactory:function ():void{ this.paddingLeft = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:NumericStepper, id:"nsQtc", events:{change:"__nsQtc_change"}, propertiesFactory:function ():Object{ return ({value:0.7, minimum:0.01, maximum:5, stepSize:0.01, width:100}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"unitless"}); }})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"Pd", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, stylesFactory:function ():void{ this.paddingLeft = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:TextInput, id:"tiPd", events:{change:"__tiPd_change"}, propertiesFactory:function ():Object{ return ({text:"10", width:100}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:ComboBox, id:"cbDp", events:{change:"__cbDp_change"}})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({height:17, text:"# ports"}); }})]}); }}), new UIComponentDescriptor({type:GridItem, stylesFactory:function ():void{ this.paddingLeft = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:NumericStepper, id:"nsNumberPorts", events:{change:"__nsNumberPorts_change"}, propertiesFactory:function ():Object{ return ({value:1, minimum:1, maximum:10, stepSize:1, width:100}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"unitless"}); }})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({height:17, text:"gain"}); }})]}); }}), new UIComponentDescriptor({type:GridItem, stylesFactory:function ():void{ this.paddingLeft = 0; }, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:NumericStepper, id:"nsGain", events:{change:"__nsGain_change"}, propertiesFactory:function ():Object{ return ({width:100, minimum:-50, stepSize:0.1, value:0, maximum:50}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"decibel"}); }})]}); }})]}); }})]}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbSBB4", propertiesFactory:function ():Object{ return ({x:389, y:30, label:"SBB4", groupName:"rgPortedAlignment", selected:true}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbQB3", propertiesFactory:function ():Object{ return ({x:447, y:30, label:"QB3", groupName:"rgPortedAlignment"}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbSC4", propertiesFactory:function ():Object{ return ({x:496, y:30, label:"SC4", groupName:"rgPortedAlignment"}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbS5", propertiesFactory:function ():Object{ return ({x:389, y:56, label:"0.5", groupName:"rbS", selected:true}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbS6", propertiesFactory:function ():Object{ return ({x:447, y:56, label:"0.6", groupName:"rbS"}); }}), new UIComponentDescriptor({type:RadioButton, id:"rbS7", propertiesFactory:function ():Object{ return ({x:496, y:56, label:"0.7", groupName:"rbS"}); }}), new UIComponentDescriptor({type:Grid, propertiesFactory:function ():Object{ return ({x:320, y:117, childDescriptors:[new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"volume", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:ComboBox, id:"cbSolutionVolumeUnits", events:{change:"__cbSolutionVolumeUnits_change"}})]}); }})]}); }}), new UIComponentDescriptor({type:GridRow, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({text:"length", height:17}); }})]}); }}), new UIComponentDescriptor({type:GridItem, propertiesFactory:function ():Object{ return ({percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:ComboBox, id:"cbSolutionLengthUnits", events:{change:"__cbSolutionLengthUnits_change"}})]}); }})]}); }})]}); }}), new UIComponentDescriptor({type:Text, stylesFactory:function ():void{ this.fontWeight = "bold"; }, propertiesFactory:function ():Object{ return ({x:20, y:10, text:"Inputs:"}); }}), new UIComponentDescriptor({type:Text, stylesFactory:function ():void{ this.fontWeight = "bold"; }, propertiesFactory:function ():Object{ return ({x:320, y:10, text:"Inputs Continued:"}); }}), new UIComponentDescriptor({type:Text, stylesFactory:function ():void{ this.fontWeight = "bold"; }, propertiesFactory:function ():Object{ return ({x:320, y:91, text:"Select Output Units:"}); }}), new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({x:320, y:30, text:"alignment"}); }}), new UIComponentDescriptor({type:Text, propertiesFactory:function ():Object{ return ({x:320, y:55, text:"ripple"}); }})]}); }})]}); }}), new UIComponentDescriptor({type:Label, events:{link:"___Label1_link"}, stylesFactory:function ():void{ this.textAlign = "center"; this.color = 0xFF; this.textDecoration = "underline"; }, propertiesFactory:function ():Object{ return ({selectable:true, y:211, x:320, width:168, htmlText:"<a href='event:http://www.ajdesigner.com'>Add to your page or website</a>"}); }}), new UIComponentDescriptor({type:Accordion, stylesFactory:function ():void{ this.color = 0; this.fillColors = [4227200, 0xC0C0C0]; }, propertiesFactory:function ():Object{ return ({x:0, y:250, width:600, height:200, childDescriptors:[new UIComponentDescriptor({type:Canvas, stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({label:"Solution: Box Parameters", percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:DataGrid, id:"_DataGrid1", propertiesFactory:function ():Object{ return ({x:0, y:0, percentHeight:100, sortableColumns:false, wordWrap:true, percentWidth:100, horizontalScrollPolicy:"off", dataTipFunction:dtResultTable, columns:[_DataGridColumn1_c(), _DataGridColumn2_c(), _DataGridColumn3_c(), _DataGridColumn4_c(), _DataGridColumn5_c(), _DataGridColumn6_c()]}); }})]}); }})]}); }}), new UIComponentDescriptor({type:Accordion, id:"aSolution", stylesFactory:function ():void{ this.color = 33023; this.textRollOverColor = 0xFF; }, propertiesFactory:function ():Object{ return ({x:0, y:450, width:600, height:350, childDescriptors:[new UIComponentDescriptor({type:Canvas, stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({label:"Graph: Output vs. Frequency", percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:LineChart, id:"linechart1", propertiesFactory:function ():Object{ return ({x:0, y:0, percentWidth:100, percentHeight:100, showDataTips:true, dataTipFunction:dtFunc_01, dataTipMode:"single", horizontalAxis:_LogAxis1_c(), verticalAxis:_LinearAxis1_c(), series:[_LineSeries1_c(), _LineSeries2_c(), _LineSeries3_c()]}); }}), new UIComponentDescriptor({type:Legend, id:"_Legend1", propertiesFactory:function ():Object{ return ({x:485, y:137}); }})]}); }}), new UIComponentDescriptor({type:Canvas, stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({label:"Disclaimer", percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:TextArea, propertiesFactory:function ():Object{ return ({x:0, y:0, percentWidth:100, percentHeight:100, text:"With the use of this program, software or calculator (hereinafter 'SOFTWARE' - defined as program, software or calculator), the end user agrees to the following terms, conditions and disclaimers and any additional terms, conditions and disclaimers located at http://www.ajdesigner.com/legal.php.\n\t\t\t\t\nLEGAL DISCLAIMER\nThe creators, Jimmy Raymond and Alena Raymond(hereinafter 'AUTHOR'), of this SOFTWARE do not represent or endorse the accuracy or reliability of any of the information or content distributed or derived through the SOFTWARE. You hereby acknowledge that any reliance upon the SOFTWARE or any materials shall be at your sole risk. The content or material is on an \"as is basis\". The AUTHOR disclaims any and all warranties, expressed or implied. With use of this SOFTWARE, website, products or materials, in no event shall the AUTHOR shall be liable for any direct, indirect, incidental, punitive, or consequential damages of any kind whatsoever with respect to the material, service, and the products.\n\nDISTRIBUTION\nThis SOFTWARE may be distributed with direct links to the files located in the ajdesigner.com domain. The SOFTWARE files shall not be distributed, published or stored by any other media or server. If the SOFTWARE is distributed, you shall accept any updates or modifications made by the AUTHOR. Note, SOFTWARE may display ads. If updates, ads or modifications are not accepted the SOFTWARE shall not be distributed or linked. With the distribution of SOFTWARE, in no event shall the AUTHOR be liable for any direct, indirect, incidental, punitive, or consequential damages of any kind whatsoever by the distributor.\n\nDISCLAIMER OF WARRANTY\nTHE SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW.\n\nMAINTENANCE\nThe AUTHOR is not obligated to provide maintenance or updates for the SOFTWARE. However, any maintenance or updates provided by the AUTHOR shall be covered by this Agreement."}); }})]}); }}), new UIComponentDescriptor({type:Canvas, stylesFactory:function ():void{ this.color = 0; }, propertiesFactory:function ():Object{ return ({label:"Embed Code: Add to Your Page or Website", percentWidth:100, percentHeight:100, childDescriptors:[new UIComponentDescriptor({type:Text, stylesFactory:function ():void{ this.textAlign = "left"; }, propertiesFactory:function ():Object{ return ({x:10, y:26, text:"Add this calculator to your page or website. Copy and paste the following code to embed the calculator.", width:578, height:48}); }}), new UIComponentDescriptor({type:Text, stylesFactory:function ():void{ this.textAlign = "left"; this.fontWeight = "bold"; }, propertiesFactory:function ():Object{ return ({x:11, y:9, text:"Embed:", width:50}); }}), new UIComponentDescriptor({type:TextArea, id:"copyText", events:{click:"__copyText_click", mouseDown:"__copyText_mouseDown"}, propertiesFactory:function ():Object{ return ({x:10, y:82, width:578, height:150, text:"<object width=\"600\" height=\"800\"><param name=\"movie\" value=\"http://sub.ajdesigner.com/subwoofer.swf\"></param><embed src=\"http://sub.ajdesigner.com/subwoofer.swf\" type=\"application/x-shockwave-flash\" width=\"600\" height=\"800\"></embed></object><br><a href=\"http://www.ajdesigner.com/index.htm\">By AJ Design Software</a>"}); }})]}); }})]}); }})]}); }}); aUnitlessUnits = new Array(); _1122770096acUnitlessUnits = new ArrayCollection(); aLengthUnits = new Array(); _501489319acLengthUnits = new ArrayCollection(); aVolumeUnits = new Array(); _2012286221acVolumeUnits = new ArrayCollection(); aResultTable = new Array(); _1675943889acResultTable = new ArrayCollection(); aDBmag = new Array(); _1207296717acDBmag = new ArrayCollection(); super(); mx_internal::_document = this; mx_internal::_subwoofer_StylesInit(); this.layout = "absolute"; this.width = 600; this.creationPolicy = "all"; this.height = 800; _RadioButtonGroup2_i(); _RadioButtonGroup1_i(); this.addEventListener("creationComplete", ___Application1_creationComplete); } private function _RadioButtonGroup2_i():RadioButtonGroup{ var _local1:RadioButtonGroup; _local1 = new RadioButtonGroup(); rbS = _local1; _local1.addEventListener("change", __rbS_change); _local1.initialized(this, "rbS"); return (_local1); } public function get rbS():RadioButtonGroup{ return (this._112675rbS); } public function set rbQB3(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._108280850rbQB3; if (_local2 !== _arg1){ this._108280850rbQB3 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbQB3", _local2, _arg1)); }; } private function _subwoofer_bindingsSetup():void{ var binding:Binding; if (!_bindings){ _bindings = []; }; if (!_watchers){ _watchers = []; }; binding = new Binding(this, function ():Object{ return (acVolumeUnits); }, function (_arg1:Object):void{ cbVas.dataProvider = _arg1; }, "cbVas.dataProvider"); _bindings[0] = binding; binding = new Binding(this, function ():Object{ return (acLengthUnits); }, function (_arg1:Object):void{ cbDp.dataProvider = _arg1; }, "cbDp.dataProvider"); _bindings[1] = binding; binding = new Binding(this, function ():Object{ return (acVolumeUnits); }, function (_arg1:Object):void{ cbSolutionVolumeUnits.dataProvider = _arg1; }, "cbSolutionVolumeUnits.dataProvider"); _bindings[2] = binding; binding = new Binding(this, function ():Object{ return (acLengthUnits); }, function (_arg1:Object):void{ cbSolutionLengthUnits.dataProvider = _arg1; }, "cbSolutionLengthUnits.dataProvider"); _bindings[3] = binding; binding = new Binding(this, function ():Object{ return (acResultTable); }, function (_arg1:Object):void{ _DataGrid1.dataProvider = _arg1; }, "_DataGrid1.dataProvider"); _bindings[4] = binding; binding = new Binding(this, function ():Object{ return (acDBmag); }, function (_arg1:Object):void{ linechart1.dataProvider = _arg1; }, "linechart1.dataProvider"); _bindings[5] = binding; binding = new Binding(this, function ():Object{ return (linechart1); }, function (_arg1:Object):void{ _Legend1.dataProvider = _arg1; }, "_Legend1.dataProvider"); _bindings[6] = binding; } public function get acResultTable():ArrayCollection{ return (this._1675943889acResultTable); } public function set rbS(_arg1:RadioButtonGroup):void{ var _local2:Object; _local2 = this._112675rbS; if (_local2 !== _arg1){ this._112675rbS = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbS", _local2, _arg1)); }; } public function get tiVas():TextInput{ return (this._110342259tiVas); } public function set acResultTable(_arg1:ArrayCollection):void{ var _local2:Object; _local2 = this._1675943889acResultTable; if (_local2 !== _arg1){ this._1675943889acResultTable = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "acResultTable", _local2, _arg1)); }; } public function set _Legend1(_arg1:Legend):void{ var _local2:Object; _local2 = this._216155035_Legend1; if (_local2 !== _arg1){ this._216155035_Legend1 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_Legend1", _local2, _arg1)); }; } public function set rbS6(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._3492979rbS6; if (_local2 !== _arg1){ this._3492979rbS6 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbS6", _local2, _arg1)); }; } public function set tiVas(_arg1:TextInput):void{ var _local2:Object; _local2 = this._110342259tiVas; if (_local2 !== _arg1){ this._110342259tiVas = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "tiVas", _local2, _arg1)); }; } public function get rbSBB4():RadioButton{ return (this._938200847rbSBB4); } public function get aSolution():Accordion{ return (this._1967800070aSolution); } public function set rbS5(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._3492978rbS5; if (_local2 !== _arg1){ this._3492978rbS5 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbS5", _local2, _arg1)); }; } public function set rbS7(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._3492980rbS7; if (_local2 !== _arg1){ this._3492980rbS7 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbS7", _local2, _arg1)); }; } private function _DataGridColumn5_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = "Bandpass 4th Order"; _local1.dataField = "bandpass"; _local1.width = 90; return (_local1); } public function __nsNumberPorts_change(_arg1:NumericStepperEvent):void{ calculateButtonPress(); } public function __copyText_click(_arg1:MouseEvent):void{ selectCopyText(); } public function ___Label1_link(_arg1:TextEvent):void{ linkHandler(_arg1); } public function get cbDp():ComboBox{ return (this._3045707cbDp); } private function _DataGridColumn3_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = "Sealed Closed"; _local1.dataField = "sealed"; _local1.width = 90; return (_local1); } public function get nsFs():NumericStepper{ return (this._3389810nsFs); } public function __nsQtc_change(_arg1:NumericStepperEvent):void{ calculateButtonPress(); } private function _LineSeries3_c():LineSeries{ var _local1:LineSeries; _local1 = new LineSeries(); _local1.yField = "yBandpass"; _local1.xField = "x"; _local1.displayName = "Bandpass"; if (!_local1.document){ _local1.document = this; }; return (_local1); } public function set rbSBB4(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._938200847rbSBB4; if (_local2 !== _arg1){ this._938200847rbSBB4 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbSBB4", _local2, _arg1)); }; } public function linkHandler(_arg1:TextEvent):void{ aSolution.selectedIndex = 2; } private function _DataGridColumn1_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = ""; _local1.dataField = "parameter"; _local1.width = 50; return (_local1); } public function set aSolution(_arg1:Accordion):void{ var _local2:Object; _local2 = this._1967800070aSolution; if (_local2 !== _arg1){ this._1967800070aSolution = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "aSolution", _local2, _arg1)); }; } public function set linechart1(_arg1:LineChart):void{ var _local2:Object; _local2 = this._259722503linechart1; if (_local2 !== _arg1){ this._259722503linechart1 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "linechart1", _local2, _arg1)); }; } public function get tVas():Text{ return (this._3541524tVas); } public function get cbSolutionLengthUnits():ComboBox{ return (this._1828862481cbSolutionLengthUnits); } public function get cbVas():ComboBox{ return (this._94433865cbVas); } private function _LineSeries1_c():LineSeries{ var _local1:LineSeries; _local1 = new LineSeries(); _local1.yField = "y"; _local1.xField = "x"; _local1.displayName = "Sealed"; if (!_local1.document){ _local1.document = this; }; return (_local1); } mx_internal function _subwoofer_StylesInit():void{ var _local1:CSSStyleDeclaration; var _local2:Array; if (mx_internal::_subwoofer_StylesInit_done){ return; }; mx_internal::_subwoofer_StylesInit_done = true; var _local3 = StyleManager; _local3.mx_internal::initProtoChainRoots(); } public function set acDBmag(_arg1:ArrayCollection):void{ var _local2:Object; _local2 = this._1207296717acDBmag; if (_local2 !== _arg1){ this._1207296717acDBmag = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "acDBmag", _local2, _arg1)); }; } public function get _DataGrid1():DataGrid{ return (this._129454722_DataGrid1); } public function set cbDp(_arg1:ComboBox):void{ var _local2:Object; _local2 = this._3045707cbDp; if (_local2 !== _arg1){ this._3045707cbDp = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "cbDp", _local2, _arg1)); }; } public function dtFunc_01(_arg1:HitData):String{ var _local2:String; _local2 = new String(); _local2 = ((((((((((("frequency: " + _arg1.item.x.toFixed(1)) + " hertz\n") + "sealed : ") + _arg1.item.y.toFixed(2)) + " db\n") + "ported : ") + _arg1.item.yPorted.toFixed(2)) + " db\n") + "bandpass : ") + _arg1.item.yBandpass.toFixed(2)) + " db"); return (_local2); } public function set nsFs(_arg1:NumericStepper):void{ var _local2:Object; _local2 = this._3389810nsFs; if (_local2 !== _arg1){ this._3389810nsFs = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "nsFs", _local2, _arg1)); }; } public function get nsGain():NumericStepper{ return (this._1037344028nsGain); } public function get acVolumeUnits():ArrayCollection{ return (this._2012286221acVolumeUnits); } public function __nsFs_change(_arg1:NumericStepperEvent):void{ calculateButtonPress(); } public function selectCopyText():void{ copyText.setSelection(0, 500); } public function get acUnitlessUnits():ArrayCollection{ return (this._1122770096acUnitlessUnits); } override public function initialize():void{ var target:subwoofer; var watcherSetupUtilClass:Object; mx_internal::setDocumentDescriptor(_documentDescriptor_); _subwoofer_bindingsSetup(); target = this; if (_watcherSetupUtil == null){ watcherSetupUtilClass = getDefinitionByName("_subwooferWatcherSetupUtil"); var _local2 = watcherSetupUtilClass; _local2["init"](null); }; _watcherSetupUtil.setup(this, function (_arg1:String){ return (target[_arg1]); }, _bindings, _watchers); super.initialize(); } public function __cbSolutionVolumeUnits_change(_arg1:ListEvent):void{ calculateButtonPress(); } public function get rbSC4():RadioButton{ return (this._108282804rbSC4); } private function _LinearAxis1_c():LinearAxis{ var _local1:LinearAxis; _local1 = new LinearAxis(); _local1.title = "db"; _local1.minimum = -30; return (_local1); } public function set rgPortedAlignment(_arg1:RadioButtonGroup):void{ var _local2:Object; _local2 = this._1873087982rgPortedAlignment; if (_local2 !== _arg1){ this._1873087982rgPortedAlignment = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rgPortedAlignment", _local2, _arg1)); }; } public function get text03():Text{ return (this._877022224text03); } public function get rbQB3():RadioButton{ return (this._108280850rbQB3); } public function set cbSolutionLengthUnits(_arg1:ComboBox):void{ var _local2:Object; _local2 = this._1828862481cbSolutionLengthUnits; if (_local2 !== _arg1){ this._1828862481cbSolutionLengthUnits = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "cbSolutionLengthUnits", _local2, _arg1)); }; } public function set tVas(_arg1:Text):void{ var _local2:Object; _local2 = this._3541524tVas; if (_local2 !== _arg1){ this._3541524tVas = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "tVas", _local2, _arg1)); }; } private function _RadioButtonGroup1_i():RadioButtonGroup{ var _local1:RadioButtonGroup; _local1 = new RadioButtonGroup(); rgPortedAlignment = _local1; _local1.addEventListener("change", __rgPortedAlignment_change); _local1.initialized(this, "rgPortedAlignment"); return (_local1); } public function get _Legend1():Legend{ return (this._216155035_Legend1); } public function get rbS5():RadioButton{ return (this._3492978rbS5); } public function get rbS6():RadioButton{ return (this._3492979rbS6); } public function get rbS7():RadioButton{ return (this._3492980rbS7); } public function set copyText(_arg1:TextArea):void{ var _local2:Object; _local2 = this._505960894copyText; if (_local2 !== _arg1){ this._505960894copyText = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "copyText", _local2, _arg1)); }; } public function ___Application1_creationComplete(_arg1:FlexEvent):void{ runInit(); } public function set cbVas(_arg1:ComboBox):void{ var _local2:Object; _local2 = this._94433865cbVas; if (_local2 !== _arg1){ this._94433865cbVas = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "cbVas", _local2, _arg1)); }; } private function _DataGridColumn6_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = "Units"; _local1.dataField = "units"; _local1.width = 50; return (_local1); } public function set cbSolutionVolumeUnits(_arg1:ComboBox):void{ var _local2:Object; _local2 = this._684913059cbSolutionVolumeUnits; if (_local2 !== _arg1){ this._684913059cbSolutionVolumeUnits = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "cbSolutionVolumeUnits", _local2, _arg1)); }; } public function __tiVas_change(_arg1:Event):void{ calculateButtonPress(); } public function calculateButtonPress():void{ var _local1:Length3; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Length; var _local8:Number; var _local9:Number; var _local10:Length3; var _local11:Length3; var _local12:Length; var _local13:Length3; var _local14:Length3; var _local15:Length3; var _local16:Length; var _local17:SealedParameters; var _local18:Object; var _local19:PortedParameters; var _local20:Object; var _local21:BandpassParameters; var _local22:Object; var _local23:Number; var _local24:Boolean; _local1 = new Length3("a"); _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = new Length("a"); _local8 = 0; _local9 = 0; _local10 = new Length3("a"); _local11 = new Length3("a"); _local12 = new Length("a"); _local13 = new Length3("a"); _local14 = new Length3("a"); _local15 = new Length3("a"); _local16 = new Length("a"); _local17 = new SealedParameters(); _local18 = new Object(); _local19 = new PortedParameters(); _local20 = new Object(); _local21 = new BandpassParameters(); _local22 = new Object(); _local23 = 0; _local24 = true; if (_local24){ _local1.setValue(Number(tiVas.text), cbVas.selectedLabel); _local2 = _local1.getValue("liter"); _local7.setValue(Number(tiPd.text), cbDp.selectedLabel); _local8 = _local7.getValue("centimeter"); _local3 = nsQts.value; _local4 = nsFs.value; _local5 = nsQtc.value; _local6 = nsGain.value; _local9 = nsNumberPorts.value; _local17.nQts = _local3; _local17.nVasLiter = _local2; _local17.nFs = _local4; _local17.nQtc = _local5; _local18 = _local17.calculateSealed(); _local10.setValue(_local18.nVbLiter, "liter"); _local19.nQts = _local3; _local19.nVasLiter = _local2; _local19.nFs = _local4; _local19.nPdCentimeter = _local8; _local19.nNumberPorts = _local9; _local19.bCheckSBB4 = rbSBB4.selected; _local19.bCheckQB3 = rbQB3.selected; _local19.bCheckSC4 = rbSC4.selected; _local20 = _local19.calculatePorted(); _local11.setValue(_local20.nVbLiter, "liter"); _local12.setValue(_local20.nPlCentimeter, "centimeter"); _local21.nQts = _local3; _local21.nVasLiter = _local2; _local21.nFs = _local4; _local21.nGain = _local6; _local21.nPdCentimeter = _local8; _local21.nNumberPorts = _local9; _local21.bCheckS5 = rbS5.selected; _local21.bCheckS6 = rbS6.selected; _local21.bCheckS7 = rbS7.selected; _local22 = _local21.calculateBandpass(); _local13.setValue(_local22.nVfLiter, "liter"); _local14.setValue(_local22.nVrLiter, "liter"); _local15.setValue((_local22.nVrLiter + _local22.nVfLiter), "liter"); _local16.setValue(_local22.nPlCentimeter, "centimeter"); _local23 = 10; while (_local23 < 1000) { aDBmag[(_local23 - 10)] = {x:_local23, y:_local18.aDBmag[(_local23 - 10)], yPorted:_local20.aDBmag[(_local23 - 10)], yBandpass:_local22.aDBmag[(_local23 - 10)]}; _local23++; }; acDBmag = new ArrayCollection(aDBmag); aResultTable[0] = {parameter:"Vb", description:"box volume", sealed:_local10.getValue(cbSolutionVolumeUnits.selectedLabel).toPrecision(5), ported:_local11.getValue(cbSolutionVolumeUnits.selectedLabel).toPrecision(5), bandpass:_local15.getValue(cbSolutionVolumeUnits.selectedLabel).toPrecision(5), units:cbSolutionVolumeUnits.selectedLabel, explain:(("Vb - The airspace volume of the box. The volume of the subwoofer and any " + "building material needs to be added to this value. For bandpass boxes, the") + " volume includes both front and rear chambers")}; aResultTable[1] = {parameter:"Vf", description:"front box volume", sealed:"N/A", ported:"N/A", bandpass:_local13.getValue(cbSolutionVolumeUnits.selectedLabel).toPrecision(5), units:cbSolutionVolumeUnits.selectedLabel}; aResultTable[2] = {parameter:"Vr", description:"rear box volume", sealed:"N/A", ported:"N/A", bandpass:_local14.getValue(cbSolutionVolumeUnits.selectedLabel).toPrecision(5), units:cbSolutionVolumeUnits.selectedLabel}; aResultTable[3] = {parameter:"f3 or fl", description:"-3db frequency", sealed:_local18.nF3.toPrecision(5), ported:_local20.nF3.toPrecision(5), bandpass:_local22.nFl.toPrecision(5), units:"hertz"}; aResultTable[4] = {parameter:"fh", description:"-3db frequency", sealed:"N/A", ported:"N/A", bandpass:_local22.nFh.toPrecision(5), units:"hertz"}; aResultTable[5] = {parameter:"fb", description:"box frequency", sealed:_local18.nFb.toPrecision(5), ported:_local20.nFb.toPrecision(5), bandpass:_local22.nFb.toPrecision(5), units:"hertz"}; aResultTable[6] = {parameter:"Pl", description:"port length", sealed:"N/A", ported:_local12.getValue(cbSolutionLengthUnits.selectedLabel).toPrecision(5), bandpass:_local16.getValue(cbSolutionLengthUnits.selectedLabel).toPrecision(5), units:cbSolutionLengthUnits.selectedLabel}; acResultTable = new ArrayCollection(aResultTable); }; } public function set _DataGrid1(_arg1:DataGrid):void{ var _local2:Object; _local2 = this._129454722_DataGrid1; if (_local2 !== _arg1){ this._129454722_DataGrid1 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "_DataGrid1", _local2, _arg1)); }; } public function get linechart1():LineChart{ return (this._259722503linechart1); } public function __copyText_mouseDown(_arg1:MouseEvent):void{ selectCopyText(); } public function set nsQtc(_arg1:NumericStepper):void{ var _local2:Object; _local2 = this._105094811nsQtc; if (_local2 !== _arg1){ this._105094811nsQtc = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "nsQtc", _local2, _arg1)); }; } private function _DataGridColumn4_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = "Ported Vented"; _local1.dataField = "ported"; _local1.width = 90; return (_local1); } public function get acDBmag():ArrayCollection{ return (this._1207296717acDBmag); } public function set acLengthUnits(_arg1:ArrayCollection):void{ var _local2:Object; _local2 = this._501489319acLengthUnits; if (_local2 !== _arg1){ this._501489319acLengthUnits = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "acLengthUnits", _local2, _arg1)); }; } public function set nsQts(_arg1:NumericStepper):void{ var _local2:Object; _local2 = this._105094827nsQts; if (_local2 !== _arg1){ this._105094827nsQts = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "nsQts", _local2, _arg1)); }; } public function __cbDp_change(_arg1:ListEvent):void{ calculateButtonPress(); } public function __cbSolutionLengthUnits_change(_arg1:ListEvent):void{ calculateButtonPress(); } public function __nsGain_change(_arg1:NumericStepperEvent):void{ calculateButtonPress(); } public function __tiPd_change(_arg1:Event):void{ calculateButtonPress(); } private function _DataGridColumn2_c():DataGridColumn{ var _local1:DataGridColumn; _local1 = new DataGridColumn(); _local1.headerText = "Description"; _local1.dataField = "description"; _local1.width = 120; _local1.showDataTips = true; return (_local1); } public function set nsGain(_arg1:NumericStepper):void{ var _local2:Object; _local2 = this._1037344028nsGain; if (_local2 !== _arg1){ this._1037344028nsGain = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "nsGain", _local2, _arg1)); }; } public function set acVolumeUnits(_arg1:ArrayCollection):void{ var _local2:Object; _local2 = this._2012286221acVolumeUnits; if (_local2 !== _arg1){ this._2012286221acVolumeUnits = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "acVolumeUnits", _local2, _arg1)); }; } public function get rgPortedAlignment():RadioButtonGroup{ return (this._1873087982rgPortedAlignment); } private function _LineSeries2_c():LineSeries{ var _local1:LineSeries; _local1 = new LineSeries(); _local1.yField = "yPorted"; _local1.xField = "x"; _local1.displayName = "Ported"; if (!_local1.document){ _local1.document = this; }; return (_local1); } public function runInit():void{ aUnitlessUnits = ["unitless"]; acUnitlessUnits = new ArrayCollection(aUnitlessUnits); aVolumeUnits = ["foot^3", "inch^3", "centimeter^3", "milliliter", "liter", "meter^3"]; acVolumeUnits = new ArrayCollection(aVolumeUnits); aLengthUnits = ["foot", "inch", "centimeter", "millimeter", "meter"]; acLengthUnits = new ArrayCollection(aLengthUnits); cbVas.selectedIndex = aVolumeUnits.indexOf("liter"); cbDp.selectedIndex = aLengthUnits.indexOf("centimeter"); cbSolutionVolumeUnits.selectedIndex = aVolumeUnits.indexOf("liter"); cbSolutionLengthUnits.selectedIndex = aLengthUnits.indexOf("centimeter"); calculateButtonPress(); tiVas.toolTip = ((("Vas: (Thiele-Small Specification)\n" + "Enter value from speaker manufacture\n") + "Related enclosure: Sealed Ported Bandpass\n\n") + "Volume of air equal to the speaker's spring characteristics"); nsQts.toolTip = ((("Qts: (Thiele-Small Specification)\n" + "Enter value from speaker manufacture\n") + "Related enclosure: Sealed Ported Bandpass\n\n") + "Total Q of the speaker"); nsFs.toolTip = ((("fs: (Thiele-Small Specification)\n" + "Enter value from speaker manufacture\n") + "Related enclosure: Sealed Ported Bandpass\n\n") + "Free air resonance of speaker"); nsQtc.toolTip = ((("Qtc:\n" + "User Defined (you choose a value)\n") + "Related enclosure: Sealed\n\n") + "Total Q of the speaker and box"); nsGain.toolTip = ((("gain:\n" + "User Defined (you choose a value)\n") + "Related enclosure: Bandpass\n\n") + "dB or sound volume increase of the system"); rbSBB4.toolTip = (rbQB3.toolTip = (rbSC4.toolTip = ((((("Alignment:\n" + "User Defined (you choose a value)\n") + "Related enclosure: Ported\n\n") + "SBB4: Good response, Large enclosure, Low tuning frequency\n") + "QB3: Slightly degraded response, Small enclosure, Lower F3\n") + "SC4: Degraded response, Large enclosure, Low tuning frequency"))); tiPd.toolTip = ((("Pd:\n" + "User Defined (you choose a value)\n") + "Related enclosure: Ported Bandpass\n\n") + "Diameter of the port or vent"); nsNumberPorts.toolTip = ((("# ports:\n" + "User Defined (you choose a value)\n") + "Related enclosure: Ported Bandpass\n\n") + "Quantity or number of ports"); } private function _subwoofer_bindingExprs():void{ var _local1:*; _local1 = acVolumeUnits; _local1 = acLengthUnits; _local1 = acVolumeUnits; _local1 = acLengthUnits; _local1 = acResultTable; _local1 = acDBmag; _local1 = linechart1; } public function get copyText():TextArea{ return (this._505960894copyText); } public function get cbSolutionVolumeUnits():ComboBox{ return (this._684913059cbSolutionVolumeUnits); } public function __cbVas_change(_arg1:ListEvent):void{ calculateButtonPress(); } private function _LogAxis1_c():LogAxis{ var _local1:LogAxis; _local1 = new LogAxis(); _local1.title = "frequency (hertz)"; _local1.baseAtZero = false; return (_local1); } public function set nsNumberPorts(_arg1:NumericStepper):void{ var _local2:Object; _local2 = this._2141785924nsNumberPorts; if (_local2 !== _arg1){ this._2141785924nsNumberPorts = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "nsNumberPorts", _local2, _arg1)); }; } public function set tiPd(_arg1:TextInput):void{ var _local2:Object; _local2 = this._3559241tiPd; if (_local2 !== _arg1){ this._3559241tiPd = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "tiPd", _local2, _arg1)); }; } public function get nsQtc():NumericStepper{ return (this._105094811nsQtc); } public function set acUnitlessUnits(_arg1:ArrayCollection):void{ var _local2:Object; _local2 = this._1122770096acUnitlessUnits; if (_local2 !== _arg1){ this._1122770096acUnitlessUnits = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "acUnitlessUnits", _local2, _arg1)); }; } public function get acLengthUnits():ArrayCollection{ return (this._501489319acLengthUnits); } public function get nsQts():NumericStepper{ return (this._105094827nsQts); } private function dtResultTable(_arg1:Object):String{ var _local2:String; _local2 = ""; if (_arg1 != null){ _local2 = _arg1.explain; }; return (_local2); } public function __rgPortedAlignment_change(_arg1:Event):void{ calculateButtonPress(); } public function dtFunc_TS(_arg1:HitData):String{ var _local2:String; _local2 = new String(); _local2 = (((("trap speed: " + _arg1.item.x) + " mph\n") + "horsepower: ") + _arg1.item.y.toFixed(2)); return (_local2); } public function __rbS_change(_arg1:Event):void{ calculateButtonPress(); } public function get nsNumberPorts():NumericStepper{ return (this._2141785924nsNumberPorts); } public function get tiPd():TextInput{ return (this._3559241tiPd); } public function set rbSC4(_arg1:RadioButton):void{ var _local2:Object; _local2 = this._108282804rbSC4; if (_local2 !== _arg1){ this._108282804rbSC4 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "rbSC4", _local2, _arg1)); }; } public function __nsQts_change(_arg1:NumericStepperEvent):void{ calculateButtonPress(); } public function set text03(_arg1:Text):void{ var _local2:Object; _local2 = this._877022224text03; if (_local2 !== _arg1){ this._877022224text03 = _arg1; dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "text03", _local2, _arg1)); }; } public static function set watcherSetupUtil(_arg1:IWatcherSetupUtil):void{ _slot1._watcherSetupUtil = _arg1; } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {_CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_221173126} [mx.skins.cursor.BusyCursor]Uses:1
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClip {_DataGridStyle__embed_css_Assets_swf_cursorStretch_2118006141} [cursorStretch]Uses:3
Symbol 5 GraphicUsed by:8
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:8 11 13 14
Symbol 8 MovieClip {_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragCopy_505536108} [mx.skins.cursor.DragCopy]Uses:5 7
Symbol 9 GraphicUsed by:11
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip {_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragReject_1231064654} [mx.skins.cursor.DragReject]Uses:9 7 10
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip {_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragLink_505798119} [mx.skins.cursor.DragLink]Uses:12 7
Symbol 14 MovieClip {_DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336} [mx.skins.cursor.DragMove]Uses:7

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 2 as "mx.skins.cursor.BusyCursor"
ExportAssets (56)Timeline Frame 2Symbol 4 as "cursorStretch"
ExportAssets (56)Timeline Frame 2Symbol 8 as "mx.skins.cursor.DragCopy"
ExportAssets (56)Timeline Frame 2Symbol 11 as "mx.skins.cursor.DragReject"
ExportAssets (56)Timeline Frame 2Symbol 13 as "mx.skins.cursor.DragLink"
ExportAssets (56)Timeline Frame 2Symbol 14 as "mx.skins.cursor.DragMove"
SerialNumber (41)Timeline Frame 1

Labels

"_subwoofer_mx_managers_SystemManager"Frame 1
"subwoofer"Frame 2




http://swfchan.com/29/143541/info.shtml
Created: 27/10 -2018 09:01:54 Last modified: 27/10 -2018 09:01:54 Server time: 22/12 -2024 08:23:19