From e4ff94f24e021698512ce767ba2736eb6bd3eea7 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Fri, 20 Sep 2024 15:52:56 +0800 Subject: [PATCH 01/10] =?UTF-8?q?REPORT-135235=20fix:fbp=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E8=B0=83=E6=95=B4=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BC=B9=E7=AA=97=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascript/JSContentWithDescriptionPane.java | 7 ++++--- .../com/fr/design/javascript/JavaScriptImplPane.java | 10 +++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index 4116f4f1d0..47f9898def 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -1,5 +1,6 @@ package com.fr.design.javascript; +import com.fine.theme.utils.FineUIScale; import com.fr.base.svg.IconUtils; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; @@ -140,7 +141,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi //js函数声明面板 JPanel jsParaPane = createJSParaPane(); - jsParaPane.setPreferredSize(new Dimension(650, 80)); + jsParaPane.setPreferredSize(FineUIScale.createScaleDimension(650, 80)); //右上角的搜索提示面板 JPanel tipsPane = createTipsPane(); @@ -153,7 +154,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi UIScrollPane contentTextAreaPanel = createContentTextAreaPanel(); initContextAreaListener(); - contentTextAreaPanel.setPreferredSize(new Dimension(850, 250)); + contentTextAreaPanel.setPreferredSize(FineUIScale.createScaleDimension(850, 250)); //js函数结束标签 UILabel endBracketsLabel = new UILabel(); endBracketsLabel.setText("}"); @@ -173,7 +174,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi //函数分类和函数说明面板================================== JPanel functionNameAndDescriptionPanel = createInterfaceAndDescriptionPanel(); - functionNameAndDescriptionPanel.setPreferredSize(new Dimension(880, 220)); + functionNameAndDescriptionPanel.setPreferredSize(FineUIScale.createScaleDimension(880, 220)); this.add(functionNameAndDescriptionPanel, BorderLayout.SOUTH); } diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java index 1efd313940..bb1921689b 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java @@ -13,13 +13,11 @@ import com.fr.design.hyperlink.AbstractHyperLinkPane; import com.fr.design.javascript.jsapi.JSImplPopulateAction; import com.fr.design.javascript.jsapi.JSImplUpdateAction; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.js.JavaScriptImpl; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; -import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; @@ -30,7 +28,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; -import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.cell; @@ -76,12 +73,11 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { cell(FineUIUtils.wrapComponentWithTitle(importedJsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript"))).weight(0.5), cell(FineUIUtils.wrapComponentWithTitle(parameterPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(0.5) ).getComponent()); + topPane.setPreferredSize(new Dimension(super.getPreferredSize().width, 150)); this.setLayout(new BorderLayout()); - this.add(column(10, - cell(topPane).weight(0.5), - cell(FineUIUtils.wrapComponentWithTitle(jsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))).weight(0.5) - ).getComponent()); + this.add(topPane, BorderLayout.NORTH); + this.add(FineUIUtils.wrapComponentWithTitle(jsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript")), BorderLayout.CENTER); this.reLayoutForChart(); } From 7a567512a8d8a411be8ff39240e7f8f0fff2dfb6 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Fri, 20 Sep 2024 16:51:09 +0800 Subject: [PATCH 02/10] =?UTF-8?q?REPORT-135235=20fix:fbp=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=82=AC=E6=B5=AE=E5=BC=B9=E7=AA=97=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=B8=8D=E7=81=B5=E6=95=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/style/TextFormatPane.java | 2 +- .../style/VanChartPlotLegendPane.java | 34 ++++++++++--------- .../designer/style/VanChartTitlePane.java | 32 +++++++++-------- 3 files changed, 36 insertions(+), 32 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java index a3a1f3f578..a86bc70e05 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java @@ -132,7 +132,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName cell(textField), row( cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Option"))).weight(LEFT_WEIGHT), - row(cell(roundingBox)).weight(RIGHT_WEIGHT) + cell(roundingBox).weight(RIGHT_WEIGHT) ), cell(previewLabel) ).getComponent()); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 57923b1ee8..3321769c9f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -32,6 +32,7 @@ import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane; import javax.swing.Icon; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; @@ -153,7 +154,7 @@ public class VanChartPlotLegendPane extends BasicPane { return FineLayoutBuilder.asBorderLayoutWrapped(column); } - protected VanChartBackgroundPane creatBackgroundPane(){ + protected VanChartBackgroundPane creatBackgroundPane() { return new VanChartBackgroundWithOutImagePane(); } @@ -252,21 +253,22 @@ public class VanChartPlotLegendPane extends BasicPane { customFloatPositionButton.setSelected(true); checkLayoutPaneVisible(); checkDisplayStrategyUse(); - - if (customFloatPositionPane == null) { - customFloatPositionPane = new VanChartFloatPositionPane(); - } - if (uiBubbleFloatPane == null) { - Point comPoint = customFloatPositionButton.getLocationOnScreen(); - Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight()); - uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) { - @Override - public void updateContentPane() { - parent.attributeChanged(); - } - }; - } - uiBubbleFloatPane.show(VanChartPlotLegendPane.this, null); + SwingUtilities.invokeLater(() -> { + if (customFloatPositionPane == null) { + customFloatPositionPane = new VanChartFloatPositionPane(); + } + if (uiBubbleFloatPane == null) { + Point comPoint = customFloatPositionButton.getLocationOnScreen(); + Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight()); + uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) { + @Override + public void updateContentPane() { + parent.attributeChanged(); + } + }; + } + uiBubbleFloatPane.show(VanChartPlotLegendPane.this, null); + }); } }); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index 9761c618ba..441e3d36e1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -35,6 +35,7 @@ import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutS import javax.swing.JPanel; import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; @@ -220,21 +221,22 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { alignmentPane.setSelectedIndex(-1); customFloatPositionButton.setSelected(true); checkDisplayStrategyUse(); - - if (customFloatPositionPane == null) { - customFloatPositionPane = new VanChartFloatPositionPane(); - } - if (uiBubbleFloatPane == null) { - Point comPoint = customFloatPositionButton.getLocationOnScreen(); - Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight()); - uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) { - @Override - public void updateContentPane() { - parent.attributeChanged(); - } - }; - } - uiBubbleFloatPane.show(VanChartTitlePane.this, null); + SwingUtilities.invokeLater(() -> { + if (customFloatPositionPane == null) { + customFloatPositionPane = new VanChartFloatPositionPane(); + } + if (uiBubbleFloatPane == null) { + Point comPoint = customFloatPositionButton.getLocationOnScreen(); + Point arrowPoint = new Point(comPoint.x + customFloatPositionButton.getWidth() / 2 - GAP, comPoint.y + customFloatPositionButton.getHeight()); + uiBubbleFloatPane = new UIBubbleFloatPane(Constants.TOP, arrowPoint, customFloatPositionPane, WIDTH, HEIGHT) { + @Override + public void updateContentPane() { + parent.attributeChanged(); + } + }; + } + uiBubbleFloatPane.show(VanChartTitlePane.this, null); + }); } }); } From 8d4fb7256fcfc88df9eeb3bf67eccef373f9f17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Fri, 20 Sep 2024 17:00:17 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-133133=20&=20REPORT-134138=20fix:?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E5=BC=82=E5=B8=B8=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E5=9C=BA=E6=99=AF=E5=BC=B9=E7=AA=97=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/connect/ConnectionListPane.java | 76 ++++++++++++++----- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index ed96b2697e..9879fd700c 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -13,6 +13,8 @@ import com.fr.design.ExtraDesignClassManager; import com.fr.design.data.MapCompareUtils; import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.FineJOptionPane; +import com.fr.design.editlock.EditLockUtils; import com.fr.design.fun.ConnectionProvider; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameObjectCreator; @@ -25,18 +27,21 @@ import com.fr.general.NameObject; import com.fr.license.database.DBTypes; import com.fr.license.database.DataBaseTypePointManager; import com.fr.license.exception.DataBaseNotSupportedException; +import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; +import com.fr.report.LockItem; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; import com.fr.workspace.WorkContext; +import com.fr.workspace.engine.exception.DriverUnExistException; import com.fr.workspace.server.database.DataBaseTypeOperator; import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import org.jetbrains.annotations.NotNull; -import javax.swing.SwingWorker; +import javax.swing.*; import java.awt.Window; import java.util.ArrayList; import java.util.Arrays; @@ -345,18 +350,23 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh private void alterConnections(List addConnections, List removedConnNames, List updateConnection) throws Exception { - try { - for (ConnectionInfoBean bean : addConnections) { + // 处理新增 connections + processConnections(addConnections, bean -> { ConnectionRepository.getInstance().add(bean); - } - for (ConnectionInfoBean bean : updateConnection) { + }, "add"); + + // 处理更新 connections + processConnections(updateConnection, bean -> { ConnectionRepository.getInstance().update(bean); - } - for (String name : removedConnNames) { + }, "update"); + + // 处理移除 connections + processConnections(removedConnNames, name -> { ConnectionRepository.getInstance().delete(new ConnectionInfoBean(name)); - } - // hades:远程环境时,由于时直接RPC调用远程修改,因此设计器本地配置需要失效 + }, "delete"); + + // 远程环境处理逻辑 if (!WorkContext.getCurrent().isLocal()) { EventDispatcher.fire(RemoteConfigEvent.EDIT, "ConnectionConfig"); } @@ -366,18 +376,46 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh } } + private void processConnections(List connections, ThrowingConsumer action, String actionType) throws Exception { + for (T item : connections) { + try { + action.accept(item); + } catch (Exception e) { + String errorConnectionName = (item instanceof ConnectionInfoBean) + ? ((ConnectionInfoBean) item).getConnectionName() + : item.toString(); + if (e instanceof DriverUnExistException) { + throw new DriverUnExistException(InterProviderFactory.getProvider().getLocText("Fine-Core_Data_Connection") + errorConnectionName + + InterProviderFactory.getProvider().getLocText("Fine-Core_Driver_Not_Found")); + } + throw e; + } + } + } + + @FunctionalInterface + interface ThrowingConsumer { + void accept(T t) throws Exception; + } public static void showDialog(Window parent) { - final Map connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); - final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() { - @Override - public void complete() { - populate(connectionMap); - } - }; - final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null); - connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap)); - connectionListDialog.setVisible(true); + try { + final Map connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); + final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() { + @Override + public void complete() { + populate(connectionMap); + } + }; + final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null); + connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap)); + connectionListDialog.setVisible(true); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Remote_Data_Error"), + Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); + EditLockUtils.unlock(LockItem.CONNECTION); + } } @Override From ac94ca4d12b90022825d39741dc8cb2820c694b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Fri, 20 Sep 2024 17:00:46 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-135142=20fix:NewUI=20=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E6=98=BE=E7=A4=BA=E6=AF=94=E4=BE=8B=E8=B0=83=E4=BC=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/designer/component/VanChartHtmlLabelPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java index 90213ea924..373fc412d9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java @@ -151,7 +151,7 @@ public class VanChartHtmlLabelPane extends JPanel { new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomHeight, customHeight}, }; - return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1, 1}); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.4, 0.6}); } private void checkWidth() { From dea308717c9f5309131a9d79bc84e5031a330e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Fri, 20 Sep 2024 17:02:53 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=97=A0jira=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/ConnectionListPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 9879fd700c..eb98dd6b0a 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -41,7 +41,8 @@ import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import org.jetbrains.annotations.NotNull; -import javax.swing.*; +import javax.swing.JOptionPane; +import javax.swing.SwingWorker; import java.awt.Window; import java.util.ArrayList; import java.util.Arrays; From 2fb49be88fb2a39158ee633edd4e43f71bf16e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Fri, 20 Sep 2024 17:10:13 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=97=A0jira=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/ConnectionListPane.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index eb98dd6b0a..52bac8eaff 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -394,6 +394,9 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh } } + /** + * 抛异常的函数式接口 + */ @FunctionalInterface interface ThrowingConsumer { void accept(T t) throws Exception; From ceb7e421ff5b7c3e9750dce6370b80b473c08523 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Mon, 23 Sep 2024 10:24:27 +0800 Subject: [PATCH 07/10] =?UTF-8?q?REPORT-134818=20fix:fbp=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=8E=A7=E4=BB=B6=E5=B1=9E=E6=80=A7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=8B=BE=E9=80=89=E6=A1=86=E8=A7=A6=E5=8F=91=E7=83=AD?= =?UTF-8?q?=E5=8C=BA=E8=BF=87=E5=A4=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/widget/ui/BasicSetVisiblePropertyPane.java | 7 +++++-- .../java/com/fr/design/parameter/RootDesignDefinePane.java | 6 +++--- .../fr/design/widget/ui/designer/ButtonGroupDictPane.java | 2 +- .../design/widget/ui/designer/CheckBoxGroupDefinePane.java | 3 ++- .../design/widget/ui/designer/ComboCheckBoxDefinePane.java | 4 +++- .../widget/ui/designer/CustomWritableRepeatEditorPane.java | 5 ++++- .../widget/ui/designer/DirectWriteEditorDefinePane.java | 4 ++-- .../design/widget/ui/designer/FieldEditorDefinePane.java | 2 +- .../com/fr/design/widget/ui/designer/LabelDefinePane.java | 4 ++-- .../com/fr/design/widget/ui/WritableRepeatEditorPane.java | 4 +++- 10 files changed, 26 insertions(+), 15 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/BasicSetVisiblePropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/BasicSetVisiblePropertyPane.java index 05dd7923e7..4613437e3a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/BasicSetVisiblePropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/BasicSetVisiblePropertyPane.java @@ -3,6 +3,9 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.form.ui.Widget; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + /** * Created by kerry on 2017/9/30. @@ -17,12 +20,12 @@ public class BasicSetVisiblePropertyPane extends FormBasicPropertyPane { protected void initComponent() { UICheckBox otherOtherConfig = createOtherConfig(); if(otherOtherConfig != null){ - corePane.add(otherOtherConfig); + corePane.add(row(cell(otherOtherConfig)).getComponent()); } visibleCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Visible"), true); visibleCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic")); - corePane.add(visibleCheckBox); + corePane.add(row(cell(visibleCheckBox)).getComponent()); } public UICheckBox createOtherConfig(){ 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 679284edd3..b6fbaea532 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 @@ -275,9 +275,9 @@ public class RootDesignDefinePane extends AbstractDataModify { cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background"))).weight(LEFT_WEIGHT), cell(backgroundPane).weight(RIGHT_WEIGHT) ), - cell(displayReport), - cell(useParamsTemplate), - cell(fireAfterEditor) + row(cell(displayReport)), + row(cell(useParamsTemplate)), + row(cell(fireAfterEditor)) ).getComponent(); } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java index 86238df132..c29aff770c 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java @@ -42,7 +42,7 @@ public class ButtonGroupDictPane extends JPanel { cell(columnLabel).weight(LEFT_WEIGHT), cell(columnSpinner).weight(RIGHT_WEIGHT) ).getComponent(); this.add(column(VERTICAL_GAP, - cell(adaptiveCheckbox), + row(cell(adaptiveCheckbox)), cell(columnSettingRow) ).getComponent()); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java index 97df720aa0..5a90856fd6 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java @@ -13,6 +13,7 @@ import javax.swing.JPanel; 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; import static com.fr.design.constants.LayoutConstants.VERTICAL_GAP; public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane { @@ -41,7 +42,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane returnTypePane = new ReturnTypePane(); return column(VERTICAL_GAP, - cell(supportTagCheckBox),cell(returnTypePane) + row(cell(supportTagCheckBox)), + cell(returnTypePane) ).getComponent(); } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java index c57d05da12..df0afbcfb2 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java @@ -7,6 +7,9 @@ import com.fr.form.ui.CustomWriteAbleRepeatEditor; import javax.swing.JPanel; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.cell; + /** * Author : Shockway * Date: 13-9-18 @@ -24,7 +27,7 @@ public abstract class CustomWritableRepeatEditorPane e cell(dicPane[0]).weight(LEFT_WEIGHT), cell(dicPane[1]).weight(RIGHT_WEIGHT) ), - cell(repeatCheckBox) + row(cell(repeatCheckBox)) ).getComponent(); if (waterMarkComponent[0] != null && waterMarkComponent[1] != null) { panel.add(row( @@ -115,7 +115,7 @@ public abstract class DirectWriteEditorDefinePane e public JPanel setValidatePane(){ directWriteCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Edit"), false); JPanel otherContentPane = column(LayoutConstants.VERTICAL_GAP).getComponent(); - otherContentPane.add(directWriteCheckBox); + otherContentPane.add(row(cell(directWriteCheckBox)).getComponent()); return otherContentPane; } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java index e847f7dac3..77a7ab450d 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java @@ -154,7 +154,7 @@ public abstract class FieldEditorDefinePane extends Abstr }); validatePane.add(column(VERTICAL_GAP, - cell(allowBlankCheckBox), + row(cell(allowBlankCheckBox)), cell(errorTipPane) ).getComponent()); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index 031b21466e..0ba933b964 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -82,8 +82,8 @@ public class LabelDefinePane extends AbstractDataModify