|
|
@ -300,6 +300,8 @@ public class GridUI extends ComponentUI { |
|
|
|
|
|
|
|
|
|
|
|
private int resolution; |
|
|
|
private int resolution; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final double THRESHOLD = 1.0E-4D; |
|
|
|
|
|
|
|
|
|
|
|
DrawLineHelper(int startIndex, int endIndex, boolean showGridLine, |
|
|
|
DrawLineHelper(int startIndex, int endIndex, boolean showGridLine, |
|
|
|
boolean showPaginateLine, DynamicUnitList sizeList, double paperPaintSize, |
|
|
|
boolean showPaginateLine, DynamicUnitList sizeList, double paperPaintSize, |
|
|
|
List paginateLineList, int resolution) { |
|
|
|
List paginateLineList, int resolution) { |
|
|
@ -342,7 +344,7 @@ public class GridUI extends ComponentUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// paint paper margin line.
|
|
|
|
// paint paper margin line.
|
|
|
|
if (showPaginateLine && paperSumSize >= paperPaintSize) { |
|
|
|
if (showPaginateLine && paperSumSize - paperPaintSize > THRESHOLD) { |
|
|
|
paginateLineList.add(getPaginateLine2D((int) sumSize)); |
|
|
|
paginateLineList.add(getPaginateLine2D((int) sumSize)); |
|
|
|
paperSumSize = tmpSize; |
|
|
|
paperSumSize = tmpSize; |
|
|
|
} |
|
|
|
} |
|
|
@ -625,10 +627,10 @@ public class GridUI extends ComponentUI { |
|
|
|
tmpLine2D = (Line2D) paginateLineList.get(j);// 直接强制转换,因为List中肯定都是Line2D型的
|
|
|
|
tmpLine2D = (Line2D) paginateLineList.get(j);// 直接强制转换,因为List中肯定都是Line2D型的
|
|
|
|
for (int k = j + 1; k < paginateLineList.size(); k++) { |
|
|
|
for (int k = j + 1; k < paginateLineList.size(); k++) { |
|
|
|
tmpLine2D2 = (Line2D) paginateLineList.get(k); |
|
|
|
tmpLine2D2 = (Line2D) paginateLineList.get(k); |
|
|
|
if (AssistUtils.equals(tmpLine2D2.getX1() ,tmpLine2D.getX1()) |
|
|
|
if (AssistUtils.equals(tmpLine2D2.getX1(), tmpLine2D.getX1()) |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getX2() , tmpLine2D.getX2()) |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getX2(), tmpLine2D.getX2()) |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getY1() , tmpLine2D.getY1()) |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getY1(), tmpLine2D.getY1()) |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getY2() , tmpLine2D.getY2())) { |
|
|
|
&& AssistUtils.equals(tmpLine2D2.getY2(), tmpLine2D.getY2())) { |
|
|
|
paginateLineList.remove(k); |
|
|
|
paginateLineList.remove(k); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|