From 2c5364119057db9aad70d9c2a39e1c4623742d09 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 25 Oct 2021 15:55:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58538=20=E9=80=82=E9=85=8D=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=94=AF=E6=8C=81=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/TableDataTreePane.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 6a9c2d1ed..b69be8c8d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -53,6 +53,7 @@ import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; +import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; import com.fr.workspace.WorkContext; import org.jetbrains.annotations.NotNull; @@ -74,6 +75,7 @@ import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; @@ -180,16 +182,20 @@ public class TableDataTreePane extends BasicTableDataTreePane { } private void initServerDatasetAuthTipJPanel() { - String[] lineTips = Toolkit.i18nText("Fine-Design_Server_Dataset_Auth_Tip").split("\n"); + String datasetAuthTip = Toolkit.i18nText("Fine-Design_Server_Dataset_Auth_Tip"); + List lineTips = new ArrayList(Arrays.asList(datasetAuthTip.split("\n"))); + if (datasetAuthTip.endsWith("\n")) { + lineTips.add(StringUtils.EMPTY); + } serverDatasetAuthTipJPanel = new JPanel(); - serverDatasetAuthTipJPanel.setLayout(new GridLayout(lineTips.length, 1)); - for (int i = 0; i < lineTips.length; i++) { - String lineTip = lineTips[i]; + serverDatasetAuthTipJPanel.setLayout(new GridLayout(lineTips.size(), 1)); + for (int i = 0; i < lineTips.size(); i++) { + String lineTip = lineTips.get(i); List jLabels = new ArrayList<>(); JLabel lineJLabel = new JLabel(lineTip); lineJLabel.setForeground(Color.lightGray); jLabels.add(lineJLabel); - if (i == (lineTips.length - 1)) { + if (i == (lineTips.size() - 1)) { JLabel jLabel = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Alphafine_No_Remind")); jLabel.setForeground(Color.blue); jLabel.addMouseListener(new MouseAdapter() {