From d3f86c6f6d27ee3837ed3ca41f1455a0f115a2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 18 Dec 2024 19:43:09 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-144262=20fix:=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E9=9D=A2=E6=9D=BF=E6=B3=A8=E5=85=A5=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/tabledata/datacenter/DCTableDataPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java index 61cf5aefbe..3462e5db67 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.tabledata.datacenter; +import com.fanruan.workplace.conetxt.WorkplaceContext; import com.fanruan.workplace.http.ServiceType; import com.fr.datacenters.tabledata.DCTableData; import com.fr.datacenters.tabledata.bean.DCNameBean; @@ -34,6 +35,7 @@ public class DCTableDataPane extends AbstractTableDataPane { private static final JxEngine JX_ENGINE = JxEngine.newInstance(false); private static final String DATA_CENTER = "dc"; + private static final String LANGUAGE = "language"; private static final String DATA_CENTER_HELPER = "dcHelper"; private static final String DATA_CENTER_INJECT_URL = "fineServletURL"; private static final String DC_INDEX_HTML = "com/fr/design/data/tabledata/datacenter/web/data-choose.prod.html"; @@ -70,6 +72,7 @@ public class DCTableDataPane extends AbstractTableDataPane { .engine(JX_ENGINE) .namespace(DATA_CENTER) .bindWindow(DATA_CENTER_HELPER, DCTableDataJSBridge::getBridge) + .bindNamespace(LANGUAGE, WorkplaceContext.getLocale().toString()) .withURL(DATACENTERS_URL, ImmutableMap.of(DATA_CENTER_INJECT_URL, getDatacentersUrl())) .build(); } else { @@ -77,6 +80,7 @@ public class DCTableDataPane extends AbstractTableDataPane { .engine(JX_ENGINE) .namespace(DATA_CENTER) .bindWindow(DATA_CENTER_HELPER, DCTableDataJSBridge::getBridge) + .bindNamespace(LANGUAGE, WorkplaceContext.getLocale().toString()) .withEMB(DC_INDEX_HTML, ImmutableMap.of(DATA_CENTER_INJECT_URL, getDatacentersUrl())) .build(); } From 8750a2528da5590478e44b6451e0e24b2339eb97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 18 Dec 2024 19:44:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-139239=20fix:=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E7=BC=A9=E6=94=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/type/ChartImagePane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java index cb9e9614c0..56d7498018 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.chart.gui.type; -import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIUtils; import com.fr.design.chart.series.PlotStyle.ChartSelectDemoPane; import com.fr.design.constants.UIConstants; @@ -9,9 +8,9 @@ import com.fr.general.IOUtils; import javax.swing.BorderFactory; import java.awt.BorderLayout; -import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; +import java.awt.Image; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; @@ -47,9 +46,10 @@ public class ChartImagePane extends ChartSelectDemoPane { public void paint(Graphics g) { super.paint(g); - BufferedImage image1 = IOUtils.readImageWithCache(fullIconPath); + BufferedImage bufferedImage = IOUtils.readImageWithCache(fullIconPath); + Image scaledImage = bufferedImage.getScaledInstance(scale(IMAGE_WIDTH), scale(IMAGE_HIGTH), Image.SCALE_SMOOTH); int x = (this.getWidth() - scale(IMAGE_WIDTH)) / 2; - g.drawImage(image1, x, 0, scale(IMAGE_WIDTH), scale(IMAGE_HIGTH), null); + g.drawImage(scaledImage, x, 0, null); } }; From 8398ef77a9db992a57f71ddf3017c7bf23800827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 18 Dec 2024 19:44:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-143955=20fix:=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1=E9=9D=A2=E6=9D=BF=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/wrapper/MultiResultTableDataWrapper.java | 3 ++- .../data/tabledata/wrapper/StoreProcedureDataWrapper.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java index 09d7882438..52a28be631 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java @@ -14,6 +14,7 @@ import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.ui.util.UIUtil; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.workspace.server.repository.connection.ConnectionRepository; @@ -200,7 +201,7 @@ public final class MultiResultTableDataWrapper implements TableDataWrapper { FineLoggerFactory.getLogger().error(e.getMessage(), e); throw new Exception(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); } finally { - connectionBar.close(); + UIUtil.invokeLaterIfNeeded(() -> connectionBar.close()); } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java index e6d93a3d43..57709259bc 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java @@ -13,6 +13,7 @@ import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.ui.util.UIUtil; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.workspace.server.entity.connection.ConnectionBean; @@ -185,10 +186,10 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { ConnectionRepository.getInstance().testConnection(ConnectionInfoBeanHelper.createConnectionInfoBean(((StoreProcedure) getTableData()).getDatabaseConnection())); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); - connectionBar.close(); throw new Exception(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); + } finally { + UIUtil.invokeLaterIfNeeded(() -> connectionBar.close()); } - connectionBar.close(); storeProcedure.resetDataModelList(); createStore(true); return null; From b908f285a2a5db1ce8371538af29448d61d9a2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 18 Dec 2024 19:46:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-144196=20fix:=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A8=A1=E6=9D=BFUI=E6=AD=BB=E9=94=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/EastRegionContainerPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index d46bfdd8ac..1f635991db 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -385,8 +385,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } private void initContentPane() { - initRightPane(); - initLeftPane(); + UIUtil.invokeLaterIfNeeded(() -> { + initRightPane(); + initLeftPane(); + }); } // 右侧属性面板