|
|
@ -315,7 +315,7 @@ public class GridUI extends ComponentUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void iterateStart2End(Graphics2D g2d) { |
|
|
|
protected void iterateStart2End(Graphics2D g2d) { |
|
|
|
float tmpSize = 0, paperSumSize = 0, sumSize = 0; |
|
|
|
double tmpSize = 0, paperSumSize = 0, sumSize = 0; |
|
|
|
for (int i = 0; i <= endIndex; i++) { |
|
|
|
for (int i = 0; i <= endIndex; i++) { |
|
|
|
// denny: 开始
|
|
|
|
// denny: 开始
|
|
|
|
if (i == 0) { |
|
|
|
if (i == 0) { |
|
|
@ -323,7 +323,7 @@ public class GridUI extends ComponentUI { |
|
|
|
|
|
|
|
|
|
|
|
// denny: 增加从0到Grid左边被hide的列宽
|
|
|
|
// denny: 增加从0到Grid左边被hide的列宽
|
|
|
|
for (int k = 0; k < startIndex; k++) { |
|
|
|
for (int k = 0; k < startIndex; k++) { |
|
|
|
tmpSize = sizeList.get(k).toPixF(resolution); |
|
|
|
tmpSize = sizeList.get(k).toPixD(resolution); |
|
|
|
|
|
|
|
|
|
|
|
paperSumSize += tmpSize; |
|
|
|
paperSumSize += tmpSize; |
|
|
|
if (paperSumSize >= paperPaintSize) { |
|
|
|
if (paperSumSize >= paperPaintSize) { |
|
|
@ -333,7 +333,7 @@ public class GridUI extends ComponentUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// adjust height.
|
|
|
|
// adjust height.
|
|
|
|
tmpSize = sizeList.get(i).toPixF(resolution); |
|
|
|
tmpSize = sizeList.get(i).toPixD(resolution); |
|
|
|
paperSumSize += tmpSize; |
|
|
|
paperSumSize += tmpSize; |
|
|
|
|
|
|
|
|
|
|
|
if (showGridLine) {// paint line.
|
|
|
|
if (showGridLine) {// paint line.
|
|
|
@ -342,7 +342,7 @@ public class GridUI extends ComponentUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// paint paper margin line.
|
|
|
|
// paint paper margin line.
|
|
|
|
if (showPaginateLine && paperSumSize >= paperPaintSize) { |
|
|
|
if (showPaginateLine && (float)paperSumSize > (float) paperPaintSize) { |
|
|
|
paginateLineList.add(getPaginateLine2D((int) sumSize)); |
|
|
|
paginateLineList.add(getPaginateLine2D((int) sumSize)); |
|
|
|
paperSumSize = tmpSize; |
|
|
|
paperSumSize = tmpSize; |
|
|
|
} |
|
|
|
} |
|
|
@ -625,10 +625,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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|