From b0326df7539bd7c2b927e4e4945d7e2b482a82fe Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 16 Oct 2020 15:53:48 +0800 Subject: [PATCH 01/16] =?UTF-8?q?CHART-15957=20&=20CHART-15957=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AF=8C=E6=96=87=E6=9C=AC=E6=89=93=E5=BC=80=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E9=BC=A0=E6=A0=87=E4=BD=8D=E7=BD=AE=E5=92=8C=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/com/fr/design/editor/rich_editor.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index a0cd5781d..07fbb3ec7 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -125,11 +125,15 @@ content = getInitContent(params, initParams, align); } + rich_editor.editor.bindToolbar(rich_editor.bar); + rich_editor.setValue({ content: content, isAuto: isAuto, dimensionIds: getDimensionIds(params) }); + + rich_editor.setFocus(); } Pool.update = function () { From 4e74f71f1103b8bc2d6a25186fb036d095111cd4 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 18 Oct 2020 14:48:59 +0800 Subject: [PATCH 02/16] =?UTF-8?q?CHART-16040=20=E7=AE=B1=E5=9E=8B=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 82 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 11 ++- 2 files changed, 90 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index abba5f753..18b3bb363 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -48,6 +48,9 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { private JPanel dataNumberPane; private JPanel dataOutlierPane; + private JPanel richTextNumberPane; + private JPanel richTextOutlierPane; + public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) { super(parent, showOnPane); checkFormatVisible(isDetailed); @@ -145,6 +148,16 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { return commonPanel; } + protected JPanel createRichFormatPanel() { + JPanel richFormatPanel = new JPanel(new BorderLayout()); + + richFormatPanel.add(createRichTextCateAndSeriesPane(), BorderLayout.NORTH); + richFormatPanel.add(createRichTextDataNumberPane(), BorderLayout.CENTER); + richFormatPanel.add(createRichTextDataDetailPane(), BorderLayout.SOUTH); + + return richFormatPanel; + } + protected Component[][] getRichTextComponents() { return new Component[][]{ new Component[]{getRichTextCategoryNameFormatPane(), null}, @@ -229,6 +242,72 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { return detailPane; } + private JPanel createRichTextCateAndSeriesPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p, p}; + + Component[][] cateAndSeries = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, getRichTextCategoryNameFormatPane()}, + new Component[]{null, getRichTextSeriesNameFormatPane()} + }; + + return TableLayoutHelper.createTableLayoutPane(cateAndSeries, rowSize, columnSize); + } + + private JPanel createRichTextDataNumberPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p}; + + Component[][] dataNumber = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextNumber}, + }; + + richTextNumberPane = TableLayoutHelper.createTableLayoutPane(dataNumber, rowSize, columnSize); + + return richTextNumberPane; + } + + private JPanel createRichTextDataDetailPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + + JPanel detailPane = new JPanel(new BorderLayout()); + + Component[][] richTextDetail = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextMax}, + new Component[]{new UILabel(getLabelContentTitle()), richTextQ3}, + new Component[]{null, richTextMedian}, + new Component[]{null, richTextQ1}, + new Component[]{null, richTextMin} + }; + + Component[][] dataOutlier = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextOutlier}, + }; + + richTextOutlierPane = TableLayoutHelper.createTableLayoutPane(dataOutlier, new double[]{p, p}, columnSize); + + detailPane.add(TableLayoutHelper.createTableLayoutPane(richTextDetail, new double[]{p, p, p, p, p, p}, columnSize), BorderLayout.NORTH); + detailPane.add(richTextOutlierPane, BorderLayout.CENTER); + + return detailPane; + } + public boolean isDirty() { return getCategoryNameFormatPane().isDirty() || getSeriesNameFormatPane().isDirty() @@ -354,5 +433,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { dataNumberPane.setVisible(detailed); dataOutlierPane.setVisible(detailed); + + richTextNumberPane.setVisible(detailed); + richTextOutlierPane.setVisible(detailed); } } 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 5d0a613ac..aca007097 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 @@ -384,17 +384,22 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Sun, 18 Oct 2020 16:19:15 +0800 Subject: [PATCH 03/16] =?UTF-8?q?CHART-16224=20=E5=A2=9E=E5=8A=A0=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartColumnPlotLabelDetailPane.java | 26 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 14 ++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index b2035522d..8de209712 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -5,6 +5,8 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; +import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; @@ -14,6 +16,30 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa super(plot, parent); } + protected void initToolTipContentPane(Plot plot) { + VanChartLabelContentPane dataLabelContentPane = new VanChartLabelContentPane(getParentPane(), VanChartColumnPlotLabelDetailPane.this) { + protected void checkCardPane() { + super.checkCardPane(); + checkOrientationPane(); + } + }; + + setDataLabelContentPane(dataLabelContentPane); + } + + private void checkOrientationPane() { + VanChartLabelContentPane dataLabelContentPane = (VanChartLabelContentPane) getDataLabelContentPane(); + UIButtonGroup content = dataLabelContentPane.getContent(); + UIButtonGroup orientation = getOrientation(); + + if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) { + orientation.setSelectedIndex(HORIZONTAL_INDEX); + orientation.setEnabled(false); + } else { + orientation.setEnabled(true); + } + } + protected boolean hasLabelOrientationPane() { return !((VanChartColumnPlot) this.getPlot()).isBar(); } 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 aca007097..d4ef4ac77 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 @@ -57,10 +57,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane content; @@ -202,6 +202,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane getContent() { + return content; + } + public AttrTooltipRichText getRichTextAttr() { return richText; } @@ -513,7 +517,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Sun, 18 Oct 2020 17:06:27 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/column/VanChartColumnPlotLabelDetailPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index 8de209712..a2be5f290 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -32,6 +32,10 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa UIButtonGroup content = dataLabelContentPane.getContent(); UIButtonGroup orientation = getOrientation(); + if (content == null || orientation == null) { + return; + } + if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) { orientation.setSelectedIndex(HORIZONTAL_INDEX); orientation.setEnabled(false); From 343465abcc736ab561958181be0c81d0c16b3919 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 19 Oct 2020 10:57:10 +0800 Subject: [PATCH 05/16] =?UTF-8?q?REPORT-41414=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86-=E7=B9=81=E4=BD=93=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E5=85=B1=E4=BA=AB=E6=95=B0=E6=8D=AE=E9=9B=86=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=88=B0=E7=A3=81=E7=9B=98=E8=AE=B0=E5=BD=95=E6=95=B0?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=B6=88=E5=A4=B1=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=B8=AA=E6=94=B9=E5=8A=A8=E5=B0=86MaxMexRow?= =?UTF-8?q?CountPanel=E4=B8=AD=E7=9A=84UISpinner=E7=BB=99=E6=8B=89?= =?UTF-8?q?=E9=95=BF=E5=BE=97=E8=BF=87=E5=A4=9A=EF=BC=8C=E8=B6=85=E8=BF=87?= =?UTF-8?q?=E4=BA=86=E8=AE=BE=E5=AE=9A=E7=9A=84=E6=9C=80=E5=A4=A7=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E5=9B=A0=E6=AD=A4=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E6=B2=A1=E8=83=BD=E6=98=BE=E7=A4=BA=20=E3=80=90=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E8=B0=83=E6=95=B4=E6=8B=89?= =?UTF-8?q?=E9=95=BF=E5=B9=85=E5=BA=A6=EF=BC=8C=E5=8F=A6=E5=A4=96=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E5=9B=BD=E9=99=85=E5=8C=96=E7=89=B9=E7=82=B9=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BA=86=E6=9C=80=E5=A4=A7=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/MaxMemRowCountPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java index 13fd60a60..af2b71a7c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java @@ -21,7 +21,7 @@ public class MaxMemRowCountPanel extends UIToolbar { private static final int MAX_IN_MEMORY = 1; private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") }; - private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 250; + private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 280; private static final int MAX_COMPONENT_COUNT_OF_MAX_MEMORY = 4; private static int getMaxComBoBoxWidth() { int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]); @@ -73,7 +73,7 @@ public class MaxMemRowCountPanel extends UIToolbar { switchCache = new UIComboBox(CACHE_LIST); switchCache.addActionListener(switchStateL); numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1); - numberSpinner.setNumberFieldColumns(4); + numberSpinner.setNumberFieldColumns(3); } private void showAllPanel() { From cd207e5d584d5c2444ba793f9cd2291a33d4f1bf Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 19 Oct 2020 11:01:29 +0800 Subject: [PATCH 06/16] =?UTF-8?q?CHART-16040=20=E7=AE=B1=E5=9E=8B=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 57 ++++++++++++++----- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index 18b3bb363..25eb587d8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -7,6 +7,13 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMinFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataNumberFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataOutlierFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataQ1Format; +import com.fr.plugin.chart.base.format.AttrTooltipDataQ3Format; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent; @@ -370,20 +377,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { if (attrTooltipContent instanceof AttrBoxTooltipContent) { AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; - VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ - richTextNumber, richTextMax, richTextQ3, richTextMedian, - richTextQ1, richTextMin, richTextOutlier - }; - - AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ - boxTooltipContent.getRichTextNumber(), - boxTooltipContent.getRichTextMax(), - boxTooltipContent.getRichTextQ3(), - boxTooltipContent.getRichTextMedian(), - boxTooltipContent.getRichTextQ1(), - boxTooltipContent.getRichTextMin(), - boxTooltipContent.getRichTextOutlier() - }; + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = getFormatPaneGroup(); + AttrTooltipFormat[] formatGroup = getFormatGroup(boxTooltipContent); populateRichTextFormat(formatPaneGroup, formatGroup); populateRichText(attrTooltipContent.getRichTextAttr()); @@ -392,6 +387,40 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } } + private VanChartFormatPaneWithoutCheckBox[] getFormatPaneGroup() { + if (detailed) { + return new VanChartFormatPaneWithoutCheckBox[]{ + richTextNumber, richTextMax, richTextQ3, richTextMedian, + richTextQ1, richTextMin, richTextOutlier + }; + } + + return new VanChartFormatPaneWithoutCheckBox[]{ + richTextMax, richTextQ3, richTextMedian, richTextQ1, richTextMin + }; + } + + private AttrTooltipFormat[] getFormatGroup(AttrBoxTooltipContent boxTooltipContent) { + AttrTooltipDataNumberFormat richTextNumber = boxTooltipContent.getRichTextNumber(); + AttrTooltipDataMaxFormat richTextMaxFormat = boxTooltipContent.getRichTextMax(); + AttrTooltipDataQ3Format richTextQ3Format = boxTooltipContent.getRichTextQ3(); + AttrTooltipDataMedianFormat richTextMedianFormat = boxTooltipContent.getRichTextMedian(); + AttrTooltipDataQ1Format richTextQ1Format = boxTooltipContent.getRichTextQ1(); + AttrTooltipDataMinFormat richTextMinFormat = boxTooltipContent.getRichTextMin(); + AttrTooltipDataOutlierFormat richTextOutlierFormat = boxTooltipContent.getRichTextOutlier(); + + if (detailed) { + return new AttrTooltipFormat[]{ + richTextNumber, richTextMaxFormat, richTextQ3Format, richTextMedianFormat, + richTextQ1Format, richTextMinFormat, richTextOutlierFormat + }; + } + + return new AttrTooltipFormat[]{ + richTextMaxFormat, richTextQ3Format, richTextMedianFormat, richTextQ1Format, richTextMinFormat + }; + } + protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { getCategoryNameFormatPane().update(attrTooltipContent.getCategoryFormat()); getSeriesNameFormatPane().update(attrTooltipContent.getSeriesFormat()); From 089d35e65567e0da23c97bb9ae8a46db385b758a Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 15 Oct 2020 12:08:09 +0800 Subject: [PATCH 07/16] =?UTF-8?q?CHART-16154=20&=20CHART-16194=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=90=9C=E7=B4=A2=E6=A1=86=E3=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=97=B6=EF=BC=8C=E4=B8=8D=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/editor/script/editor.js | 2 +- .../script/insertcombo/combo.insert_param.js | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) 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 26d58f495..2d8bc97a8 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 @@ -194,7 +194,7 @@ content = this.editor.getValue(BI.NicEditor.FormatType.ESCAPE), isEqualToPlaceholder = editorService.isRichTextEqual(content, this.options.placeholder); - var HTML_ONLY_STYLE_TAG = "||||||||||||||||||||

"; + var HTML_ONLY_STYLE_TAG = "|||||||||||||||||"; if (!isEqualToPlaceholder) { content = content.replaceAll(HTML_ONLY_STYLE_TAG, ""); diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js b/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js index 7efb49c0c..36c02feda 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/insertcombo/combo.insert_param.js @@ -30,6 +30,7 @@ items: this.model.items, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, behaviors: {}, + width: 200, layouts: [{ type: "bi.vertical" }], @@ -45,27 +46,15 @@ var searchPopup = { type: "bi.vertical", cls: "bi-border", - hgap: 15, - tgap: 5, + tgap: 10, bgap: 10, - items: [{ - type: "bi.searcher", - adapter: this.adapter, - width: 210, - height: 24, - listeners: [{ - eventName: BI.Searcher.EVENT_CHANGE, - action: function () { - self.store.changeParam(this.getValue()[0]); - } - }] - }, this.adapter] + items: [this.adapter] }; return { type: "bi.combo", direction: "bottom,left", - isNeedAdjustWidth: false, + isNeedAdjustWidth: true, el: { type: "bi.vertical_adapt", items: [{ From 5efb759544ddb10e5b009cfa7e4cbeceb570d216 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 15 Oct 2020 12:24:40 +0800 Subject: [PATCH 08/16] =?UTF-8?q?CHART-16148=20=E8=A7=A3=E5=86=B3=E7=BB=84?= =?UTF-8?q?=E5=90=88=E5=9B=BE=E4=B8=AD=E6=A0=87=E7=AD=BE=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=A7=A6=E5=8F=91=E6=9B=B4=E6=96=B0=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E5=B1=9E=E6=80=A7=E5=82=A8=E5=AD=98=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/style/VanChartCustomPlotLabelTabPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java index 5461b220f..04b94ef5c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotLabelTabPane.java @@ -83,14 +83,14 @@ public class VanChartCustomPlotLabelTabPane extends VanChartCustomPlotTabPane customPlotList = plot.getCustomPlotList(); for (int i = 0; i < paneList.size() && i < customPlotList.size(); i++) { ConditionAttr attrList = customPlotList.get(i).getConditionCollection().getDefaultAttr(); - DataSeriesCondition attr = customPlotList.get(i).getAttrLabelFromConditionCollection(); - if (attr != null) { - attrList.remove(attr); - } VanChartPlotLabelPane labelPane = (VanChartPlotLabelPane) paneList.get(i); AttrLabel attrLabel = labelPane.update(); + DataSeriesCondition attr = customPlotList.get(i).getAttrLabelFromConditionCollection(); + if (attr != null) { + attrList.remove(attr); + } if (attrLabel != null) { attrList.addDataSeriesCondition(attrLabel); } From f7bf95d3ccf060f645882190fccbaf5aa7236147 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 15 Oct 2020 21:20:47 +0800 Subject: [PATCH 09/16] =?UTF-8?q?CHART-16226=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=BB=98=E8=AE=A4=E5=B1=85=E5=B7=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 10 ++++++++- .../component/VanChartLabelContentPane.java | 6 ++++++ .../component/VanChartRichEditorPane.java | 21 +++++++++++++++++-- .../style/VanChartFunnelLabelContentPane.java | 3 ++- .../label/VanChartMapLabelContentPane.java | 3 ++- .../VanChartMultiPieLabelContentPane.java | 3 ++- .../VanChartStructureLabelContentPane.java | 3 ++- .../VanChartWordCloudTooltipContentPane.java | 9 ++++++++ .../com/fr/design/editor/rich_editor.html | 10 +++++---- 9 files changed, 57 insertions(+), 11 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index abba5f753..d6a30bf50 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -254,7 +254,15 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected AttrTooltipContent createAttrTooltip() { - return new AttrBoxTooltipContent(detailed); + AttrTooltipContent boxTooltipContent = new AttrBoxTooltipContent(detailed); + + boxTooltipContent.getCategoryFormat().setEnable(true); + boxTooltipContent.getSeriesFormat().setEnable(true); + + boxTooltipContent.getRichTextCategoryFormat().setEnable(true); + boxTooltipContent.getRichTextSeriesFormat().setEnable(true); + + return boxTooltipContent; } protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { 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 7fe05a360..957fcdaf7 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 @@ -1,5 +1,7 @@ package com.fr.van.chart.designer.component; +import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.type.TextAlign; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -15,4 +17,8 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane { protected VanChartHtmlLabelPane createHtmlLabelPane() { return new VanChartHtmlLabelPaneWithBackGroundLabel(); } + + protected AttrTooltipContent createAttrTooltip() { + return new AttrTooltipContent(TextAlign.CENTER); + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index 615979f30..408b730b2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -2,6 +2,7 @@ package com.fr.van.chart.designer.component; import com.fr.design.ui.ModernUIPane; import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.type.TextAlign; import com.fr.stable.StringUtils; import com.teamdev.jxbrowser.chromium.Browser; import com.teamdev.jxbrowser.chromium.JSValue; @@ -71,12 +72,18 @@ public class VanChartRichEditorPane { String content = richText.getContent(); String initParams = StringUtils.EMPTY; + String align = StringUtils.EMPTY; if (content.contains("data-id") && !content.contains("class")) { initParams = richText.getInitParamsContent(); + + String left = TextAlign.LEFT.getAlign(); + String center = TextAlign.CENTER.getAlign(); + + align = content.contains(left) ? left : center; } - return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams); + return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams, align); } public static class RichEditorModel { @@ -84,12 +91,14 @@ public class VanChartRichEditorPane { private boolean auto; private String params; private String initParams; + private String align; - public RichEditorModel(String content, boolean auto, String params, String initParams) { + public RichEditorModel(String content, boolean auto, String params, String initParams, String align) { this.content = content; this.auto = auto; this.params = params; this.initParams = initParams; + this.align = align; } public String getContent() { @@ -123,5 +132,13 @@ public class VanChartRichEditorPane { public void setInitParams(String initParams) { this.initParams = initParams; } + + public String getAlign() { + return align; + } + + public void setAlign(String align) { + this.align = align; + } } } 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 c12f40058..d7b9f9da4 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 @@ -4,6 +4,7 @@ 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.plugin.chart.type.TextAlign; 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; @@ -82,7 +83,7 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane { } protected AttrTooltipContent createAttrTooltip() { - AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); + AttrTooltipContent attrTooltipContent = new AttrTooltipContent(TextAlign.CENTER); attrTooltipContent.getCategoryFormat().setEnable(false); attrTooltipContent.getRichTextCategoryFormat().setEnable(false); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java index f73c32a48..95e286458 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java @@ -3,6 +3,7 @@ package com.fr.van.chart.map.designer.style.label; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; import com.fr.plugin.chart.base.format.AttrTooltipMapValueFormat; +import com.fr.plugin.chart.type.TextAlign; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithoutCheckBox; @@ -42,7 +43,7 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { @Override protected AttrTooltipContent createAttrTooltip() { - AttrTooltipContent content = new AttrTooltipContent(); + AttrTooltipContent content = new AttrTooltipContent(TextAlign.CENTER); content.setCategoryFormat(new AttrTooltipAreaNameFormat()); content.setValueFormat(new AttrTooltipMapValueFormat()); content.setRichTextCategoryFormat(new AttrTooltipAreaNameFormat()); diff --git a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java index a3d8f3c57..09093b099 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java @@ -2,6 +2,7 @@ package com.fr.van.chart.multilayer.style; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; +import com.fr.plugin.chart.type.TextAlign; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox; @@ -36,7 +37,7 @@ public class VanChartMultiPieLabelContentPane extends VanChartLabelContentPane { } protected AttrTooltipContent createAttrTooltip() { - AttrTooltipContent content = new AttrTooltipContent(); + AttrTooltipContent content = new AttrTooltipContent(TextAlign.CENTER); content.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); content.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat()); return content; diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java index bfe147ba6..4e2036465 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java @@ -4,6 +4,7 @@ package com.fr.van.chart.structure.desinger.style; import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; +import com.fr.plugin.chart.type.TextAlign; 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.PercentFormatPaneWithCheckBox; @@ -60,7 +61,7 @@ public class VanChartStructureLabelContentPane extends VanChartLabelContentPane @Override protected AttrTooltipContent createAttrTooltip() { - AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); + AttrTooltipContent attrTooltipContent = new AttrTooltipContent(TextAlign.CENTER); attrTooltipContent.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); return attrTooltipContent; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java index c0e9ac6c3..273d85ae8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java @@ -82,6 +82,15 @@ public class VanChartWordCloudTooltipContentPane extends VanChartTooltipContentP AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat()); + + attrTooltipContent.getCategoryFormat().setEnable(true); + attrTooltipContent.getSeriesFormat().setEnable(true); + attrTooltipContent.getValueFormat().setEnable(true); + + attrTooltipContent.getRichTextCategoryFormat().setEnable(true); + attrTooltipContent.getRichTextSeriesFormat().setEnable(true); + attrTooltipContent.getRichTextValueFormat().setEnable(true); + return attrTooltipContent; } } diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index e19ec4b4b..a0cd5781d 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -41,6 +41,7 @@ var isAuto = Pool.data.isAuto(); var params = Pool.data.getParams(); var initParams = Pool.data.getInitParams(); + var align = Pool.data.getAlign(); var getDimensionIds = function (params) { var result = []; @@ -58,7 +59,7 @@ return result; } - var getInitContent = function (params, initParams) { + var getInitContent = function (params, initParams, align) { var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); var paramGroup = params.split("-"); @@ -68,7 +69,7 @@ var [key, value] = paramGroup[i].split(":"); if (initParams.indexOf(value) > -1) { - content += '

' + editorService.getEditorParamImage(key) + '

'; + content += '

' + editorService.getEditorParamImage(key) + '

'; } } @@ -78,7 +79,7 @@ var dimensionIds = getDimensionIds(params); if (initParams) { - content = getInitContent(params, initParams); + content = getInitContent(params, initParams, align); } var rich_editor = BI.createWidget({ @@ -118,9 +119,10 @@ var isAuto = Pool.data.isAuto(); var params = Pool.data.getParams(); var initParams = Pool.data.getInitParams(); + var align = Pool.data.getAlign(); if (initParams) { - content = getInitContent(params, initParams); + content = getInitContent(params, initParams, align); } rich_editor.setValue({ From 192d92988ec9a325679a4aa2cdf8e96989357f44 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 16 Oct 2020 10:29:06 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/box/VanChartBoxTooltipContentPane.java | 10 +--------- .../style/VanChartWordCloudTooltipContentPane.java | 9 --------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index d6a30bf50..abba5f753 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -254,15 +254,7 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected AttrTooltipContent createAttrTooltip() { - AttrTooltipContent boxTooltipContent = new AttrBoxTooltipContent(detailed); - - boxTooltipContent.getCategoryFormat().setEnable(true); - boxTooltipContent.getSeriesFormat().setEnable(true); - - boxTooltipContent.getRichTextCategoryFormat().setEnable(true); - boxTooltipContent.getRichTextSeriesFormat().setEnable(true); - - return boxTooltipContent; + return new AttrBoxTooltipContent(detailed); } protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java index 273d85ae8..c0e9ac6c3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java @@ -82,15 +82,6 @@ public class VanChartWordCloudTooltipContentPane extends VanChartTooltipContentP AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat()); - - attrTooltipContent.getCategoryFormat().setEnable(true); - attrTooltipContent.getSeriesFormat().setEnable(true); - attrTooltipContent.getValueFormat().setEnable(true); - - attrTooltipContent.getRichTextCategoryFormat().setEnable(true); - attrTooltipContent.getRichTextSeriesFormat().setEnable(true); - attrTooltipContent.getRichTextValueFormat().setEnable(true); - return attrTooltipContent; } } From 508f90f401524bd820378cee6d278927875203a2 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 16 Oct 2020 15:01:33 +0800 Subject: [PATCH 11/16] =?UTF-8?q?CHART-15955=20&=20CHART-16115=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AF=8C=E6=96=87=E6=9C=AC=E7=95=8C=E9=9D=A2=E5=AE=BD?= =?UTF-8?q?=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/component/VanChartRichEditorDialog.java | 2 +- .../src/main/resources/com/fr/design/editor/script/editor.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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 index e584ea544..a13208df5 100644 --- 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 @@ -10,7 +10,7 @@ import java.awt.Frame; public class VanChartRichEditorDialog extends BasicDialog { - public static final Dimension DEFAULT = new Dimension(660, 600); + public static final Dimension DEFAULT = new Dimension(960, 600); public VanChartRichEditorDialog(Frame parent, BasicPane pane) { super(parent, pane); 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 2d8bc97a8..e8d9e9a56 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 @@ -27,7 +27,6 @@ this.editor = BI.createWidget({ type: "bi.nic_editor", $value: "chart-common-editor", - height: 365, cls: "editor bi-border bi-focus-shadow " + (o.textAlign === "center" ? "editor-center-text" : ""), listeners: [{ eventName: BI.NicEditor.EVENT_FOCUS, From c17cee8045ab8d3ecd43444c098f249e44c3e634 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 16 Oct 2020 15:53:48 +0800 Subject: [PATCH 12/16] =?UTF-8?q?CHART-15957=20&=20CHART-15957=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AF=8C=E6=96=87=E6=9C=AC=E6=89=93=E5=BC=80=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E9=BC=A0=E6=A0=87=E4=BD=8D=E7=BD=AE=E5=92=8C=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/com/fr/design/editor/rich_editor.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index a0cd5781d..07fbb3ec7 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -125,11 +125,15 @@ content = getInitContent(params, initParams, align); } + rich_editor.editor.bindToolbar(rich_editor.bar); + rich_editor.setValue({ content: content, isAuto: isAuto, dimensionIds: getDimensionIds(params) }); + + rich_editor.setFocus(); } Pool.update = function () { From f1fe0a4da619a1ccf5c8ab572f951c42d92e4d88 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 18 Oct 2020 14:48:59 +0800 Subject: [PATCH 13/16] =?UTF-8?q?CHART-16040=20=E7=AE=B1=E5=9E=8B=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 82 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 11 ++- 2 files changed, 90 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index abba5f753..18b3bb363 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -48,6 +48,9 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { private JPanel dataNumberPane; private JPanel dataOutlierPane; + private JPanel richTextNumberPane; + private JPanel richTextOutlierPane; + public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) { super(parent, showOnPane); checkFormatVisible(isDetailed); @@ -145,6 +148,16 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { return commonPanel; } + protected JPanel createRichFormatPanel() { + JPanel richFormatPanel = new JPanel(new BorderLayout()); + + richFormatPanel.add(createRichTextCateAndSeriesPane(), BorderLayout.NORTH); + richFormatPanel.add(createRichTextDataNumberPane(), BorderLayout.CENTER); + richFormatPanel.add(createRichTextDataDetailPane(), BorderLayout.SOUTH); + + return richFormatPanel; + } + protected Component[][] getRichTextComponents() { return new Component[][]{ new Component[]{getRichTextCategoryNameFormatPane(), null}, @@ -229,6 +242,72 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { return detailPane; } + private JPanel createRichTextCateAndSeriesPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p, p}; + + Component[][] cateAndSeries = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, getRichTextCategoryNameFormatPane()}, + new Component[]{null, getRichTextSeriesNameFormatPane()} + }; + + return TableLayoutHelper.createTableLayoutPane(cateAndSeries, rowSize, columnSize); + } + + private JPanel createRichTextDataNumberPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p}; + + Component[][] dataNumber = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextNumber}, + }; + + richTextNumberPane = TableLayoutHelper.createTableLayoutPane(dataNumber, rowSize, columnSize); + + return richTextNumberPane; + } + + private JPanel createRichTextDataDetailPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + + JPanel detailPane = new JPanel(new BorderLayout()); + + Component[][] richTextDetail = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextMax}, + new Component[]{new UILabel(getLabelContentTitle()), richTextQ3}, + new Component[]{null, richTextMedian}, + new Component[]{null, richTextQ1}, + new Component[]{null, richTextMin} + }; + + Component[][] dataOutlier = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, richTextOutlier}, + }; + + richTextOutlierPane = TableLayoutHelper.createTableLayoutPane(dataOutlier, new double[]{p, p}, columnSize); + + detailPane.add(TableLayoutHelper.createTableLayoutPane(richTextDetail, new double[]{p, p, p, p, p, p}, columnSize), BorderLayout.NORTH); + detailPane.add(richTextOutlierPane, BorderLayout.CENTER); + + return detailPane; + } + public boolean isDirty() { return getCategoryNameFormatPane().isDirty() || getSeriesNameFormatPane().isDirty() @@ -354,5 +433,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { dataNumberPane.setVisible(detailed); dataOutlierPane.setVisible(detailed); + + richTextNumberPane.setVisible(detailed); + richTextOutlierPane.setVisible(detailed); } } 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 5d0a613ac..aca007097 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 @@ -384,17 +384,22 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Sun, 18 Oct 2020 16:19:15 +0800 Subject: [PATCH 14/16] =?UTF-8?q?CHART-16224=20=E5=A2=9E=E5=8A=A0=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartColumnPlotLabelDetailPane.java | 26 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 14 ++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index b2035522d..8de209712 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -5,6 +5,8 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; +import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; @@ -14,6 +16,30 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa super(plot, parent); } + protected void initToolTipContentPane(Plot plot) { + VanChartLabelContentPane dataLabelContentPane = new VanChartLabelContentPane(getParentPane(), VanChartColumnPlotLabelDetailPane.this) { + protected void checkCardPane() { + super.checkCardPane(); + checkOrientationPane(); + } + }; + + setDataLabelContentPane(dataLabelContentPane); + } + + private void checkOrientationPane() { + VanChartLabelContentPane dataLabelContentPane = (VanChartLabelContentPane) getDataLabelContentPane(); + UIButtonGroup content = dataLabelContentPane.getContent(); + UIButtonGroup orientation = getOrientation(); + + if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) { + orientation.setSelectedIndex(HORIZONTAL_INDEX); + orientation.setEnabled(false); + } else { + orientation.setEnabled(true); + } + } + protected boolean hasLabelOrientationPane() { return !((VanChartColumnPlot) this.getPlot()).isBar(); } 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 aca007097..d4ef4ac77 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 @@ -57,10 +57,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane content; @@ -202,6 +202,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane getContent() { + return content; + } + public AttrTooltipRichText getRichTextAttr() { return richText; } @@ -513,7 +517,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Sun, 18 Oct 2020 17:06:27 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/column/VanChartColumnPlotLabelDetailPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index 8de209712..a2be5f290 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -32,6 +32,10 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa UIButtonGroup content = dataLabelContentPane.getContent(); UIButtonGroup orientation = getOrientation(); + if (content == null || orientation == null) { + return; + } + if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) { orientation.setSelectedIndex(HORIZONTAL_INDEX); orientation.setEnabled(false); From a1505fbdf661e3638bbac60aa4ed6f2525e734aa Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 19 Oct 2020 11:01:29 +0800 Subject: [PATCH 16/16] =?UTF-8?q?CHART-16040=20=E7=AE=B1=E5=9E=8B=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 57 ++++++++++++++----- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index 18b3bb363..25eb587d8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -7,6 +7,13 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataMinFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataNumberFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataOutlierFormat; +import com.fr.plugin.chart.base.format.AttrTooltipDataQ1Format; +import com.fr.plugin.chart.base.format.AttrTooltipDataQ3Format; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent; @@ -370,20 +377,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { if (attrTooltipContent instanceof AttrBoxTooltipContent) { AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; - VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ - richTextNumber, richTextMax, richTextQ3, richTextMedian, - richTextQ1, richTextMin, richTextOutlier - }; - - AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ - boxTooltipContent.getRichTextNumber(), - boxTooltipContent.getRichTextMax(), - boxTooltipContent.getRichTextQ3(), - boxTooltipContent.getRichTextMedian(), - boxTooltipContent.getRichTextQ1(), - boxTooltipContent.getRichTextMin(), - boxTooltipContent.getRichTextOutlier() - }; + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = getFormatPaneGroup(); + AttrTooltipFormat[] formatGroup = getFormatGroup(boxTooltipContent); populateRichTextFormat(formatPaneGroup, formatGroup); populateRichText(attrTooltipContent.getRichTextAttr()); @@ -392,6 +387,40 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } } + private VanChartFormatPaneWithoutCheckBox[] getFormatPaneGroup() { + if (detailed) { + return new VanChartFormatPaneWithoutCheckBox[]{ + richTextNumber, richTextMax, richTextQ3, richTextMedian, + richTextQ1, richTextMin, richTextOutlier + }; + } + + return new VanChartFormatPaneWithoutCheckBox[]{ + richTextMax, richTextQ3, richTextMedian, richTextQ1, richTextMin + }; + } + + private AttrTooltipFormat[] getFormatGroup(AttrBoxTooltipContent boxTooltipContent) { + AttrTooltipDataNumberFormat richTextNumber = boxTooltipContent.getRichTextNumber(); + AttrTooltipDataMaxFormat richTextMaxFormat = boxTooltipContent.getRichTextMax(); + AttrTooltipDataQ3Format richTextQ3Format = boxTooltipContent.getRichTextQ3(); + AttrTooltipDataMedianFormat richTextMedianFormat = boxTooltipContent.getRichTextMedian(); + AttrTooltipDataQ1Format richTextQ1Format = boxTooltipContent.getRichTextQ1(); + AttrTooltipDataMinFormat richTextMinFormat = boxTooltipContent.getRichTextMin(); + AttrTooltipDataOutlierFormat richTextOutlierFormat = boxTooltipContent.getRichTextOutlier(); + + if (detailed) { + return new AttrTooltipFormat[]{ + richTextNumber, richTextMaxFormat, richTextQ3Format, richTextMedianFormat, + richTextQ1Format, richTextMinFormat, richTextOutlierFormat + }; + } + + return new AttrTooltipFormat[]{ + richTextMaxFormat, richTextQ3Format, richTextMedianFormat, richTextQ1Format, richTextMinFormat + }; + } + protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { getCategoryNameFormatPane().update(attrTooltipContent.getCategoryFormat()); getSeriesNameFormatPane().update(attrTooltipContent.getSeriesFormat());