From 31777798a4d35d7709982c81d287132d8395d9bb Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 15 Jul 2021 15:54:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-55212=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-tab=E9=87=8C=E7=9A=84=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E5=92=8C=E6=8A=A5=E8=A1=A8=E5=9D=97=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=82=B9=E5=87=BB=E5=8E=9F=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=E5=92=8C=E5=8F=8C=E5=87=BB?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E7=9A=84=E7=BC=96=E8=BE=91=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8F=AF=E4=BB=A5=E8=A7=A6=E5=8F=91=20&&=20REPORT-552?= =?UTF-8?q?28=20=E3=80=90=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E5=88=86?= =?UTF-8?q?=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8=20?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=85=B6=E4=BB=96=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E4=BC=9A=E7=95=99=E5=9C=A8=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E9=A1=B5=E9=9D=A2=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EditingMouseListener.java | 4 ++- .../java/com/fr/design/mainframe/JForm.java | 27 +++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 1c14d739aa..b393d29b06 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -624,6 +624,8 @@ public class EditingMouseListener extends MouseInputAdapter { creator = processTopLayoutMouseClick(creator); if (creator != null) { + // tab块处于未编辑状态 + boolean uneditedTab = designer.getCursor().getType() != Cursor.HAND_CURSOR && creator.acceptType(XWCardMainBorderLayout.class) && !((XWCardMainBorderLayout) creator).isEditable(); // 点击不在tab块的button中 boolean clickedNonCardButton = !creator.acceptType(XCardAddButton.class, XCardSwitchButton.class); if (clickedNonCardButton && e.getClickCount() == 1 && designer.getCursor().getType() != Cursor.HAND_CURSOR) { @@ -641,7 +643,7 @@ public class EditingMouseListener extends MouseInputAdapter { } }); - } else if (clickedNonCardButton && responseTabLayout(oldCreator, e)) { + } else if (clickedNonCardButton && uneditedTab && responseTabLayout(oldCreator, e)) { // do nothing } else { creator.respondClick(this, e); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 08969c91a0..bc32c5fd9e 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -47,8 +47,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; -import com.fr.design.mainframe.share.collect.ComponentCollector; -import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.mainframe.template.info.JFormProcessInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; @@ -79,10 +77,8 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WLayout; import com.fr.general.ComparatorUtils; -import com.fr.json.JSONArray; import com.fr.log.FineLoggerFactory; import com.fr.page.PaperSettingProvider; -import com.fr.plugin.observer.PluginEventListener; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.report.worksheet.FormElementCase; @@ -93,6 +89,8 @@ import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; import com.fr.web.controller.ViewRequestConstants; +import java.awt.event.ContainerAdapter; +import java.awt.event.ContainerEvent; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JComponent; @@ -135,18 +133,36 @@ public class JForm extends JTemplate implements BaseJForm implements BaseJForm Date: Thu, 15 Jul 2021 15:55:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-55228=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E6=89=93=E5=BC=80=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20=E5=B7=A5=E5=85=B7=E6=A0=8F=E4=BC=9A?= =?UTF-8?q?=E7=95=99=E5=9C=A8=E8=AE=BE=E8=AE=A1=E9=A1=B5=E9=9D=A2=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/creator/XCreator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 0983dded9b..c5b4dda506 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -830,4 +830,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo } } + public void hidePopup() { + if (popup != null) { + popup.setVisible(false); + } + } + }