From 70847a3057e823686fdd524a845e6ea4aeabcf10 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 17:01:37 +0800 Subject: [PATCH 1/4] =?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 636fdcaaf..cdfe374b2 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 2/4] =?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 cdfe374b2..ca621984b 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 3/4] =?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 0c71e9488..fba15b043 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 4/4] =?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 f7f5ef16b..914b389a5 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 c75c6607c..f22d44cb3 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