From 18ff7bf04990489771d461a28c3bfeb6d87dda87 Mon Sep 17 00:00:00 2001 From: Hans Date: Thu, 22 Oct 2020 12:32:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?MOBILE-29820=20=E7=A7=BB=E5=8A=A8=E7=AB=AFt?= =?UTF-8?q?ab=E6=A0=B7=E5=BC=8F=E9=A1=B5=E9=9D=A2=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=20=E5=AF=B9=E9=BD=90=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BF=20=E6=96=B0=E5=A2=9Escroll=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/TabMobileWidgetDefinePane.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java index ee7a28c295..b6a6b7eaf0 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java @@ -4,6 +4,8 @@ import com.fr.base.iofile.attr.FormTabPaddingAttrMark; import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; +import com.fr.design.dialog.AttrScrollPane; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.form.util.FormDesignerUtils; import com.fr.design.gui.frpane.AttributeChangeListener; @@ -15,7 +17,6 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.accessibles.AccessibleTemplateStyleEditor; import com.fr.design.mainframe.widget.accessibles.MobileTemplateStylePane; -import com.fr.design.widget.ui.designer.mobile.component.MobileAdvanceInnerPane; import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane; import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane; import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane; @@ -24,6 +25,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.cardtag.mobile.MobileTemplateStyle; import javax.swing.JPanel; +import javax.swing.BorderFactory; import java.awt.BorderLayout; import java.awt.Component; @@ -36,9 +38,20 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { private MobileComponentLayoutIntervalPane intervalPane; private MobileBookMarkUsePane mobileBookMarkUsePane; private MobileTabCommonSettingPane mobileTabCommonSettingPane; + private JPanel contentJPanel; + private BasicScrollPane scrollPane; public TabMobileWidgetDefinePane(XCreator xCreator) { this.xCreator = xCreator; + contentJPanel = new JPanel(); + scrollPane = new AttrScrollPane() { + @Override + protected JPanel createContentPane() { + return contentJPanel; + } + }; + scrollPane.setBorder(null); + } private void bindListeners2Widgets() { @@ -61,6 +74,7 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { @Override public void initPropertyGroups(Object source) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template")); templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData())); @@ -89,7 +103,8 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { //高级 holder.add(advancePane, BorderLayout.CENTER); - this.add(holder, BorderLayout.NORTH); + contentJPanel.add(holder, BorderLayout.CENTER); + this.add(scrollPane, BorderLayout.CENTER); } @Override From 65a78e486fbcf0fe5c354d3ac64dd5a019a454a9 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 23 Oct 2020 10:08:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?MOBILE-29820=20=E7=A7=BB=E5=8A=A8=E7=AB=AFt?= =?UTF-8?q?ab=E6=A0=B7=E5=BC=8F=E9=A1=B5=E9=9D=A2=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=20=E6=B7=BB=E5=8A=A0=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=20=E6=9C=80=E5=A4=96=E5=B1=82=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E4=BD=BF=E7=94=A8JPanel=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E7=BA=A6=E6=9D=9F=E5=AF=BC=E8=87=B4=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=BC=82=E5=B8=B8=EF=BC=8C=E9=9C=80=E8=A6=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/TabMobileWidgetDefinePane.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java index b6a6b7eaf0..af591abddd 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java @@ -24,6 +24,7 @@ import com.fr.design.widget.ui.designer.mobile.component.MobileTabCommonSettingP import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.cardtag.mobile.MobileTemplateStyle; +import java.awt.Dimension; import javax.swing.JPanel; import javax.swing.BorderFactory; import java.awt.BorderLayout; @@ -40,10 +41,12 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { private MobileTabCommonSettingPane mobileTabCommonSettingPane; private JPanel contentJPanel; private BasicScrollPane scrollPane; + private JPanel holder; + private Dimension dimension; public TabMobileWidgetDefinePane(XCreator xCreator) { this.xCreator = xCreator; - contentJPanel = new JPanel(); + contentJPanel = FRGUIPaneFactory.createCenterFlowZeroGapBorderPane(); scrollPane = new AttrScrollPane() { @Override protected JPanel createContentPane() { @@ -79,7 +82,18 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template")); templateStyleEditor = new AccessibleTemplateStyleEditor(new MobileTemplateStylePane((WCardTagLayout) xCreator.toData())); JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE); - JPanel holder = FRGUIPaneFactory.createBorderLayout_S_Pane(); + holder = new JPanel(new BorderLayout()) { + @Override + public Dimension getPreferredSize() { + if (dimension == null) { + return super.getPreferredSize(); + } else { + Dimension defaultDimension = super.getPreferredSize(); + defaultDimension.width = dimension.width; + return defaultDimension; + } + } + }; holder.add(jPanel, BorderLayout.NORTH); JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); if (!shouldHidePadding(designer)) { @@ -111,6 +125,9 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane { public void populate(FormDesigner designer) { WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData(); MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle(); + if (dimension == null) { + dimension = holder.getPreferredSize(); + } templateStyleEditor.setValue(mobileTemplateStyle); // 数据 populate 完成后,再设置监听 this.bindListeners2Widgets(); From a80b9cbbb7b714f41a28d8205adeb3219220f748 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 21 Oct 2020 14:52:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?MOBILE-29857=E3=80=90RN=E3=80=91=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E4=B8=8A=E5=9C=86=E7=82=B9=E6=8C=87=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E9=80=89=E4=B8=AD=E5=A1=AB=E5=85=85=E8=89=B2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=90=8E=E6=B2=A1=E6=9C=89=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MobileTabCommonSettingPane.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java index 4670456aec..def9cf795a 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java @@ -35,6 +35,7 @@ public class MobileTabCommonSettingPane extends BasicPane { private ModeButtonGroup buttonGroup; private NewColorSelectBox initDotColorBox; private NewColorSelectBox selectDotColorBox; + private boolean isPopulate; public MobileTabCommonSettingPane(boolean isTopComponent) { initComponent(isTopComponent); @@ -89,23 +90,27 @@ public class MobileTabCommonSettingPane extends BasicPane { initDotColorBox = new NewColorSelectBox(0){ @Override protected void iniListener() { - } - - @Override - public void mouseClicked(MouseEvent e) { - super.mouseClicked(e); - this.attributeChange(); + this.addSelectChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (!isPopulate) { + attributeChange(); + } + } + }); } }; selectDotColorBox = new NewColorSelectBox(0){ @Override protected void iniListener() { - } - - @Override - public void mouseClicked(MouseEvent e) { - super.mouseClicked(e); - this.attributeChange(); + this.addSelectChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (!isPopulate) { + attributeChange(); + } + } + }); } }; JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); @@ -189,7 +194,9 @@ public class MobileTabCommonSettingPane extends BasicPane { color = defaultColor; } if (color != colorBox.getSelectObject()) { + isPopulate = true; colorBox.setSelectObject(color); + isPopulate = false; } }