From 520b9130d12e8035cbbd8d9074f5e0f1fba49487 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 25 Oct 2021 15:09:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?CHART-21579=20=E6=A8=A1=E7=89=88=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2-=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8-=E7=B3=BB=E5=88=97-=E6=B8=90=E5=8F=98=E8=89=B2?= =?UTF-8?q?=E7=9A=84=E8=89=B2=E5=80=BC=E8=81=94=E5=8A=A8=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 1. 图表渐变色选择组合时,渐变色应该被设置为主题色阵列中 第一列第一行和第二列第一行对应的主题色,然后切换到 自定义色时,渐变色需要与之前的主题色保持一致 2. 渐变条的实现也有问题,应该把被选中 SelectColorPointBtn对应的颜色传递给 NewColorSelectPane,这样颜色选择框才能在主题色阵列和 使用过的颜色列表中标记对应的颜色。不过直接修改GradientBar实现 风险有点大,可能会影响其他使用场景,所以只针对固定不可拖拽的渐变条 进行修复. 【改动思路】 同上 --- .../mainframe/theme/edit/chart/ChartSeriesStylePane.java | 5 +++-- .../design/style/background/gradient/FixedGradientBar.java | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java index 098dc468d..f9ca4edf3 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme.edit.chart; +import com.fr.base.FineColor; import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; @@ -7,12 +8,12 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog; import com.fr.design.style.background.gradient.FixedGradientBar; -import java.util.List; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.List; /** * @author Bjorn @@ -66,7 +67,7 @@ public class ChartSeriesStylePane extends AbstractChartStylePane { if (chartStyle.getThemedChartSeriesColor().isCombineColor()) { List editingColorScheme = TemplateThemeProfileDialog.getEditingColorScheme(); colorTypeButton.setSelectedIndex(0); - gradientBar.updateColor(editingColorScheme.get(0), editingColorScheme.get(1)); + gradientBar.updateColor(new FineColor(0, 0, editingColorScheme.get(0)), new FineColor(1, 0, editingColorScheme.get(1))); } else { colorTypeButton.setSelectedIndex(1); gradientBar.updateColor(chartStyle.getThemedChartSeriesColor().getBeginColor(), chartStyle.getThemedChartSeriesColor().getEndColor()); diff --git a/designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java b/designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java index 8c502114b..06a217f23 100644 --- a/designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java +++ b/designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java @@ -14,6 +14,12 @@ public class FixedGradientBar extends GradientBar { super(minvalue, maxvalue); } + @Override + protected void clickButton(int select) { + setColor(getList().get(select).getColorInner()); + super.clickButton(select); + } + @Override protected void addMouseDragListener() { //不添加拖拽事件 From 29814f2081f57569503963b7d67563cb8cf4d40c Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 25 Oct 2021 15:23:13 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-61338=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=B8=BB=E9=A2=98-=E4=B8=BB=E9=A2=98=E9=85=8D=E8=89=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E5=90=8E=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=A9=BA=E7=99=BD=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 确保在EDT展示Toast 【改动思路】 同上 --- .../design/mainframe/theme/TemplateThemeProfilePane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index bc787bb18..9e88dfba1 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -220,7 +220,12 @@ public abstract class TemplateThemeProfilePane extends saveButton.setEnabled(false); saveAsButton.setEnabled(true); actionListener.onSaved(config.cachedFetch(getName())); - DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); + } + }); } }); } From 2c5364119057db9aad70d9c2a39e1c4623742d09 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 25 Oct 2021 15:55:50 +0800 Subject: [PATCH 3/4] =?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() { From 895fbc41b44cfe1e649cd88f55fd1dceae268020 Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 25 Oct 2021 16:10:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-61505=20=E5=AF=BC=E5=87=BA-=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BA=8B=E4=BB=B6-=E6=A8=A1=E6=9D=BF=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/javascript/ExportJavaScriptPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index e43857e21..3561dc097 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -696,7 +696,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane