From e1bd950705c905c419cb9d6223ff4ee9e9527ee9 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 10 Sep 2021 18:19:54 +0800 Subject: [PATCH 01/10] =?UTF-8?q?CHART-20568=20[=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=AA=8C=E6=94=B6]=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E9=A1=B5=E9=9D=A2=E5=9B=BE=E8=A1=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=AC=BC=E7=95=9C=20&=20CHART-20627=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E7=BB=84=E4=BB=B6=EF=BC=8C=E9=BC=A0=E6=A0=87=E5=8F=8C?= =?UTF-8?q?=E5=87=BB=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0=E5=9B=BE=E5=BD=A2?= =?UTF-8?q?=E9=87=8D=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 EditingMouseListener#startEditing会将图表的 ChartComponent放入FormDesigner, 作为编辑中的 ChartComponent来显示, 同时这里又在下层绘制了一遍 ChartComponent,导致图表进入编辑状态,会出现两个重 叠的ChartComponent。 考虑到编辑中,FormDesigner中的ChartComponent位于 上层,下层的ChartComponent实际上没什么用,所以可以 不用绘制下层的ChartComponent 【改动思路】 同上 --- .../com/fr/design/designer/creator/XChartEditor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java index ad328b85e7..eeb74155a3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java @@ -232,7 +232,14 @@ public class XChartEditor extends XBorderStyleWidgetCreator { Dimension size = getSize(); PaddingMargin margin = toData().getMargin(); - designerEditor.paintEditor(g, size, margin); + if (!isEditing) { + // CHART-20568 & CHART-20627 + // EditingMouseListener#startEditing会将图表的ChartComponent放入FormDesigner, 作为编辑中的ChartComponent来显示, + // 同时这里又在下层绘制了一遍ChartComponent,导致图表进入编辑状态,会出现两个重叠的ChartComponent。 + // 考虑到编辑中,FormDesigner中的ChartComponent位于上层,下层的ChartComponent实际上没什么用,所以可以不用绘制 + // 下层的ChartComponent + designerEditor.paintEditor(g, size, margin); + } if (coverPanel != null) { int horizonMargin = margin != null ? margin.getLeft() + margin.getRight() : 0; From 9effebf03d1f05d43331aa3c4277585b642c7c68 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Sun, 12 Sep 2021 21:50:03 +0800 Subject: [PATCH 02/10] =?UTF-8?q?REPORT-59143=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D=E3=80=91=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E4=B9=9F=E8=A6=81=E6=94=AF=E6=8C=81=E6=96=B0=E6=97=A7?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/fit/NewJForm.java | 7 +------ .../main/java/com/fr/design/fit/common/TemplateTool.java | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java index 74737f8ce6..fe192b59b9 100644 --- a/designer-form/src/main/java/com/fr/design/fit/NewJForm.java +++ b/designer-form/src/main/java/com/fr/design/fit/NewJForm.java @@ -73,8 +73,6 @@ public class NewJForm extends JForm { * @date: 2020/9/13 23:23 */ private void changePaneSize() { - if (mobileForm()) - return; NewFormMarkAttr newFormMarkAttr = this.getTarget().getAttrMark(NewFormMarkAttr.XML_TAG); if (newFormMarkAttr.isNotSetOriginSize()) { newFormMarkAttr.setBodyHeight(LayoutTool.getBodyHeight(this)); @@ -284,10 +282,7 @@ public class NewJForm extends JForm { private UIButton[] addAdaptiveSwitchButton(UIButton[] extraButtons) { switchAction = new SwitchAction(); - if (!mobileForm()) { - return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()}); - } - return extraButtons; + return ArrayUtils.addAll(extraButtons, new UIButton[]{switchAction.getToolBarButton()}); } public boolean isNewJFrom() { diff --git a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java index 323a28ad04..b8954d5f7e 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java @@ -48,9 +48,7 @@ public class TemplateTool { } else { if (jTemplate instanceof NewJForm) { NewJForm newJForm = (NewJForm) jTemplate; - if (newJForm.mobileForm()) { - currentType = JFormType.OLD_TYPE; - } else if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { + if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { currentType = JFormType.NEW_TYPE; } } From e2e41ccc472040b959b247d733731dba0e759fd4 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 10 Sep 2021 18:29:38 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-58252=20=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E5=8D=95=E5=85=83=E6=A0=BC=E8=A1=8C=E5=88=97=E6=A0=87?= =?UTF-8?q?=E8=AF=86=E5=8E=BB=E6=8E=89=E5=90=8E=E7=9A=84=E5=BC=A5=E8=A1=A5?= =?UTF-8?q?=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 表单报表块缩略图中去掉表格行列标志后,需要提供给用户一个仅 通过缩略图确定表格内容区域位置的方案。讨论后的方案为表格缩略 图中不出现内容区域外的网格线,用户从而可以直接通过缩略图网格线 的尺寸和位置来确定内容区域的大小和位置. 【改动思路】 同上 --- .../form/FormElementCaseDesigner.java | 3 ++ .../src/main/java/com/fr/grid/Grid.java | 10 ++++ .../src/main/java/com/fr/grid/GridUI.java | 50 ++++++++++++++----- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java index 2dd3dbbb7f..5be6362a4d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java @@ -152,10 +152,13 @@ public class FormElementCaseDesigner Grid grid = this.elementCasePane != null ? this.elementCasePane.getGrid() : null; if (grid != null) { boolean oldTranslucent = grid.isTranslucent(); + boolean oldShowExtraGridLine = grid.isShowExtraGridLine(); // 截缩图图时grid需支持半透明,不能用默认白色填充画布,否则会遮挡组件样式背景 grid.setTranslucent(true); + grid.setShowExtraGridLine(false); grid.paint(g2d); grid.setTranslucent(oldTranslucent); + grid.setShowExtraGridLine(oldShowExtraGridLine); } } catch (Exception e) { diff --git a/designer-realize/src/main/java/com/fr/grid/Grid.java b/designer-realize/src/main/java/com/fr/grid/Grid.java index b55f60bb53..80147f3e57 100644 --- a/designer-realize/src/main/java/com/fr/grid/Grid.java +++ b/designer-realize/src/main/java/com/fr/grid/Grid.java @@ -136,6 +136,8 @@ public class Grid extends BaseGridComponent { // 截取缩略图时需透明(不能用默认白色填充),否则会遮挡组件样式的背景,其余情况的绘制可以用白色等默认颜色填充 private boolean isTranslucent = false; + // 是否绘制单元格内容区之外的网格线 + private boolean showExtraGridLine = true; public Grid(int resolution) { this.resolution = resolution; @@ -1469,4 +1471,12 @@ public class Grid extends BaseGridComponent { public void setTranslucent(boolean translucent) { isTranslucent = translucent; } + + public boolean isShowExtraGridLine() { + return showExtraGridLine; + } + + public void setShowExtraGridLine(boolean showExtraGridLine) { + this.showExtraGridLine = showExtraGridLine; + } } diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index 10934a7cc4..07044b82c2 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -288,15 +288,25 @@ public class GridUI extends ComponentUI { } } } - GridRange gridRange = GridRange.range(grid.getHorizontalBeginValue(), horizontalEndValue, grid.getVerticalBeginValue(), verticalEndValue) + int xBeginIndex = grid.getHorizontalBeginValue(); + int xEndIndex = horizontalEndValue; + int yBeginIndex = grid.getVerticalBeginValue(); + int yEndIndex = verticalEndValue; + if (!grid.isShowExtraGridLine()) { + xBeginIndex = 0; + xEndIndex = Math.max(0, report.getColumnCount() - 1); + yBeginIndex = 0; + yEndIndex = Math.max(0, report.getRowCount() - 1); + } + GridRange gridRange = GridRange.range(xBeginIndex, xEndIndex, yBeginIndex, yEndIndex) .rangeList(rowHeightList, columnWidthList) .realSize(realWidth, realHeight); - new DrawVerticalLineHelper(gridRange, grid.isShowGridLine(), + new DrawVerticalLineHelper(gridRange, grid.isShowGridLine(), grid.isShowExtraGridLine(), isShowVerticalPaginateLine, paperPaintHeight, paginateLineList, resolution).iterateStart2End(g2d); - new DrawHorizontalLineHelper(gridRange, grid.isShowGridLine(), + new DrawHorizontalLineHelper(gridRange, grid.isShowGridLine(), grid.isShowExtraGridLine(), isShowHorizontalPaginateLine, paperPaintWidth, paginateLineList, resolution).iterateStart2End(g2d); } @@ -320,6 +330,7 @@ public class GridUI extends ComponentUI { protected GridRange gridRange; protected boolean showGridLine; + protected boolean showExtraGridLine; protected boolean showPaginateLine; protected double paperPaintSize; @@ -332,11 +343,12 @@ public class GridUI extends ComponentUI { protected static final double THRESHOLD = 1.0E-4D; - DrawLineHelper(GridRange gridRange, boolean showGridLine, + DrawLineHelper(GridRange gridRange, boolean showGridLine, boolean showExtraGridLine, boolean showPaginateLine, double paperPaintSize, List paginateLineList, int resolution) { this.gridRange = gridRange; this.showGridLine = showGridLine; + this.showExtraGridLine = showExtraGridLine; this.showPaginateLine = showPaginateLine; this.paperPaintSize = paperPaintSize; @@ -353,10 +365,10 @@ public class GridUI extends ComponentUI { private class DrawVerticalLineHelper extends DrawLineHelper { - DrawVerticalLineHelper(GridRange gridRange, boolean showGridLine, + DrawVerticalLineHelper(GridRange gridRange, boolean showGridLine, boolean discardExtraGridLine, boolean showPaginateLine, double paperPaintSize, List paginateLineList, int resolution) { - super(gridRange, showGridLine, showPaginateLine, + super(gridRange, showGridLine, discardExtraGridLine, showPaginateLine, paperPaintSize, paginateLineList, resolution); } @@ -372,7 +384,7 @@ public class GridUI extends ComponentUI { @Override protected void iterateStart2End(Graphics2D g2d) { - float rowHeight, paperYAxisSumSize = 0, yAxisSumSize = 0; + float rowHeight, paperYAxisSumSize = 0, maxXAxisSumSize = 0, yAxisSumSize = 0; for (int i = 0; i <= gridRange.yEndIndex; i++) { if (i == 0) { i = gridRange.yBeginIndex; @@ -397,6 +409,9 @@ public class GridUI extends ComponentUI { } xAxisSumSize += columnWidth; } + if (xAxisSumSize > maxXAxisSumSize) { + maxXAxisSumSize = xAxisSumSize; + } } if (showPaginateLine && paperYAxisSumSize - paperPaintSize > THRESHOLD) { paginateLineList.add(getPaginateLine2D((int) yAxisSumSize)); @@ -406,17 +421,21 @@ public class GridUI extends ComponentUI { } // paint 最后一个横线.. if (showGridLine) { - drawLastLine(g2d, (int) yAxisSumSize); + if (showExtraGridLine) { + drawLastLine(g2d, (int) yAxisSumSize); + } else { + GraphHelper.drawLine(g2d, 0, yAxisSumSize, maxXAxisSumSize, yAxisSumSize); + } } } } private class DrawHorizontalLineHelper extends DrawLineHelper { - DrawHorizontalLineHelper(GridRange gridRange, boolean showGridLine, + DrawHorizontalLineHelper(GridRange gridRange, boolean showGridLine, boolean discardExtraGridLine, boolean showPaginateLine, double paperPaintSize, List paginateLineList, int resolution) { - super(gridRange, showGridLine, showPaginateLine, + super(gridRange, showGridLine, discardExtraGridLine, showPaginateLine, paperPaintSize, paginateLineList, resolution); } @@ -432,7 +451,7 @@ public class GridUI extends ComponentUI { @Override protected void iterateStart2End(Graphics2D g2d) { - float columnWidth, paperXAxisSumSize = 0, xAxisSumSize = 0; + float columnWidth, paperXAxisSumSize = 0, maxYAxisSumSize = 0, xAxisSumSize = 0; for (int i = 0; i <= gridRange.xEndIndex; i++) { if (i == 0) { i = gridRange.xBeginIndex; @@ -456,6 +475,9 @@ public class GridUI extends ComponentUI { } yAxisSumSize += rowHeight; } + if (yAxisSumSize > maxYAxisSumSize) { + maxYAxisSumSize = yAxisSumSize; + } } if (showPaginateLine && paperXAxisSumSize - paperPaintSize > THRESHOLD) { paginateLineList.add(getPaginateLine2D((int) xAxisSumSize)); @@ -465,7 +487,11 @@ public class GridUI extends ComponentUI { } // paint 最后一个横线.. if (showGridLine) { - drawLastLine(g2d, (int) xAxisSumSize); + if (showExtraGridLine) { + drawLastLine(g2d, (int) xAxisSumSize); + } else { + GraphHelper.drawLine(g2d, xAxisSumSize, 0, xAxisSumSize, maxYAxisSumSize); + } } } } From 040b0841d9b8bb62dd71c7a5832721071a21f63b Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 13 Sep 2021 09:51:59 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-59143=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D=E3=80=91=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E4=B9=9F=E8=A6=81=E6=94=AF=E6=8C=81=E6=96=B0=E6=97=A7?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/fit/common/TemplateTool.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java index b8954d5f7e..ae1e98f885 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java @@ -46,11 +46,8 @@ public class TemplateTool { if (AdaptiveSwitchUtil.isSwitchJFromIng()) { currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; } else { - if (jTemplate instanceof NewJForm) { - NewJForm newJForm = (NewJForm) jTemplate; - if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { - currentType = JFormType.NEW_TYPE; - } + if (isNewJForm(jTemplate)) { + currentType = JFormType.NEW_TYPE; } } //UI转换 @@ -62,6 +59,16 @@ public class TemplateTool { } }; + private static boolean isNewJForm(JTemplate jTemplate) { + if (jTemplate instanceof NewJForm) { + NewJForm newJForm = (NewJForm) jTemplate; + if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { + return true; + } + } + return false; + } + public static Listener getSwitchListener() { return switchListener; } From 91a6242ed074ddeece06106924aca851c91346e9 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 13 Sep 2021 09:55:13 +0800 Subject: [PATCH 05/10] =?UTF-8?q?REPORT-59143=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D=E3=80=91=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E4=B9=9F=E8=A6=81=E6=94=AF=E6=8C=81=E6=96=B0=E6=97=A7?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/fit/common/TemplateTool.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java index ae1e98f885..cb415df591 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java @@ -45,10 +45,8 @@ public class TemplateTool { JFormType currentType = JFormType.OLD_TYPE; if (AdaptiveSwitchUtil.isSwitchJFromIng()) { currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; - } else { - if (isNewJForm(jTemplate)) { - currentType = JFormType.NEW_TYPE; - } + } else if (isNewJForm(jTemplate)) { + currentType = JFormType.NEW_TYPE; } //UI转换 currentType.switchUIMode(); From 5eb2538703801c695457b91b7519eb08eadb0895 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 13 Sep 2021 10:27:29 +0800 Subject: [PATCH 06/10] =?UTF-8?q?REPORT-59010=20=E6=BC=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XCreatorUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 6e44ad1963..e1d99e57e5 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -3,6 +3,8 @@ */ package com.fr.design.designer.creator; +import com.fr.base.theme.FineColorFlushUtils; +import com.fr.base.theme.FineColorGather; import com.fr.base.theme.FineColorManager; import com.fr.base.theme.FormTheme; import com.fr.base.theme.TemplateTheme; @@ -377,8 +379,9 @@ public class XCreatorUtils { } public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { - FineColorManager.traverse(container.toData(), new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible)); - + FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible); + FineColorFlushUtils.replaceCacheObject(container.toData(), colorGather); + FineColorManager.traverse(container.toData(), colorGather); Form.traversalWidget(container.toData(), new WidgetGather() { @Override public void dealWith(Widget widget) { From 414415bcf1a367dad750fee72ca39b9dc703f127 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 13 Sep 2021 10:54:24 +0800 Subject: [PATCH 07/10] =?UTF-8?q?REPORT-58626=20=E6=96=B0=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94-=E6=8A=A5=E8=A1=A8=E5=9D=97-=E6=97=A7?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E4=B8=BA=E6=A8=AA=E5=90=91=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=EF=BC=8C=E5=88=87=E6=8D=A2=E6=88=90=E6=96=B0?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=90=8E=E5=9B=BE=E7=89=87=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E4=B8=8D=E8=A7=81=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/XElementCase.java | 8 ++++++- .../fr/design/mainframe/FormSelection.java | 21 ------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java b/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java index 220fddff5e..8df20d4050 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java @@ -33,7 +33,7 @@ import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.util.Set; -public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider , Releasable { +public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider, Releasable { private UILabel imageLable; private FormDesigner designer; private static BufferedImage DEFAULT_BACKGROUND; @@ -269,6 +269,12 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme return toData().getElementCase(); } + @Override + public void doLayout() { + super.doLayout(); + this.updateECImage(); + } + public String getElementCaseContainerName() { return toData().getWidgetName(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java index c25d99b1ae..308eba7741 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java @@ -294,7 +294,6 @@ public class FormSelection { creator.setBackupBound(backupBounds); } layoutAdapter.fix(creator); - resetElementCaseImage(creator); } i++; } @@ -322,26 +321,6 @@ public class FormSelection { return false; } - /** - * @Description 重置报表块缩略图 - * @param: creator - * @return void - * @Author Henry.Wang - * @Date 2021/5/21 14:59 - **/ - public void resetElementCaseImage(XCreator creator) { - if (creator instanceof XWTitleLayout) { - XWTitleLayout xwTitleLayout = (XWTitleLayout) creator; - for (int i = 0; i < xwTitleLayout.getComponentCount(); i++) { - Component component = xwTitleLayout.getComponent(i); - if (component instanceof XElementCase) { - XElementCase xElementCase = (XElementCase) component; - xElementCase.updateECImage(); - } - } - } - } - /** * 检查下有没有参数面板,如果存在,处理下参数面板造成的偏移量 * @param rectangle From 08c75b39820ccbd86e586d2dba5ba5d1291168ba Mon Sep 17 00:00:00 2001 From: rinoux Date: Mon, 13 Sep 2021 11:27:55 +0800 Subject: [PATCH 08/10] =?UTF-8?q?REPORT-58984=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E6=95=B0=E6=8D=AE=E9=9B=86=E5=85=BC=E5=AE=B9=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/DBTableDataPane.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index c57dfe00dd..173da2fbf7 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -647,10 +647,12 @@ public class DBTableDataPane extends AbstractTableDataPane { public StrategyConfig find() { StrategyConfig strategyConfig = null; if (getTableData() != null) { - try { - strategyConfig = getTableData().getStrategyConfig() == null ? null : getTableData().getStrategyConfig().clone(); - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + strategyConfig = getTableData().getStrategyConfig(); + if (strategyConfig == null) { + //共享数据集 + if (getTableData().isShare()) { + strategyConfig = StrategyConfigHelper.createStrategyConfig(true, false, true); + } } } From 19a9842a4a4f8810cb3f666f3fe5f5fd0683bb9e Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 13 Sep 2021 14:04:43 +0800 Subject: [PATCH 09/10] =?UTF-8?q?REPORT-59322=20=E3=80=90=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=88=87=E6=8D=A2=E3=80=91=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E6=96=B9=E6=A1=88-=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E5=86=85=E5=AE=B9=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 颜色列表尺寸不能被下方的提示文字尺寸影响 【改动思路】 同标题 --- .../fr/design/mainframe/theme/TemplateThemeProfilePane.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index 01a13ea98d..d5103f8246 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -237,6 +237,9 @@ public abstract class TemplateThemeProfilePane extends double[] rowSize = new double[]{p, p, p}; double[] columnSize = {p, p}; + JPanel colorListContainerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + colorListContainerPane.add(colorListPane, BorderLayout.WEST); + JPanel previewLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); previewLabelPane.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Preview_Label")), BorderLayout.NORTH); @@ -244,7 +247,7 @@ public abstract class TemplateThemeProfilePane extends tipLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); JPanel content = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ - {LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Edit_Label")), colorListPane}, + {LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Edit_Label")), colorListContainerPane}, {null, tipLabel}, {previewLabelPane, extendedContainer}, }, From 99d3def5be0c07bb4d8cba03f2c6f25c92ed9c28 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 13 Sep 2021 16:03:35 +0800 Subject: [PATCH 10/10] =?UTF-8?q?CHART-20522=20=E5=88=87=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=BB=E9=A2=98-=E7=BB=86=E8=8A=82=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E9=87=8C=EF=BC=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E6=B8=90=E5=8F=98?= =?UTF-8?q?=E7=9A=84=E9=A6=96=E4=B8=AA=E9=A2=9C=E8=89=B2=E5=8F=98=E6=88=90?= =?UTF-8?q?=E7=99=BD=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XCreatorUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index e1d99e57e5..7f571ce9e3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -380,8 +380,6 @@ public class XCreatorUtils { public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible); - FineColorFlushUtils.replaceCacheObject(container.toData(), colorGather); - FineColorManager.traverse(container.toData(), colorGather); Form.traversalWidget(container.toData(), new WidgetGather() { @Override public void dealWith(Widget widget) { @@ -394,5 +392,7 @@ public class XCreatorUtils { return true; } }, TemplateThemeAware.class); + FineColorFlushUtils.replaceCacheObject(container.toData(), colorGather); + FineColorManager.traverse(container.toData(), colorGather); } } \ No newline at end of file