public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height) {
Insets nextInsets;
int px, py, pw, ph;
px = x;
py = y;
pw = width;
ph = height;
if(outsideBorder != null) {
outsideBorder.paintBorder(c, g, px, py, pw, ph);
nextInsets = outsideBorder.getBorderInsets(c);
px += nextInsets.left;
py += nextInsets.top;
pw = pw - nextInsets.right - nextInsets.left;
ph = ph - nextInsets.bottom - nextInsets.top;
}
if(insideBorder != null)
insideBorder.paintBorder(c, g, px, py, pw, ph);
}
Paints the compound border by painting the outside border
with the specified position and size and then painting the
inside border at the specified position and size offset by
the insets of the outside border. |