From 6621921d0dd5f2af4a9a6060bfd409b9254ddb0e Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 3 Dec 2021 14:37:52 +0800 Subject: [PATCH 1/7] =?UTF-8?q?REPORT-56014=20&=20REPORT-56015=20=E3=80=90?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91?= =?UTF-8?q?=E3=80=90=E4=B8=8B=E4=B8=AA=E7=89=88=E6=9C=AC=E3=80=91=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=8D=E7=94=A8-=E7=BB=84=E4=BB=B6=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=82=B9=E4=B9=9D=E5=9B=BE=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E7=BA=BF=E9=87=8D=E5=8F=A0=E4=BA=86=E7=9A=84=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?web=E7=AB=AF=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 点九图小而组件大,且中间不可缩放的尺寸为0时,就会出现空白。从点九图的 使用机制上看无法避免上上述情况,需要在生成点九图的时候,强制中间缩放 区域的尺寸最小为1才行,即两条平行线之间的最小间距为1. 【改动思路】 同上 --- .../gui/xpane/BorderLineAndImagePane.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java index 6e8cac0d8..1db2db2e2 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java @@ -503,6 +503,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private int ninePointBottom = -1; private static final int MIN_NINE_POINT = 0; + private static final int MIN_GAP_PARALLEL_LINES = 1; private int imgWidth; private int imgHeight; @@ -773,8 +774,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private void onNinePointTopChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgHeight - ninePointBottom) { - value = imgHeight - ninePointBottom - MIN_NINE_POINT; + } else if (value >= imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES) { + value = imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES; } this.ninePointTop = value; repaint(); @@ -783,8 +784,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private void onNinePointBottomChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgHeight - ninePointTop) { - value = imgHeight - ninePointTop - MIN_NINE_POINT; + } else if (value >= imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES) { + value = imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES; } this.ninePointBottom = value; repaint(); @@ -793,8 +794,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private void onNinePointLeftChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgWidth - ninePointRight) { - value = imgWidth - ninePointRight - MIN_NINE_POINT; + } else if (value >= imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES) { + value = imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES; } this.ninePointLeft = value; repaint(); @@ -803,8 +804,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { private void onNinePointRightChanged(int value) { if (value < MIN_NINE_POINT) { value = MIN_NINE_POINT; - } else if (value >= imgWidth - ninePointLeft) { - value = imgWidth - ninePointLeft - MIN_NINE_POINT; + } else if (value >= imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES) { + value = imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES; } this.ninePointRight = value; repaint(); From 84b3103890b1620c393be4657a8ca9720301f800 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 3 Dec 2021 14:40:32 +0800 Subject: [PATCH 2/7] =?UTF-8?q?REPORT-60161=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B9=9D=E7=82=B9=E5=9B=BE=E7=9A=84=E7=BA=BF=E5=9C=A8=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E4=B8=8A=E5=90=8E=EF=BC=8C=E5=85=B6=E4=BB=96=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=9B=9E=E6=9D=A5=E5=8F=91=E7=8E=B0=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=88=90=E9=BB=98=E8=AE=A4=E4=BA=95=E5=AD=97=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 点九图边界线值为0也是有效值 【改动思路 --- .../com/fr/design/gui/xpane/BorderLineAndImagePane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java index 1db2db2e2..47ea7fb0d 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java @@ -298,15 +298,16 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { Background borderImage = style.getBorderImage(); if (borderImage instanceof ImageBackground) { // 图片类型边框 - Image image = ((ImageBackground) borderImage).getImage(); - int[] ninePoint = ((ImageBackground) borderImage).getNinePoint(); + ImageBackground imageBackground = (ImageBackground) borderImage; + Image image = imageBackground.getImage(); if (image != null) { this.borderLineCombo.selectBorderImage(); this.imagePreviewPane.setImageWithSuffix(((ImageBackground) borderImage).getImageWithSuffix()); this.tweakNinePointButton.setEnabled(true); this.borderImageOpacityPane.populateBean(style.getBorderImageOpacity()); - if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] > 0 && ninePoint[1] > 0 && ninePoint[2] > 0 && ninePoint[3] > 0) { + int[] ninePoint = ((ImageBackground) borderImage).getNinePoint(); + if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] >= 0 && ninePoint[1] >= 0 && ninePoint[2] >= 0 && ninePoint[3] >= 0) { this.ninePoint = Arrays.copyOf(ninePoint, 4); } else { this.ninePoint = new int[4]; From a74ef15eb8ae1c24921076db96888d554cbebf2d Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 6 Dec 2021 09:49:04 +0800 Subject: [PATCH 3/7] =?UTF-8?q?CHART-21584=20feat:fvs.chart.font=20?= =?UTF-8?q?=E5=8D=95=E4=BD=8Dpx=20=E8=8C=83=E5=9B=B46-200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/ChartTextAttrPane.java | 10 ++++++++-- .../chart/gui/style/ChartTextAttrPaneWithAuto.java | 13 +++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 9a906cc7c..956a28e14 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -13,6 +13,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; @@ -29,16 +30,21 @@ public class ChartTextAttrPane extends BasicPane { private static final long serialVersionUID = 6731679928019436869L; public static final int FONT_START = 6; public static final int FONT_END = 72; + public static final int FONT_END_4_DUCHAMP = 200; private UIComboBox fontNameComboBox; private UIComboBox fontSizeComboBox; private UIToggleButton bold; private UIToggleButton italic; private UIColorButton fontColor; - public static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1]; + private static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1]; + private static Integer[] FONT_SIZES_4_DUCHAMP = new Integer[FONT_END_4_DUCHAMP - FONT_START + 1]; static { for (int i = FONT_START; i <= FONT_END; i++) { FONT_SIZES[i - FONT_START] = i; } + for (int i = FONT_START; i <= FONT_END_4_DUCHAMP; i++) { + FONT_SIZES_4_DUCHAMP[i - FONT_START] = i; + } } public ChartTextAttrPane() { @@ -176,7 +182,7 @@ public class ChartTextAttrPane extends BasicPane { } protected Object[] getFontSizeComboBoxModel() { - return FONT_SIZES; + return ChartEditContext.duchampMode() ? FONT_SIZES_4_DUCHAMP : FONT_SIZES; } protected void initState() { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java index 292d83c9e..af157afca 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java @@ -4,23 +4,30 @@ import com.fr.chart.base.ChartConstants; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButtonWithAuto; import com.fr.design.i18n.Toolkit; -import com.fr.plugin.chart.type.FontAutoType; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; +import com.fr.plugin.chart.type.FontAutoType; public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto"); private FontAutoType type; public static String[] FONT_SIZES_WITH_AUTO = new String[FONT_END - FONT_START + 2]; + private static String[] FONT_SIZES_WITH_AUTO_4_DUCHAMP = new String[FONT_END_4_DUCHAMP - FONT_START + 2]; static { FONT_SIZES_WITH_AUTO[0] = AUTO; + FONT_SIZES_WITH_AUTO_4_DUCHAMP[0] = AUTO; for (int i = 1; i < FONT_SIZES_WITH_AUTO.length; i++) { FONT_SIZES_WITH_AUTO[i] = FONT_START + i - 1 + ""; } + + for (int i = 1; i < FONT_SIZES_WITH_AUTO_4_DUCHAMP.length; i++) { + FONT_SIZES_WITH_AUTO_4_DUCHAMP[i] = FONT_START + i - 1 + ""; + } } public ChartTextAttrPaneWithAuto(FontAutoType type) { @@ -42,7 +49,9 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { } protected Object[] getFontSizeComboBoxModel() { - return isFontSizeAuto() ? FONT_SIZES_WITH_AUTO : FONT_SIZES; + return isFontSizeAuto() + ? (ChartEditContext.duchampMode() ? FONT_SIZES_WITH_AUTO_4_DUCHAMP : FONT_SIZES_WITH_AUTO) + : super.getFontSizeComboBoxModel(); } protected float updateFontSize() { From adf49bfded20a12f7fc261119314b1fc582069f4 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 6 Dec 2021 09:50:47 +0800 Subject: [PATCH 4/7] update --- .../fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 956a28e14..d07ec476e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -36,7 +36,7 @@ public class ChartTextAttrPane extends BasicPane { private UIToggleButton bold; private UIToggleButton italic; private UIColorButton fontColor; - private static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1]; + public static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1]; private static Integer[] FONT_SIZES_4_DUCHAMP = new Integer[FONT_END_4_DUCHAMP - FONT_START + 1]; static { for (int i = FONT_START; i <= FONT_END; i++) { From c19bb8edeb53d4c7cc911fe3e6a9d14c5afea91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 6 Dec 2021 11:29:57 +0800 Subject: [PATCH 5/7] =?UTF-8?q?REPORT-63499=20=E6=8C=89=E9=92=AE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=A0=91=E8=8A=82=E7=82=B9=E9=85=8D=E7=BD=AE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=BA=8B=E4=BB=B6=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=B8=8A=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/controlpane/UIListGroupControlPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index 6ec5f496a..e82cbac82 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java @@ -122,10 +122,11 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li protected void populateNameObjects(Widget widget) { ArrayList nameObjectList = new ArrayList<>(); - for (int i = 0, size = widget.getListenerSize(); i < size; i++) { + for (int i = 0, j = 0, size = widget.getListenerSize(); i < size; i++) { Listener listener = widget.getListener(i); if (!listener.isDefault()) { - nameObjectList.add(i, new NameObject(switchLang(listener.getEventName()) + (i + 1), listener)); + nameObjectList.add(j, new NameObject(switchLang(listener.getEventName()) + (j + 1), listener)); + j++; } } populate(getHelper().processCatalog(nameObjectList)); From 72b7bdacaef2cd278727d73ba32f9848cf6178cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 6 Dec 2021 13:49:59 +0800 Subject: [PATCH 6/7] REPORT-63499 --- .../fr/design/gui/controlpane/UIListGroupControlPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index e82cbac82..063491f88 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java @@ -122,11 +122,12 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li protected void populateNameObjects(Widget widget) { ArrayList nameObjectList = new ArrayList<>(); - for (int i = 0, j = 0, size = widget.getListenerSize(); i < size; i++) { + for (int i = 0, size = widget.getListenerSize(); i < size; i++) { Listener listener = widget.getListener(i); if (!listener.isDefault()) { - nameObjectList.add(j, new NameObject(switchLang(listener.getEventName()) + (j + 1), listener)); - j++; + String eventName = switchLang(listener.getEventName()) + (nameObjectList.size() + 1); + NameObject nameObject = new NameObject(eventName, listener); + nameObjectList.add(nameObject); } } populate(getHelper().processCatalog(nameObjectList)); From ca2fcb358e038e9564ac0f5edc6aad48c554316d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 6 Dec 2021 14:55:46 +0800 Subject: [PATCH 7/7] =?UTF-8?q?REPORT-63092=20=E6=BC=8F=E4=BC=A0=E4=BA=86i?= =?UTF-8?q?mport=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-form/src/main/java/com/fr/design/mainframe/JForm.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index d8680e4ad..66dc972c4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -16,6 +16,7 @@ import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.file.export.EmbeddedFormExportExportAction; import com.fr.design.base.mode.DesignModeContext; import com.fr.design.cell.FloatElementsProvider; +import com.fr.design.constants.TableDataConstants; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.designer.TargetComponent; import com.fr.design.designer.beans.actions.CopyAction;