From 6dbe6fa6ab99f93e9d109a6eba34944b9c4c82bd Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 21 Feb 2022 15:40:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-58833=20js=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascript/JSContentWithDescriptionPane.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index 469598a3f..8e8ef45b9 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -441,19 +441,21 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi Object value = helpDOCList.getSelectedValue(); if (value instanceof HelpDocument) { String url = ((HelpDocument) value).getDocumentUrl(); - try { - Desktop.getDesktop().browse(new URI(url)); - } catch (IOException ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); - } catch (URISyntaxException ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); - } + browse(url); } } } }); } + private void browse(String url){ + try { + Desktop.getDesktop().browse(new URI(url)); + } catch (IOException | URISyntaxException ex) { + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); + } + } + private void initHelpDOCListRender() { helpDOCList.setCellRenderer(new DefaultListCellRenderer() { @Override From 1f7420988ad4b8ba0359b647d1e48c666b780c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 21 Feb 2022 16:29:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-66947=20=E6=8B=96=E6=8B=BD=E6=8B=96?= =?UTF-8?q?=E5=87=BA=E5=8F=AF=E6=8B=96=E6=8B=BD=E5=8C=BA=E5=9F=9F=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=8F=8A=E6=97=B6?= =?UTF-8?q?=E6=B8=85=E7=90=86=E5=86=85=E5=AD=98=E9=87=8C=E6=AE=8B=E7=95=99?= =?UTF-8?q?=E7=9A=84=E4=B8=8A=E6=AC=A1dropTarget=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E6=B8=85=E7=90=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/FormCreatorDropTarget.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java index 62e256379..1c873417a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -87,6 +87,7 @@ public class FormCreatorDropTarget extends DropTarget { cancelPromptWidgetForbidEnter(); // 隐藏组件图标 designer.resetDraggingPosition(); + designer.clearDropTarget(); designer.setPainter(null); designer.repaint(); } From eb9039dd3bccf8ddb70af702849d4f80dbb9cbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 21 Feb 2022 16:50:34 +0800 Subject: [PATCH 3/4] REPORT-66947 --- .../java/com/fr/design/mainframe/FormCreatorDropTarget.java | 1 - .../src/main/java/com/fr/design/mainframe/FormDesigner.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java index 1c873417a..62e256379 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -87,7 +87,6 @@ public class FormCreatorDropTarget extends DropTarget { cancelPromptWidgetForbidEnter(); // 隐藏组件图标 designer.resetDraggingPosition(); - designer.clearDropTarget(); designer.setPainter(null); designer.repaint(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 2b43265f9..7837f8b00 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -1248,7 +1248,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection * @param currentDragEvent */ public void startDraggingNewWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) { - if (currentDragEvent == null || this.getDropTarget() != null) { + if (currentDragEvent == null) { return; } @@ -1270,7 +1270,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection * @param currentDragEvent */ public void startDraggingFormWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) { - if (currentDragEvent == null || this.getDropTarget() != null) { + if (currentDragEvent == null) { return; } backUpCreator(xCreator); From 6ddf7a3e6115907e1423b042fcd8b8da67b3aca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 21 Feb 2022 17:38:28 +0800 Subject: [PATCH 4/4] REPORT-66939 --- .../main/java/com/fr/design/mainframe/FormDesigner.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 7837f8b00..24ed004ff 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -1318,7 +1318,14 @@ public class FormDesigner extends TargetComponent implements TreeSelection DraggingModel model = this.draggingModel; MouseEvent dragEvent = model.getCurrentDragEvent(); XCreator hotspot = this.getComponentAt(dragEvent.getX(), dragEvent.getY()); - return XCreatorUtils.getHotspotContainer(hotspot); + XLayoutContainer container = XCreatorUtils.getHotspotContainer(hotspot); + XLayoutContainer topLayout = container.getTopLayout(); + // REPORT-66939 Tab比较特殊,它是又多个LayoutContainer组成,直接返回container会导致误判,需要先找到最上层topLayout,取其父layout才是正确结果 + if (topLayout != null && container != topLayout) { + return (XLayoutContainer) topLayout.getParent(); + } else { + return container; + } } /**