diff --git a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java index 98f5f36530..82c8ec340f 100644 --- a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java @@ -224,7 +224,7 @@ public abstract class LiteConditionPane extends BasicBeanPa } int returnVal = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION); if (returnVal == JOptionPane.OK_OPTION) { DefaultTreeModel treeModel = (DefaultTreeModel) conditionsTree.getModel(); diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java index 4c4785be01..342221fd20 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java @@ -215,7 +215,7 @@ public class JTreeControlPane extends ControlPane { public void actionPerformed(ActionEvent e) { // TODO remove tree node int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val != JOptionPane.OK_OPTION) { return; } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java index fd2fcc3755..27cff9c5e3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java @@ -126,7 +126,7 @@ public class UITabbedPane extends JTabbedPane{ * @param i tab索引 */ public void doRemoveTab(int i){ - int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(UITabbedPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove") + int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(UITabbedPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt") , JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (re == JOptionPane.OK_OPTION) { super.removeTabAt(i); diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java index eedc12058d..1bf9d604fc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java @@ -179,7 +179,7 @@ public class LayerDataControlPane extends ControlPane { public void actionPerformed(ActionEvent e) { // TODO remove tree node int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val != JOptionPane.OK_OPTION) { return; } diff --git a/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java b/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java index 32b33cbab2..74024a86fe 100644 --- a/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java @@ -76,7 +76,7 @@ public class UIMenuTableUI extends UITableUI{ public void mousePressed(MouseEvent e) { if (e.getX() >= table.getWidth() - 20) { int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val == JOptionPane.OK_OPTION) { uiTable.removeLine(table.rowAtPoint(e.getPoint())); uiTable.fireTargetChanged(); diff --git a/designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java b/designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java index 71e80027c3..93ce206299 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java @@ -134,7 +134,7 @@ public class UITableUI extends BasicTableUI { } if (!table.isEditing()) { int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val == JOptionPane.OK_OPTION) { ((UITable) table).removeLine(table.rowAtPoint(e.getPoint())); ((UITable) table).fireTargetChanged(); diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java index 8918cccdbf..8b046f3d08 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java @@ -271,7 +271,7 @@ public abstract class UITableModelAdapter extends AbstractTableModel implemen component = DesignerContext.getDesignerFrame(); } int val = FineJOptionPane.showConfirmDialog(component, getDeleteTipText() - , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), + , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val != JOptionPane.OK_OPTION) { return; diff --git a/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java b/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java index 2353965581..b0c57418ac 100644 --- a/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java +++ b/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java @@ -1,5 +1,12 @@ package com.fr.design.login.socketio; +import com.fr.cbb.websocket.core.WebSocketAckRequest; +import com.fr.cbb.websocket.core.WebSocketClientProvider; +import com.fr.cbb.websocket.core.WebSocketConfiguration; +import com.fr.cbb.websocket.core.WebSocketServerFactory; +import com.fr.cbb.websocket.core.WebSocketServerProvider; +import com.fr.cbb.websocket.holder.EventHolder; +import com.fr.cbb.websocket.listener.SocketDataListener; import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.login.DesignerLoginType; @@ -7,11 +14,6 @@ import com.fr.design.login.bean.BBSAccountLogin; import com.fr.design.upm.event.CertificateEvent; import com.fr.event.EventDispatcher; import com.fr.log.FineLoggerFactory; -import com.fr.third.socketio.AckRequest; -import com.fr.third.socketio.Configuration; -import com.fr.third.socketio.SocketIOClient; -import com.fr.third.socketio.SocketIOServer; -import com.fr.third.socketio.listener.DataListener; import java.net.URLDecoder; import java.util.concurrent.ExecutorService; @@ -27,7 +29,7 @@ public class LoginAuthServer { private AtomicBoolean started = new AtomicBoolean(false); - private SocketIOServer server; + private WebSocketServerProvider server; private static final String HOSTNAME = "localhost"; private static final int PORT = 41925; @@ -46,10 +48,10 @@ public class LoginAuthServer { } private LoginAuthServer() { - Configuration config = new Configuration(); + WebSocketConfiguration config = new WebSocketConfiguration(); config.setHostname(HOSTNAME); config.setPort(PORT); - server = new SocketIOServer(config); + server = WebSocketServerFactory.registerWebSocketServer(config); initEventListener(); } @@ -87,9 +89,9 @@ public class LoginAuthServer { } private void initEventListener() { - server.addEventListener("bbsAccountLogin", BBSAccountLogin.class, new DataListener() { + server.addEventListener(EventHolder.build("bbsAccountLogin", BBSAccountLogin.class, new SocketDataListener() { @Override - public void onData(SocketIOClient client, BBSAccountLogin data, AckRequest ackRequest) throws Exception { + public void onData(WebSocketClientProvider client, BBSAccountLogin data, WebSocketAckRequest ackRequest) throws Exception { // 保存登录信息到.FineReport100配置中 int uid = data.getUid(); if (uid > 0) { @@ -106,6 +108,6 @@ public class LoginAuthServer { EventDispatcher.fire(CertificateEvent.LOGIN, username); } } - }); + })); } } diff --git a/designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java b/designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java index 1fc67b2852..94d8c8be95 100644 --- a/designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java +++ b/designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java @@ -37,7 +37,7 @@ public class AddedMemberList extends MemberList { "Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_User_And_Its_Design_Authorities"; if (member.isSelected() && member.hasAuthority()){ int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle), - Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val == JOptionPane.OK_OPTION) { member.setSelected(!member.isSelected()); ((DefaultListModel) getModel()).removeElement(member); diff --git a/designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java b/designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java index 5851ec48c6..5b59a839b7 100644 --- a/designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java +++ b/designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java @@ -39,7 +39,7 @@ public class AddingMemberList extends MemberList { "Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_User_And_Its_Design_Authorities"; if (member.isSelected() && member.hasAuthority()){ int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle), - Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val == JOptionPane.OK_OPTION) { member.setSelected(!member.isSelected()); } diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java index d90f2af422..91661301f1 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java @@ -792,7 +792,7 @@ public final class GUICoreUtils { return false; } - int returnVal = FineJOptionPane.showConfirmDialog(ancestorWindow, com.fr.design.i18n.Toolkit.i18nText(key), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), + int returnVal = FineJOptionPane.showConfirmDialog(ancestorWindow, com.fr.design.i18n.Toolkit.i18nText(key), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.OK_OPTION) { int minSelectedIndex = nodeList.getMinSelectionIndex(); diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java index 13b4cdc750..8360989818 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java @@ -1,5 +1,6 @@ package com.fr.start.server; +import com.fr.cbb.websocket.core.WebSocketEndpoint; import com.fr.design.DesignerEnvManager; import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; @@ -11,7 +12,6 @@ import com.fr.startup.FineWebApplicationInitializer; import com.fr.third.guava.collect.Sets; import com.fr.third.springframework.web.SpringServletContainerInitializer; import com.fr.third.springframework.web.context.support.AnnotationConfigWebApplicationContext; -import com.fr.web.socketio.WebSocketEndpoint; import com.fr.workspace.WorkContext; import org.apache.catalina.Context; import org.apache.catalina.LifecycleException; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java index 5f03a75516..f42391ba06 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java @@ -139,7 +139,7 @@ public class MatchResultTable extends JTable { if (mouseEntered) { MatchResultTable.this.getCellEditor().stopCellEditing(); int val = JOptionPane.showConfirmDialog(MatchResultTable.this, Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", - Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (val == JOptionPane.OK_OPTION) { DefaultTableModel model = (DefaultTableModel) MatchResultTable.this.getModel(); Object areaName = MatchResultTable.this.getValueAt(row, 0); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java index 61dfa46c72..ef4dc97dca 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java @@ -163,7 +163,7 @@ public class ServerPrinterPane extends BasicPane { } int returnVal = FineJOptionPane.showConfirmDialog(ServerPrinterPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Are_You_Sure_To_Delete_The_Selected_Printer") - + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.OK_OPTION) { ((DefaultListModel) printerList.getModel()).remove(selectedIndex);