From 25bc07bef4ae58d7cbac160bac5260fbe914399b Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 31 Aug 2021 10:27:02 +0800 Subject: [PATCH 1/6] =?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 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 2/6] =?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 70847a3057e823686fdd524a845e6ea4aeabcf10 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 17:01:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-58535=20=E3=80=90=E7=A8=B3=E5=AE=9A?= =?UTF-8?q?=E5=85=B1=E5=88=9B=E3=80=91=E9=99=84=E4=BB=B6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E5=87=BA=E7=8E=B02=E4=B8=AA=E7=BC=96?= =?UTF-8?q?=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 4/6] =?UTF-8?q?REPORT-55748=20=E5=A4=84=E7=90=86=E4=B8=8Bi?= =?UTF-8?q?mport=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 5/6] =?UTF-8?q?REPORT-55048=20websocket=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E7=9A=84=E6=83=85=E5=86=B5=E5=A4=84=E7=90=86?= =?UTF-8?q?=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 6/6] =?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