From f338b528f3626ad2f06db601fd061047b56b296d Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 16 Jul 2021 17:30:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-55337=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-=E7=BB=84=E4=BB=B6=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E9=94=AE=E7=9B=98delete=E5=B0=B1=E5=88=A0=E4=B8=8D=E6=8E=89?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BA=86=EF=BC=9B=E6=B2=A1=E6=9C=89=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=B7=A5=E5=85=B7=E6=A0=8F=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E5=8F=AF=E4=BB=A5delete=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E5=88=A0=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/ui/SelectedPopupDialog.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java index bceba44d3..c5f94d70e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java +++ b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java @@ -24,6 +24,7 @@ public class SelectedPopupDialog extends JDialog { super(DesignerContext.getDesignerFrame()); this.setUndecorated(true); this.setModal(false); + this.setFocusableWindowState(false); controlPanel = new PopupControlPanel(creator, designer); this.getContentPane().add(controlPanel); this.setSize(controlPanel.getDefaultDimension()); From de8c84681a30810f0e422da3216af708cc02d9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 16 Jul 2021 17:35:05 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-55339=20=E6=9D=83=E9=99=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=EF=BC=8C=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=EF=BC=8C=E5=9C=A8=E5=88=87=E6=8D=A2=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E7=BC=96=E8=BE=91=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=9C=AA=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/poly/creator/ECBlockPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java index 28b09fef7..bbf91f640 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java @@ -18,6 +18,7 @@ import com.fr.design.actions.edit.HyperlinkAction; import com.fr.design.actions.edit.merge.MergeCellAction; import com.fr.design.actions.edit.merge.UnmergeCellAction; import com.fr.design.actions.utils.DeprecatedActionManager; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; @@ -55,10 +56,10 @@ public class ECBlockPane extends PolyElementCasePane { @Override public void selectionChanged(SelectionEvent e) { - if (!isEditable()) { + if (!isEditable() && !DesignModeContext.isAuthorityEditing()) { return; } - if (DesignerMode.isAuthorityEditing()) { + if (DesignModeContext.isAuthorityEditing()) { if (designer.getSelection().getEditingElementCasePane() == null) { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit()); From 4c2f04c16d55e795386939cef9a0589238c33f32 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 19 Jul 2021 11:16:02 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-55227=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-=E7=BB=84=E4=BB=B6=E6=82=AC=E5=81=9C1s?= =?UTF-8?q?=E5=90=8E=E5=88=A4=E6=96=AD=E7=BB=84=E4=BB=B6=E7=A7=BB=E5=85=A5?= =?UTF-8?q?tab=E5=86=85=E9=83=A8=EF=BC=8C=E8=BF=99=E6=97=B6=E5=80=99?= =?UTF-8?q?=E7=9A=84tab=E5=9D=97=E6=B2=A1=E6=9C=89=E9=A2=84=E6=9C=9F?= =?UTF-8?q?=E7=9A=84=E8=93=9D=E8=89=B2=E9=98=B4=E5=BD=B1=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cardlayout/XWCardMainBorderLayout.java | 10 ++++++++ .../mainframe/FormCreatorDropTarget.java | 4 ++++ .../fr/design/mainframe/FormDesignerUI.java | 23 ++++++++++++++++++- .../com/fr/design/mainframe/TabDragInner.java | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index 992fa00cc..a762c59f4 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.creator.cardlayout; +import com.fr.base.GraphHelper; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.LayoutAdapter; @@ -32,6 +33,8 @@ import com.fr.general.ComparatorUtils; import com.fr.general.act.BorderPacker; +import com.fr.stable.Constants; +import java.awt.Color; import java.awt.Component; import java.awt.Cursor; import java.awt.Dimension; @@ -50,6 +53,9 @@ import java.util.List; */ public class XWCardMainBorderLayout extends XWBorderLayout { + private static final int BORDER_WIDTH = 4; + private static final Color OUTER_BORDER_COLOR = new Color(65, 155, 249, 30); + private static final int CENTER = 1; private static final int NORTH = 0; private static final int TITLE_STYLE = 2; @@ -345,6 +351,10 @@ public class XWCardMainBorderLayout extends XWBorderLayout { @Override public void paintBorder(Graphics g, Rectangle bounds){ + if (isDragInAble()) { + g.setColor(OUTER_BORDER_COLOR); + GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 3, bounds.height + BORDER_WIDTH + 3), Constants.LINE_LARGE); + } if (!isMouseEnter) { super.paintBorder(g, bounds); } 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 2fdbb5a29..11fa1dc3b 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 @@ -335,4 +335,8 @@ public class FormCreatorDropTarget extends DropTarget { } } } + + public TabDragInner getTabDragInner() { + return this.tabDragInner; + } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java index 893297081..c48c88101 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java @@ -13,7 +13,7 @@ import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; -import com.fr.design.designer.creator.XWTitleLayout; +import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.utils.ComponentUtils; @@ -24,6 +24,7 @@ import com.fr.report.core.ReportUtils; import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; +import java.awt.dnd.DropTarget; import javax.swing.*; import javax.swing.plaf.ComponentUI; import java.awt.AlphaComposite; @@ -94,6 +95,7 @@ public class FormDesignerUI extends ComponentUI { } paintBorder(g); paintSelection(g); + paintDropBorderShadow(g); if (DesignerMode.isAuthorityEditing()) { paintAuthorityDetails(g, designer.getRootComponent()); @@ -330,6 +332,25 @@ public class FormDesignerUI extends ComponentUI { } } + /** + * 绘制可拖拽进tab块之前的阴影 + * + * @param g + */ + private void paintDropBorderShadow(Graphics g) { + DropTarget dropTarget = designer.getDropTarget(); + if (dropTarget instanceof FormCreatorDropTarget) { + FormCreatorDropTarget target = (FormCreatorDropTarget) dropTarget; + XLayoutContainer layoutContainer = target.getTabDragInner().getBelowXLayoutContainer(); + if (layoutContainer != null && layoutContainer.acceptType(XWCardMainBorderLayout.class)) { + Rectangle creatorBounds = ComponentUtils.getRelativeBounds(layoutContainer); + creatorBounds.x -= designer.getHorizontalScaleValue(); + creatorBounds.y -= designer.getVerticalScaleValue(); + layoutContainer.paintBorder(g, creatorBounds); + } + } + } + /** * 初始为自适应时,处理选中的范围 * @param bound diff --git a/designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java b/designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java index ce98d9d55..fb6608c43 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java @@ -71,6 +71,7 @@ public class TabDragInner { ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, belowXLayoutContainer); if (adapter != null) { editingMouseListener.startEditing(belowXLayoutContainer, adapter.getDesignerEditor(), adapter); + belowXLayoutContainer.setDragInAble(false); } } } From 236228b2fa30aca4d4adb66f96d5c0a6dac0d2dd Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 19 Jul 2021 11:19:07 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-55227=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-=E7=BB=84=E4=BB=B6=E6=82=AC=E5=81=9C1s?= =?UTF-8?q?=E5=90=8E=E5=88=A4=E6=96=AD=E7=BB=84=E4=BB=B6=E7=A7=BB=E5=85=A5?= =?UTF-8?q?tab=E5=86=85=E9=83=A8=EF=BC=8C=E8=BF=99=E6=97=B6=E5=80=99?= =?UTF-8?q?=E7=9A=84tab=E5=9D=97=E6=B2=A1=E6=9C=89=E9=A2=84=E6=9C=9F?= =?UTF-8?q?=E7=9A=84=E8=93=9D=E8=89=B2=E9=98=B4=E5=BD=B1=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardMainBorderLayout.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index a762c59f4..22698ef5b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -352,8 +352,10 @@ public class XWCardMainBorderLayout extends XWBorderLayout { @Override public void paintBorder(Graphics g, Rectangle bounds){ if (isDragInAble()) { + Color oldColor = g.getColor(); g.setColor(OUTER_BORDER_COLOR); GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 3, bounds.height + BORDER_WIDTH + 3), Constants.LINE_LARGE); + g.setColor(oldColor); } if (!isMouseEnter) { super.paintBorder(g, bounds); From f902d06d5fa7b9e6720e6e49b097689e4d5415bd Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 14 Jul 2021 13:43:44 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-54374=20=E6=8B=96=E6=8B=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9tab=E9=87=8C=E7=9A=84=E7=BB=9D=E5=AF=B9=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E5=9D=97=E9=AB=98=E5=BA=A6=EF=BC=8C=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E5=9D=97=E9=94=99=E4=B9=B1=20=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E8=AE=BE=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=EF=BC=8C=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=9D=97=E5=86=85=E9=83=A8=E7=BB=84=E4=BB=B6=E4=BD=8D=E7=A7=BB?= =?UTF-8?q?=E6=88=90=E7=94=BB=E5=B8=83=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/XWFitLayout.java | 45 +++++++++++++------ .../fr/design/mainframe/FormSelection.java | 4 +- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java index 896cbe37c..cd0919d59 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java @@ -758,6 +758,11 @@ public class XWFitLayout extends XLayoutContainer { int[] veris = getVeris(true); int containerWidth = 0; int containerHeight = 0; + + PaddingMargin margin = toData().getMargin(); + int maxW = this.getWidth() - margin.getRight(); + int maxH = this.getHeight() - margin.getBottom(); + for (int index=0, n=this.getComponentCount(); index i) { + // 这里处理绝对画布块 仅局限于选中多个组件且其中包含了绝对画布块的情况 + boolean accept = creator.acceptType(XWAbsoluteLayout.class) && recs.size() > i && selection.size() > 1; + if (accept) { Rectangle rectangle = recs.get(i); check4ParaPane(rectangle); creator.setBackupBound(rectangle);