From 138ecd0a81c9cff0c31ae6522eaed341e465ffa2 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 15:14:24 +0800 Subject: [PATCH 1/8] =?UTF-8?q?CHART-16016=20=E7=9B=91=E6=8E=A7=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E8=87=AA=E5=8A=A8=E6=95=B0=E6=8D=AE=E7=82=B9=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=94=AF=E6=8C=81=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nChartLabelContentPaneWithoutRichText.java | 361 ------------------ .../VanChartRefreshTooltipContentPane.java | 4 + .../component/VanChartTooltipContentPane.java | 167 ++++++-- .../label/GaugeLabelContentPane.java | 8 +- ...efreshTooltipContentPaneWithOutSeries.java | 4 + ...nChartFunnelRefreshTooltipContentPane.java | 5 + .../label/VanChartGanttLabelContentPane.java | 8 +- .../VanChartMapRefreshTooltipContentPane.java | 4 + ...ChartMutiPieRefreshTooltipContentPane.java | 4 + ...ChartScatterRefreshTooltipContentPane.java | 4 + .../VanChartStructureLabelContentPane.java | 8 +- ...artStructureRefreshTooltipContentPane.java | 4 + ...artWordCloudRefreshTooltipContentPane.java | 4 + 13 files changed, 184 insertions(+), 401 deletions(-) delete mode 100644 designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPaneWithoutRichText.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPaneWithoutRichText.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPaneWithoutRichText.java deleted file mode 100644 index dafaef060c..0000000000 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPaneWithoutRichText.java +++ /dev/null @@ -1,361 +0,0 @@ -package com.fr.van.chart.designer.component; - -import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; -import com.fr.plugin.chart.base.AttrTooltipContent; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; -import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; -import com.fr.van.chart.designer.style.VanChartStylePane; - -import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class VanChartLabelContentPaneWithoutRichText extends BasicBeanPane { - - private UIButtonGroup content; - - private ValueFormatPaneWithCheckBox valueFormatPane; - private PercentFormatPaneWithCheckBox percentFormatPane; - private CategoryNameFormatPaneWithCheckBox categoryNameFormatPane; - private SeriesNameFormatPaneWithCheckBox seriesNameFormatPane; - - //监控刷新时,自动数据点提示使用 - private ChangedValueFormatPaneWithCheckBox changedValueFormatPane; - private ChangedPercentFormatPaneWithCheckBox changedPercentFormatPane; - private UIButtonGroup styleButton; - private ChartTextAttrPane textAttrPane; - private JPanel centerPane; - private JPanel commonPanel; - private JPanel stylePanel; - private VanChartHtmlLabelPane htmlLabelPane; - - private VanChartStylePane parent; - private JPanel showOnPane; - - public VanChartLabelContentPaneWithoutRichText(VanChartStylePane parent, JPanel showOnPane) { - this.parent = parent; - this.showOnPane = showOnPane; - - this.setLayout(new BorderLayout()); - this.add(createLabelContentPane(), BorderLayout.CENTER); - } - - public ValueFormatPaneWithCheckBox getValueFormatPane() { - return valueFormatPane; - } - - public void setValueFormatPane(ValueFormatPaneWithCheckBox valueFormatPane) { - this.valueFormatPane = valueFormatPane; - } - - public PercentFormatPaneWithCheckBox getPercentFormatPane() { - return percentFormatPane; - } - - public void setPercentFormatPane(PercentFormatPaneWithCheckBox percentFormatPane) { - this.percentFormatPane = percentFormatPane; - } - - public CategoryNameFormatPaneWithCheckBox getCategoryNameFormatPane() { - return categoryNameFormatPane; - } - - public void setCategoryNameFormatPane(CategoryNameFormatPaneWithCheckBox categoryNameFormatPane) { - this.categoryNameFormatPane = categoryNameFormatPane; - } - - public SeriesNameFormatPaneWithCheckBox getSeriesNameFormatPane() { - return seriesNameFormatPane; - } - - public void setSeriesNameFormatPane(SeriesNameFormatPaneWithCheckBox seriesNameFormatPane) { - this.seriesNameFormatPane = seriesNameFormatPane; - } - - private JPanel createLabelContentPane() { - content = new UIButtonGroup<>(new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Common"), - Toolkit.i18nText("Fine-Design_Chart_Custom") - }); - - initFormatPane(parent, showOnPane); - - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - - commonPanel = createCommonPanel(); - htmlLabelPane = createHtmlLabelPane(); - htmlLabelPane.setParent(parent); - stylePanel = createTextStylePane(); - centerPane = new JPanel(new CardLayout()) { - @Override - public Dimension getPreferredSize() { - if (content.getSelectedIndex() == 0) { - return commonPanel.getPreferredSize(); - } else { - return new Dimension(commonPanel.getPreferredSize().width, htmlLabelPane.getPreferredSize().height); - } - } - }; - centerPane.add(htmlLabelPane, Toolkit.i18nText("Fine-Design_Chart_Custom")); - centerPane.add(commonPanel, Toolkit.i18nText("Fine-Design_Chart_Common")); - - double[] column = {f, e}; - double[] row = {p, p, p}; - Component[][] components = new Component[][]{ - new Component[]{null, null}, - new Component[]{new UILabel(getLabelContentTitle()), content}, - new Component[]{null, centerPane}, - }; - initContentListener(); - JPanel paramsPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, column); - - JPanel contentPane = new JPanel(new BorderLayout()); - contentPane.add(paramsPanel, BorderLayout.CENTER); - contentPane.add(stylePanel, BorderLayout.SOUTH); - - return getLabelContentPane(contentPane); - } - - protected boolean hasTextStylePane() { - return true; - } - - private JPanel createTextStylePane() { - styleButton = new UIButtonGroup<>(new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Automatic"), - Toolkit.i18nText("Fine-Design_Chart_Custom") - }); - - textAttrPane = new ChartTextAttrPane() { - protected Component[][] getComponents(JPanel buttonPane) { - return new Component[][]{ - new Component[]{null, null}, - new Component[]{null, getFontNameComboBox()}, - new Component[]{null, buttonPane} - }; - } - }; - - JPanel buttonPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), styleButton); - - JPanel stylePanel = new JPanel(new BorderLayout()); - stylePanel.add(buttonPane, BorderLayout.CENTER); - stylePanel.add(textAttrPane, BorderLayout.SOUTH); - - initStyleButtonListener(); - - return stylePanel; - } - - private void initStyleButtonListener() { - styleButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - checkStylePane(); - } - }); - } - - private void checkStylePane() { - if (hasTextStylePane()) { - stylePanel.setVisible(true); - textAttrPane.setVisible(styleButton.getSelectedIndex() == 1); - } else { - stylePanel.setVisible(false); - } - } - - protected String getLabelContentTitle() { - return Toolkit.i18nText("Fine-Design_Report_Text"); - } - - protected JPanel getLabelContentPane(JPanel contentPane) { - return createTableLayoutPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Content"), contentPane); - } - - protected VanChartHtmlLabelPane createHtmlLabelPane() { - return new VanChartHtmlLabelPane(); - } - - protected JPanel createCommonPanel() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - - double[] columnSize = {f, p}; - double[] rowSize = getRowSize(p); - - return TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize); - } - - protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { - categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane); - seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane); - valueFormatPane = new ValueFormatPaneWithCheckBox(parent, showOnPane); - percentFormatPane = new PercentFormatPaneWithCheckBox(parent, showOnPane); - } - - protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) { - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); - } - - protected double[] getRowSize(double p) { - return new double[]{p, p, p, p}; - } - - protected Component[][] getPaneComponents() { - return new Component[][]{ - new Component[]{categoryNameFormatPane, null}, - new Component[]{seriesNameFormatPane, null}, - new Component[]{valueFormatPane, null}, - new Component[]{percentFormatPane, null}, - }; - } - - private void initContentListener() { - content.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - checkCardPane(); - } - }); - } - - - private void checkCardPane() { - CardLayout cardLayout = (CardLayout) centerPane.getLayout(); - if (content.getSelectedIndex() == 1) { - cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Custom")); - if (isDirty()) { - setCustomFormatterText(); - setDirty(false); - } - } else { - cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Common")); - } - } - - protected void setCustomFormatterText() { - htmlLabelPane.setCustomFormatterText(updateBean().getFormatterTextFromCommon()); - } - - public boolean isDirty() { - return categoryNameFormatPane.isDirty() || seriesNameFormatPane.isDirty() || valueFormatPane.isDirty() || percentFormatPane.isDirty() - || (changedValueFormatPane != null && changedValueFormatPane.isDirty()) || (changedValueFormatPane != null && changedPercentFormatPane.isDirty()); - } - - public void setDirty(boolean isDirty) { - categoryNameFormatPane.setDirty(isDirty); - seriesNameFormatPane.setDirty(isDirty); - valueFormatPane.setDirty(isDirty); - percentFormatPane.setDirty(isDirty); - - if (changedValueFormatPane != null) { - changedValueFormatPane.setDirty(isDirty); - } - if (changedPercentFormatPane != null) { - changedPercentFormatPane.setDirty(isDirty); - } - } - - @Override - protected String title4PopupWindow() { - return ""; - } - - - @Override - public void populateBean(AttrTooltipContent attrTooltipContent) { - if (attrTooltipContent == null) { - return; - } - - content.setSelectedIndex(attrTooltipContent.isCommon() ? 0 : 1); - - populateFormatPane(attrTooltipContent); - - htmlLabelPane.populate(attrTooltipContent.getHtmlLabel()); - if (!attrTooltipContent.isCommon()) { - setDirty(false); - } - if (hasTextStylePane()) { - this.styleButton.setSelectedIndex(attrTooltipContent.isCustom() ? 1 : 0); - this.textAttrPane.populate(attrTooltipContent.getTextAttr()); - } - checkCardPane(); - checkStylePane(); - } - - protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { - categoryNameFormatPane.populate(attrTooltipContent.getCategoryFormat()); - seriesNameFormatPane.populate(attrTooltipContent.getSeriesFormat()); - valueFormatPane.populate(attrTooltipContent.getValueFormat()); - percentFormatPane.populate(attrTooltipContent.getPercentFormat()); - - if (changedValueFormatPane != null) { - changedValueFormatPane.populate(attrTooltipContent.getChangedValueFormat()); - } - if (changedPercentFormatPane != null) { - changedPercentFormatPane.populate(attrTooltipContent.getChangedPercentFormat()); - } - } - - public AttrTooltipContent updateBean() { - AttrTooltipContent attrTooltipContent = createAttrTooltip(); - - attrTooltipContent.setCommon(content.getSelectedIndex() == 0); - - updateFormatPane(attrTooltipContent); - - updateFormatsWithPaneWidth(attrTooltipContent); - - htmlLabelPane.update(attrTooltipContent.getHtmlLabel()); - - if (hasTextStylePane()) { - attrTooltipContent.setCustom(styleButton.getSelectedIndex() == 1); - attrTooltipContent.setTextAttr(this.textAttrPane.update()); - } - - return attrTooltipContent; - } - - protected AttrTooltipContent createAttrTooltip() { - return new AttrTooltipContent(); - } - - protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { - categoryNameFormatPane.update(attrTooltipContent.getCategoryFormat()); - seriesNameFormatPane.update(attrTooltipContent.getSeriesFormat()); - valueFormatPane.update(attrTooltipContent.getValueFormat()); - percentFormatPane.update(attrTooltipContent.getPercentFormat()); - - if (changedValueFormatPane != null) { - changedValueFormatPane.update(attrTooltipContent.getChangedValueFormat()); - } - if (changedPercentFormatPane != null) { - changedPercentFormatPane.update(attrTooltipContent.getChangedPercentFormat()); - } - } - - private void updateFormatsWithPaneWidth(AttrTooltipContent attrTooltipContent) { - int paneWidth = seriesNameFormatPane.getWidth(); - if (paneWidth == 0) { - attrTooltipContent.getSeriesFormat().setEnable(false); - } - } -} diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java index 09e208cc10..7ecb797d6a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java @@ -22,6 +22,10 @@ public class VanChartRefreshTooltipContentPane extends VanChartTooltipContentPan return new double[]{p,p,p,p,p,p}; } + protected boolean supportRichEditor() { + return false; + } + @Override protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { super.initFormatPane(parent, showOnPane); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index fcbe91a5e0..f64bd54de2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -222,6 +222,14 @@ public class VanChartTooltipContentPane extends BasicBeanPane(new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Common"), - Toolkit.i18nText("Fine-Design_Chart_Rich_Text"), - Toolkit.i18nText("Fine-Design_Chart_Custom") - }); + if (supportRichEditor()) { + content = new UIButtonGroup<>(new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Common"), + Toolkit.i18nText("Fine-Design_Chart_Rich_Text"), + Toolkit.i18nText("Fine-Design_Chart_Custom") + }); + } else { + content = new UIButtonGroup<>(new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Common"), + Toolkit.i18nText("Fine-Design_Chart_Custom") + }); + } Component[][] components = new Component[][]{ new Component[]{null, null}, @@ -319,7 +357,12 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Mon, 28 Sep 2020 15:39:50 +0800 Subject: [PATCH 2/8] =?UTF-8?q?CHART-16006=20=E6=A0=87=E7=AD=BE=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89JS=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ChartHtmlLabelPaneWithBackGroundLabel.java | 27 +++++++++++++++++++ .../component/VanChartLabelContentPane.java | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java new file mode 100644 index 0000000000..f9c9f7d490 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java @@ -0,0 +1,27 @@ +package com.fr.van.chart.designer.component; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.JPanel; +import java.awt.Component; + +public class VanChartHtmlLabelPaneWithBackGroundLabel extends VanChartHtmlLabelPane { + + protected JPanel createWidthAndHeightPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + + JPanel panel = super.createWidthAndHeightPane(); + + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel}, + }; + + return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{d, f}); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java index 8586f21067..7fe05a3600 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java @@ -13,6 +13,6 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane { } protected VanChartHtmlLabelPane createHtmlLabelPane() { - return new VanChartHtmlLabelPane(); + return new VanChartHtmlLabelPaneWithBackGroundLabel(); } } From 66692b09efba43ca3fa73951481657d320834656 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 16:47:44 +0800 Subject: [PATCH 3/8] =?UTF-8?q?CHART-16030=20=E4=BF=AE=E6=94=B9=E6=95=A3?= =?UTF-8?q?=E7=82=B9=E5=9B=BE=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8populate=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scatter/VanChartScatterTooltipContentPane.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java index 9431b4ab76..cdc2b040e7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.scatter; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltipContent; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; @@ -107,21 +108,24 @@ public class VanChartScatterTooltipContentPane extends VanChartTooltipContentPa } protected void populateRichEditor(AttrTooltipContent attrTooltipContent) { - super.populateRichEditor(attrTooltipContent); - if (attrTooltipContent instanceof ScatterAttrTooltipContent) { ScatterAttrTooltipContent scatterAttrTooltipContent = (ScatterAttrTooltipContent) attrTooltipContent; VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ - richTextXFormatPane, richTextYFormatPane, richTextSizeFormatPane + getRichTextSeriesNameFormatPane(), + richTextXFormatPane, + richTextYFormatPane, + richTextSizeFormatPane }; AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ + scatterAttrTooltipContent.getRichTextSeriesFormat(), scatterAttrTooltipContent.getRichTextXFormat(), scatterAttrTooltipContent.getRichTextYFormat(), scatterAttrTooltipContent.getRichTextSizeFormat() }; + setRichTextAttr(new AttrTooltipRichText()); populateRichTextFormat(formatPaneGroup, formatGroup); populateRichText(attrTooltipContent.getRichTextAttr()); } From 79696bbb3d52bdfa29fde2cdde63efe00b21f1e0 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 17:18:59 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=B6=88=E9=99=A4=E9=AD=94=E6=9C=AF?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartTooltipContentPane.java | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index f64bd54de2..523d39a3e1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -51,6 +51,15 @@ public class VanChartTooltipContentPane extends BasicBeanPane content; private CategoryNameFormatPaneWithCheckBox categoryNameFormatPane; @@ -232,9 +241,9 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Mon, 28 Sep 2020 19:11:04 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=20REPORT-38557=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=90JDK11=E3=80=91=E6=B7=BB=E5=8A=A0=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=9A=84=E9=9D=A2=E6=9D=BF=E9=87=8C=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/web/CustomIconPane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 54f1755b94..ef66fc039a 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -404,7 +404,6 @@ public class CustomIconPane extends BasicPane { double p = TableLayout.PREFERRED; double[] rowSize = {p, p}; double[] columnSize = {p, p}; - int[][] rowCount = {{1, 1}, {1, 1}}; UIButton browseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_SelectIcon")); browseButton.setPreferredSize(new Dimension(80, 25)); browseButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_this_button")); @@ -443,7 +442,7 @@ public class CustomIconPane extends BasicPane { imagePane.add(browseButton); Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), nameTextField}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon") + ":"), imagePane}}; - JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); + JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.add(centerPane, BorderLayout.CENTER); } From 83e6fa4dc8ab64707cc44327f558258e328616ee Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 20:50:57 +0800 Subject: [PATCH 6/8] =?UTF-8?q?CHART-15950=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84dialog=E4=B8=8D=E7=9B=B8?= =?UTF-8?q?=E5=BA=94enter=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/dialog/UIDialog.java | 5 +++ .../component/VanChartRichEditorDialog.java | 31 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 2 +- .../com/fr/design/editor/script/editor.js | 4 +-- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java index 8f2021c696..dd3ddab3b9 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java @@ -116,6 +116,11 @@ public abstract class UIDialog extends JDialog { doCancel(); } }); + + applyEnterAction(); + } + + protected void applyEnterAction() { JPanel defaultPane = (JPanel) this.getContentPane(); InputMap inputMapAncestor = defaultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); ActionMap actionMap = defaultPane.getActionMap(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java new file mode 100644 index 0000000000..2cc0463f92 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java @@ -0,0 +1,31 @@ +package com.fr.van.chart.designer.component; + +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.BasicPane; +import com.fr.design.i18n.Toolkit; +import com.fr.design.utils.gui.GUICoreUtils; + +import java.awt.Dimension; +import java.awt.Frame; + +public class VanChartRichEditorDialog extends BasicDialog { + + public static final Dimension DEFAULT = new Dimension(660, 600); + + public VanChartRichEditorDialog(Frame parent, BasicPane pane) { + super(parent, pane); + + this.setTitle(Toolkit.i18nText("Fine-Design_Report_RichTextEditor")); + this.setBasicDialogSize(DEFAULT); + GUICoreUtils.centerWindow(this); + this.setResizable(false); + } + + protected void applyEnterAction() { + + } + + public void checkValid() { + + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 523d39a3e1..98616c4e52 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -407,7 +407,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane pane = VanChartRichEditorPane.createRichEditorPane(richText); - BasicDialog dialog = pane.showWindow(new JFrame()); + BasicDialog dialog = new VanChartRichEditorDialog(new JFrame(), pane); pane.populate(VanChartRichEditorPane.getRichEditorModel(richText)); diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js index d42f978cd8..1a2a07dc4b 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js @@ -128,8 +128,8 @@ } str += " " + key + "=\"" + value + "\""; - if (key === "alt" && dataIdMap[value]) { - str += " " + "data-id" + "=\"" + dataIdMap[value] + "\""; + if (key === "alt" && dataIdMap[value.trim()]) { + str += " " + "data-id" + "=\"" + dataIdMap[value.trim()] + "\""; } }); From 05fa2e7476c769dde0470ce6f9eb716d224d511b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 21:15:32 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=BC=8F=E6=96=97?= =?UTF-8?q?=E5=9B=BE=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/VanChartFunnelLabelContentPane.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java index 3df529fc3f..4443fb162f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java @@ -1,15 +1,17 @@ package com.fr.van.chart.funnel.designer.style; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipNameFormat; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox; -import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -59,6 +61,24 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane { setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane)); } + protected void populateRichEditor(AttrTooltipContent attrTooltipContent) { + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ + getRichTextSeriesNameFormatPane(), + getRichTextValueFormatPane(), + getRichTextPercentFormatPane() + }; + + AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ + attrTooltipContent.getRichTextSeriesFormat(), + attrTooltipContent.getRichTextValueFormat(), + attrTooltipContent.getRichTextPercentFormat() + }; + + setRichTextAttr(new AttrTooltipRichText()); + populateRichTextFormat(formatPaneGroup, formatGroup); + populateRichText(attrTooltipContent.getRichTextAttr()); + } + protected AttrTooltipContent createAttrTooltip() { AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.getCategoryFormat().setEnable(false); From f38350202d657a1da66b9d511936e96f0c05fc8e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 28 Sep 2020 21:47:57 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=BC=8F=E6=96=97?= =?UTF-8?q?=E5=9B=BE=E7=B3=BB=E5=88=97=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../funnel/designer/style/VanChartFunnelLabelContentPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java index 4443fb162f..af29cddf39 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java @@ -83,6 +83,7 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane { AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.getCategoryFormat().setEnable(false); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); + attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat()); return attrTooltipContent; }