| 161 | private static final int[] YDOWN = {4, 1, 1}; |
| 162 | |
| 163 | @Override |
| 164 | public void paint(Graphics g) |
| 165 | { |
| 166 | Color b; |
| 167 | Color f; |
| 168 | if (entered) |
| 169 | { |
| 170 | b = UIManager.getColor("controlDkShadow"); |
| 171 | f = Color.BLACK; |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | b = UIManager.getColor("control"); |
| 176 | f = UIManager.getColor("controlDkShadow"); |
| 177 | } |
| 178 | g.setColor(b); |
| 179 | g.fillRect(0, 0, getWidth(), getHeight()); |
| 180 | int center = getWidth() / 2; |
| 181 | int[] xs = {center, center - 3, center + 3}; |
| 182 | int[] ys; |
| 183 | if (open) |
| 184 | { |
| 185 | ys = YUP; |
| 186 | |
| 187 | } |
| 188 | else |
| 189 | { |
| 190 | ys = YDOWN; |
| 191 | } |
| 192 | g.setColor(f); |
| 193 | g.drawPolygon(xs, ys, 3); |
| 194 | g.fillPolygon(xs, ys, 3); |
| 195 | } |
| 196 | |
| 197 | public void setOpen(boolean open) |
| 198 | { |