From 31ca57f271c9537c7d075ce8a2a84ee2adc57835 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 25 Oct 2021 10:47:55 +0800 Subject: [PATCH 1/7] =?UTF-8?q?REPORT-61366=20FR11=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=9A=84=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=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 | 8 ++- .../cellquick/CellDSColumnEditor.java | 29 ++++++--- .../cellquick/CellFormulaQuickEditor.java | 65 ++++++++++++++++++- .../cellquick/CellStringQuickEditor.java | 3 +- 4 files changed, 90 insertions(+), 15 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 ae0a94799..8c96c4c86 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 @@ -43,6 +43,7 @@ import java.awt.event.ItemListener; import java.math.RoundingMode; import java.text.Format; import java.text.SimpleDateFormat; +import java.util.Arrays; /** * @author Starryi @@ -151,16 +152,17 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName protected JPanel createContentPane (Component[][] components) { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p, p}; + double[] rowSize = new double[components.length]; + Arrays.fill(rowSize, p); double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + int[][] rowCount = new int[components.length][2]; + Arrays.fill(rowCount, new int[] {1, 1}); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); } protected Component[][] getComponent (JPanel centerPane, JPanel typePane) { return new Component[][]{ - new Component[]{null, null}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Format"), SwingConstants.LEFT), typePane}, new Component[]{centerPane, null}, new Component[]{optionPane, null}, diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 276f3ba74..0ede5114f 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -42,6 +42,7 @@ import com.fr.report.cell.cellattr.core.group.DSColumn; import com.fr.report.cell.cellattr.core.group.FilterTypeEnum; import com.fr.report.cell.cellattr.core.group.SelectCount; import com.fr.stable.StringUtils; +import com.fr.third.jodd.util.ArraysUtil; import javax.swing.BorderFactory; import javax.swing.Icon; @@ -60,6 +61,7 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; +import java.util.Arrays; import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM; import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.EVEN; @@ -472,6 +474,7 @@ public class CellDSColumnEditor extends CellQuickEditor { if (cellElement != null) { sortPane.update(cellElement); valuePane.update(cellElement); + formatAttrPane.update(cellElement); filterPane.update(cellElement); //更新单元格扩展属性 updateExtendConfig(); @@ -486,6 +489,7 @@ public class CellDSColumnEditor extends CellQuickEditor { disableListener(); sortPane.populate(cellElement); valuePane.populate(cellElement); + formatAttrPane.populate(cellElement); filterPane.populate(cellElement); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); if (cellExpandAttr == null) { @@ -614,15 +618,19 @@ public class CellDSColumnEditor extends CellQuickEditor { enableListener(); - double[] rowSize = {P, P, P, P, P, P}; - double[] columnSize = {F}; Component[][] components = new Component[][]{ {sortPane}, {filterPane}, {valuePane}, + {formatAttrPane}, {extendableDirectionPane}, {multiNumPane} }; + + double[] rowSize = new double[components.length]; + Arrays.fill(rowSize, P); + double[] columnSize = {F}; + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); } @@ -1233,15 +1241,20 @@ public class CellDSColumnEditor extends CellQuickEditor { } public class FormatAttrPane extends AbstractAttrNoScrollPane { - private final TextFormatPane formatPane; + private TextFormatPane formatPane; - public FormatAttrPane() { + @Override + protected JPanel createContentPane() { this.formatPane = new TextFormatPane(); + return this.formatPane; } @Override - protected JPanel createContentPane() { - return formatPane; + public Dimension getPreferredSize() { + if (formatPane == null) { + return super.getPreferredSize(); + } + return formatPane.getPreferredSize(); } protected void initContentPane() { @@ -1253,13 +1266,13 @@ public class CellDSColumnEditor extends CellQuickEditor { } public void populate(CellElement cellElement) { - if (cellElement != null) { + if (cellElement != null && formatPane != null) { formatPane.populateBean(cellElement.getStyle()); } } public void update(CellElement cellElement) { - if (cellElement != null) { + if (cellElement != null && formatPane != null) { cellElement.setStyle(formatPane.update(cellElement.getStyle())); } } diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java index 5695f1ba2..30a5f0f55 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -8,8 +8,11 @@ import com.fr.design.actions.insert.cell.FormulaCellAction; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.formula.FormulaFactory; import com.fr.design.formula.UIFormula; +import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; +import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.style.TextFormatPane; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; @@ -35,6 +38,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; +import java.util.Arrays; /** * 公式快速编辑面板,同文本数字编辑拆分 @@ -46,6 +50,7 @@ import java.awt.event.KeyEvent; public class CellFormulaQuickEditor extends CellQuickEditor { //文本域 private UITextField formulaTextField; + private TextFormatPane formatPane; //编辑状态 private boolean isEditing = false; @@ -136,10 +141,59 @@ public class CellFormulaQuickEditor extends CellQuickEditor { pane.add(formulaButton, BorderLayout.EAST); content.add(pane, BorderLayout.NORTH); + + Component[][] componentLines = new Component[][] { + new Component[]{EMPTY_LABEL, content}, + new Component[]{createFormatPane(), null}, + }; + double[] rowSize = new double[componentLines.length]; + Arrays.fill(rowSize, TableLayout.PREFERRED); + double[] columnSize = new double[] {TableLayout.PREFERRED, TableLayout.FILL }; return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ - new Component[]{EMPTY_LABEL, content}}, - new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP); + new Component[]{EMPTY_LABEL, content}, + new Component[]{createFormatPane(), null}, + }, + rowSize, columnSize, HGAP, VGAP); + } + + private JPanel createFormatPane() { + formatPane = new TextFormatPane(); + AbstractAttrNoScrollPane container = new AbstractAttrNoScrollPane() { + @Override + protected JPanel createContentPane() { + return formatPane; + } + + protected void initContentPane() { + leftContentPane = createContentPane(); + if (leftContentPane != null) { + leftContentPane.setBorder(BorderFactory.createEmptyBorder()); + this.add(leftContentPane, BorderLayout.CENTER); + } + } + }; + + container.addAttributeChangeListener(new AttributeChangeListener() { + @Override + public void attributeChange() { + isEditing = true; + + CellSelection cs1 = (CellSelection) tc.getSelection(); + cellElement = tc.getEditingElementCase().getTemplateCellElement(cs1.getColumn(), cs1.getRow()); + + if (cellElement == null) { + CellSelection cs = (CellSelection) tc.getSelection(); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); + tc.getEditingElementCase().addCellElement(cellElement, false); + } + + cellElement.setStyle(formatPane.update(cellElement.getStyle())); + + fireTargetModified(); + isEditing = false; + } + }); + return container; } @Override @@ -202,6 +256,11 @@ public class CellFormulaQuickEditor extends CellQuickEditor { } showText(str); formulaTextField.setEditable(tc.isSelectedOneCell()); + + if (cellElement != null) { + Style style = cellElement.getStyle(); + formatPane.populateBean(style); + } } /** diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellStringQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellStringQuickEditor.java index 76e0926e0..1b2c9ae4d 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellStringQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellStringQuickEditor.java @@ -3,6 +3,7 @@ package com.fr.quickeditor.cellquick; import com.fr.base.BaseFormula; import com.fr.base.Style; import com.fr.base.TextFormat; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.itextarea.UITextArea; @@ -65,7 +66,7 @@ public class CellStringQuickEditor extends CellQuickEditor { */ @Override public JComponent createCenterBody() { - JPanel content = new JPanel(new BorderLayout()); + JPanel content = new JPanel(new BorderLayout(0, IntervalConstants.INTERVAL_L1)); stringTextArea = new UITextArea(); stringTextArea.addKeyListener(new KeyAdapter() { From 205e0eb733076c9d9ab0665a8aaefc60d1cb8dfa Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 25 Oct 2021 11:12:11 +0800 Subject: [PATCH 2/7] =?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 【问题原因】 AlphaFine需要一个不带参数的默认构造函数,用于构建面板 【改动思路】 同上 --- .../theme/TemplateThemeGridControlPane.java | 23 +++++++------ .../theme/TemplateThemeGridPagesPane.java | 13 +++++--- .../theme/TemplateThemeGridPane.java | 33 ++++++++++--------- 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java index 36f4fc146..cdbd6d10f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java @@ -22,6 +22,7 @@ import com.fr.design.menu.ToolBarDef; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; +import com.fr.third.javax.annotation.Nullable; import com.fr.transaction.CallBackAdaptor; import javax.swing.BorderFactory; @@ -67,19 +68,19 @@ public class TemplateThemeGridControlPane extends Basic private final Window window; - public static TemplateThemeGridControlPane createFormThemesManagerPane(Window window) { + public static TemplateThemeGridControlPane createFormThemesManagerPane(@Nullable Window window) { FormThemeConfig config = FormThemeConfig.getInstance(); FormThemeProfilePane editPane = new FormThemeProfilePane(config); return new TemplateThemeGridControlPane<>(window, config, editPane); } - public static TemplateThemeGridControlPane createReportThemesManagerPane(Window window) { + public static TemplateThemeGridControlPane createReportThemesManagerPane(@Nullable Window window) { ReportThemeConfig config = ReportThemeConfig.getInstance(); ReportThemeProfilePane editPane = new ReportThemeProfilePane(config); return new TemplateThemeGridControlPane<>(window, config, editPane); } - public TemplateThemeGridControlPane(Window window, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { + public TemplateThemeGridControlPane(@Nullable Window window, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { this.window = window; this.config = config; this.profilePane = profilePane; @@ -124,13 +125,15 @@ public class TemplateThemeGridControlPane extends Basic } private void registerWindowListener() { - window.addWindowListener(new WindowAdapter() { - @Override - public void windowClosed(WindowEvent e) { - super.windowClosed(e); - asyncThemeFetcher.shutdown(); - } - }); + if (window != null) { + window.addWindowListener(new WindowAdapter() { + @Override + public void windowClosed(WindowEvent e) { + super.windowClosed(e); + asyncThemeFetcher.shutdown(); + } + }); + } } private void resetEnableRemoveAction(T selectedTheme, RemoveThemeAction removeAction) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java index 330a2d053..bfef5179a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java @@ -22,6 +22,7 @@ import com.fr.design.mainframe.theme.provider.ThemeManageActionProvider; import com.fr.design.mainframe.theme.ui.BreadcrumbBar; import com.fr.stable.ArrayUtils; import com.fr.stable.unit.FU; +import com.fr.third.javax.annotation.Nullable; import com.fr.workspace.WorkContext; import javax.swing.BorderFactory; @@ -62,11 +63,15 @@ public class TemplateThemeGridPagesPane extends JPanel { private PageChangeListener pageChangeListener; private TemplateThemeGridPagePane currentTemplateThemeGridPagePane; - public TemplateThemeGridPagesPane(Window window) { + public TemplateThemeGridPagesPane() { + initializePane(null); + } + + public TemplateThemeGridPagesPane(@Nullable Window window) { initializePane(window); } - private void initializePane(Window window) { + private void initializePane(@Nullable Window window) { setLayout(new BorderLayout()); setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); @@ -234,7 +239,7 @@ public class TemplateThemeGridPagesPane extends JPanel { private final JTemplate template; public final TemplateThemeGridPane themeListPane; - public TemplateThemeUsingPane(Window window) { + public TemplateThemeUsingPane(@Nullable Window window) { super(); setLayout(new BorderLayout()); setBorder(new CompoundBorder( @@ -273,7 +278,7 @@ public class TemplateThemeGridPagesPane extends JPanel { public static class TemplateThemeManagingPane extends TemplateThemeGridPagePane { private final UITabbedPane tabbedPane; - public TemplateThemeManagingPane(Window window) { + public TemplateThemeManagingPane(@Nullable Window window) { setLayout(FRGUIPaneFactory.createBorderLayout()); tabbedPane = new UITabbedPane(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java index 5d5ea7052..bce859051 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java @@ -9,6 +9,7 @@ import com.fr.design.event.ChangeListener; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.StringUtils; +import com.fr.third.javax.annotation.Nullable; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -56,7 +57,7 @@ public class TemplateThemeGridPane extends BasicPane { private final Window window; - public TemplateThemeGridPane(Window window, boolean displayTheme4NewTemplateMarker, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { + public TemplateThemeGridPane(@Nullable Window window, boolean displayTheme4NewTemplateMarker, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { this.window = window; this.displayTheme4NewTemplateMarker = displayTheme4NewTemplateMarker; this.config = config; @@ -90,21 +91,23 @@ public class TemplateThemeGridPane extends BasicPane { } private void registerWindowListener() { - window.addWindowListener(new WindowAdapter() { - @Override - public void windowOpened(WindowEvent e) { - super.windowOpened(e); - startListenThemeConfig(); - asyncFetchThemes(); - } + if (window != null) { + window.addWindowListener(new WindowAdapter() { + @Override + public void windowOpened(WindowEvent e) { + super.windowOpened(e); + startListenThemeConfig(); + asyncFetchThemes(); + } - @Override - public void windowClosed(WindowEvent e) { - super.windowClosed(e); - stopListenThemeConfig(); - asyncThemeFetcher.shutdown(); - } - }); + @Override + public void windowClosed(WindowEvent e) { + super.windowClosed(e); + stopListenThemeConfig(); + asyncThemeFetcher.shutdown(); + } + }); + } } public void fillContentListPane() { From 520b9130d12e8035cbbd8d9074f5e0f1fba49487 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 25 Oct 2021 15:09:13 +0800 Subject: [PATCH 3/7] =?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 4/7] =?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 7ed323a4ef65481c5ad0ce694a36df77b04c949d Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Mon, 25 Oct 2021 15:53:03 +0800 Subject: [PATCH 5/7] =?UTF-8?q?REPORT-61510=20=E7=BB=84=E4=BB=B6=E5=9F=8B?= =?UTF-8?q?=E7=82=B9=E7=89=88=E6=9C=AC=E7=94=B1jartime=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E6=88=90jar=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/share/collect/ComponentCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 3ea805deb..c31e07f64 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -525,7 +525,7 @@ public class ComponentCollector implements XMLable { jo.put("userId", MarketConfig.getInstance().getBBSAttr().getBbsUid()); jo.put("uuid", uuid); jo.put("cmpBoardClickDaily", cmpBoardClickDaily()); - jo.put("pluginVersion", GeneralUtils.readBuildNO()); + jo.put("pluginVersion", GeneralUtils.getVersion()); jo.put("localCmpNumber", localCmpNumber); jo.put("remoteCmpNumber", remoteCmpNumber); jo.put("uploadCmpNumber", uploadCmpNumber); From 2c5364119057db9aad70d9c2a39e1c4623742d09 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 25 Oct 2021 15:55:50 +0800 Subject: [PATCH 6/7] =?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 7/7] =?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