From 9c4086872796f7dbdb5d53e4b48c9298eb76b7b1 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 5 Jan 2018 16:00:33 +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?=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=3D>=E5=AD=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD1=3D>=E8=AE=BE=E5=AE=9A=E7=94=BB=E5=B8=83=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=B9=B6=E9=94=81=E5=AE=9A=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 3 +- .../design/locale/designer_ja_JP.properties | 1 + .../design/locale/designer_ko_KR.properties | 1 + .../design/locale/designer_zh_CN.properties | 3 +- .../design/locale/designer_zh_TW.properties | 1 + .../form/mobile/FormMobileAttrPane.java | 16 +++----- .../FormMobileTemplateSettingsPane.java | 11 ++++-- .../src/com/fr/design/mainframe/FormArea.java | 37 ++++++++++++++++++- .../src/com/fr/design/mainframe/JForm.java | 2 +- 10 files changed, 57 insertions(+), 19 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3efb952ca0..5265515263 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2176,3 +2176,4 @@ FR-Designer_Mobile_Screen_Match_Desc=4.7 inch screen phone: fit FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7 inch or more mobile phones: zooming in FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7 inch mobile phone: zooming out FR-Designer_Adaptive_Property_Auto_Match_Desc=In order to improve the end template effect of the mobile phone, when using the reserved layout function, the component scaling logic under the adaptive layout is set as "lateral adaptive" +FR-Designer_Template_Settings=Template Settings diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 8093b6e4ea..cef5d259c6 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2174,4 +2174,5 @@ FR-Designer_Canvas_Size_Lock_Desc=The size of the canvas is 375*560, the width i FR-Designer_Mobile_Screen_Match_Desc=4.7 inch screen phone: fit FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7 inch or more mobile phones: zooming in FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7 inch mobile phone: zooming out -FR-Designer_Adaptive_Property_Auto_Match_Desc=In order to improve the end template effect of the mobile phone, when using the reserved layout function, the component scaling logic under the adaptive layout is set as "lateral adaptive" \ No newline at end of file +FR-Designer_Adaptive_Property_Auto_Match_Desc=In order to improve the end template effect of the mobile phone, when using the reserved layout function, the component scaling logic under the adaptive layout is set as "lateral adaptive" +FR-Designer_Template_Settings=Template Settings \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index ee834b755b..2143be3f7a 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -2173,3 +2173,4 @@ FR-Designer_Open_Adaptive_Property_Auto_Match= FR-Designer_Mobile_Screen_Zoom_In= FR-Designer_Mobile_Screen_Zoom_Out= FR-Designer_Adaptive_Property_Auto_Match_Desc= +FR-Designer_Template_Settings= diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 9130aa4e5a..6f81086304 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -2175,3 +2175,4 @@ FR-Designer_Mobile_Screen_Zoom_In= FR-Designer_Mobile_Screen_Zoom_Out= FR-Designer_Mobile_Screen_Zoom_Out_Desc= FR-Designer_Adaptive_Property_Auto_Match_Desc= +FR-Designer_Template_Settings= diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 987929be28..5727fd3102 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -2175,4 +2175,5 @@ FR-Designer_Canvas_Size_Lock_Desc=\u753B\u5E03\u5927\u5C0F375*560\uFF0C\u5BBD\u5 FR-Designer_Mobile_Screen_Match_Desc=4.7\u5BF8\u5C4F\u5E55\u624B\u673A\uFF1A\u9002\u914D FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7\u5BF8\u4EE5\u4E0A\u624B\u673A\uFF1A\u653E\u5927 FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7\u5BF8\u4EE5\u4E0B\u624B\u673A\uFF1A\u538B\u7F29 -FR-Designer_Adaptive_Property_Auto_Match_Desc=\u4E3A\u63D0\u5347\u624B\u673A\u7AEF\u6A21\u7248\u6548\u679C\uFF0C\u5728\u4F7F\u7528\u4FDD\u7559\u5E03\u5C40\u529F\u80FD\u65F6\uFF0C\u8BBE\u7F6E\u81EA\u9002\u5E94\u5E03\u5C40\u65B9\u5F0F\u4E0B\u7684\u7EC4\u4EF6\u7F29\u653E\u903B\u8F91\u4E3A"\u6A2A\u5411\u81EA\u9002\u5E94" \ No newline at end of file +FR-Designer_Adaptive_Property_Auto_Match_Desc=\u4E3A\u63D0\u5347\u624B\u673A\u7AEF\u6A21\u7248\u6548\u679C\uFF0C\u5728\u4F7F\u7528\u4FDD\u7559\u5E03\u5C40\u529F\u80FD\u65F6\uFF0C\u8BBE\u7F6E\u81EA\u9002\u5E94\u5E03\u5C40\u65B9\u5F0F\u4E0B\u7684\u7EC4\u4EF6\u7F29\u653E\u903B\u8F91\u4E3A"\u6A2A\u5411\u81EA\u9002\u5E94" +FR-Designer_Template_Settings=\u6A21\u7248\u8BBE\u7F6E \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 59dee09532..e9a8b643ad 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2175,3 +2175,4 @@ FR-Designer_Mobile_Screen_Match_Desc=4.7\u5BF8\u8367\u5E55\u624B\u6A5F\uFF1A\u90 FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7\u5BF8\u4EE5\u4E0A\u624B\u6A5F\uFF1A\u653E\u5927 FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7\u5BF8\u4EE5\u4E0B\u624B\u6A5F\uFF1A\u58D3\u7E2E FR-Designer_Adaptive_Property_Auto_Match_Desc=\u70BA\u63D0\u5347\u624B\u6A5F\u7AEF\u6A21\u7248\u6548\u679C\uFF0C\u5728\u4F7F\u7528\u4FDD\u7559\u4F48\u5C40\u529F\u80FD\u6642\uFF0C\u8A2D\u5B9A\u81EA\u6211\u8ABF\u6574\u4F48\u5C40\u7BA1\u9053\u4E0B\u7684\u7D44\u4EF6\u7E2E\u653E\u908F\u8F2F\u70BA\u201C\u6A6B\u5411\u81EA\u6211\u8ABF\u6574\u201D +FR-Designer_Template_Settings=\u6A21\u7248\u8A2D\u5B9A diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java index b8d1bbb3a0..a2650d8069 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java @@ -18,29 +18,21 @@ public class FormMobileAttrPane extends BasicBeanPane{ // 模版设置面板 private FormMobileTemplateSettingsPane formMobileTemplateSettingsPane; - static final int PADDINGHEIGHT = 10; + private static final int PADDING = 10; public FormMobileAttrPane() { this.initComponents(); } - //现在只有两个panel,填不满自适应对话框,只能为工具栏Panel和h5解析方式panel分别包裹上一层Panel再计算高度,不然会自动 - //拉长两个Panel的高度去填满整个对话框。 private void initComponents() { -// JPanel jPanel1 = new JPanel(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); -// jPanel1.setLayout(FRGUIPaneFactory.createBorderLayout()); -// jPanel1.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); JPanel mobileToolBarPaneWrapper = new JPanel(new BorderLayout()); - mobileToolBarPaneWrapper.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); + mobileToolBarPaneWrapper.setBorder(BorderFactory.createEmptyBorder(PADDING, PADDING, 0, PADDING)); this.mobileToolBarPane = new MobileToolBarPane(); mobileToolBarPaneWrapper.add(this.mobileToolBarPane, BorderLayout.NORTH); - //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 -// jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); -// jPanel1.add("North", this.mobileToolBarPane); JPanel formMobileTemplateSettingsPaneWrapper = new JPanel(new BorderLayout()); - formMobileTemplateSettingsPaneWrapper.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + formMobileTemplateSettingsPaneWrapper.setBorder(BorderFactory.createEmptyBorder(PADDING, PADDING, PADDING, PADDING)); this.formMobileTemplateSettingsPane = new FormMobileTemplateSettingsPane(); formMobileTemplateSettingsPaneWrapper.add(this.formMobileTemplateSettingsPane, BorderLayout.NORTH); @@ -54,12 +46,14 @@ public class FormMobileAttrPane extends BasicBeanPane{ ob = new FormMobileAttr(); } this.mobileToolBarPane.populateBean(ob); + this.formMobileTemplateSettingsPane.populateBean(ob); } @Override public FormMobileAttr updateBean() { FormMobileAttr formMobileAttr = new FormMobileAttr(); this.mobileToolBarPane.updateBean(formMobileAttr); + this.formMobileTemplateSettingsPane.updateBean(formMobileAttr); return formMobileAttr; } diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java index 13e74c0873..399f217f4b 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java @@ -133,6 +133,8 @@ public class FormMobileTemplateSettingsPane extends BasicBeanPane 0.0000001) { + widthPane.setValue(MOBILE_ONLY_WIDTH); + changeWidthPaneValue(MOBILE_ONLY_WIDTH); + heightPane.setValue(MOBILE_ONLY_HEIGHT); + changeHeightPaneValue(MOBILE_ONLY_HEIGHT); + widthPane.setEnabled(false); + } else if (!formMobileAttr.isMobileOnly() && !widthPane.isEnabled()) { + widthPane.setEnabled(true); + } + } + }); } MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index a754fdacf7..707356c0c4 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -236,7 +236,7 @@ public class JForm extends JTemplate implements BaseJForm { centerPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, new Color(85, 85, 85))); formDesign = new FormDesigner(this.getTarget(), new TabChangeAction(BaseJForm.ELEMENTCASE_TAB, this)); WidgetToolBarPane.getInstance(formDesign); - FormArea area = new FormArea(formDesign); + FormArea area = new FormArea(formDesign, this); JPanel areaWrapper = new JPanel(new BorderLayout()); areaWrapper.add(area, BorderLayout.CENTER); areaWrapper.setBackground(Color.white);