From c210b8387adf9935622806ae5dbdf2dbcf3e94fc Mon Sep 17 00:00:00 2001 From: vito Date: Mon, 6 Sep 2021 14:16:59 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-58799=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E3=80=91=E6=A8=A1=E7=89=88=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=8F=90=E7=A4=BA=E6=97=A0=E6=B3=95=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/app/DesignerAppUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java index 437458c9ae..218ee4728a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java @@ -27,6 +27,7 @@ import com.fr.third.guava.cache.CacheBuilder; import com.fr.third.guava.collect.Multimap; import com.fr.workspace.WorkContext; +import javax.swing.SwingUtilities; import java.time.Duration; import java.util.Collection; import java.util.Map; @@ -183,7 +184,7 @@ public class DesignerAppUtils { // 试图获取多行读取错误提示并缓存待处理列表 String detail = dealWithErrorDetailMultiLineAndCache(path); if (detail.length() > 0) { - UIUtil.invokeLaterIfNeeded(() -> { + SwingUtilities.invokeLater(() -> { if (WorkContext.getCurrent().isLocal()) { UIExpandDialog.Builder() .owner(DesignerContext.getDesignerFrame()) From b8ccf0865e0ce908b4a922fed8a536bffa79c69c Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Sep 2021 11:28:13 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-58200=20=E5=88=9D=E6=AC=A1=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E7=9A=8410.0=E8=AE=BE=E8=AE=A1=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9B=AE=E5=BD=95=E4=B8=8B=E4=BC=9A=E7=94=9F?= =?UTF-8?q?=E6=88=90.finereport80=E7=BC=93=E5=AD=98=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/DesignerEnvManager.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index effd32b14a..717faebe15 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -403,9 +403,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version); - if (!envHome.exists()) { - StableUtils.mkdirs(envHome); - } return envHome.getAbsolutePath(); } From 8804789738b514c02ce8afaf6aaaee3bf9cda878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 6 Sep 2021 17:38:56 +0800 Subject: [PATCH 3/5] =?UTF-8?q?CHART-20498=20=E4=B8=BB=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E8=89=B2=E6=8E=A7=E4=BB=B6=E9=80=89=E4=B8=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/style/color/ColorControlWindow.java | 13 +++++++++++-- .../chart/gui/style/series/UIColorPickerPane.java | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java index 7fccbfde23..b84173f1db 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java @@ -62,19 +62,28 @@ public abstract class ColorControlWindow extends JPopupMenu { } protected void initSelectionPopupPane(boolean isSupportTransparent) { - selectionPopupPane = new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor()); + selectionPopupPane = createColorSelectionPopupPane(isSupportTransparent); this.add(selectionPopupPane, BorderLayout.CENTER); } + protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) { + return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor()); + } + protected boolean supportThemeColor(){ return true; } - class ColorSelectionPopupPane extends NewColorSelectPane { + protected class ColorSelectionPopupPane extends NewColorSelectPane { private static final long serialVersionUID = 7822856562329146354L; public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor) { + this(isSupportTransparent, isSupportThemeColor, null); + } + + public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor, Color color) { super(isSupportTransparent, isSupportThemeColor); + this.setColor(color); this.addChangeListener(new ChangeListener() { @Override diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 6529efce05..736ae5b3f7 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -370,6 +370,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { ColorRecButton.this.repaint(); } + @Override + protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) { + return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor(), ColorRecButton.this.color); + } + }; } From 9d23edf0e1102635db099774d1ac449129701cd4 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 6 Sep 2021 19:46:49 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-58705=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=9C=80=E8=BF=91=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E9=A2=9C=E8=89=B2=E8=BF=98=E4=BF=9D=E7=95=99=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E8=89=B2=E5=9D=90=E6=A0=87=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/preview/ReportThemePreviewPane.java | 6 ++- .../ecpreview/AbstractECPreviewPane.java | 3 ++ .../ecpreview/ECReportPreviewPane.java | 39 ++++++++++++------- .../ecpreview/cell/CornerPreviewCell.java | 4 +- .../background/gradient/GradientBar.java | 1 + .../com/fr/design/style/color/ColorCell.java | 5 +++ .../style/color/NewColorSelectPane.java | 4 +- 7 files changed, 40 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java index e4b4ee7a98..4ceec636d4 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java @@ -22,6 +22,7 @@ import com.fr.plugin.chart.vanchart.VanChart; import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; @@ -40,11 +41,12 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane { + protected Style getReportBigTitleStyle(ThemedCellStyleList cellStyleList) { + return getCellStyle(cellStyleList.getUse4BigTitle()); + } protected Style getReportHeaderStyle(ThemedCellStyleList cellStyleList) { return getCellStyle(cellStyleList.getUse4Header()); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java index 4274950cff..231233196d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/ECReportPreviewPane.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.theme.preview.ecpreview; import com.fr.base.theme.ReportTheme; import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.settings.ThemedCellStyleList; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.theme.preview.ThemePreviewed; import com.fr.design.mainframe.theme.preview.UINoOpaquePanel; @@ -21,6 +22,7 @@ import java.util.ArrayList; import java.util.List; public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreviewed { + private List headerTitleCellList = new ArrayList<>(); private List headerCellList = new ArrayList<>(); private List titleCellList = new ArrayList<>(); private List contentCellList = new ArrayList<>(); @@ -56,20 +58,26 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview private JPanel createNorthPane() { JPanel northPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); - CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{"产品", "数据", "统计维度"}, new Point2D[]{new Point(132, 75), new Point(189, 53)}); - cornerCell.setPreferredSize(new Dimension(189, 75)); + AbstractPreviewCell bigTitleCell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Big_Title")); + bigTitleCell.setPreferredSize(new Dimension(615, 46)); + headerTitleCellList.add(bigTitleCell); + northPane.add(bigTitleCell, BorderLayout.NORTH); + CornerPreviewCell cornerCell = new CornerPreviewCell(new String[]{Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Product"), + Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Data"), Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Statistical_Dimension")}, + new Point2D[]{new Point(159, 71), new Point(226, 49)}); + cornerCell.setPreferredSize(new Dimension(226, 71)); headerCellList.add(cornerCell); northPane.add(cornerCell, BorderLayout.WEST); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); northPane.add(centerPane, BorderLayout.CENTER); - PreviewCell cell = new PreviewCell("按地区统计"); + PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Statistical_By_Area")); titleCellList.add(cell); cell.setPreferredSize(new Dimension(308, 38)); centerPane.add(cell, BorderLayout.NORTH); JPanel eastSouthPane = new UINoOpaquePanel(new GridLayout()); - PreviewCell cell1 = new PreviewCell("华东"); - PreviewCell cell2 = new PreviewCell("华南"); - PreviewCell cell3 = new PreviewCell("小计"); + PreviewCell cell1 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_East_China")); + PreviewCell cell2 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_South_China")); + PreviewCell cell3 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Subtotal")); headerCellList.add(cell1); headerCellList.add(cell2); headerCellList.add(cell3); @@ -84,24 +92,24 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview JPanel centerPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); JPanel westPane = FRGUIPaneFactory.createBorderLayout_NO_Opaque_Pane(); centerPane.add(westPane, BorderLayout.WEST); - PreviewCell cell1 = new PreviewCell("饮料"); + PreviewCell cell1 = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Drink")); titleCellList.add(cell1); - cell1.setPreferredSize(new Dimension(94, 183)); + cell1.setPreferredSize(new Dimension(112, 153)); westPane.add(cell1, BorderLayout.WEST); - JPanel gridPane = new UINoOpaquePanel(new GridLayout(6, 1)); - for (int i = 0; i < 6; i++) { - PreviewCell cell = new PreviewCell("苹果汁"); - cell.setPreferredSize(new Dimension(95, 31)); + JPanel gridPane = new UINoOpaquePanel(new GridLayout(5, 1)); + for (int i = 0; i < 5; i++) { + PreviewCell cell = new PreviewCell(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_EC_Apple_Juice")); + cell.setPreferredSize(new Dimension(114, 31)); headerCellList.add(cell); gridPane.add(cell); } westPane.add(gridPane, BorderLayout.CENTER); - JPanel innerCenterPane = new UINoOpaquePanel(new GridLayout(6, 3)); + JPanel innerCenterPane = new UINoOpaquePanel(new GridLayout(5, 3)); centerPane.add(innerCenterPane, BorderLayout.CENTER); - for (int i = 0; i < 18; i++) { + for (int i = 0; i < 15; i++) { PreviewCell cell = new PreviewCell("35600"); - cell.setPreferredSize(new Dimension(102, 31)); + cell.setPreferredSize(new Dimension(123, 31)); if ((i + 1) % 3 == 0) { highLightCellList.add(cell); } else { @@ -117,6 +125,7 @@ public class ECReportPreviewPane extends UINoOpaquePanel implements ThemePreview @Override public void refresh(TemplateTheme theme) { ThemedCellStyleList cellStyleConfig = theme.getCellStyleList(); + refresh(headerTitleCellList, getReportBigTitleStyle(cellStyleConfig)); refresh(headerCellList, getReportHeaderStyle(cellStyleConfig)); refresh(contentCellList, getMainContentStyle(cellStyleConfig)); refresh(titleCellList, getSmallTitleStyle(cellStyleConfig)); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/CornerPreviewCell.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/CornerPreviewCell.java index 00cb90774c..c82ea9fa9c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/CornerPreviewCell.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ecpreview/cell/CornerPreviewCell.java @@ -21,8 +21,8 @@ public class CornerPreviewCell extends AbstractPreviewCell { FRFont frFont = style.getFRFont(); g2d.setPaint(frFont.getForeground()); g2d.drawString(values[0], 23, 53); - GraphDrawHelper.drawRotatedString(g2d, values[1], 104, 50, 30); - g2d.drawString(values[2], 128, 23); + GraphDrawHelper.drawRotatedString(g2d, values[1], 128, 50, 30); + g2d.drawString(values[2], 150, 23); //画分割线 for (int i = 0; i < point2DS.length; i++) { g2d.draw(new Line2D.Double(0, 0, point2DS[i].getX(), point2DS[i].getY())); //画线 diff --git a/designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java b/designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java index aac5c837a7..97a19f4643 100644 --- a/designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java +++ b/designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java @@ -146,6 +146,7 @@ public class GradientBar extends AbstractComponentPopBox implements UIObserver, return false; } }; + colorPane.setColor(getColor()); colorPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { hidePopupMenu(); diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java b/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java index 3e5636dc3e..4cc3e41cea 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java @@ -10,6 +10,7 @@ import java.awt.event.MouseEvent; import javax.swing.JComponent; +import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; import com.fr.general.ComparatorUtils; @@ -100,6 +101,10 @@ public class ColorCell extends JComponent implements ColorSelectable { if (e == null || e.getID() == MouseEvent.MOUSE_RELEASED) { colorSelectable.setColor(this.getColor()); colorSelectable.colorSetted(this); + if (this.getColor() != null) { + int rgb = this.getColor().getRGB(); + DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(new Color(rgb)); + } } if (e != null) { diff --git a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java index 7c471abcde..f38e69a8bf 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java @@ -332,9 +332,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { changeListener.stateChanged(evt); } } - if (color != null) { - DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(color.getColor()); - } + this.repaint(); } From 58a2121afb277b989d1da24b28e32727433eb1bd Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 7 Sep 2021 15:10:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-58211=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E8=83=8C=E6=99=AF=E6=B8=90=E5=8F=98=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E5=8F=B3=E8=BE=B9=E6=8C=89=E9=92=AE=E4=B8=8D=E5=A5=BD?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/theme/TemplateThemeProfilePane.java | 2 +- .../mainframe/theme/dialog/TemplateThemeProfileDialog.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 9e63e2240b..a19b1c2b86 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 @@ -71,7 +71,7 @@ public abstract class TemplateThemeProfilePane extends public static final int PREVIEW_PANE_WIDTH = LEFT_TITLE_PANE_WIDTH - 10; public static final int PREVIEW_PANE_HEIGHT = LEFT_TITLE_PANE_HEIGHT - TITLE_BORDER_FONT - 16; - public static final int RIGHT_PANE_WIDTH = 352; + public static final int RIGHT_PANE_WIDTH = 362; public static final int RIGHT_PANE_HEIGHT = LEFT_TITLE_PANE_HEIGHT; public static final int COLOR_SCHEME_TITLE_PANE_WIDTH = 298; public static final int COLOR_SCHEME_TITLE_PANE_HEIGHT = 174 + TITLE_BORDER_FONT / 2; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java index 7974097b58..0ddabe0762 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java @@ -24,7 +24,7 @@ public class TemplateThemeProfileDialog extends Templat private static final int PADDING_VERTICAL = 4; public static TemplateThemeProfilePane currentVisibleProfilePane; - public static final int CONTENT_WIDTH = 1000; + public static final int CONTENT_WIDTH = 1010; public static final int CONTENT_HEIGHT = 542; public TemplateThemeProfileDialog(Window parent, TemplateThemeProfilePane profilePane) {