(int) (border.left() / 3), (int) (border.right() / 3));
(int) (border.left() / 3));
    private static void paintBorderSide(OutputDevice outputDevice,             final BorderPropertySet border, final Rectangle bounds, final int sides,             int currentSide, final IdentValue borderSideStyle, int xOffset) {        if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) {            BorderPropertySet bd2 = new BorderPropertySet((int) (border.top() / 2),                    (int) (border.right() / 2),                    (int) (border.bottom() / 2),                    (int) (border.left() / 2));            if (borderSideStyle == IdentValue.RIDGE) {                paintGoodBevel(outputDevice, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide);                paintGoodBevel(outputDevice, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide);            } else {                paintGoodBevel(outputDevice, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide);                paintGoodBevel(outputDevice, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide);            }            return;        }        if (borderSideStyle == IdentValue.OUTSET) {            paintGoodBevel(outputDevice, bounds, border,                    border.brighter(borderSideStyle),                    border.darker(borderSideStyle), sides, currentSide);            return;        }        if (borderSideStyle == IdentValue.INSET) {            paintGoodBevel(outputDevice, bounds, border,                    border.darker(borderSideStyle),                    border.brighter(borderSideStyle), sides, currentSide);            return;        }        if (borderSideStyle == IdentValue.SOLID) {            paintSolid(outputDevice, bounds, border, border, sides, currentSide);            return;        }        if (borderSideStyle == IdentValue.DOUBLE) {            // this may need to be modified to account for rounding errors            // create a new border only 1/3 the thickness            BorderPropertySet outer = new BorderPropertySet((int) (border.top() / 3),                    (int) (border.bottom() / 3),                    (int) (border.left() / 3),                    (int) (border.right() / 3));            BorderPropertySet center = new BorderPropertySet(outer);            BorderPropertySet inner = new BorderPropertySet(outer);            if ((int) border.top() == 1) {                outer.setTop(1f);                center.setTop(0f);            }            if ((int) border.bottom() == 1) {                outer.setBottom(1f);                center.setBottom(0f);            }            if ((int) border.left() == 1) {                outer.setLeft(1f);                center.setLeft(0f);            }            if ((int) border.right() == 1) {                outer.setRight(1f);                center.setRight(0f);            }            if ((int) border.top() == 2) {                outer.setTop(1f);                center.setTop(0f);                inner.setTop(1f);            }            if ((int) border.bottom() == 2) {                outer.setBottom(1f);                center.setBottom(0f);                inner.setBottom(1f);            }            if ((int) border.left() == 2) {                outer.setLeft(1f);                center.setLeft(0f);                inner.setLeft(1f);            }            if ((int) border.right() == 2) {                outer.setRight(1f);                center.setRight(0f);                inner.setRight(1f);            }            Rectangle b2 = shrinkRect(bounds, outer, sides);            b2 = shrinkRect(b2, center, sides);            // draw outer border            paintSolid(outputDevice, bounds, outer, border, sides, currentSide);            // draw inner border            paintSolid(outputDevice, b2, inner, border, sides, currentSide);            return;        }        int thickness = 0;        if (currentSide == BorderPainter.TOP) thickness = (int) border.top();        if (currentSide == BorderPainter.BOTTOM) thickness = (int) border.bottom();        if (currentSide == BorderPainter.RIGHT) thickness = (int) border.right();        if (currentSide == BorderPainter.LEFT) thickness = (int) border.left();        if (borderSideStyle == IdentValue.DASHED) {            outputDevice.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);            paintPatternedRect(outputDevice, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset);            outputDevice.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);        }        if (borderSideStyle == IdentValue.DOTTED) {            // turn off anti-aliasing or the dots will be all blurry            outputDevice.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);            paintPatternedRect(outputDevice, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset);            outputDevice.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);        }    }