01: package com.jidesoft.plaf.xerto;
02:
03: import javax.swing.border.Border;
04: import javax.swing.plaf.UIResource;
05: import java.awt.*;
06:
07: /**
08: * StatusBarBorder
09: *
10: * @author Created by Jasper Potts (01-Apr-2004)
11: * @version 1.0
12: */
13: public class StatusBarBorder implements Border, UIResource {
14:
15: /**
16: * Returns the insets of the border.
17: *
18: * @param c the component for which this border insets value applies
19: */
20: public Insets getBorderInsets(Component c) {
21: return new Insets(6, 0, 2, 0);
22: }
23:
24: /**
25: * Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own
26: * background when painting.
27: */
28: public boolean isBorderOpaque() {
29: return false;
30: }
31:
32: /**
33: * Paints the border for the specified component with the specified position and size.
34: *
35: * @param c the component for which this border is being painted
36: * @param g the paint graphics
37: * @param x the x position of the painted border
38: * @param y the y position of the painted border
39: * @param width the width of the painted border
40: * @param height the height of the painted border
41: */
42: public void paintBorder(Component c, Graphics g, int x, int y,
43: int width, int height) {
44: g.setColor(XertoUtils.getControlDarkShadowColor());
45: g.drawLine(x, y + 2, x + width, y + 2);
46: g.setColor(XertoUtils.getControlMidShadowColor());
47: g.drawLine(x, y + 3, x + width, y + 3);
48: g.drawLine(x, y + height - 1, x + width, y + height - 1);
49: g.setColor(XertoUtils.getControlLightShadowColor());
50: g.drawLine(x, y + 4, x + width, y + 4);
51: g.drawLine(x, y + height - 2, x + width, y + height - 2);
52: g.setColor(XertoUtils.getControlVeryLightShadowColor());
53: g.drawLine(x, y + 5, x + width, y + 5);
54: g.drawLine(x, y + height - 3, x + width, y + height - 3);
55: }
56: }
|