From 432f839d4d5046969bb01ea02dae4c0bc6718c34 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 Dec 2024 15:18:20 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-144772=20fix:=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE=E9=9B=86=E5=BC=B9=E7=AA=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/preview/PreviewTablePane.java | 5 ++--- .../resources/com/fr/design/i18n/dimension_en.properties | 1 + .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 1 + .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 1 + .../resources/com/fr/design/i18n/dimension_zh.properties | 1 + .../resources/com/fr/design/i18n/dimension_zh_TW.properties | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java index 5a2f3f543d..ed1e69d882 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java @@ -14,7 +14,6 @@ import com.fr.data.desensitize.base.DesensitizationTableData; import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.NameDataModel; -import com.fr.data.operator.DataOperator; import com.fr.design.DesignerEnvManager; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.preview.desensitization.TableDataPreviewDesensitizeManager; @@ -57,7 +56,6 @@ import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; -import javax.swing.UIManager; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; @@ -101,7 +99,8 @@ public class PreviewTablePane extends BasicPane { private PreviewTableDesensitizationPane desensitizationPane; private static final int PREVIEW_TABLE_MIN_COLUMN_WIDTH = FineUIScale.scale(75); - private static final int PREVIEW_TABLE_WIDTH = FineUIScale.scale(610); + private static final int PREVIEW_TABLE_WIDTH = FineUIUtils.getScaledI18nDimension( + "com.fr.design.data.datapane.preview.PreviewTablePane").width; private static final int TAB_MAX_COUNT_WITH_LINE = 7; /** diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index f9b75269f7..5bfb081100 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -39,5 +39,6 @@ com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 com.fr.design.data.tabledata.dialog=1200*600 com.fr.design.dscolumn.SpecifiedGroupAttrPane=900*600 +com.fr.design.data.datapane.preview.PreviewTablePane=800*520 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 4b9a58fa23..0e5b590cb4 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -38,5 +38,6 @@ com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 com.fr.design.data.tabledata.dialog=900*600 com.fr.design.dscolumn.SpecifiedGroupAttrPane=800*600 +com.fr.design.data.datapane.preview.PreviewTablePane=800*520 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 1b2a61ed78..3b73377fc6 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -38,5 +38,6 @@ com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 com.fr.design.data.tabledata.dialog=900*600 com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600 +com.fr.design.data.datapane.preview.PreviewTablePane=610*520 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index e187dfc098..5a008418c3 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties @@ -38,6 +38,7 @@ com.fr.design.actions.printingSetting.dialog=660*600 com.fr.design.data.datapane.preview.dialog=660*600 com.fr.design.data.tabledata.dialog=900*600 com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600 +com.fr.design.data.datapane.preview.PreviewTablePane=610*520 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index 8c3e985151..5726891ba7 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -37,5 +37,6 @@ com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 com.fr.design.data.tabledata.dialog=900*600 com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600 +com.fr.design.data.datapane.preview.PreviewTablePane=610*520 From 1655dfd6af0882ae8faffe24ce2e9d7875418f20 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 Dec 2024 15:19:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-144798=20fix:=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5UI=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 --- .../java/com/fr/design/EnvChangeEntrance.java | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 33be0b7fc4..82779f3844 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -22,6 +22,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.manager.clip.TemplateTreeClipboard; import com.fr.design.notification.NotificationCenter; import com.fr.design.plugin.remind.PluginErrorDesignReminder; +import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.DesignUtils; import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.env.EnvListPane; @@ -551,35 +552,37 @@ public class EnvChangeEntrance { if (eventPipe != null) { eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); } - final EnvListPane envListPane = new EnvListPane(); - envListPane.populateEnvManager(DesignerEnvManager.getEnvManager().getCurEnvName()); - BasicDialog envListDialog = envListPane.showWindow(SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame())); - dialog = envListDialog; - envListDialog.addDialogActionListener(new DialogActionAdapter() { + UIUtil.invokeLaterIfNeeded(() -> { + final EnvListPane envListPane = new EnvListPane(); + envListPane.populateEnvManager(DesignerEnvManager.getEnvManager().getCurEnvName()); + BasicDialog envListDialog = envListPane.showWindow(SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame())); + dialog = envListDialog; + envListDialog.addDialogActionListener(new DialogActionAdapter() { - @Override - public void doOk() { - FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); - if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { - DesignerExiter.getInstance().execute(); - } else { - updateNotRememberPwdEnv(); - if (DesignerContext.getDesignerFrame().isVisible()) { - VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); + @Override + public void doOk() { + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); + if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { + DesignerExiter.getInstance().execute(); + } else { + updateNotRememberPwdEnv(); + if (DesignerContext.getDesignerFrame().isVisible()) { + VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); + } } } - } - @Override - public void doCancel() { - dialog = null; - DesignerExiter.getInstance().execute(); + @Override + public void doCancel() { + dialog = null; + DesignerExiter.getInstance().execute(); + } + }); + if (e != null) { + WorkspaceExceptionHandler.getInstance().handleInStart(e, workspaceInfo); } + envListDialog.setVisible(true); }); - if (e != null) { - WorkspaceExceptionHandler.getInstance().handleInStart(e, workspaceInfo); - } - envListDialog.setVisible(true); } /** From 2f08d0bd5ae9222837a173a7c13a8342e71c2ab7 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 Dec 2024 15:41:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-144798=20fix:=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5UI=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 --- .../java/com/fr/design/EnvChangeEntrance.java | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 82779f3844..0a90682a49 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -516,7 +516,7 @@ public class EnvChangeEntrance { final EnvListPane envListPane = new EnvListPane(); final BasicDialog envListDialog = envListPane.showWindow(DesignerContext.getDesignerFrame()); dialog = envListDialog; - envListPane.populateEnvManager(envName); + UIUtil.invokeLaterIfNeeded(() -> envListPane.populateEnvManager(envName)); envListDialog.addDialogActionListener(new DialogActionAdapter() { @Override @@ -552,40 +552,38 @@ public class EnvChangeEntrance { if (eventPipe != null) { eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); } - UIUtil.invokeLaterIfNeeded(() -> { - final EnvListPane envListPane = new EnvListPane(); - envListPane.populateEnvManager(DesignerEnvManager.getEnvManager().getCurEnvName()); - BasicDialog envListDialog = envListPane.showWindow(SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame())); - dialog = envListDialog; - envListDialog.addDialogActionListener(new DialogActionAdapter() { + final EnvListPane envListPane = new EnvListPane(); + UIUtil.invokeLaterIfNeeded(() -> envListPane.populateEnvManager(DesignerEnvManager.getEnvManager().getCurEnvName())); + BasicDialog envListDialog = envListPane.showWindow(SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame())); + dialog = envListDialog; + envListDialog.addDialogActionListener(new DialogActionAdapter() { - @Override - public void doOk() { - FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); - if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { - DesignerExiter.getInstance().execute(); - } else { - updateNotRememberPwdEnv(); - if (DesignerContext.getDesignerFrame().isVisible()) { - VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); - } + @Override + public void doOk() { + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); + if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { + DesignerExiter.getInstance().execute(); + } else { + updateNotRememberPwdEnv(); + if (DesignerContext.getDesignerFrame().isVisible()) { + VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); } } + } - @Override - public void doCancel() { - dialog = null; - DesignerExiter.getInstance().execute(); - } - }); - if (e != null) { - WorkspaceExceptionHandler.getInstance().handleInStart(e, workspaceInfo); + @Override + public void doCancel() { + dialog = null; + DesignerExiter.getInstance().execute(); } - envListDialog.setVisible(true); }); + if (e != null) { + WorkspaceExceptionHandler.getInstance().handleInStart(e, workspaceInfo); + } + envListDialog.setVisible(true); } - /** + /** * 切换环境后 刷新远程目录需要忘记密码的情况 */ private void updateNotRememberPwdEnv() {