Browse Source

REPORT-32520 修改代码规范

bugfix/10.0
Yuan.Wang 4 years ago
parent
commit
1f3781c344
  1. 12
      designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java

12
designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java

@ -777,11 +777,11 @@ public class PageSetupPane extends BasicPane {
// 纵向的长度 // 纵向的长度
String h_str = "" + paper_height; String h_str = "" + paper_height;
//使用科学计数法显示长度的时候,限制纵向显示长度为9位 //使用科学计数法显示长度的时候,限制纵向显示长度为9位
if (h_str.contains(E)){ if (h_str.contains(E)) {
String str1=h_str.substring(h_str.indexOf(E)); String str1 = h_str.substring(h_str.indexOf(E));
String str2=h_str.substring(0,9-str1.length()); String str2 = h_str.substring(0, 9 - str1.length());
h_str = str2+str1; h_str = str2 + str1;
}else if(h_str.indexOf(CoreConstants.DOT) > 0) { } else if (h_str.indexOf(CoreConstants.DOT) > 0) {
h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2); h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2);
} }
int h_length = fm.stringWidth(h_str); int h_length = fm.stringWidth(h_str);
@ -790,7 +790,7 @@ public class PageSetupPane extends BasicPane {
double startX = (pane_width - paint_width) / 2; double startX = (pane_width - paint_width) / 2;
double startY = (pane_height - paint_height) / 2; double startY = (pane_height - paint_height) / 2;
g2d.translate(startX, startY); g2d.translate(startX, startY);
g2d = getG2d(paint_width, paint_height,g2d,w_str,h_str,w_length,h_length); g2d = getG2d(paint_width, paint_height, g2d, w_str, h_str, w_length, h_length);
if (paper_orientation == ReportConstants.PORTRAIT) { if (paper_orientation == ReportConstants.PORTRAIT) {
g2d.drawImage(img, (int) ((paint_width - img.getWidth(null)) / 2), g2d.drawImage(img, (int) ((paint_width - img.getWidth(null)) / 2),
(int) ((paint_height - img.getHeight(null)) / 2), null); (int) ((paint_height - img.getHeight(null)) / 2), null);

Loading…
Cancel
Save