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.winxp.frame.WinXpTitleBarUI extends TitleBarUI{
15
16
17 public function WinXpTitleBarUI(){
18 super();
19 }
20
21 private function paintBackGround(com:Component, g:Graphics, b:Rectangle):Void{
22 var x1:Number = b.x;
23 var y1:Number = b.y;
24 var x2:Number = x1 + b.width;
25 var y2:Number = y1 + b.height;
26 var colors:Array = [0x0053e1, 0x026afe];
27 var alphas:Array = [100, 100];
28 var ratios:Array = [75, 255];
29 var matrix:Object = {matrixType:"box", x:x1, y:y1, w:b.width, h:b.height, r:(90/180)*Math.PI};
30 var brush:GradientBrush=new GradientBrush(GradientBrush.LINEAR, colors, alphas, ratios, matrix);
31 g.fillRectangle(brush,x1,y1,x2,y2);
32
33 var penTool:Pen=new Pen(new ASColor(0x2b90ff,100));
34 penTool.setThickness(2);
35 g.drawLine(penTool,x1,y1,x2,y1);
36 penTool.setColor(0x0144d0);
37 penTool.setThickness(1);
38
39 g.drawLine(penTool,x1,y2-1,x2,y2-1);
40
41 if (frame.isActive()){
42 }else{
43 g.fillRectangle(new SolidBrush(ASColor.BLACK.getRGB(), 15),x1,y1,x2,y2);
44 }
45 }
46 }
47