|
|
|
@ -494,28 +494,33 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
|
|
|
|
|
int scaleRight = (int) (ninePointRight * scale); |
|
|
|
|
int scaleBottom = (int) (ninePointBottom * scale); |
|
|
|
|
|
|
|
|
|
double topYInPane = scaleImgY + scaleTop; |
|
|
|
|
double bottomYInPane = scaleImgY + scaleImgHeight - scaleBottom; |
|
|
|
|
double leftXInPane = scaleImgX + scaleLeft; |
|
|
|
|
double rightXInPane = scaleImgX + scaleImgWidth - scaleRight; |
|
|
|
|
|
|
|
|
|
g2d.setColor(PATCH_COLOR); |
|
|
|
|
// draw horizontal patch
|
|
|
|
|
GraphDrawHelper.fillRect(g2d, 0, scaleImgY + scaleTop, getWidth(), scaleImgHeight - scaleTop - scaleBottom); |
|
|
|
|
GraphDrawHelper.fillRect(g2d, 0, topYInPane, getWidth(), scaleImgHeight - scaleTop - scaleBottom); |
|
|
|
|
// draw vertical patch
|
|
|
|
|
GraphDrawHelper.fillRect(g2d, scaleImgX + scaleLeft, 0,scaleImgWidth - scaleLeft - scaleRight, getHeight()); |
|
|
|
|
|
|
|
|
|
g2d.setColor(DIVIDER_COLOR); |
|
|
|
|
// draw top divider
|
|
|
|
|
GraphDrawHelper.drawLine(g2d, 0, scaleImgY + scaleTop, getWidth(), scaleImgY + scaleTop); |
|
|
|
|
GraphDrawHelper.drawLine(g2d, 0, topYInPane, getWidth(), topYInPane); |
|
|
|
|
// draw bottom divider
|
|
|
|
|
GraphDrawHelper.drawLine(g2d, 0, scaleImgY + scaleImgHeight - scaleBottom, getWidth(), scaleImgY + scaleImgHeight - scaleBottom); |
|
|
|
|
GraphDrawHelper.drawLine(g2d, 0, bottomYInPane, getWidth(), bottomYInPane); |
|
|
|
|
// draw left divider
|
|
|
|
|
GraphDrawHelper.drawLine(g2d, scaleImgX + scaleLeft, 0, scaleImgX + scaleLeft, getHeight()); |
|
|
|
|
GraphDrawHelper.drawLine(g2d, leftXInPane, 0, leftXInPane, getHeight()); |
|
|
|
|
// draw right divider
|
|
|
|
|
GraphDrawHelper.drawLine(g2d, scaleImgX + scaleImgWidth - scaleRight, 0, scaleImgX + scaleImgWidth - scaleRight, getHeight()); |
|
|
|
|
GraphDrawHelper.drawLine(g2d, rightXInPane, 0, rightXInPane, getHeight()); |
|
|
|
|
|
|
|
|
|
g2d.setColor(TEXT_COLOR); |
|
|
|
|
// draw nine point info
|
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointTop), scaleImgX + (scaleImgWidth + scaleLeft - scaleRight) / 2.0, (scaleImgY + scaleTop) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointBottom), scaleImgX + scaleLeft + (scaleImgWidth - scaleLeft - scaleRight) / 2.0, scaleImgY + scaleImgHeight - (scaleBottom - PADDING) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointLeft), (scaleImgX + scaleLeft) / 2.0, scaleImgY + (scaleImgHeight + scaleTop - scaleBottom) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointRight), scaleImgX + scaleImgWidth - (scaleRight - PADDING) / 2.0, scaleImgY + (scaleImgHeight + scaleTop - scaleBottom) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointTop), (leftXInPane + rightXInPane) / 2.0F, topYInPane / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointBottom), (leftXInPane + rightXInPane) / 2.0F, (bottomYInPane + getHeight()) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointLeft), leftXInPane / 2.0, (topYInPane + bottomYInPane) / 2.0); |
|
|
|
|
GraphDrawHelper.drawString(g2d, Integer.toString(ninePointRight), (rightXInPane + getWidth()) / 2.0, (topYInPane + bottomYInPane) / 2.0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|