Sha256: 35d53dbd4ac1025a9700bf1eca2b0a32407f992f5db54e86022d47d8a0bd7e26
Contents?: true
Size: 1.36 KB
Versions: 28
Compression:
Stored size: 1.36 KB
Contents
package asunit.textui { import flash.display.DisplayObject; import flash.events.Event; import mx.core.IUIComponent; import asunit.textui.TestRunner; public class FlexTestRunner extends TestRunner { public function FlexTestRunner() { setPrinter(new ResultPrinter()); } protected override function addedHandler(event:Event):void { if(event.target === this) { parent.addEventListener(Event.RESIZE, resizeHandler); resizeHandler(new Event(Event.RESIZE)); } else { event.stopPropagation(); } } public override function set width(w:Number):void { fPrinter.width = w; } public override function set height(h:Number):void { fPrinter.height = h; } public function resizeHandler(event:Event):void { width = parent.width; height = parent.height; } public override function addChild(child:DisplayObject):DisplayObject { if(parent && child is IUIComponent) { // AND check for 'is' UIUComponent... return parent.addChild(child); } else { return super.addChild(child); } } public override function removeChild(child:DisplayObject):DisplayObject { if(child is IUIComponent) { return parent.removeChild(child); } else { return super.removeChild(child); } } } }
Version data entries
28 entries across 28 versions & 1 rubygems