Browse Source

MOBILE-6262 FR9.0设计器提供手机端设计画布参考尺寸=>普通报表=>3 页面设置—纸张大小=>限制宽度范围

plough 7 years ago
parent
commit
8e77828513
  1. 17
      designer/src/com/fr/design/report/PageSetupPane.java

17
designer/src/com/fr/design/report/PageSetupPane.java

@ -428,6 +428,23 @@ public class PageSetupPane extends BasicPane {
setAndPopulate(isCustomed, unitType); setAndPopulate(isCustomed, unitType);
populateMargin(); populateMargin();
checkMobileSetting(report);
}
private void checkMobileSetting(Report report) {
if (report.getBook().getReportMobileAttr().isMobileCanvasSize()) {
// 当勾选移动端画布大小后,自定义选项不可修改;限制宽度范围
predefinedRadioButton.setEnabled(false);
predefinedComboBox.setEnabled(false);
double maxWidth;
if (unitType == Constants.UNIT_MM) { // 毫米
maxWidth = PaperSize.PAPERSIZE_MOBILE.getWidth().toMMValue4Scale2();
} else { // 英寸
maxWidth = PaperSize.PAPERSIZE_MOBILE.getWidth().toINCHValue4Scale3();
}
((SpinnerNumberModel)paperWidthSpinner.getModel()).setMaximum(maxWidth);
}
} }
private void unitSet(int unitType) { private void unitSet(int unitType) {

Loading…
Cancel
Save