Line line;
edge = top;
if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
line = new Line(null, section, edge.getThickness(),
null, true, new Point(rect.x, rect.y),
new Point(rect.x + rect.width, rect.y));
for (int i = 0; i < edge.getNumber(); ++i) {
ld.drawLine(line, arg);
line.getPoint(0).y += BORDER_LINE_SPACE_MULT;
line.getPoint(1).y += BORDER_LINE_SPACE_MULT;
}
}
edge = bottom;
if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
line = new Line(null, section, edge.getThickness(),
null, true, new Point(rect.x, rect.y + rect.height),
new Point(rect.x + rect.width, rect.y + rect.height));
for (int i = 0; i < edge.getNumber(); ++i) {
ld.drawLine(line, arg);
line.getPoint(0).y -= BORDER_LINE_SPACE_MULT;
line.getPoint(1).y -= BORDER_LINE_SPACE_MULT;
}
}
edge = left;
if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
line = new Line(null, section, edge.getThickness(),
null, true, new Point(rect.x, rect.y),
new Point(rect.x, rect.y + rect.height));
for (int i = 0; i < edge.getNumber(); ++i) {
ld.drawLine(line, arg);
line.getPoint(0).x += BORDER_LINE_SPACE_MULT;
line.getPoint(1).x += BORDER_LINE_SPACE_MULT;
}
}
edge = right;
if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
line = new Line(null, section, edge.getThickness(),
null, true, new Point(rect.x + rect.width, rect.y),
new Point(rect.x + rect.width, rect.y + rect.height));
for (int i = 0; i < edge.getNumber(); ++i) {
ld.drawLine(line, arg);
line.getPoint(0).x -= BORDER_LINE_SPACE_MULT;
line.getPoint(1).x -= BORDER_LINE_SPACE_MULT;
}