From 5b4868a601d318f1d29d2177dda311e71ee2dec9 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 23 Jul 2020 18:04:45 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=B3=BB=E5=88=97=E5=92=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=82=B9=E6=8F=90=E7=A4=BA=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/box/VanChartBoxPlotTooltipPane.java | 6 + .../van/chart/box/VanChartBoxSeriesPane.java | 94 ++++++++++++- .../van/chart/box/VanChartBoxStylePane.java | 4 +- .../box/VanChartBoxTooltipContentPane.java | 123 +++++++++++++++++- 4 files changed, 222 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java index e976d05e6..4ad21d0d8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java @@ -1,6 +1,8 @@ package com.fr.van.chart.box; import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrTooltip; +import com.fr.plugin.chart.box.attr.AttrBoxTooltip; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; @@ -14,6 +16,10 @@ public class VanChartBoxPlotTooltipPane extends VanChartPlotTooltipPane { tooltipContentPane = new VanChartBoxTooltipContentPane(parent, VanChartBoxPlotTooltipPane.this); } + protected AttrTooltip getAttrTooltip() { + return new AttrBoxTooltip(); + } + protected boolean hasTooltipSeriesType() { return false; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java index 867f7ec9e..e64a134d5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java @@ -1,12 +1,102 @@ package com.fr.van.chart.box; import com.fr.chart.chartattr.Plot; +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.ChartStylePane; -import com.fr.van.chart.column.VanChartColumnSeriesPane; +import com.fr.plugin.chart.box.VanChartBoxPlot; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; +import com.fr.van.chart.designer.component.VanChartBeautyPane; +import com.fr.van.chart.designer.component.VanChartMarkerPane; +import com.fr.van.chart.designer.component.border.VanChartBorderPane; +import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane; -public class VanChartBoxSeriesPane extends VanChartColumnSeriesPane { +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; + +public class VanChartBoxSeriesPane extends VanChartAbstractPlotSeriesPane { + + private VanChartMarkerPane normalValuePane; + private VanChartMarkerPane outlierValuePane; public VanChartBoxSeriesPane(ChartStylePane parent, Plot plot) { super(parent, plot); } + + protected JPanel getContentInPlotType() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + + Component[][] components = new Component[][]{ + new Component[]{createBorderPane()}, + new Component[]{createNormalValuePane()}, + new Component[]{createOutlierValuePane()} + }; + + contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + return contentPane; + } + + protected VanChartBorderPane createDiffBorderPane() { + return new VanChartBorderPane(); + } + + private JPanel createNormalValuePane() { + normalValuePane = new VanChartMarkerPane(); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Normal_Value"), normalValuePane); + } + + private JPanel createOutlierValuePane() { + outlierValuePane = new VanChartMarkerPane(); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value"), outlierValuePane); + } + + private void checkMarkerPane(boolean isDetailed) { + normalValuePane.setVisible(isDetailed); + outlierValuePane.setVisible(isDetailed); + } + + protected void setColorPaneContent(JPanel panel) { + panel.add(createAlphaPane(), BorderLayout.SOUTH); + } + + protected VanChartBeautyPane createStylePane() { + return null; + } + + public void populateBean(Plot plot) { + if (plot == null) { + return; + } + + super.populateBean(plot); + + if (plot instanceof VanChartBoxPlot) { + normalValuePane.populate(((VanChartBoxPlot) plot).getNormalValue()); + outlierValuePane.populate(((VanChartBoxPlot) plot).getOutlierValue()); + + checkMarkerPane(((VanChartBoxPlot) plot).isDetailed()); + } + } + + public void updateBean(Plot plot) { + if (plot == null) { + return; + } + + if (plot instanceof VanChartBoxPlot) { + ((VanChartBoxPlot) plot).setNormalValue(normalValuePane.update()); + ((VanChartBoxPlot) plot).setOutlierValue(outlierValuePane.update()); + } + + super.updateBean(plot); + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java index b9e60c68e..53cf8083f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java @@ -2,11 +2,11 @@ package com.fr.van.chart.box; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AttributeChangeListener; -import com.fr.van.chart.bar.VanChartBarStylePane; +import com.fr.van.chart.designer.style.VanChartStylePane; import java.util.List; -public class VanChartBoxStylePane extends VanChartBarStylePane { +public class VanChartBoxStylePane extends VanChartStylePane { public VanChartBoxStylePane(AttributeChangeListener listener) { super(listener); 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 9fc9988f0..870250d65 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 @@ -1,8 +1,12 @@ package com.fr.van.chart.box; +import com.fr.design.i18n.Toolkit; +import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -10,6 +14,14 @@ import java.awt.Component; public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { + private VanChartFormatPaneWithCheckBox number; + private VanChartFormatPaneWithCheckBox max; + private VanChartFormatPaneWithCheckBox q3; + private VanChartFormatPaneWithCheckBox median; + private VanChartFormatPaneWithCheckBox q1; + private VanChartFormatPaneWithCheckBox min; + private VanChartFormatPaneWithCheckBox outlier; + public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane) { super(parent, showOnPane); } @@ -17,12 +29,121 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane); seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane); + + number = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Data_Number"); + } + }; + max = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Max_Value"); + } + }; + q3 = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Data_Q3"); + } + }; + median = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Data_Median"); + } + }; + q1 = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Data_Q1"); + } + }; + min = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Design_Chart_Min_Value"); + } + }; + outlier = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { + protected String getCheckBoxText() { + return Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value"); + } + }; + } + + protected double[] getRowSize(double p) { + return new double[]{p, p, p, p, p, p, p, p, p}; } protected Component[][] getPaneComponents() { return new Component[][]{ new Component[]{categoryNameFormatPane, null}, - new Component[]{seriesNameFormatPane, null} + new Component[]{seriesNameFormatPane, null}, + new Component[]{number, null}, + new Component[]{max, null}, + new Component[]{q3, null}, + new Component[]{median, null}, + new Component[]{q1, null}, + new Component[]{min, null}, + new Component[]{outlier, null} }; } + + public boolean isDirty() { + return categoryNameFormatPane.isDirty() + || seriesNameFormatPane.isDirty() + || number.isDirty() + || max.isDirty() + || q3.isDirty() + || median.isDirty() + || q1.isDirty() + || min.isDirty() + || outlier.isDirty(); + } + + public void setDirty(boolean isDirty) { + categoryNameFormatPane.setDirty(isDirty); + seriesNameFormatPane.setDirty(isDirty); + number.setDirty(isDirty); + max.setDirty(isDirty); + q3.setDirty(isDirty); + median.setDirty(isDirty); + q1.setDirty(isDirty); + min.setDirty(isDirty); + outlier.setDirty(isDirty); + } + + protected AttrTooltipContent createAttrTooltip() { + return new AttrBoxTooltipContent(); + } + + protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { + categoryNameFormatPane.populate(attrTooltipContent.getCategoryFormat()); + seriesNameFormatPane.populate(attrTooltipContent.getSeriesFormat()); + + if (attrTooltipContent instanceof AttrBoxTooltipContent) { + AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; + + number.populate(boxTooltipContent.getNumber()); + max.populate(boxTooltipContent.getMax()); + q3.populate(boxTooltipContent.getQ3()); + median.populate(boxTooltipContent.getMedian()); + q1.populate(boxTooltipContent.getQ1()); + min.populate(boxTooltipContent.getMin()); + outlier.populate(boxTooltipContent.getOutlier()); + } + } + + protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { + categoryNameFormatPane.update(attrTooltipContent.getCategoryFormat()); + seriesNameFormatPane.update(attrTooltipContent.getSeriesFormat()); + + if (attrTooltipContent instanceof AttrBoxTooltipContent) { + AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; + + number.update(boxTooltipContent.getNumber()); + max.update(boxTooltipContent.getMax()); + q3.update(boxTooltipContent.getQ3()); + median.update(boxTooltipContent.getMedian()); + q1.update(boxTooltipContent.getQ1()); + min.update(boxTooltipContent.getMin()); + outlier.update(boxTooltipContent.getOutlier()); + } + } } From 7db61352ff4bbb50fe3b1b55acb8d685febe52a8 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 23 Jul 2020 18:54:52 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/BoxPlotTableDataContentPane.java | 31 ++++------ .../BoxPlotTableResultDataSeriesPane.java | 5 +- .../table/BoxPlotTableSeriesTypeUsePane.java | 5 +- .../data/table/BoxTableDefinitionHelper.java | 59 +++++++++++++++++++ 4 files changed, 76 insertions(+), 24 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxTableDefinitionHelper.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java index 6ea7e126e..c17b39bf0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java @@ -12,8 +12,6 @@ import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.plugin.chart.box.data.VanBoxTableDefinition; -import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper; -import com.fr.plugin.chart.box.data.VanBoxTableResultDefinition; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -31,6 +29,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { private BoxPlotTableSeriesTypeUsePane seriesTypeComboxPane; private BoxPlotTableResultDataSeriesPane resultDataSeriesPane; + private JPanel filterPane; private ChartDataFilterPane dataScreeningPane; private ChartDataPane parent; @@ -88,10 +87,10 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { dataScreeningPane = new ChartDataFilterPane(initplot, parent, false); dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); - JPanel panel = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), 290, 24, dataScreeningPane); - panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); + filterPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), 290, 24, dataScreeningPane); + filterPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); - return panel; + return filterPane; } private void initDataTypeListener() { @@ -109,6 +108,10 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { if (resultDataSeriesPane != null) { resultDataSeriesPane.setVisible(dataType.getSelectedIndex() == 1); } + + if (filterPane != null) { + filterPane.setVisible(dataType.getSelectedIndex() == 0); + } } public void checkBoxUse(boolean hasUse) { @@ -144,7 +147,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { public void updateBean(ChartCollection collection) { checkChartCollection(collection); - VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection); + VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection); if (table != null) { table.setDetailed(dataType.getSelectedIndex() == 0); @@ -164,7 +167,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { checkChartCollection(collection); if (dataType != null) { - dataType.setSelectedIndex(VanBoxTableDefinitionHelper.isDetailedTableDataType(collection) ? 0 : 1); + dataType.setSelectedIndex(BoxTableDefinitionHelper.isDetailedTableDataType(collection) ? 0 : 1); } if (seriesTypeComboxPane != null) { seriesTypeComboxPane.populateBean(collection); @@ -180,7 +183,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { } private void checkChartCollection(ChartCollection collection) { - VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection); + VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection); if (table == null) { collection.getSelectedChart().setFilterDefinition(new VanBoxTableDefinition()); @@ -188,26 +191,18 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { } private void populateDataScreeningPane(ChartDataFilterPane dataScreeningPane, ChartCollection collection) { - NormalTableDataDefinition detailedDefinition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection); - VanBoxTableResultDefinition resultDefinition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection); + NormalTableDataDefinition detailedDefinition = BoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection); if (detailedDefinition != null) { dataScreeningPane.populateDefinition(detailedDefinition, false); - } else if (resultDefinition != null) { - dataScreeningPane.populateDefinition(resultDefinition, false); } } private void updateDataScreeningPane(ChartDataFilterPane dataScreeningPane, ChartCollection collection) { - NormalTableDataDefinition detailedDefinition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection); - VanBoxTableResultDefinition resultDefinition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection); + NormalTableDataDefinition detailedDefinition = BoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection); if (detailedDefinition != null) { dataScreeningPane.updateDefinition(detailedDefinition); } - - if (resultDefinition != null) { - dataScreeningPane.updateDefinition(resultDefinition); - } } } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java index 04dd3cda9..ff5391d11 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java @@ -8,7 +8,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.plugin.chart.box.data.VanBoxTableDefinition; -import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper; import com.fr.plugin.chart.box.data.VanBoxTableResultDefinition; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -120,7 +119,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa public void populateBean(ChartCollection collection) { super.populateBean(collection); - VanBoxTableResultDefinition definition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection); + VanBoxTableResultDefinition definition = BoxTableDefinitionHelper.getBoxTableResultDefinition(collection); if (definition == null) { return; @@ -136,7 +135,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa } public void updateBean(ChartCollection collection) { - VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection); + VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection); VanBoxTableResultDefinition definition = new VanBoxTableResultDefinition(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java index 1fd9186b1..ea8533577 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java @@ -18,7 +18,6 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.box.data.VanBoxTableDefinition; -import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -168,7 +167,7 @@ public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane Date: Fri, 24 Jul 2020 09:50:28 +0800 Subject: [PATCH 3/8] =?UTF-8?q?REPORT-35906=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=8C=E6=95=B0=E6=88=96=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E5=90=8E=EF=BC=8C=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E4=BC=9A=E5=81=9A=E4=B8=80=E9=83=A8=E5=88=86=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=8C=E6=A0=B9=E6=8D=AE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=9A=84=E9=A1=BA=E5=BA=8F=E7=89=B9=E7=82=B9=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E5=8E=BB=E5=A4=9A=E4=BD=99=E7=9A=84Component=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../tabledata/tabledatapane/MaxMemRowCountPanel.java | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 3118ed8a9..84c06b0b5 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ allprojects { dependencies { implementation 'com.fr.third:jxbrowser:6.23' - implementation 'com.fr.third:jxbrowser-swing:6.23' + //implementation 'com.fr.third:jxbrowser-swing:6.23' implementation 'com.fr.third:jxbrowser-mac:6.23' implementation 'com.fr.third:jxbrowser-win64:6.23' implementation 'com.fr.third.server:servlet-api:3.0' 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 00bbcc995..fbab521b0 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 @@ -1,6 +1,6 @@ package com.fr.design.data.tabledata.tabledatapane; -import java.awt.Dimension; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itoolbar.UIToolbar; +import com.fr.design.i18n.Toolkit; public class MaxMemRowCountPanel extends UIToolbar { @@ -88,7 +89,11 @@ public class MaxMemRowCountPanel extends UIToolbar { switchCache.setSelectedIndex(MAX_IN_MEMORY); this.add(new UILabel(" ")); this.add(numberSpinner); - this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row"))); + this.add(new UILabel(" " + Toolkit.i18nText("Fine-Design_Basic_Row"))); + if (this.getComponentCount() > 4) { + this.remove(1); + this.remove(1); + } this.validate(); this.repaint(); } From dbcdf851828b67dfa580affe0622372db11539e0 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 24 Jul 2020 14:44:26 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E7=B3=BB=E5=88=97=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E7=82=B9=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/box/VanChartBoxSeriesPane.java | 13 +++++++++---- .../box/data/table/BoxPlotTableDataContentPane.java | 6 +++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java index e64a134d5..617d3e5e7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java @@ -18,6 +18,9 @@ import java.awt.Component; public class VanChartBoxSeriesPane extends VanChartAbstractPlotSeriesPane { + private JPanel normalMarker; + private JPanel outlierMarker; + private VanChartMarkerPane normalValuePane; private VanChartMarkerPane outlierValuePane; @@ -49,19 +52,21 @@ public class VanChartBoxSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createNormalValuePane() { normalValuePane = new VanChartMarkerPane(); + normalMarker = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Normal_Value"), normalValuePane); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Normal_Value"), normalValuePane); + return normalMarker; } private JPanel createOutlierValuePane() { outlierValuePane = new VanChartMarkerPane(); + outlierMarker = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value"), outlierValuePane); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value"), outlierValuePane); + return outlierMarker; } private void checkMarkerPane(boolean isDetailed) { - normalValuePane.setVisible(isDetailed); - outlierValuePane.setVisible(isDetailed); + normalMarker.setVisible(isDetailed); + outlierMarker.setVisible(isDetailed); } protected void setColorPaneContent(JPanel panel) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java index c17b39bf0..bb17a6f2c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java @@ -11,6 +11,7 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.plugin.chart.box.VanChartBoxPlot; import com.fr.plugin.chart.box.data.VanBoxTableDefinition; import javax.swing.BorderFactory; @@ -150,7 +151,10 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection); if (table != null) { - table.setDetailed(dataType.getSelectedIndex() == 0); + boolean isDetailed = dataType.getSelectedIndex() == 0; + + table.setDetailed(isDetailed); + ((VanChartBoxPlot) initplot).setDetailed(isDetailed); } if (seriesTypeComboxPane != null) { seriesTypeComboxPane.updateBean(collection); From 0a80bfb61fbeb03598bb998fab667c630b57b546 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 24 Jul 2020 17:00:28 +0800 Subject: [PATCH 5/8] =?UTF-8?q?Merge=20branch=20'release/10.0'=20of=20http?= =?UTF-8?q?s://code.fineres.com/scm/~yvan/design=20into=20release/10.0=20#?= =?UTF-8?q?=20=E8=AF=B7=E8=BE=93=E5=85=A5=E4=B8=80=E4=B8=AA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=A1=E6=81=AF=E4=BB=A5=E8=A7=A3=E9=87=8A=E6=AD=A4?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=9A=84=E5=BF=85=E8=A6=81=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E5=B0=A4=E5=85=B6=E6=98=AF=E5=B0=86=E4=B8=80=E4=B8=AA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E7=9A=84=E4=B8=8A=E6=B8=B8=E5=88=86=E6=94=AF?= =?UTF-8?q?=20#=20=E5=90=88=E5=B9=B6=E5=88=B0=E4=B8=BB=E9=A2=98=E5=88=86?= =?UTF-8?q?=E6=94=AF=E3=80=82=20#=20#=20=E4=BB=A5=20'#'=20=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E7=9A=84=E8=A1=8C=E5=B0=86=E8=A2=AB=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E7=A9=BA=E7=9A=84=E6=8F=90=E4=BA=A4=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=B0=86=E7=BB=88=E6=AD=A2=E6=8F=90=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../tabledata/tabledatapane/MaxMemRowCountPanel.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 84c06b0b5..3118ed8a9 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ allprojects { dependencies { implementation 'com.fr.third:jxbrowser:6.23' - //implementation 'com.fr.third:jxbrowser-swing:6.23' + implementation 'com.fr.third:jxbrowser-swing:6.23' implementation 'com.fr.third:jxbrowser-mac:6.23' implementation 'com.fr.third:jxbrowser-win64:6.23' implementation 'com.fr.third.server:servlet-api:3.0' 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 fbab521b0..3f5902d8a 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 @@ -1,6 +1,7 @@ package com.fr.design.data.tabledata.tabledatapane; -import java.awt.*; + +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -87,13 +88,12 @@ public class MaxMemRowCountPanel extends UIToolbar { this.removeAll(); this.add(switchCache); switchCache.setSelectedIndex(MAX_IN_MEMORY); + if (this.getComponentCount() == 4) { + return; + } this.add(new UILabel(" ")); this.add(numberSpinner); this.add(new UILabel(" " + Toolkit.i18nText("Fine-Design_Basic_Row"))); - if (this.getComponentCount() > 4) { - this.remove(1); - this.remove(1); - } this.validate(); this.repaint(); } From 80554b04ffb68cc30392a0ba19dfa870e961b704 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 27 Jul 2020 10:43:05 +0800 Subject: [PATCH 6/8] =?UTF-8?q?Merge=20branch=20'release/10.0'=20of=20http?= =?UTF-8?q?s://code.fineres.com/scm/~yvan/design=20into=20release/10.0=20#?= =?UTF-8?q?=20=E8=AF=B7=E8=BE=93=E5=85=A5=E4=B8=80=E4=B8=AA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=A1=E6=81=AF=E4=BB=A5=E8=A7=A3=E9=87=8A=E6=AD=A4?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=9A=84=E5=BF=85=E8=A6=81=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E5=B0=A4=E5=85=B6=E6=98=AF=E5=B0=86=E4=B8=80=E4=B8=AA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E7=9A=84=E4=B8=8A=E6=B8=B8=E5=88=86=E6=94=AF?= =?UTF-8?q?=20#=20=E5=90=88=E5=B9=B6=E5=88=B0=E4=B8=BB=E9=A2=98=E5=88=86?= =?UTF-8?q?=E6=94=AF=E3=80=82=20#=20#=20=E4=BB=A5=20'#'=20=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E7=9A=84=E8=A1=8C=E5=B0=86=E8=A2=AB=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E7=A9=BA=E7=9A=84=E6=8F=90=E4=BA=A4=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=B0=86=E7=BB=88=E6=AD=A2=E6=8F=90=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/MaxMemRowCountPanel.java | 5 +++-- 1 file changed, 3 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 3f5902d8a..bb8f3128b 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 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_COMPONENT_COUNT_OF_MAX_MEMORY = 4; private static int getMaxComBoBoxWidth() { int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]); for (int i = 1; i < CACHE_LIST.length; i++) { @@ -88,7 +88,8 @@ public class MaxMemRowCountPanel extends UIToolbar { this.removeAll(); this.add(switchCache); switchCache.setSelectedIndex(MAX_IN_MEMORY); - if (this.getComponentCount() == 4) { + if (this.getComponentCount() == MAX_COMPONENT_COUNT_OF_MAX_MEMORY) { + //此处因为switchCache的setSelectedIndex可能会造成双层调用,然后因为重复添加组件产生bug,故而定义这个工具栏的正常最大组件数,做个判断 return; } this.add(new UILabel(" ")); From 46b4d5e81d6d325cbb3f377803df473e757bef4b Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 27 Jul 2020 11:16:35 +0800 Subject: [PATCH 7/8] =?UTF-8?q?Merge=20branch=20'release/10.0'=20of=20http?= =?UTF-8?q?s://code.fineres.com/scm/~yvan/design=20into=20release/10.0=20#?= =?UTF-8?q?=20=E8=AF=B7=E8=BE=93=E5=85=A5=E4=B8=80=E4=B8=AA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=A1=E6=81=AF=E4=BB=A5=E8=A7=A3=E9=87=8A=E6=AD=A4?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=9A=84=E5=BF=85=E8=A6=81=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E5=B0=A4=E5=85=B6=E6=98=AF=E5=B0=86=E4=B8=80=E4=B8=AA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E7=9A=84=E4=B8=8A=E6=B8=B8=E5=88=86=E6=94=AF?= =?UTF-8?q?=20#=20=E5=90=88=E5=B9=B6=E5=88=B0=E4=B8=BB=E9=A2=98=E5=88=86?= =?UTF-8?q?=E6=94=AF=E3=80=82=20#=20#=20=E4=BB=A5=20'#'=20=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E7=9A=84=E8=A1=8C=E5=B0=86=E8=A2=AB=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E7=A9=BA=E7=9A=84=E6=8F=90=E4=BA=A4=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=B0=86=E7=BB=88=E6=AD=A2=E6=8F=90=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/MaxMemRowCountPanel.java | 5 +++-- 1 file changed, 3 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 bb8f3128b..d43e6bdee 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 @@ -13,6 +13,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.i18n.Toolkit; +import com.fr.stable.StringUtils; public class MaxMemRowCountPanel extends UIToolbar { @@ -92,9 +93,9 @@ public class MaxMemRowCountPanel extends UIToolbar { //此处因为switchCache的setSelectedIndex可能会造成双层调用,然后因为重复添加组件产生bug,故而定义这个工具栏的正常最大组件数,做个判断 return; } - this.add(new UILabel(" ")); + this.add(new UILabel(StringUtils.BLANK)); this.add(numberSpinner); - this.add(new UILabel(" " + Toolkit.i18nText("Fine-Design_Basic_Row"))); + this.add(new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Basic_Row"))); this.validate(); this.repaint(); } From 46b31cea09de2cc64fa80034fae38bf9f3b205b7 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 27 Jul 2020 14:38:42 +0800 Subject: [PATCH 8/8] CHART-14813 dierta time --- .../main/java/com/fr/extended/chart/ExtendedOtherPane.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java index 6fba552b7..74bc01282 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java @@ -109,7 +109,7 @@ public class ExtendedOtherPane extends AbstractChartAtt } }); - autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0); + autoRefreshTime = createIntervalTime(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f, 20}; @@ -129,6 +129,10 @@ public class ExtendedOtherPane extends AbstractChartAtt return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Refresh"), gapPane); } + protected UISpinner createIntervalTime() { + return new UISpinner(1, Integer.MAX_VALUE, 5, 60); + } + private JPanel createHyperlinkPane() { hyperLinkPane = new ExtendedChartHyperLinkPane(); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), hyperLinkPane);