From ab86d37db01776bd73c7b9a5d0f3e6b25fc7f401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 16:31:10 +0800 Subject: [PATCH 01/11] =?UTF-8?q?REPORT-59744=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E6=89=8B=E5=8A=A8=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E4=BB=A5=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=A4=84=E4=BD=8D=E7=BD=AE=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/poly/group/PolyBoundsGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java index aadeb0178..599a14f44 100644 --- a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java +++ b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java @@ -52,7 +52,7 @@ public class PolyBoundsGroup implements GroupModel { @Override public Object getValue(int row, int column) { UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); if (column == 0) { switch (row) { case 0: @@ -83,7 +83,7 @@ public class PolyBoundsGroup implements GroupModel { if (column == 1) { int v = value == null ? 0 : ((Number) value).intValue(); UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); switch (row) { case 0: r.x = v; From 6479efca90317e0ce14c9c78238d3ff0c366473c Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 16:52:29 +0800 Subject: [PATCH 02/11] =?UTF-8?q?CHART-21418=20fix:=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9=20=E5=8C=BA=E5=88=86=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E5=9C=A8=E4=B8=8A=E9=9D=A2=E8=BF=98=E6=98=AF=E4=B8=8B?= =?UTF-8?q?=E9=9D=A2=20=E5=A6=82=E6=9E=9C=E5=9C=A8=E4=B8=8A=E9=9D=A2=20?= =?UTF-8?q?=E5=88=99=E6=98=AF=E4=BB=8EdisplayComponent=E4=B8=8B=E9=9D=A2?= =?UTF-8?q?=E7=A6=BB=E5=BC=80=20=E9=9A=90=E8=97=8F=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/style/AbstractSelectBox.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index 41eeacdba..4e82d3805 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -10,6 +10,7 @@ import com.fr.stable.Constants; import javax.swing.AbstractButton; import javax.swing.JPanel; +import javax.swing.JWindow; import javax.swing.border.AbstractBorder; import javax.swing.event.AncestorEvent; import javax.swing.event.AncestorListener; @@ -20,6 +21,7 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; +import java.awt.Point; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.event.MouseAdapter; @@ -99,9 +101,25 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou displayComponent.addMouseListener(new MouseAdapter() { @Override public void mouseExited(MouseEvent e) { + if (!isPopupVisible()) { + //如果弹出框==null 或者 弹出框不可见 直接return + return; + } + Point popMenuP = getControlWindow().getLocation(); + Point displayComponentP = displayComponent.getLocationOnScreen(); + if (popMenuP.getX() < displayComponentP.getX() - 1) { + //如果 弹出框横向超出屏幕 往左调整了 和displayComponent横向错开 就不处理了 + return; + } + Rectangle rectangle = displayComponent.getBounds(); - if (e.getY() < rectangle.y) { - //如果是从displayComponent上面离开的,隐藏弹出界面。 + boolean bottomPopAndExitTop = displayComponentP.getY() < popMenuP.getY() && e.getY() <= rectangle.y; + boolean topPopAndExitBottom = displayComponentP.getY() > popMenuP.getY() && e.getY() >= rectangle.y + rectangle.getHeight(); + boolean exitLeftOrRight = rectangle.x > e.getX() || rectangle.x + rectangle.getWidth() < e.getX(); + if (bottomPopAndExitTop || topPopAndExitBottom || exitLeftOrRight) { + //弹出框在displayComponent下面 且 鼠标是从displayComponent上面离开的,隐藏弹出界面。 + //弹出框在displayComponent上面 且 鼠标是从displayComponent下面离开的,隐藏弹出界面。 + //鼠标从displayComponent左边 或者 右边 离开,隐藏弹出界面。 hidePopupMenu(); } From 103beaec4cf49352c9af70ad3ab77a930ec3c9dd Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 17:23:38 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-61610=20fix:=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=8A=A5=E9=94=99=20A.clas?= =?UTF-8?q?s=20can=20not=20cast=20to=20A.class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ChartPropertyPane.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 2d4d5fef6..c3918aba2 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -10,12 +10,22 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.chart.fun.ChartTypeUIProvider; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.GeneralContext; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.injectable.PluginModule; +import com.fr.plugin.injectable.SpecialLevel; +import com.fr.plugin.manage.PluginFilter; +import com.fr.plugin.observer.PluginEvent; +import com.fr.plugin.observer.PluginEventListener; +import com.fr.plugin.observer.PluginEventType; import com.fr.stable.AssistUtils; import javax.swing.BorderFactory; @@ -39,8 +49,11 @@ public class ChartPropertyPane extends BaseChartPropertyPane { //ID一样的话 不用新建chartEditPane private String currentID; + private static PluginEventListener pluginEventListener; + private ChartPropertyPane() { initComponent(); + addListener(); } protected void initComponent() { @@ -48,6 +61,27 @@ public class ChartPropertyPane extends BaseChartPropertyPane { this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } + private void addListener() { + if (pluginEventListener != null) { + GeneralContext.stopListenPlugin(pluginEventListener); + } + pluginEventListener = new PluginEventListener() { + @Override + public void on(PluginEvent event) { + //禁用启用图表插件 这边id置空。这样展示图表配置属性不管和上一个id是否一样 都新建chartEditPane + currentID = null; + } + }; + GeneralContext.listenPlugin(PluginEventType.AfterRun, pluginEventListener, new PluginFilter() { + + @Override + public boolean accept(PluginContext context) { + + return context.contain(PluginModule.ExtraChartDesign); + } + }); + } + @Override public void updateChartEditPane(String plotID) { if (!AssistUtils.equals(currentID, plotID)) { From cc3ae6732b1177ac0e68777c4b4c56d7e0eb7f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 17:46:33 +0800 Subject: [PATCH 04/11] =?UTF-8?q?REPORT-61695=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8-=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=B8=8B=E7=BB=84=E4=BB=B6=E5=8F=B3=E4=BE=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=9D=A2=E6=9D=BF=E6=98=BE=E7=A4=BA=E2=80=9C=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=A7=E5=B0=8F=E2=80=9D=EF=BC=8C=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=B8=8B=E6=98=BE=E7=A4=BA=E7=9A=84=E6=98=AF?= =?UTF-8?q?=E2=80=9C=E6=8E=A7=E4=BB=B6=E4=BD=8D=E7=BD=AE=E2=80=9D=E2=80=9C?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=A4=A7=E5=B0=8F=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index ae3dfc255..99b1ddaa0 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -51,7 +51,7 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget_Size")), ratioLocked != null ? createRightPane(width, ratioLocked, height) : createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; From 660f291c475ab8da8621e917bb49694d89a08216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 20:23:06 +0800 Subject: [PATCH 05/11] =?UTF-8?q?REPORT-61618=20=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90=E6=97=B6=E5=B8=A6=E2=80=9C?= =?UTF-8?q?-=E2=80=9D=EF=BC=8C=E5=AF=BC=E8=87=B4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E5=A4=B1=E6=95=88@Jaimme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/data/BasicTableDataUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java index 57c7e23a1..c711a1999 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java @@ -11,7 +11,7 @@ import com.fr.stable.StringUtils; * Created by hades on 2020/4/27 */ public abstract class BasicTableDataUtils { - private static final String SEPARATOR = "-"; + private static final String SEPARATOR = "_"; private static final int LEN = 2; From 08ec528ba25a6550e2e7115201b8c448018cbbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 20:27:19 +0800 Subject: [PATCH 06/11] REPORT-61695 --- .../main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index 99b1ddaa0..ae3dfc255 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -51,7 +51,7 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget_Size")), + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), ratioLocked != null ? createRightPane(width, ratioLocked, height) : createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; From 9ecac9978a7342813635da46462e28e929082385 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 20:54:03 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=EF=BC=9A=E6=AF=8F=E4=B8=AA=E5=AE=9E=E4=BE=8B=E5=90=84=E8=87=AA?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E6=8F=92=E4=BB=B6=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ChartPropertyPane.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index c3918aba2..135f14f6c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -49,8 +49,6 @@ public class ChartPropertyPane extends BaseChartPropertyPane { //ID一样的话 不用新建chartEditPane private String currentID; - private static PluginEventListener pluginEventListener; - private ChartPropertyPane() { initComponent(); addListener(); @@ -62,17 +60,13 @@ public class ChartPropertyPane extends BaseChartPropertyPane { } private void addListener() { - if (pluginEventListener != null) { - GeneralContext.stopListenPlugin(pluginEventListener); - } - pluginEventListener = new PluginEventListener() { + GeneralContext.listenPlugin(PluginEventType.AfterRun, new PluginEventListener() { @Override public void on(PluginEvent event) { //禁用启用图表插件 这边id置空。这样展示图表配置属性不管和上一个id是否一样 都新建chartEditPane currentID = null; } - }; - GeneralContext.listenPlugin(PluginEventType.AfterRun, pluginEventListener, new PluginFilter() { + }, new PluginFilter() { @Override public boolean accept(PluginContext context) { From 4ea706cf0c63fbafbca0cef02c7cc514d77e8e04 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 20:55:09 +0800 Subject: [PATCH 08/11] update --- .../main/java/com/fr/design/mainframe/ChartPropertyPane.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 135f14f6c..7d787f15a 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -10,18 +10,15 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; -import com.fr.design.chart.fun.ChartTypeUIProvider; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; -import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.GeneralContext; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; -import com.fr.plugin.injectable.SpecialLevel; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; From d1bea1c69e96e1fa41308aadf5d35ca21f9b3b26 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 4 Nov 2021 21:05:08 +0800 Subject: [PATCH 09/11] =?UTF-8?q?REPORT-61410=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E9=A2=84=E8=A7=88=E6=97=B6=E5=8F=AF=E5=A4=8D=E5=88=B6?= =?UTF-8?q?-=E8=A1=A8=E5=A4=B4=E5=A4=8D=E5=88=B6=E9=97=AE=E9=A2=98=20&&=20?= =?UTF-8?q?REPORT-61409=20=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E5=A4=8D=E5=88=B6-=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E6=97=B6=E6=98=BE=E7=A4=BA=E6=88=90Null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/preview/CopyableJTable.java | 51 ++++++++++++------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java index eb8d188a1..a452a4d37 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java @@ -106,6 +106,7 @@ public class CopyableJTable extends SortableJTable { self.updateEndPoint(-1, column); self.refreshTable(); } + self.requestFocusInWindow(); } private int getColumn(MouseEvent e) { @@ -249,26 +250,9 @@ public class CopyableJTable extends SortableJTable { FineLoggerFactory.getLogger().info("copy cell value"); java.util.List> table = new ArrayList<>(); if ((startRow != endRow || startCol != endCol) && Math.min(startCol, endCol) > -1) { - for (int i = Math.min(startRow, endRow); i <= Math.max(startRow, endRow); i++) { - table.add(new ArrayList<>()); - for (int j = Math.min(startCol, endCol); j <= Math.max(startCol, endCol); j++) { - Object text = this.getTableValue(i, j); - table.get(table.size() - 1).add(text); - } - } + copyAreaData(table); } else if (pointList.size() > 0) { - Collections.sort(pointList, Comparator.comparing(Point::getX).thenComparing(Point::getY)); - int startRow = pointList.get(0).x; - int currentRow = startRow; - table.add(new ArrayList<>()); - for (Point point : pointList) { - while (currentRow < point.x) { - table.add(new ArrayList<>()); - currentRow++; - } - Object text = this.getTableValue(point.x, point.y); - table.get(table.size() - 1).add(text); - } + copyPointsData(table); } Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); @@ -276,6 +260,35 @@ public class CopyableJTable extends SortableJTable { clip.setContents(tText, null); } + private void copyAreaData(java.util.List> table) { + for (int i = Math.min(startRow, endRow); i <= Math.max(startRow, endRow); i++) { + table.add(new ArrayList<>()); + for (int j = Math.min(startCol, endCol); j <= Math.max(startCol, endCol); j++) { + Object text = this.getTableValue(i, j); + if (text != null) { + table.get(table.size() - 1).add(text); + } + } + } + } + + private void copyPointsData(java.util.List> table) { + Collections.sort(pointList, Comparator.comparing(Point::getX).thenComparing(Point::getY)); + int startRow = pointList.get(0).x; + int currentRow = startRow; + table.add(new ArrayList<>()); + for (Point point : pointList) { + while (currentRow < point.x) { + table.add(new ArrayList<>()); + currentRow++; + } + Object text = this.getTableValue(point.x, point.y); + if (text != null) { + table.get(table.size() - 1).add(text); + } + } + } + private Object getTableValue(int row, int col) { Object value = null; if (col > -1) { From 7e996b635a79c655a10730ab8bfd6dabe3c5d977 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 5 Nov 2021 13:59:26 +0800 Subject: [PATCH 10/11] =?UTF-8?q?REPORT-62016=20BI=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/versioncheck/VersionCheckUtils.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index e5624c453..d2794cd6e 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -64,6 +64,11 @@ public class VersionCheckUtils { private static final String ID = "id"; private static final String VERSION = "version"; private static final String NAME = "name"; + private static final String RUNNING = "running"; + private static final String SYNC = "sync"; + private static final String GROUP = "group"; + private static final String BI = "bi"; + private static final String BIPREFIX = "com.finebi"; private static final Set pluginsNeedIgnore = new HashSet<>(); static { pluginsNeedIgnore.addAll(Arrays.asList( @@ -263,13 +268,10 @@ public class VersionCheckUtils { Map pluginsNameMap = ReportHelper.getPluginNameMap(); for (int i = 0; i < remotePlugins.size(); i++) { remotePlugin = remotePlugins.getJSONObject(i); - if (ComparatorUtils.equals(remotePlugin.getString("running"), "false") || (remotePlugin.containsKey("sync") && !remotePlugin.getBoolean("sync"))) { + if (isPluginNeedIgnore(remotePlugin)) { continue; } String remotePluginID = remotePlugin.getString(ID); - if (pluginsNeedIgnore.contains(remotePluginID)) { - continue; - } if (localPluginsMap.containsKey(remotePluginID)) { if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) { continue; @@ -290,6 +292,12 @@ public class VersionCheckUtils { return differentPlugins; } + private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { + return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) + || (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.containsKey(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) + || pluginsNeedIgnore.contains(remotePlugin.getString(ID))); + } + public static JSONArray syncPlugins(JSONArray differentPlugins) { Set uninstallFailed = uninstallPlugins(differentPlugins); List plugins = getSyncPlugins(differentPlugins, uninstallFailed); From fd8213b03d3af41490fb403bfdc7083885b865f3 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Fri, 5 Nov 2021 14:18:37 +0800 Subject: [PATCH 11/11] =?UTF-8?q?REPORT-62179=20=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9A=84=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=80=BC=E6=A0=A1=E9=AA=8C=E9=9C=80=E6=94=AF=E6=8C=81=E5=85=AC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/NumberEditorValidatePane.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java index d77e1e900..7fd88dd95 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -1,6 +1,10 @@ package com.fr.design.widget.component; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.design.beans.UITextFieldAdapter; import com.fr.design.designer.IntervalConstants; +import com.fr.design.fun.TextFieldAdapterProvider; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -9,6 +13,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.NumberEditor; +import com.fr.log.FineLoggerFactory; import com.fr.stable.AssistUtils; import com.fr.stable.StringUtils; @@ -35,7 +40,7 @@ public class NumberEditorValidatePane extends JPanel { private UISpinner minValueSpinner; private UISpinner decimalLength; private JPanel limitNumberPane; - private UITextField errorMsgTextField; + private ErrorMsgTextFieldAdapter errorMsgTextField; private JPanel errorMsgTextFieldPane; private ActionListener allowDecimalsListener; @@ -100,9 +105,20 @@ public class NumberEditorValidatePane extends JPanel { } private void initErrorMsgPane() { - errorMsgTextField = new UITextField(); + TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); + if (provider != null) { + try { + errorMsgTextField = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextField = new UITextFieldAdapter(); + } + } else { + errorMsgTextField = new UITextFieldAdapter(); + } + errorMsgTextFieldPane = TableLayoutHelper.createGapTableLayoutPane( - new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")), errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")), errorMsgTextField.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); }