From afa46632039de5a43bbbd5c62ccdee3e82681413 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 28 Dec 2020 14:13:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-45473=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E8=B6=85=E8=BF=8716=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=97=B6=EF=BC=8C=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E4=B8=AD=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=90=8D=E7=A7=B0=20=E3=80=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=91=E4=B9=8B=E5=89=8D=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=98=AF=E8=B0=83=E7=94=A8=E4=BB=A3=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=90=8D=E7=A7=B0=E7=9A=84UILabel=E7=9A=84ge?= =?UTF-8?q?tPreferredSize()=E8=8E=B7=E5=8F=96width=EF=BC=8C=E7=84=B6?= =?UTF-8?q?=E5=90=8E=E8=B7=9F=E5=B8=B8=E9=87=8F143=E5=8E=BB=E6=AF=94?= =?UTF-8?q?=E8=BE=83=EF=BC=8C=E5=A6=82=E6=9E=9C=E8=B6=85=E8=BF=87=E4=BA=86?= =?UTF-8?q?143=EF=BC=8C=E5=B0=B1=E5=B0=86=E5=85=B6=E4=B8=AD=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=87=8F=E7=9F=AD=E5=87=A0=E4=B8=AA=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E4=B8=8A"..."=EF=BC=8C=E7=84=B6=E5=90=8E?= =?UTF-8?q?=E5=BE=AA=E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91=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E5=87=8F=E7=9F=AD=E5=AD=97=E7=AC=A6=E7=84=B6=E5=90=8E=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0"..."=EF=BC=8C=E8=BF=99=E6=A0=B7UILabel=E8=A2=AB?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0panel=E4=B8=AD=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=BB=86=E5=BE=AE=E5=8F=98=E5=8C=96=E4=B9=9F?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E8=B6=85=E8=BF=87=E5=8E=9F=E6=9D=A5=E7=9A=84?= =?UTF-8?q?143=EF=BC=8C=E6=95=B0=E6=8D=AE=E9=9B=86=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/MultiTDTableDataPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java index 571e13d44..4a153bfaa 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java @@ -41,7 +41,7 @@ import java.util.Map.Entry; public class MultiTDTableDataPane extends AbstractTableDataPane { - private static final int MAX_LENTH_OF_DATASET = 143; //关联数据集面板最大显示的数据集长度,超出这个长度显示数据集名称+“...” + private static final int MAX_LENTH_OF_DATASET = 130; //关联数据集面板最大显示的数据集长度,超出这个长度显示数据集名称+“...” private static final int MIN_BAR_NUMBER = 10; private static final int SUB_LENGTH = 4; private JPanel centerPanel; From bf63fbf211ca9054e06f5acb2257609951e5929a Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 15:22:53 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/selection/CellSelection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 4c90be3c5..30d7e2078 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -573,6 +573,11 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setValue(null); + CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); } break; From b7051b4470167277a4907a362b876e36059b59ec Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 16:10:31 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/selection/CellSelection.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 30d7e2078..da8788bb9 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -573,11 +573,7 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setValue(null); - CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); - cellGUIAttr.setShowAsDefault(true); - cellGUIAttr.setShowAsHTML(false); - cellGUIAttr.setShowAsDownload(false); - cellGUIAttr.setShowAsImage(false); + setDefault(element); } break; @@ -593,6 +589,15 @@ public class CellSelection extends Selection { return true; } + //设置显示内容为default + private void setDefault(CellElement element) { + CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); + } + @Override public int[] getSelectedColumns() { From 9175e0258dd7e4a5f1e587dedd4e63f4212dbb61 Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 28 Dec 2020 17:38:12 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-45880=20=E4=BD=BF=E7=94=A8=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=81=A2=E5=A4=8D=E6=99=AE=E9=80=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=90=8E=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/grid/selection/CellSelection.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index da8788bb9..7f5d86ef1 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -592,10 +592,12 @@ public class CellSelection extends Selection { //设置显示内容为default private void setDefault(CellElement element) { CellGUIAttr cellGUIAttr = element.getCellGUIAttr(); - cellGUIAttr.setShowAsDefault(true); - cellGUIAttr.setShowAsHTML(false); - cellGUIAttr.setShowAsDownload(false); - cellGUIAttr.setShowAsImage(false); + if (cellGUIAttr != null) { + cellGUIAttr.setShowAsDefault(true); + cellGUIAttr.setShowAsHTML(false); + cellGUIAttr.setShowAsDownload(false); + cellGUIAttr.setShowAsImage(false); + } } From 2f68f0db7c323a482b3a79a56dcb4780fa4f5b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 29 Dec 2020 13:54:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?CHART-17661=20=E5=A4=9A=E5=B1=82=E9=A5=BC?= =?UTF-8?q?=E5=9B=BE=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/designer/PlotFactory.java | 19 +++++++++++++++---- .../label/VanChartGaugePlotLabelPane.java | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java b/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java index ab46f5526..0f9db09fa 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java @@ -166,6 +166,12 @@ public class PlotFactory { tooltipContentMap.put(VanChartStructurePlot.class, VanChartStructureTooltipContentPane.class); } + private static Map, Class> labelMap = new HashMap<>(); + + static { + labelMap.put(PiePlot4VanChart.class, VanChartPiePlotLabelPane.class); + labelMap.put(VanChartGaugePlot.class, VanChartGaugePlotLabelPane.class); + } /** * 监控刷新 自动数据点提示Map @@ -208,10 +214,15 @@ public class PlotFactory { } public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane, boolean inCondition) { - if (plot instanceof VanChartGaugePlot) { - return new VanChartGaugePlotLabelPane(plot, stylePane); - } else if (plot instanceof PiePlot4VanChart) { - return new VanChartPiePlotLabelPane(plot, stylePane, inCondition); + Class key = plot.getClass(); + if (labelMap.containsKey(key)) { + try { + Class cl = labelMap.get(key); + Constructor constructor = cl.getConstructor(Plot.class, VanChartStylePane.class, boolean.class); + return constructor.newInstance(plot, stylePane, inCondition); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } } return new VanChartPlotLabelPane(plot, stylePane, inCondition); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java index 9bc21a044..5861bb0c2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugePlotLabelPane.java @@ -25,8 +25,8 @@ public class VanChartGaugePlotLabelPane extends VanChartPlotLabelPane { private VanChartPlotLabelDetailPane gaugeValueLabelPane; - public VanChartGaugePlotLabelPane(Plot plot, VanChartStylePane parent) { - super(plot, parent); + public VanChartGaugePlotLabelPane(Plot plot, VanChartStylePane parent, boolean inCondition) { + super(plot, parent, inCondition); } protected void createLabelPane() {