|
|
@ -503,6 +503,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private int ninePointBottom = -1; |
|
|
|
private int ninePointBottom = -1; |
|
|
|
|
|
|
|
|
|
|
|
private static final int MIN_NINE_POINT = 0; |
|
|
|
private static final int MIN_NINE_POINT = 0; |
|
|
|
|
|
|
|
private static final int MIN_GAP_PARALLEL_LINES = 1; |
|
|
|
|
|
|
|
|
|
|
|
private int imgWidth; |
|
|
|
private int imgWidth; |
|
|
|
private int imgHeight; |
|
|
|
private int imgHeight; |
|
|
@ -773,8 +774,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private void onNinePointTopChanged(int value) { |
|
|
|
private void onNinePointTopChanged(int value) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
} else if (value >= imgHeight - ninePointBottom) { |
|
|
|
} else if (value >= imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES) { |
|
|
|
value = imgHeight - ninePointBottom - MIN_NINE_POINT; |
|
|
|
value = imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES; |
|
|
|
} |
|
|
|
} |
|
|
|
this.ninePointTop = value; |
|
|
|
this.ninePointTop = value; |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
@ -783,8 +784,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private void onNinePointBottomChanged(int value) { |
|
|
|
private void onNinePointBottomChanged(int value) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
} else if (value >= imgHeight - ninePointTop) { |
|
|
|
} else if (value >= imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES) { |
|
|
|
value = imgHeight - ninePointTop - MIN_NINE_POINT; |
|
|
|
value = imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES; |
|
|
|
} |
|
|
|
} |
|
|
|
this.ninePointBottom = value; |
|
|
|
this.ninePointBottom = value; |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
@ -793,8 +794,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private void onNinePointLeftChanged(int value) { |
|
|
|
private void onNinePointLeftChanged(int value) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
} else if (value >= imgWidth - ninePointRight) { |
|
|
|
} else if (value >= imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES) { |
|
|
|
value = imgWidth - ninePointRight - MIN_NINE_POINT; |
|
|
|
value = imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES; |
|
|
|
} |
|
|
|
} |
|
|
|
this.ninePointLeft = value; |
|
|
|
this.ninePointLeft = value; |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
@ -803,8 +804,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private void onNinePointRightChanged(int value) { |
|
|
|
private void onNinePointRightChanged(int value) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
if (value < MIN_NINE_POINT) { |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
value = MIN_NINE_POINT; |
|
|
|
} else if (value >= imgWidth - ninePointLeft) { |
|
|
|
} else if (value >= imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES) { |
|
|
|
value = imgWidth - ninePointLeft - MIN_NINE_POINT; |
|
|
|
value = imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES; |
|
|
|
} |
|
|
|
} |
|
|
|
this.ninePointRight = value; |
|
|
|
this.ninePointRight = value; |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
|