package skins.Aqua { import flash.display.GradientType; import flash.geom.Matrix; import mx.skins.Border; public class TabBar extends Border { override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var radius : uint = 10; var cols : Array = getStyle('fillColors'); var colors:Array = cols; var alphas:Array = [1, 1]; var ratios:Array = [0, 0xFF]; var matrix:Matrix = new Matrix(); matrix.createGradientBox(unscaledWidth, unscaledHeight, 90*Math.PI/180, 0, 0); with (graphics) { clear(); lineStyle(0, 0, 0); beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix); drawRoundRectComplex( 2, 1, unscaledWidth - 1, unscaledHeight - 1, getStyle('leftCorner'), getStyle('rightCorner'), 0 , 0); endFill(); lineStyle(1, getStyle('borderColor'), 1); switch (name) { case 'selectedOverSkin': case 'selectedDownSkin': case 'selectedUpSkin': beginFill(getStyle('selectedColor'), 1); lineStyle(1, getStyle('borderColor'), 1); moveTo(0, radius); curveTo(0, 0, radius, 0); lineTo(unscaledWidth - radius, 0); curveTo(unscaledWidth, 0, unscaledWidth, radius); lineTo(unscaledWidth, unscaledHeight); lineStyle(1, getStyle('borderColor'), 0); lineTo(0, unscaledHeight); lineStyle(1, getStyle('borderColor'), 1); lineTo(0, radius); endFill(); break; default : if (0 == getStyle('rightCorner')) { lineStyle(2, 0, 0.3); moveTo(unscaledWidth, 5); lineTo(unscaledWidth, unscaledHeight - 5); } break; } } } } }