From 20f647a2d769f719c8210e0f84d2ad88e5dd530f Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 25 Sep 2024 14:08:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=8F=90=E4=BA=A4=E5=85=A5=E5=BA=93=E5=B8=83?= =?UTF-8?q?=E5=B1=80&=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=8E=A7=E4=BB=B6=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/Commit2DBJavaScriptPane.java | 2 +- .../fr/design/javascript/JavaScriptActionPane.java | 12 ++++++++++++ .../fr/design/write/submit/DBManipulationPane.java | 8 ++++++-- .../java/com/fr/design/widget/WidgetEventPane.java | 9 +++++++++ .../design/widget/ui/WritableRepeatEditorPane.java | 2 +- .../SmartInsertDBManipulationInWidgetEventPane.java | 13 +++++++++++++ 6 files changed, 42 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java index eb38df9a8b..101c5a293f 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java @@ -59,7 +59,7 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane { private static final long serialVersionUID = 1L; + private static final int DEFAULT_GAP = 4; + private List contentDBManiPane; private JavaScriptResourceInfo resourceInfo; @@ -130,6 +132,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { return new String[]{WebContentUtils.FR_SUBMITINFO}; } + @Override + public int getVerticalGap() { + return JavaScriptActionPane.this.getVerticalGap(); + } }; callPane.populateBean(getCall()); @@ -227,4 +233,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { } }; } + + public int getVerticalGap() { + + return DEFAULT_GAP; + } + } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index 01dafb590b..eebd4811dc 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java @@ -277,11 +277,15 @@ public class DBManipulationPane extends BasicBeanPane { JPanel conditionPane = this.createConditionPane(); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); - btPane.add(column(4, + addBottomComponent(btPane, conditionPane, eventPane); + return btPane; + } + + protected void addBottomComponent(JPanel bottomPane, JPanel conditionPane, JPanel eventPane) { + bottomPane.add(column(4, cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), row(cell(eventPane), cell(new UILabel())) ).getComponent()); - return btPane; } private UIButton addEventButton() { diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java index 47db0235f1..5f3bcbe1f9 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java @@ -105,6 +105,15 @@ public class WidgetEventPane extends UIListGroupControlPane { return new SmartInsertDBManipulationInWidgetEventPane(epane); } + @Override + public int getVerticalGap() { + if (getContentDBManiPane().get(0) instanceof SmartInsertDBManipulationInWidgetEventPane) { + return 10; + } else { + return 4; + } + } + @Override protected String title4PopupWindow() { return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Callback_Function"); diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java index e66f13eb37..20236e9767 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java @@ -21,7 +21,7 @@ public abstract class WritableRepeatEditorPane JPanel contentPane = column(LayoutConstants.VERTICAL_GAP).getComponent(); JPanel otherContentPane = this.setThirdContentPane(); if (otherContentPane != null) { - contentPane.add(row(cell(otherContentPane)).getComponent()); + contentPane.add(row(cell(otherContentPane).weight(1.0)).getComponent()); } return contentPane; } diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java index 476c664fe0..c4e0c9cddb 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java @@ -1,12 +1,18 @@ package com.fr.design.write.submit; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; import javax.swing.*; import java.awt.*; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.row; + /** * Created with IntelliJ IDEA. * User: zheng @@ -22,6 +28,13 @@ public class SmartInsertDBManipulationInWidgetEventPane extends SmartInsertDBMan protected void addComponent(JPanel mainPane,JScrollPane addPane){ } + protected void addBottomComponent(JPanel bottomPane, JPanel conditionPane, JPanel eventPane) { + bottomPane.add(column(10, + cell(conditionPane), + row(cell(eventPane), cell(new UILabel())) + ).getComponent()); + } + protected Dimension createConditionPanePreferredSize(){ return FineUIScale.scale(new Dimension(454, 20)); } From 306dce73964600078954a2ebfdde082c45dd4f3d Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 25 Sep 2024 14:13:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/widget/WidgetEventPane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java index 5f3bcbe1f9..0e639a9242 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java @@ -31,6 +31,10 @@ import java.lang.reflect.Constructor; public class WidgetEventPane extends UIListGroupControlPane { private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1); + private static final int WIDGET_BTN_GAP = 10; + + private static final int WIDGET_PANE_BTN_GAP = 4; + private Selection selection = NO_SELECTION; private ElementCasePane object; @@ -108,9 +112,9 @@ public class WidgetEventPane extends UIListGroupControlPane { @Override public int getVerticalGap() { if (getContentDBManiPane().get(0) instanceof SmartInsertDBManipulationInWidgetEventPane) { - return 10; + return WIDGET_BTN_GAP; } else { - return 4; + return WIDGET_PANE_BTN_GAP; } }