diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWdigetEventNoCellPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWdigetEventNoCellPane.java new file mode 100644 index 0000000000..f5426bd14a --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWdigetEventNoCellPane.java @@ -0,0 +1,35 @@ +package com.fr.design.write.submit; + +import com.fine.theme.utils.FineUIScale; +import com.fr.design.editor.editor.Editor; + +import java.awt.BorderLayout; +import java.awt.Dimension; + +import static com.fine.theme.utils.FineUIScale.scale; + +public class DBManipulationInWdigetEventNoCellPane extends DBManipulationPane { + + public DBManipulationInWdigetEventNoCellPane() { + super(); + } + + public DBManipulationInWdigetEventNoCellPane(Editor[] v_Types) { + super(v_Types); + } + + protected Dimension createEditTablePreferredSize() { + return scale(new Dimension(280, 150)); + } + + protected Dimension getPreferredScrollableViewportSize() { + return scale(new Dimension(280, 120)); + } + protected Dimension createControlBtnPanePreferredSize(){ + return FineUIScale.scale(new Dimension(110, 20)); + } + + protected String setControlBtnPanePosition(){ + return BorderLayout.EAST; + } +} 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 ee71b66b35..2f14608ec2 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 @@ -175,7 +175,7 @@ public class DBManipulationPane extends BasicBeanPane { keyColumnValuesTable = new KeyColumnNameValueTable(); editTablePane.add(new UIVerticalScrollPane(keyColumnValuesTable), BorderLayout.CENTER); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); - keyColumnValuesTable.setPreferredScrollableViewportSize(scale(new Dimension(280, 150))); + keyColumnValuesTable.setPreferredScrollableViewportSize(getPreferredScrollableViewportSize()); keyColumnValuesTable.setShowHorizontalLines(true); northPane.add(column(10, @@ -200,6 +200,10 @@ public class DBManipulationPane extends BasicBeanPane { addListeners(); } + protected Dimension getPreferredScrollableViewportSize() { + return scale(new Dimension(280, 150)); + } + public void setSubMitName(String subMitName) { this.subMitName = subMitName; } diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java index 2a3ab3dac2..143b7ee024 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java @@ -7,6 +7,7 @@ import com.fr.design.javascript.EmailPane; import com.fr.design.javascript.JavaScriptActionPane; import com.fr.design.mainframe.FormDesigner; import com.fr.design.widget.EventCreator; +import com.fr.design.write.submit.DBManipulationInWdigetEventNoCellPane; import com.fr.design.write.submit.DBManipulationPane; import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.designer.creator.XCreator; @@ -44,7 +45,7 @@ public class EventPropertyTable extends UIListControlPane { return new JavaScriptActionPane() { @Override protected DBManipulationPane createDBManipulationPane() { - return new DBManipulationPane(ValueEditorPaneFactory.formEditors()); + return new DBManipulationInWdigetEventNoCellPane(ValueEditorPaneFactory.formEditors()); } @Override