1 | class PinIcon extends ImageIcon {↵ | | 1 | class MaximizeIcon extends ImageIcon {↵
|
|
2 | private PinIcon() {↵ | | 2 | private MaximizeIcon() {↵
|
3 | super();↵ | | 3 | super();↵
|
4 | }↵ | | 4 | }↵
|
|
5 | public void paintIcon(Component c, Graphics g, int x, int y) {↵ | | 5 | public void paintIcon(Component c, Graphics g, int x, int y) {↵
|
6 | Graphics2D g2 = (Graphics2D) g;↵ | | 6 | Graphics2D g2 = (Graphics2D) g;↵
|
|
| | | 7 | ↵
|
|
7 | if (isActive())↵ | | 8 | if (isActive())↵
|
8 | g2.setColor(ACTIVE_LABEL_COLOR);↵ | | 9 | g2.setColor(ACTIVE_LABEL_COLOR);↵
|
9 | else↵ | | 10 | else↵
|
10 | g2.setColor(INACTIVE_LABEL_COLOR);↵ | | 11 | g2.setColor(INACTIVE_LABEL_COLOR);↵
|
11 | g2.drawRect(3, 2, 4, 4);↵ | | 12 | g2.drawRect(2, 3, 5, 5);↵
|
|
12 | g2.drawLine(2, 2 + 4, 2 + 4 + 2, 2 + 4);↵ | | 13 | g2.drawLine(3 + 1, 1, 3 + 6, 1);↵
|
13 | g2.drawLine(5, 6, 5, 8);↵ | | 14 | g2.drawLine(3 + 6, 1, 3 + 6, 1 + 6 - 1);↵
|
|
14 | }↵ | | 15 | }↵
|
|
15 | /**↵ | | 16 | /**↵
|
16 | * @see javax.swing.Icon#getIconHeight()↵ | | 17 | * @see javax.swing.Icon#getIconHeight()↵
|
17 | */↵ | | 18 | */↵
|
18 | public int getIconHeight() {↵ | | 19 | public int getIconHeight() {↵
|
19 | return 8;↵ | | 20 | return 8;↵
|
20 | }↵ | | 21 | }↵
|
|
21 | /**↵ | | 22 | /**↵
|
22 | * @see javax.swing.Icon#getIconWidth()↵ | | 23 | * @see javax.swing.Icon#getIconWidth()↵
|
23 | */↵ | | 24 | */↵
|
24 | public int getIconWidth() {↵ | | 25 | public int getIconWidth() {↵
|
25 | return 8;↵ | | 26 | return 8;↵
|
26 | | | 27 |
|