1
4
5 import org.aswing.ASColor;
6 import org.aswing.Component;
7 import org.aswing.geom.Rectangle;
8 import org.aswing.graphices.GradientBrush;
9 import org.aswing.graphices.Graphics;
10 import org.aswing.graphices.Pen;
11 import org.aswing.graphices.SolidBrush;
12 import org.aswing.plaf.basic.frame.TitleBarUI;
13
14 class org.aswing.plaf.asw.frame.ASWingTitleBarUI extends TitleBarUI{
15
16
17 public function ASWingTitleBarUI(){
18 super();
19 }
20
21 private function paintBackGround(com:Component, g:Graphics, b:Rectangle):Void{
22 if(!com.isOpaque()){
23 return;
24 }
25 var x:Number = b.x;
26 var y:Number = b.y;
27 var w:Number = b.width;
28 var h:Number = b.height;
29 var colors:Array = [0xDEDEDE, 0xF1F1F1];
30 var alphas:Array = [100, 100];
31 var ratios:Array = [75, 255];
32 var matrix:Object = {matrixType:"box", x:x, y:y, w:w, h:h, r:(90/180)*Math.PI};
33 var brush:GradientBrush=new GradientBrush(GradientBrush.LINEAR, colors, alphas, ratios, matrix);
34 g.fillRoundRect(brush, x, y, w, h, 4, 4, 0, 0);
35
36 colors = [0xF7F7F7, 0xF7F7F7];
37 alphas = [80, 0];
38 ratios = [0, 100];
39 matrix = {matrixType:"box", x:x, y:y, w:b.width, h:b.height, r:(90/180)*Math.PI};
40 brush=new GradientBrush(GradientBrush.LINEAR, colors, alphas, ratios, matrix);
41 g.fillRoundRect(brush, x, y, w, h-h/4, 4, 4, 0, 0);
42 var penTool:Pen=new Pen(activeBorderColor);
43 g.drawLine(penTool, x, y+h-1, x+w, y+h-1);
44
45 if (frame.isActive()){
46 }else{
47 g.fillRoundRect(new SolidBrush(ASColor.BLACK.getRGB(), 15), x, y ,w, h, 4, 4, 0, 0);
48 }
49 }
50 }
51