From 624748dd870d072aa7ac6ddc149684566a5af461 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 22 Jul 2021 12:42:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-55557=20=E5=BC=B9=E7=AA=97=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=85=B3=E9=97=AD=E5=A4=84=E7=90=86=EF=BC=88?= =?UTF-8?q?cpt&frm=E5=90=88=E5=B9=B6=E4=B8=8B=E5=A4=84=E7=90=86=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=89&&=20REPORT-55552=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=80=81=E7=BC=96=E8=BE=91=E5=92=8C=E5=B8=AE=E5=8A=A9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesktopCardPane.java | 4 +++ .../com/fr/design/mainframe/JTemplate.java | 7 ++++- .../design/mainframe/TabChangeListener.java | 13 ++++++++ .../fr/design/designer/creator/XCreator.java | 8 ++++- .../designer/creator/XWAbsoluteLayout.java | 5 +--- .../cardlayout/XWCardMainBorderLayout.java | 5 +--- .../design/designer/ui/PopupControlPanel.java | 4 ++- .../designer/ui/SelectedPopupDialog.java | 9 ++++++ .../fr/design/mainframe/ComponentTree.java | 3 +- .../com/fr/design/mainframe/CoverPane.java | 21 ++++++++++--- .../fr/design/mainframe/CoverReportPane.java | 3 -- .../mainframe/EditingMouseListener.java | 15 +++++++--- .../com/fr/design/mainframe/FormDesigner.java | 14 +++++++++ .../java/com/fr/design/mainframe/JForm.java | 30 +++++-------------- .../com/fr/design/mainframe/JWorkBook.java | 16 ++++++++++ 15 files changed, 111 insertions(+), 46 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/TabChangeListener.java diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java index f540832d0d..f3afcacc98 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java @@ -56,6 +56,10 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing()) { DesignModeContext.switchTo(DesignerMode.NORMAL); } + // 切换时 + if (component != null) { + component.fireTabChange(); + } DesignerFrameFileDealerPane.getInstance().setCurrentEditingTemplate(jt); if (component != null) { layeredPane.remove(component); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index abd219ee7f..f1bc2cbafe 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -95,7 +95,7 @@ import java.util.concurrent.Callable; /** * 报表设计和表单设计的编辑区域(设计器编辑的IO文件) */ -public abstract class JTemplate> extends TargetComponent implements ToolBarMenuDockPlus, DesignerProxy, JTemplateSave { +public abstract class JTemplate> extends TargetComponent implements ToolBarMenuDockPlus, DesignerProxy, JTemplateSave, TabChangeListener { // TODO ALEX_SEP editingFILE这个属性一定要吗?如果非要不可,有没有可能保证不为null private static final int PREFIX_NUM = 3000; protected FILE editingFILE = null; @@ -218,6 +218,11 @@ public abstract class JTemplate> } } + @Override + public void fireTabChange() { + // do nothing + } + protected void addPane(PropertyItemPaneProvider provider) { // do nothing } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/TabChangeListener.java b/designer-base/src/main/java/com/fr/design/mainframe/TabChangeListener.java new file mode 100644 index 0000000000..a69706c551 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/TabChangeListener.java @@ -0,0 +1,13 @@ +package com.fr.design.mainframe; + +/** + * tab切换时对当前打开的模版处理些事件 + * + * @author hades + * @version 10.0 + * Created by hades on 2021/7/22 + */ +public interface TabChangeListener { + + void fireTabChange(); +} 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 2f5f0e6282..fa9267b1a7 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 @@ -778,7 +778,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo int extraY = (int) (bounds.y * designer.getScale()); popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); popup.updatePane(designer); - popup.setVisible(selected && accept && popup.hasVisibleButtons()); + popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible()); popup.setRelativeBounds(bounds); } @@ -836,4 +836,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo } } + public void processPopup(boolean canVisible) { + if (popup != null) { + popup.setCanVisible(canVisible); + } + } + } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index c6d0067c3a..fdd62d1b0f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -447,10 +447,7 @@ public class XWAbsoluteLayout extends XLayoutContainer { super.paint(g); //如果鼠标移动到布局内且布局不可编辑,画出编辑蒙层 if (isMouseEnter && !this.editable) { - CoverReportPane.paintEditButton(g, this); - if (isShared()) { - CoverReportPane.paintShareButton(g, this); - } + CoverReportPane.paintCover(g, this); } } 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 523533e5e7..6009711f71 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 @@ -344,10 +344,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout { super.paint(g); //如果鼠标移动到布局内且布局不可编辑,画出编辑蒙层 if (isMouseEnter && !editable) { - CoverReportPane.paintEditButton(g, this); - if (isShared()) { - CoverReportPane.paintShareButton(g, this); - } + CoverReportPane.paintCover(g, this); } } diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java index ebcfa472f0..ad003ff692 100644 --- a/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java +++ b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java @@ -4,7 +4,9 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWTitleLayout; +import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.VerticalFlowLayout; @@ -193,7 +195,7 @@ public class PopupControlPanel extends JPanel { } public void updatePane(FormDesigner designer) { - setButtonVisible(editButton, creator.acceptType(XWTitleLayout.class)); + setButtonVisible(editButton, creator.acceptType(XWTitleLayout.class, XWCardMainBorderLayout.class) || creator.getClass().equals(XWAbsoluteLayout.class)); setButtonVisible(settingButton, creator.isShared()); setButtonVisible(toggleButton, AdapterBus.searchLayoutAdapter(designer, creator) instanceof FRAbsoluteLayoutAdapter); toggleButton.setSelected(creator.toData().isAspectRatioLocked()); 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 c5f94d70eb..285bbc3b8b 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 @@ -20,6 +20,8 @@ public class SelectedPopupDialog extends JDialog { private final PopupControlPanel controlPanel; + private boolean canVisible = true; + public SelectedPopupDialog(XCreator creator, FormDesigner designer) { super(DesignerContext.getDesignerFrame()); this.setUndecorated(true); @@ -43,4 +45,11 @@ public class SelectedPopupDialog extends JDialog { this.controlPanel.setRelativeBounds(rectangle); } + public boolean isCanVisible() { + return canVisible; + } + + public void setCanVisible(boolean canVisible) { + this.canVisible = canVisible; + } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java b/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java index 25bf1f5de7..0c838b61ec 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java @@ -4,6 +4,7 @@ import com.fr.design.constants.UIConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.designer.treeview.ComponentTreeCellRenderer; @@ -414,7 +415,7 @@ public class ComponentTree extends JTree { private void showSelectedPopup(XCreator comp) { Rectangle rectangle = getRelativeBounds(comp); - comp.showSelectedPopup(designer, rectangle, comp.acceptType(XWTitleLayout.class)); + comp.showSelectedPopup(designer, rectangle, comp.acceptType(XWTitleLayout.class, XWCardMainBorderLayout.class, XWAbsoluteLayout.class)); comp.setSelected(true); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/CoverPane.java b/designer-form/src/main/java/com/fr/design/mainframe/CoverPane.java index f63c430554..6bafb317f3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/CoverPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/CoverPane.java @@ -42,9 +42,7 @@ public class CoverPane extends JComponent { Graphics2D g2d = (Graphics2D) g; Composite oldComposite = g2d.getComposite(); //画白色的编辑层 - g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 50 / 100.0F)); - g2d.setColor(XCreatorConstants.COVER_COLOR); - g2d.fillRect(x, y, w, h); + paintCover(g, component); //画编辑按钮所在框 FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); AlphaComposite alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, formDesigner.getCursor().getType() != Cursor.DEFAULT_CURSOR ? 0.9f : 0.7f); @@ -71,6 +69,21 @@ public class CoverPane extends JComponent { GraphHelper.draw(g, new Rectangle(BORDER_WIDTH, BORDER_WIDTH, w - BORDER_WIDTH * 2, h - BORDER_WIDTH * 2), Constants.LINE_MEDIUM); } + /** + * 绘制悬浮层 + * @param g + * @param component + */ + public static void paintCover(Graphics g, Component component) { + Graphics2D g2d = (Graphics2D) g; + Composite oldComposite = g2d.getComposite(); + //画白色的编辑层 + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 50 / 100.0F)); + g2d.setColor(XCreatorConstants.COVER_COLOR); + g2d.fillRect(0, 0, component.getWidth(), component.getHeight()); + g2d.setComposite(oldComposite); + } + public CoverPane() { setBackground(null); setOpaque(false); @@ -87,6 +100,6 @@ public class CoverPane extends JComponent { public void paint(Graphics g) { super.paint(g); - paintEditButton(g, this); + paintCover(g, this); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/CoverReportPane.java b/designer-form/src/main/java/com/fr/design/mainframe/CoverReportPane.java index 14b8aed7a3..ba687f5255 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/CoverReportPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/CoverReportPane.java @@ -75,8 +75,5 @@ public class CoverReportPane extends CoverPane{ @Override public void paint(Graphics g) { super.paint(g); - if (isShared()) { - paintShareButton(g, this); - } } } 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 783e984b9d..5cd0458350 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 @@ -18,7 +18,9 @@ import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XEditorHolder; import com.fr.design.designer.creator.XElementCase; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.cardlayout.XCardAddButton; import com.fr.design.designer.creator.cardlayout.XCardSwitchButton; import com.fr.design.designer.creator.cardlayout.XWCardLayout; @@ -383,6 +385,14 @@ public class EditingMouseListener extends MouseInputAdapter { } private boolean isEditButton(MouseEvent e, XCreator component, Insets insets) { + // 不显示编辑按钮 鼠标格式 + if (component.getParent() instanceof XCreator) { + XCreator parent = (XCreator) component.getParent(); + if (parent.acceptType(XWTitleLayout.class) || component.acceptType(XWCardMainBorderLayout.class, XWAbsoluteLayout.class)) { + return false; + } + } + int innerWidth = component.getWidth() - insets.left - insets.right; int innerHeight = component.getHeight() - insets.top - insets.bottom; @@ -458,10 +468,7 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } - if (isShareConfigButton(e, component, insets)) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - component.setHelpBtnOnFocus(true); - } else if (isEditButton(e, component, insets)) { + if (isEditButton(e, component, insets)) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } } 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 1d4fad8e34..1a6d24ec55 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 @@ -1743,4 +1743,18 @@ public class FormDesigner extends TargetComponent
implements TreeSelection return false; } + public void processPopup(boolean canVisible) { + XCreator creator = this.getSelectionModel().getSelection().getSelectedCreator(); + if (creator != null) { + creator.processPopup(canVisible); + } + } + + public void hidePopup() { + XCreator creator = this.getSelectionModel().getSelection().getSelectedCreator(); + if (creator != null) { + creator.hidePopup(); + } + } + } 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 bc32c5fd9e..8c9b1f2bc8 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 @@ -89,8 +89,6 @@ 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; @@ -133,36 +131,16 @@ public class JForm extends JTemplate implements BaseJForm implements BaseJForm implements BaseJForm { centerPane = new UIModeControlContainer(parameterPane, reportComposite = new ReportComponentComposite(this)) { @Override protected void onModeChanged() { + processPopup(isUpMode()); refreshToolArea(); } @@ -1221,4 +1222,19 @@ public class JWorkBook extends JTemplate { super.whenClose(); reportComposite.doRemoveAction(); } + + protected void processPopup(boolean visible) { + FormDesigner designer = (FormDesigner) parameterPane.getParaDesigner(); + if (designer != null) { + designer.processPopup(visible); + } + } + + @Override + public void fireTabChange() { + FormDesigner designer = (FormDesigner) parameterPane.getParaDesigner(); + if (designer != null) { + designer.hidePopup(); + } + } } From 232ffe723800768db25e2501417fa5b2119a95e2 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 21 Jul 2021 17:42:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-55545=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-=E4=B8=8B=E6=8B=89=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=EF=BC=8Ccpt=E5=92=8Cfrm=E9=83=BD=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E6=94=B6=E8=B5=B7=E6=A0=A1=E9=AA=8C=E4=B8=8A?= =?UTF-8?q?=E6=96=B9=E4=BB=BB=E6=84=8F=E7=9A=84=E8=AE=BE=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E5=85=81=E8=AE=B8=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=82=A3?= =?UTF-8?q?=E4=B8=89=E4=B8=AA=E9=80=89=E9=A1=B9=E5=B0=B1=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E9=97=B4=E9=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT-55618 【组件背景分离】组件复用-安装自适应插件,报表块的内容显示方式和提示文字,跑到了最下面 REPORT-55370 【10.0.18冒烟】参数控件TAb键切换顺序展示有问题 【问题原因】 三个问题的原因是一样的。将尺寸/位置面板挪动到了高级属性的上方后,导致后续的面板中设置项出现了 BorderLayout.CENTER约束中嵌套BorderLayout.CENTER约束的情况,位于其中的组件高度变大。 【改动思路】 右侧栏有问题的设置项用BorderLayout包装起来,使用BorderLayout.North打破上述嵌套约束. --- .../mainframe/widget/ui/FormWidgetCardPane.java | 7 ++++--- .../fr/design/parameter/RootDesignDefinePane.java | 15 +++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index a5189e66f6..b9230546df 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -187,9 +187,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { }); DataModify definePane = rn.getDefinePane(); - JComponent jComponent = definePane.toSwingComponent(); - - attriCardPane.add(jComponent, BorderLayout.CENTER); + // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 + JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); + definePaneWrapContent.add(definePane.toSwingComponent(), BorderLayout.NORTH); + attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); currentEditorDefinePane = definePane; } diff --git a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java index 2e96e6ed8d..5f45b57b09 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java @@ -62,18 +62,13 @@ public class RootDesignDefinePane extends AbstractDataModify { public void initComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel inbuiltDefineContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(inbuiltDefineContentPane, BorderLayout.NORTH); - designerWidth = new UIBoundSpinner(1, Integer.MAX_VALUE, 1); - JPanel layoutPane = createBoundsPane(); - UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane); - inbuiltDefineContentPane.add(layoutExpandablePane, BorderLayout.NORTH); - JPanel advancePane = createAdvancePane(); UIExpandablePane advanceExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, advancePane); - inbuiltDefineContentPane.add(advanceExpandablePane, BorderLayout.CENTER); - + this.add(advanceExpandablePane, BorderLayout.NORTH); + JPanel layoutPane = createBoundsPane(); + UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane); + this.add(layoutExpandablePane, BorderLayout.CENTER); this.addExtraUIExpandablePaneFromPlugin(); } @@ -88,7 +83,7 @@ public class RootDesignDefinePane extends AbstractDataModify { panel.add(uiExpandablePane); } } - this.add(panel, BorderLayout.CENTER); + this.add(panel, BorderLayout.SOUTH); } public JPanel createBoundsPane() { From 794f0630b9c1ba52983922942effd5c16dc50939 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 21 Jul 2021 18:07:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-55603=20=E3=80=9010.0.18=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E3=80=90=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8?= =?UTF-8?q?-=E6=8E=A7=E4=BB=B6=E7=BB=84=E4=BB=B6=E7=B1=BB=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E6=9C=80=E6=96=B0jar=E4=B8=8B=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8E=A7=E4=BB=B6=E5=A4=A7=E5=B0=8F=E3=80=81=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 1. 插件控件的FormWidgetCardPane.initComponent方法在isExtraWidget后直接退出, 没有执行添加boundPane的逻辑 2. 插件控件的definePane既包含了基本属性,又包含了高级属性,FormWidgetCardPane 内部无法在基本属性和高级属性之前插入boundPane 【改动思路】 和产品沟通后确认,对于插件控件,暂时不改变右侧栏中位置*尺寸面板的位置,其余类型的内置 控件仍然需要将位置*尺寸面板放置在高级属性上方 --- .../widget/ui/FormWidgetCardPane.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index b9230546df..a76c96902c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -150,6 +150,11 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { freshPropertyMode(innerCreator); if (isExtraWidget) { + // REPORT-55603: 仅对于插件控件,将尺寸*位置面板放置在definePane下方,其余控件将尺寸*位置面板放置在definePane上方 + widgetBoundPane = createWidgetBoundPane(xCreator); + if (widgetBoundPane != null) { + attriCardPane.add(widgetBoundPane, BorderLayout.CENTER); + } return; } @@ -187,10 +192,18 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { }); DataModify definePane = rn.getDefinePane(); - // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 - JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); - definePaneWrapContent.add(definePane.toSwingComponent(), BorderLayout.NORTH); - attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); + JComponent definePaneComponent = definePane.toSwingComponent(); + boolean isExtraWidget = FormWidgetDefinePaneFactoryBase.isExtraXWidget(creator.toData()); + + if (isExtraWidget) { + // REPORT-55603: 仅对于插件控件,将尺寸*位置面板放置在definePane下方,其余控件将尺寸*位置面板放置在definePane上方 + attriCardPane.add(definePaneComponent, BorderLayout.NORTH); + } else { + // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 + JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); + definePaneWrapContent.add(definePaneComponent, BorderLayout.NORTH); + attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); + } currentEditorDefinePane = definePane; } From de124d121be31b9c927479e0d2e17314c776c4ed Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 22 Jul 2021 15:09:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-55549=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=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E8=83=8C=E6=99=AF=E6=97=B6=EF=BC=8C=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E5=9C=A8=E8=AE=BE=E8=AE=A1=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E9=87=8C=E6=98=BE=E7=A4=BA=E4=BA=86=E8=83=8C=E6=99=AF=E6=95=88?= =?UTF-8?q?=E6=9E=9C=EF=BC=8C=E4=BD=86web=E9=A2=84=E8=A7=88=E6=B2=A1?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 主体背景的生效范围暂时保持原样,不作用于与包含标题区域的整体范围内. 与前端实现保持一致 【改动思路】 临时注释设计器端带标题容器的背景效果 --- .../creator/XBorderStyleWidgetCreator.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java index 754638783c..26d65cb5d1 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java @@ -194,13 +194,14 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ titleCreator.setBorder(new BottomLineBorder(color, thickness)); } - if (bodyXCreator instanceof XBorderStyleWidgetCreator) { - XBorderStyleWidgetCreator styledBodyXCreator = (XBorderStyleWidgetCreator) bodyXCreator; - Background background4Painting = styledBodyXCreator.getBackground4Painting(); - - styledBodyXCreator.setBackground4Painting(null); // body不绘制背景 - titleParent.setBackground4Painting(background4Painting); // 容器绘制完整背景 - } + // 主体背景的生效范围暂时保持原样,不作用于包含标题区域的整体范围内 +// if (bodyXCreator instanceof XBorderStyleWidgetCreator) { +// XBorderStyleWidgetCreator styledBodyXCreator = (XBorderStyleWidgetCreator) bodyXCreator; +// Background background4Painting = styledBodyXCreator.getBackground4Painting(); +// +// styledBodyXCreator.setBackground4Painting(null); // body不绘制背景 +// titleParent.setBackground4Painting(background4Painting); // 容器绘制完整背景 +// } } } }