From 8e778285138f326192217f4f0f385f41df51fa69 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 8 Jan 2018 17:35:44 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-6262=20FR9.0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E6=89=8B=E6=9C=BA=E7=AB=AF=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E5=8F=82=E8=80=83=E5=B0=BA=E5=AF=B8=3D>?= =?UTF-8?q?=E6=99=AE=E9=80=9A=E6=8A=A5=E8=A1=A8=3D>3=20=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E2=80=94=E7=BA=B8=E5=BC=A0=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=3D>=E9=99=90=E5=88=B6=E5=AE=BD=E5=BA=A6=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/report/PageSetupPane.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/designer/src/com/fr/design/report/PageSetupPane.java b/designer/src/com/fr/design/report/PageSetupPane.java index 9e1ac363af..93460b7cc9 100644 --- a/designer/src/com/fr/design/report/PageSetupPane.java +++ b/designer/src/com/fr/design/report/PageSetupPane.java @@ -428,6 +428,23 @@ public class PageSetupPane extends BasicPane { setAndPopulate(isCustomed, unitType); 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) {