From 25bc07bef4ae58d7cbac160bac5260fbe914399b Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 31 Aug 2021 10:27:02 +0800 Subject: [PATCH 01/14] =?UTF-8?q?REPORT-58394=20fix:=E4=B8=8D=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=A7=E7=89=88=E6=9C=AC=E5=9B=BE=E8=A1=A8=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=20=E5=8F=AA=E6=98=AF=E4=B8=8D=E8=83=BD=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=20=E5=9B=BE=E8=A1=A8=E9=85=8D=E7=BD=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B9=9F=E6=98=AF=E8=A6=81=E5=87=BA=E6=9D=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/chart/gui/ChartTypePane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index e93f0023bc..a668fa3b36 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -173,8 +173,7 @@ public class ChartTypePane extends AbstractChartAttrPane { Map>> allChartTypePane, ActionListener autoButtonListener) { - - String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDs(); + String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDsIncludeDisabled(); for (String id : chartIDs) { From bf4bba7fcc3c63c811e9d528e5a0338a5a2da72e Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 10:52:08 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E6=97=A0jira=20=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XCreator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index c3e29e1237..55b9c191f3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -799,10 +799,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); - popup.updatePane(designer); - popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); - popup.setRelativeBounds(bounds); + try { + popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); + popup.updatePane(designer); + popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); + popup.setRelativeBounds(bounds); + } catch (Exception ignored) { + } } }); } From bec1ebd012b8049444ed664c1124d6c8d718f59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 31 Aug 2021 14:37:15 +0800 Subject: [PATCH 03/14] =?UTF-8?q?CHART-20517=20=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=BC=96=E8=BE=91=E4=B9=8B=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index e93f0023bc..09daae3b32 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -222,6 +222,7 @@ public class ChartTypePane extends AbstractChartAttrPane { String lastPlotID = chart.getID(); + boolean chartTypeChange = false; try { AbstractChartTypePane selectedPane = (AbstractChartTypePane) getSelectedPane(); ChartProvider newDefaultChart = (ChartProvider) ChartTypeManager.getInstanceWithCheck().getCharts(selectedPane.getPlotID())[0].clone(); @@ -231,13 +232,16 @@ public class ChartTypePane extends AbstractChartAttrPane { editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart; + chartTypeChange = true; } } catch (CloneNotSupportedException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } //这一步会替换plot + String id = chart.getID(); ((AbstractChartTypePane) getSelectedPane()).updateBean(chart); - if (inForm) { + chartTypeChange = chartTypeChange || !ComparatorUtils.equals(id, chart.getID()); + if (inForm && chartTypeChange) { chart.resetAttrInForm(); } reLayoutEditPane(chart, lastPlotID); @@ -465,5 +469,6 @@ public class ChartTypePane extends AbstractChartAttrPane { public void registerChartEditPane(ChartEditPane currentEditPane) { this.editPane = currentEditPane; this.inForm = editPane.isInForm(); + buttonPane.refreshChartInForm(inForm); } } \ No newline at end of file From b8d800e2a618a2521d23044871feaeb778b1ce08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 31 Aug 2021 14:37:15 +0800 Subject: [PATCH 04/14] =?UTF-8?q?CHART-20517=20=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=BC=96=E8=BE=91=E4=B9=8B=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index a668fa3b36..985ee28afa 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -221,6 +221,7 @@ public class ChartTypePane extends AbstractChartAttrPane { String lastPlotID = chart.getID(); + boolean chartTypeChange = false; try { AbstractChartTypePane selectedPane = (AbstractChartTypePane) getSelectedPane(); ChartProvider newDefaultChart = (ChartProvider) ChartTypeManager.getInstanceWithCheck().getCharts(selectedPane.getPlotID())[0].clone(); @@ -230,13 +231,16 @@ public class ChartTypePane extends AbstractChartAttrPane { editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart; + chartTypeChange = true; } } catch (CloneNotSupportedException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } //这一步会替换plot + String id = chart.getID(); ((AbstractChartTypePane) getSelectedPane()).updateBean(chart); - if (inForm) { + chartTypeChange = chartTypeChange || !ComparatorUtils.equals(id, chart.getID()); + if (inForm && chartTypeChange) { chart.resetAttrInForm(); } reLayoutEditPane(chart, lastPlotID); @@ -464,5 +468,6 @@ public class ChartTypePane extends AbstractChartAttrPane { public void registerChartEditPane(ChartEditPane currentEditPane) { this.editPane = currentEditPane; this.inForm = editPane.isInForm(); + buttonPane.refreshChartInForm(inForm); } } \ No newline at end of file From cdbac0ac9f8253772beb6a279e507ec2da36eca5 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 16:31:41 +0800 Subject: [PATCH 05/14] =?UTF-8?q?REPORT-50784=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=96=87=E6=9C=AC=E5=8C=85=E5=90=AB=E7=94=9F=E5=83=BB?= =?UTF-8?q?=E5=AD=97=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E5=8F=8C=E5=87=BB?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=90=8E=E5=AD=97=E7=AC=A6=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=94=A8=E9=BB=98=E8=AE=A4=E5=AD=97=E4=BD=93=E7=BB=98=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/itextfield/EditTextField.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java index 694c3e507e..9ed9068273 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java @@ -13,6 +13,9 @@ import javax.swing.text.PlainDocument; * Number Field. */ public class EditTextField extends UIGridTextField { + + private static final String I18NProperty = "i18n"; + private int maxLength = 24; public EditTextField() { @@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField { } class TextDocument extends PlainDocument { + + private Object defaultI18NProperty; + public TextDocument() { + defaultI18NProperty = getProperty(I18NProperty); } @Override @@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField { Toolkit.getDefaultToolkit().beep(); return; } + putProperty(I18NProperty, defaultI18NProperty); super.insertString(offset, s, a); } } From 70847a3057e823686fdd524a845e6ea4aeabcf10 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 17:01:37 +0800 Subject: [PATCH 06/14] =?UTF-8?q?REPORT-58535=20=E3=80=90=E7=A8=B3?= =?UTF-8?q?=E5=AE=9A=E5=85=B1=E5=88=9B=E3=80=91=E9=99=84=E4=BB=B6=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=A6=82=E7=8E=87=E5=87=BA=E7=8E=B02=E4=B8=AA?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/EditingMouseListener.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 636fdcaaf1..cdfe374b20 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -36,6 +36,7 @@ import com.fr.design.utils.gui.LayoutUtils; import com.fr.general.ComparatorUtils; import com.fr.stable.Constants; +import com.fr.third.org.apache.commons.lang3.ArrayUtils; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPopupMenu; @@ -645,16 +646,15 @@ public class EditingMouseListener extends MouseInputAdapter { selectionModel.selectACreatorAtMouseEvent(e); refreshTopXCreator(); XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators(); - // 放到事件队尾执行 - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - for (XCreator xCreator : xCreators) { - xCreator.setSelected(!e.isShiftDown() && !e.isControlDown()); + if (ArrayUtils.getLength(xCreators) == 1) { + // 放到事件队尾执行 + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + xCreators[0].setSelected(!e.isShiftDown() && !e.isControlDown()); } - } - }); - + }); + } } else if (clickedNonCardButton && uneditedTab && responseTabLayout(oldCreator, e)) { // do nothing } else { From b9810de77f1aa36da88dd1de48f9998eef0972be Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 17:04:42 +0800 Subject: [PATCH 07/14] =?UTF-8?q?REPORT-55748=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=B8=8Bimport=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/EditingMouseListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index cdfe374b20..ca621984b9 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -34,9 +34,9 @@ import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.LayoutUtils; import com.fr.general.ComparatorUtils; +import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; -import com.fr.third.org.apache.commons.lang3.ArrayUtils; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPopupMenu; From bc0aee15e1948b6fc6ce395cd54c70fcb2c1547e Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 20:21:46 +0800 Subject: [PATCH 08/14] =?UTF-8?q?REPORT-55048=20websocket=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=90=86=E7=9A=84=E6=83=85=E5=86=B5=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/socketio/DesignerSocketIO.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 0c71e9488f..fba15b0432 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -156,11 +156,15 @@ public class DesignerSocketIO { private static String[] getSocketUri() throws IOException { Workspace current = WorkContext.getCurrent(); URL url = new URL(current.getPath()); - Integer[] ports = current.get(SocketInfoOperator.class).getPort(); + Integer[] ports = WebSocketConfig.getInstance().getAvailablePorts(); WorkspaceConnection connection = current.getConnection(); // 服务器配置https webSocket可能是wss也可能是ws webSocket的协议可以单独配置 WebSocketProtocol webSocketProtocol = WebSocketConfig.getInstance().getProtocol(); currentProtocol = webSocketProtocol == WebSocketProtocol.PLAIN ? HTTP : HTTPS; + if (WebSocketConfig.getInstance().isUsingProxy()) { + // 如果配置了代理服务器跟随服务器协议 + currentProtocol = url.getProtocol(); + } String[] result = new String[ports.length]; for (int i = 0; i < ports.length; i++) { result[i] = String.format("%s://%s:%s%s?%s=%s&%s=%s", From c19f6811e7f98abeed97626fad9c4636e44d83f4 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Wed, 1 Sep 2021 10:18:15 +0800 Subject: [PATCH 09/14] =?UTF-8?q?REPORT-56134=20js=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=8A=A5=E9=94=99=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 5 +- .../com/fr/design/webattr/EditToolBar.java | 84 ++++++++++-------- .../com/fr/design/widget/WidgetEventPane.java | 86 ++++++++++--------- 3 files changed, 97 insertions(+), 78 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java index f7f5ef16b0..914b389a52 100644 --- a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java @@ -182,7 +182,10 @@ public class ListenerEditPane extends BasicBeanPane { @Override public Listener updateBean() { String actionLocaleName = ReportEngineEventMapping.getLocaleName(listener.getEventName()); - javaScriptActionPane.setResourceInfo(new JavaScriptResourceInfo(JavaScriptResourceInfo.Type.WEB_CONFIG, Toolkit.i18nText(actionLocaleName))); + + JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.WEB_CONFIG, Toolkit.i18nText(actionLocaleName)); + JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); + javaScriptActionPane.setResourceInfo(javaScriptResourceInfo); this.listener.setEventName(this.nameText.getText()); FurtherBasicBeanPane pane = this.cards.get(this.styleBox.getSelectedIndex()); this.listener.setAction(pane.updateBean()); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index c75c6607c7..f22d44cb3f 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -519,7 +519,10 @@ public class EditToolBar extends BasicPane { if (javaScriptPane == null || ((CustomToolBarButton) widget).getJSImpl() == null) { javaScriptPane = JavaScriptActionPane.createDefault(); } - javaScriptPane.setResourceInfo(new JavaScriptResourceInfo(JavaScriptResourceInfo.Type.WIDGET, ((Button) widget).getText())); + + JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.WIDGET, ((Button) widget).getText()); + JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); + javaScriptPane.setResourceInfo(javaScriptResourceInfo); javaScriptPane.setPreferredSize(new Dimension(750, 500)); BasicDialog dialog = javaScriptPane.showWindow(SwingUtilities.getWindowAncestor(ButtonPane.this)); @@ -539,27 +542,28 @@ public class EditToolBar extends BasicPane { } }; - /** - * 更新 - * @param widget 对应组件 - */ - public void populate(Widget widget) { - this.widget = widget; - card.show(centerPane, "none"); - if (widget instanceof Button) { - populateDefault(); - } - if (widget instanceof Export) { - populateExport(); - } else if (widget instanceof AppendColumnRow) { - populateAppendColumnRow(); - } else if (widget instanceof Submit) { - populateSubmit(); - } else if (widget instanceof CustomToolBarButton) { - populateCustomToolBarButton(); - } else if (widget instanceof Email) { - populateEmail(); - } + /** + * 更新 + * + * @param widget 对应组件 + */ + public void populate(Widget widget) { + this.widget = widget; + card.show(centerPane, "none"); + if (widget instanceof Button) { + populateDefault(); + } + if (widget instanceof Export) { + populateExport(); + } else if (widget instanceof AppendColumnRow) { + populateAppendColumnRow(); + } else if (widget instanceof Submit) { + populateSubmit(); + } else if (widget instanceof CustomToolBarButton) { + populateCustomToolBarButton(); + } else if (widget instanceof Email) { + populateEmail(); + } Set extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); for (ExtraButtonToolBarProvider provider : extraButtonSet) { @@ -572,21 +576,22 @@ public class EditToolBar extends BasicPane { count.setValue(((AppendColumnRow) widget).getCount()); } - private void populateExport(){ - card.show(centerPane, "export"); - Export export = (Export) widget; - this.pdf.setSelected(export.isPdfAvailable()); - this.excelP.setSelected(export.isExcelPAvailable()); - this.excelO.setSelected(export.isExcelOAvailable()); - this.excelS.setSelected(export.isExcelSAvailable()); - this.word.setSelected(export.isWordAvailable()); - this.image.setSelected(export.isImageAvailable()); - if(exportToolBarProviders != null){ - for(int i=0; i Date: Wed, 1 Sep 2021 11:28:13 +0800 Subject: [PATCH 10/14] =?UTF-8?q?REPORT-58200=20=E5=88=9D=E6=AC=A1?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=9A=8410.0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E7=9B=AE=E5=BD=95=E4=B8=8B=E4=BC=9A?= =?UTF-8?q?=E7=94=9F=E6=88=90.finereport80=E7=BC=93=E5=AD=98=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/DesignerEnvManager.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 7242b22950..9c23dcc51a 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -390,9 +390,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version); - if (!envHome.exists()) { - StableUtils.mkdirs(envHome); - } return envHome.getAbsolutePath(); } From 4c17b62cfc2c069389ca4bd80dc4d29bf2aa738e Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Sep 2021 16:09:43 +0800 Subject: [PATCH 11/14] =?UTF-8?q?REPORT-58573=20=E6=89=93=E5=BC=8011.0?= =?UTF-8?q?=E5=88=B6=E4=BD=9C=E7=9A=84=E6=A8=A1=E6=9D=BF=E4=B8=8D=E5=90=91?= =?UTF-8?q?=E4=B8=8A=E5=85=BC=E5=AE=B9=E6=8F=90=E7=A4=BA-=20=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=86=85=E5=AE=B9=E4=B8=AD=E5=BA=94=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=87=B311?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/JTemplate.java | 3 ++- .../main/java/com/fr/design/utils/DesignUtils.java | 13 +++++++++++++ .../java/com/fr/design/utils/DesignUtilsTest.java | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 79f6a5c1e8..d4931763c8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -47,6 +47,7 @@ import com.fr.design.menu.NameSeparator; import com.fr.design.menu.ShortCut; import com.fr.design.preview.PagePreview; import com.fr.design.ui.util.UIUtil; +import com.fr.design.utils.DesignUtils; import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.EmptyCallBackSaveWorker; import com.fr.design.write.submit.DBManipulationInWidgetEventPane; @@ -1071,7 +1072,7 @@ public abstract class JTemplate> public boolean isOldDesigner() { String xmlDesignerVersion = getTarget().getXMLDesignerVersion(); if (isHigherThanCurrent(xmlDesignerVersion)) { - String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", StringUtils.parseVersion(xmlDesignerVersion)); + String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion)); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); return true; diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 8bd4e880d9..f066d648a2 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -425,4 +425,17 @@ public class DesignUtils { return true; } + /** + * FR25.0版本出来需要进行适配下 + * + * @param xmlDesignerVersion + * @return + */ + public static String parseVersion(String xmlDesignerVersion) { + if (StringUtils.isNotEmpty(xmlDesignerVersion)) { + return String.valueOf(xmlDesignerVersion.charAt(0) - 'A'); + } + return xmlDesignerVersion; + } + } diff --git a/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java b/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java index 9db729a978..52c93dea50 100644 --- a/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java +++ b/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java @@ -3,6 +3,7 @@ package com.fr.design.utils; import com.fr.general.ComparatorUtils; import junit.framework.TestCase; +import org.junit.Assert; import org.junit.Test; import java.net.ServerSocket; @@ -29,4 +30,10 @@ public class DesignUtilsTest extends TestCase { assertTrue(DesignUtils.isPortOccupied()); } + @Test + public void testParseVersion() { + Assert.assertEquals("10", DesignUtils.parseVersion("KAA")); + Assert.assertEquals("11", DesignUtils.parseVersion("LAA")); + } + } \ No newline at end of file From 37abccaea2409929a679cb0c12289ba2082f6123 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 3 Sep 2021 11:05:56 +0800 Subject: [PATCH 12/14] =?UTF-8?q?REPORT-58713=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E4=B8=AD=E5=85=AC=E5=BC=8F=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=9A=84=E5=8F=82=E6=95=B0=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=BC=9A=E5=87=BA=E7=8E=B0=E2=80=9C=E9=97=AA?= =?UTF-8?q?=E5=B1=8F=E2=80=9D=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/creator/XCreator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 55b9c191f3..e0e6e74a4a 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -802,7 +802,12 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo try { popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); popup.updatePane(designer); - popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); + boolean needShowing = selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog(); + if (!popup.isVisible() && needShowing) { + popup.setVisible(true); + } else if (!needShowing) { + popup.setVisible(false); + } popup.setRelativeBounds(bounds); } catch (Exception ignored) { } From 98768ff1088b7541169523f4086883456259cb73 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 3 Sep 2021 11:44:46 +0800 Subject: [PATCH 13/14] =?UTF-8?q?REPORT-58713=20=20=E5=8A=A0=E4=BA=9B?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/designer/creator/XCreator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index e0e6e74a4a..e825285585 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -803,6 +803,8 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); popup.updatePane(designer); boolean needShowing = selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog(); + // 当不可见时,且可以设置为可见状态,才去设置为可见 + // 避免已经是可见状态时,重复设置可见,造成闪屏 if (!popup.isVisible() && needShowing) { popup.setVisible(true); } else if (!needShowing) { From 720d610df56abedfd471cdab65232a9cef3c8f8b Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 3 Sep 2021 16:25:17 +0800 Subject: [PATCH 14/14] =?UTF-8?q?REPORT-58533=20=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E6=8A=A5=E8=A1=A8=E5=9D=97=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/creator/XElementCase.java | 3 +-- 1 file changed, 1 insertion(+), 2 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 b5cc813ae8..220fddff5e 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 @@ -321,9 +321,8 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme FormDesigner designer = editingMouseListener.getDesigner(); if (e.getButton() == MouseEvent.BUTTON1 && (e.getClickCount() == 2 || designer.getCursor().getType() == Cursor.HAND_CURSOR)) { - FormElementCaseContainerProvider component = (FormElementCaseContainerProvider) designer.getComponentAt(e); //切换设计器 - designer.switchTab(component); + designer.switchTab(this); } }