viewMetrics property to determine its value. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public function get backgroundImageBounds():Rectangle { return _backgroundImageBounds; } /** * @private */ public function set backgroundImageBounds(value:Rectangle):void { if (_backgroundImageBounds && value && _backgroundImageBounds.equals(value)) return; _backgroundImageBounds = value; invalidateDisplayList(); } /** * @private */ public function get hasBackgroundImage():Boolean { return false; } /** * @private */ public function layoutBackgroundImage():void { } /** * @private */ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var hasPanelParent:Boolean = isPanel(parent); var titleBarHeight:Number; if (hasPanelParent) titleBarHeight = Object(parent).getStyle("headerHeight"); if (isNaN(titleBarHeight)) titleBarHeight = hasPanelParent ? Object(parent).mx_internal::getHeaderHeightProxy(true) - 1 : 30; tbbg.height = titleBarHeight; tbhi.height = titleBarHeight; tbdiv.top = titleBarHeight; var em:EdgeMetrics = borderMetrics; // Control bar visibility is determined by a borderMetric.bottom greater than 1 if (em.bottom > 1) { cbbg.height = em.bottom - 1; cbdiv.bottom = cbbg.height; cbbg.visible = cbdiv.visible = true; } else { cbbg.visible = cbdiv.visible = false; } if (getStyle("borderVisible") == false) { border.visible = false; contents.left = contents.top = contents.right = contents.bottom = 0; } else { border.visible = true; contents.left = contents.top = contents.right = contents.bottom = 1; } dropShadow.visible = getStyle("dropShadowVisible") && width > 0 && height > 0; var cr:Number = getStyle("cornerRadius"); if (cornerRadius != cr) { cornerRadius = cr; contentMaskRect.topLeftRadiusX = cornerRadius; contentMaskRect.topRightRadiusX = cornerRadius; border.topLeftRadiusX = cornerRadius; border.topRightRadiusX = cornerRadius; dropShadow.trRadius = cornerRadius; dropShadow.tlRadius = cornerRadius; if (cbbg.visible) { contentMaskRect.bottomLeftRadiusX = cornerRadius; contentMaskRect.bottomRightRadiusX = cornerRadius; border.bottomLeftRadiusX = cornerRadius; border.bottomRightRadiusX = cornerRadius; dropShadow.blRadius = cornerRadius; dropShadow.brRadius = cornerRadius; } } backgroundFill.color = getStyle("backgroundColor"); backgroundFill.alpha = getStyle("backgroundAlpha"); super.updateDisplayList(unscaledWidth, unscaledHeight); } /** * We don't use 'is' to prevent dependency issues * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ private static var panels:Object = {}; private static function isPanel(parent:Object):Boolean { var s:String = getQualifiedClassName(parent); if (panels[s] == 1) return true; if (panels[s] == 0) return false; if (s == "mx.containers::Panel") { panels[s] == 1; return true; } var x:XML = describeType(parent); var xmllist:XMLList = x.extendsClass.(@type == "mx.containers::Panel"); if (xmllist.length() == 0) { panels[s] = 0; return false; } panels[s] = 1; return true; } private var cornerRadius:Number; ]]>