1 package org.wcb.gui.component;
2
3 import javax.swing.Icon;
4 import java.awt.Color;
5 import java.awt.Component;
6 import java.awt.Graphics;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public class AngledLinesWindowsCornerIcon implements Icon {
25
26
27 private static final Color WHITE_LINE_COLOR = new Color(255, 255, 255);
28 private static final Color GRAY_LINE_COLOR = new Color(172, 168, 153);
29
30
31 private static final int WIDTH = 13;
32 private static final int HEIGHT = 13;
33
34
35
36
37
38 public int getIconHeight() {
39 return WIDTH;
40 }
41
42
43
44
45
46 public int getIconWidth() {
47 return HEIGHT;
48 }
49
50
51
52
53
54
55
56
57 public void paintIcon(Component c, Graphics g, int x, int y) {
58
59 g.setColor(WHITE_LINE_COLOR);
60 g.drawLine(0, 12, 12, 0);
61 g.drawLine(5, 12, 12, 5);
62 g.drawLine(10, 12, 12, 10);
63
64 g.setColor(GRAY_LINE_COLOR);
65 g.drawLine(1, 12, 12, 1);
66 g.drawLine(2, 12, 12, 2);
67 g.drawLine(3, 12, 12, 3);
68
69 g.drawLine(6, 12, 12, 6);
70 g.drawLine(7, 12, 12, 7);
71 g.drawLine(8, 12, 12, 8);
72
73 g.drawLine(11, 12, 12, 11);
74 g.drawLine(12, 12, 12, 12);
75
76 }
77 }