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..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; @@ -105,6 +109,15 @@ public class WidgetEventPane extends UIListGroupControlPane { return new SmartInsertDBManipulationInWidgetEventPane(epane); } + @Override + public int getVerticalGap() { + if (getContentDBManiPane().get(0) instanceof SmartInsertDBManipulationInWidgetEventPane) { + return WIDGET_BTN_GAP; + } else { + return WIDGET_PANE_BTN_GAP; + } + } + @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)); }