diff --git a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java index 094915a858..d4a6b8f43a 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java @@ -136,7 +136,7 @@ public abstract class AbstractExportAction> extends JT int returnVal = FineJOptionPane.showConfirmDialog( DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + e.getEditingFILE() + "\" ?", - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE ); 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/data/MapCompareUtils.java b/designer-base/src/main/java/com/fr/design/data/MapCompareUtils.java deleted file mode 100644 index 331e980834..0000000000 --- a/designer-base/src/main/java/com/fr/design/data/MapCompareUtils.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.fr.design.data; - -import org.jetbrains.annotations.NotNull; - -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author rinoux - * @version 10.0 - * Created by rinoux on 2022/3/28 - */ -public final class MapCompareUtils { - - - /** - * 对比两个map 查找出相比orig,other中有哪些是新增的、删除的或者被修改的,并分别进行处理 - * - * 对比时默认用equals方法来判断是否为 EntryEventKind#UPDATED - * - * @param orig 原始map - * @param other 参考的新map - * @param eventHandler 有区别时的事件处理器 - * @param K - * @param V - */ - public static void contrastMapEntries(@NotNull Map orig, @NotNull Map other, @NotNull EventHandler eventHandler) { - - contrastMapEntries(orig, other, eventHandler, UpdateRule.DEFAULT); - } - - /** - * 对比两个map 查找出相比orig,other中有哪些是新增的、删除的或者被修改的,并分别进行处理 - * - * 对比时用自定义的规则来判断是否为 EntryEventKind#UPDATED - * - * @param orig 原始map - * @param other 参考的新map - * @param eventHandler 有区别时的事件处理器 - * @param updateRule 自定义的Update事件判定规则 - * @param - * @param - */ - public static void contrastMapEntries(@NotNull Map orig, @NotNull Map other, @NotNull EventHandler eventHandler, @NotNull UpdateRule updateRule) { - - Map copiedOrig = new LinkedHashMap<>(orig); - - other.forEach((k, v) -> { - V existedV = copiedOrig.remove(k); - if (existedV != null) { - if (updateRule.needUpdate(existedV, v)) { - eventHandler.on(EntryEventKind.UPDATED, k, v); - } - } else { - eventHandler.on(EntryEventKind.ADDED, k, v); - } - }); - - copiedOrig.forEach((k, v) -> eventHandler.on(EntryEventKind.REMOVED, k, v)); - } - - - /** - * 事件处理器,对应比较后的三种结果的事件处理 - * @param - * @param - */ - public interface EventHandler { - void on(EntryEventKind entryEventKind, K k, V v); - } - - /** - * 数据被修改(EntryEventKind.UPDATED) 的判定规则 - * @param - * @param - */ - public interface UpdateRule { - - EntryEventKind eventKind = EntryEventKind.UPDATED; - - UpdateRule DEFAULT = new UpdateRule() {}; - - default boolean needUpdate(V origin, V v) { - return !v.equals(origin); - } - } - - public enum EntryEventKind { - ADDED, - REMOVED, - UPDATED; - } -} diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java index 264a937999..ea368bbfcd 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java @@ -236,17 +236,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData @Override public void update(TableDataConfig tableDataConfig) { - Nameable[] tableDataArray = this.update(); - List tableDataBeans = new ArrayList<>(); - Map map = MapUtils.invertMap(getDsNameChangedMap()); - for (int i = 0; i < tableDataArray.length; i++) { - NameObject nameObject = (NameObject) tableDataArray[i]; - String oldName = map.get(nameObject.getName()); - if (oldName == null) { - oldName = StringUtils.EMPTY; - } - tableDataBeans.add(new TableDataBean(nameObject.getName(), oldName, (TableData) nameObject.getObject())); - } + List tableDataBeans = getUpdateTableDataBeans(); try { WorkContext.getCurrent().get(TableDataOperator.class, new ExceptionHandler() { @Override @@ -263,6 +253,25 @@ public class TableDataPaneListPane extends JListControlPane implements TableData } } + /** + * 获取更新时的数据集快照 + * + * @return 快照 + */ + private List getUpdateTableDataBeans() { + Nameable[] tableDataArray = this.update(); + List tableDataBeans = new ArrayList<>(); + Map map = MapUtils.invertMap(getDsNameChangedMap()); + for (Nameable nameable : tableDataArray) { + NameObject nameObject = (NameObject) nameable; + String oldName = map.get(nameObject.getName()); + if (oldName == null) { + oldName = StringUtils.EMPTY; + } + tableDataBeans.add(new TableDataBean(nameObject.getName(), oldName, (TableData) nameObject.getObject())); + } + return tableDataBeans; + } private boolean saveByOldWay(List tableDataBean) { try { return TableDataOperatorImpl.getInstance().saveTableData(tableDataBean); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 9c2427f5a3..a107d2c793 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -10,7 +10,7 @@ import com.fr.data.metric.utils.DatabaseConnectionMetricHandler; import com.fr.data.operator.DataOperator; import com.fr.decision.record.OperateConstants; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.data.MapCompareUtils; +import com.fr.general.MapCompareUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.fun.ConnectionProvider; import com.fr.design.gui.controlpane.JListControlPane; diff --git a/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java b/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java index 4e0b4e520d..a5f890de6d 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java @@ -39,7 +39,7 @@ public class FineJOptionPane extends JOptionPane { } private final static String MESSAGE_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Message"); - private final static String CONFIRM_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"); + private final static String CONFIRM_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"); private final static String INPUT_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"); /** diff --git a/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java index 6e6c3d8b9b..800e1596bd 100644 --- a/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java @@ -304,7 +304,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver, if (designerEnvManager.isSupportStringToFormula()) { if (!designerEnvManager.isDefaultStringToFormula()) { int returnValue = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit_String_To_Formula") - + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (returnValue == JOptionPane.OK_OPTION) { setCurrentEditor(j); diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java index 503929e228..b19e243850 100644 --- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java @@ -285,7 +285,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName if (designerEnvManager.isSupportStringToFormula()) { if (!designerEnvManager.isDefaultStringToFormula()) { int returnValue = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit_String_To_Formula") - + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (returnValue == JOptionPane.OK_OPTION) { setCurrentEditor(j); diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index be7c8c1953..8f2783a3ca 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -1000,7 +1000,7 @@ public class MultiTemplateTabPane extends JComponent { if (!specifiedTemplate.isALLSaved() && !DesignerMode.isVcsMode()) { specifiedTemplate.stopEditing(); int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?", - Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.YES_OPTION) { CallbackSaveWorker worker = specifiedTemplate.save(); worker.addSuccessCallback(new Runnable() { diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index 8da6b7a3b6..5dfedc2662 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -353,7 +353,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { if (FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), tipContent, - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), YES_NO_OPTION) == JOptionPane.YES_OPTION) { // 删除所有选中的即可 @@ -378,7 +378,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { if (FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), tipContent, - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), YES_NO_OPTION) == JOptionPane.YES_OPTION) { // 删除其他 diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java index 7168db0b5c..ebe6abb672 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java @@ -153,7 +153,7 @@ public abstract class EditingStringListPane extends BasicBeanPane> if (selected != null) { int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?", - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION); if (re == JOptionPane.OK_OPTION) { JListUtils.removeSelectedListItems(jlist); 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/RegPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java index f84d0f5fdb..ea92ee73ce 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java @@ -394,6 +394,7 @@ public class RegPane extends BasicPane { private static class RegLengthPane extends DisplayPane { private UISpinner minLenSpinner; private UISpinner maxLenSpinner; + private final int DEFAULT_WIDTH = 60; public RegLengthPane(){ this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -403,8 +404,11 @@ public class RegPane extends BasicPane { maxLenSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, 0); UILabel minLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Reg_Min_Length")); UILabel maxLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Reg_Max_Length")); - minLabel.setPreferredSize(new Dimension(60, 20)); - maxLabel.setPreferredSize(new Dimension(60, 20)); + int minLabelWidth = Math.max(minLabel.getPreferredSize().width, DEFAULT_WIDTH); + int maxLabelWidth = Math.max(maxLabel.getPreferredSize().width, DEFAULT_WIDTH); + + minLabel.setPreferredSize(new Dimension(minLabelWidth, 20)); + maxLabel.setPreferredSize(new Dimension(maxLabelWidth, 20)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ 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/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 1ac6538926..afa1a3bcb2 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -797,7 +797,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (!editingTemplate.getEditingFILE().exists()) { int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + editingTemplate.getEditingFILE() - + "\" ?", Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION, + + "\" ?", Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.YES_OPTION && editingTemplate.saveTemplate()) { editingTemplate.saveTemplate(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/guide/tip/BubbleTip.java b/designer-base/src/main/java/com/fr/design/mainframe/guide/tip/BubbleTip.java index 13e5dc28f0..c0337e7b2c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/guide/tip/BubbleTip.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/guide/tip/BubbleTip.java @@ -37,7 +37,7 @@ public class BubbleTip implements GuideTip { int returnVal = FineJOptionPane.showConfirmDialog( currentGuide.getGuideView(), Toolkit.i18nText("Fine-Design_Guide_Option_Warning_Terminal"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.YES_OPTION) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/VcsProcessFailedWrapper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/VcsProcessFailedWrapper.java index 0a257ce2e4..93d7d93479 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/VcsProcessFailedWrapper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/VcsProcessFailedWrapper.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.vcs; import com.fr.report.entity.VcsEntity; +import com.fr.stable.StringUtils; import java.util.ArrayList; import java.util.List; @@ -51,6 +52,19 @@ public class VcsProcessFailedWrapper { return detailList; } + /** + * 是否失败 + */ + public boolean isFalse(VcsTableEntity entity) { + for (VcsEntity vcsEntity : failedList) { + if (StringUtils.equals(vcsEntity.getFilename(), entity.getFilename()) + && vcsEntity.getVersion() == entity.getEntity().getVersion()) { + return true; + } + } + return false; + } + /** * 处理是否全部成功 */ diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCloseTemplateHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCloseTemplateHelper.java index 5877795589..8f258b3e0d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCloseTemplateHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCloseTemplateHelper.java @@ -88,7 +88,7 @@ public class VcsCloseTemplateHelper { specifiedTemplate.stopEditing(); int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), String.format("%s\"%s\" ?",Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save"), specifiedTemplate.getEditingFILE()), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (returnVal == JOptionPane.YES_OPTION) { CallbackSaveWorker worker = specifiedTemplate.save(); worker.addSuccessCallback(() -> { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java index 13d705754a..2224bb1aec 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java @@ -5,6 +5,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrameFileDealerPane; @@ -55,13 +56,17 @@ public class EditFileVersionDialog extends UIDialog { private void initComponents() { JPanel fontPane = new JPanel(new BorderLayout()); - fontPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Vcs_Version_Message") + ":"), BorderLayout.NORTH); + UILabel fontLabel = new UILabel(" " + Toolkit.i18nText("Fine-Design_Vcs_Version_Message") + ":"); + fontLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Vcs_Version_Message")); + fontPane.add(fontLabel, BorderLayout.NORTH); msgTestArea.setBorder(null); UIScrollPane scrollPane = new UIScrollPane(msgTestArea); + UILabel versionTip = new UILabel(" " + Toolkit.i18nText("Fine-Design_Vcs_Version_Number") + ":"); + versionTip.setToolTipText(Toolkit.i18nText("Fine-Design_Vcs_Version_Number")); Component[][] components = new Component[][]{ - new Component[]{new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Vcs_Version_Number") + ":"), versionLabel}, + new Component[]{versionTip, versionLabel}, new Component[]{fontPane, scrollPane} }; double[] rowSizes = new double[]{25, 100}; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java index 98e7bae071..1aacaa9d7b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java @@ -222,7 +222,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane int selVal = FineJOptionPane.showConfirmDialog( RecyclePane.this, isDelete ? getDeleteTip(selectList.size()) : getRestoreTip(selectList.size()), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (selVal == JOptionPane.YES_OPTION) { @@ -232,7 +232,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane } private void updateVcsUI(VcsProcessFailedWrapper wrapper) { - tableEntities = model.getList().stream().filter(tableEntity -> !tableEntity.isSelect() || wrapper.getFailedNameList().contains(tableEntity.getFilename())).collect(Collectors.toList()); + tableEntities = model.getList().stream().filter(tableEntity -> !tableEntity.isSelect() || wrapper.isFalse(tableEntity)).collect(Collectors.toList()); model.setList(new ArrayList<>(tableEntities)); model.fireTableDataChanged(); fireVcsListener(model.getList()); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java index 4ca132ea5b..b97de53991 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java @@ -120,7 +120,7 @@ public class VcsCenterPane extends VcsNewPane { int selVal = FineJOptionPane.showConfirmDialog( VcsCenterPane.this, Toolkit.i18nText("Fine-Design_Vcs_Center_Delete", fileName), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (selVal == JOptionPane.YES_OPTION) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java index 28cb3f2447..2c8401c94c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java @@ -371,7 +371,7 @@ public class VcsMovePanel extends BasicPane { private void doAfterMove() { visible = !VcsHelper.getInstance().isLegacyMode(); initVcsLabel(updatePane); - updatePane.setVisible(visible); + updatePane.setVisible(!visible); callBack.doCallBack(visible); parentCard.show(parentPane, SETTING); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java index 8e5e22c475..11da401226 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java @@ -168,7 +168,7 @@ public class VcsNewPane extends RecyclePane { int selVal = FineJOptionPane.showConfirmDialog( VcsNewPane.this, Toolkit.i18nText("Fine-Design_Vcs_Restore_This_Version_Tips"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (selVal == JOptionPane.YES_OPTION) { @@ -255,7 +255,7 @@ public class VcsNewPane extends RecyclePane { int selVal = FineJOptionPane.showConfirmDialog( VcsNewPane.this, Toolkit.i18nText("Fine-Design_Vcs_Delete_This_Version_Tips"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (selVal == JOptionPane.YES_OPTION) { 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/upm/UpmFinder.java b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java index ede9b45d81..1158f97aa3 100644 --- a/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java +++ b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java @@ -84,7 +84,7 @@ public class UpmFinder { if (!checkUPMResourcesExist()) { // upm下载 int val = FineJOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); if (val == JOptionPane.OK_OPTION) { try { UpmResourceLoader.INSTANCE.download(); 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/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 032f16a769..6931fa6636 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -332,7 +332,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")}; if (!jarConsistency) { int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION, QUESTION_MESSAGE, IOUtils.readIcon("com/fr/design/icon/versioncheck/question.png"), option, 1); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION, QUESTION_MESSAGE, IOUtils.readIcon("com/fr/design/icon/versioncheck/question.png"), option, 1); if (0 == a) { progressBar.setVisible(true); progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 66b9d12d3d..f794a0a8e7 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -950,7 +950,7 @@ public class FILEChooserPane extends BasicPane { if (access(selectedFile) && access(currentDirectory)) { if (selectedFile.exists()) { int selVal = FineJOptionPane.showConfirmDialog(dialog, Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Cover_The_Current_File") + " ?", - Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (selVal == JOptionPane.YES_OPTION) { option = JOPTIONPANE_OK_OPTION; saveDictionary(); 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-base/src/test/java/com/fr/design/data/MapCompareUtilsTest.java b/designer-base/src/test/java/com/fr/design/data/MapCompareUtilsTest.java deleted file mode 100644 index 1f1e60e2be..0000000000 --- a/designer-base/src/test/java/com/fr/design/data/MapCompareUtilsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.fr.design.data; - -import org.junit.Assert; -import org.junit.Test; - -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author rinoux - * @version 10.0 - * Created by rinoux on 2022/3/28 - */ -public class MapCompareUtilsTest { - - @Test - public void contrastMapEntries() { - - - Map orig = new LinkedHashMap<>(); - - orig.put("aaa", "aaa"); - orig.put("bbb", "bbb"); - orig.put("ccc", "ccc"); - orig.put("ddd", "ddd"); - - - Map other = new LinkedHashMap<>(); - - other.put("aaa", "111"); - other.put("bbb", "bbb"); - other.put("ccc", "ccc"); - other.put("eee", "eee"); - - - MapCompareUtils.contrastMapEntries(orig, other, new MapCompareUtils.EventHandler() { - @Override - public void on(MapCompareUtils.EntryEventKind entryEventKind, String s, String s2) { - switch (entryEventKind) { - case UPDATED: - Assert.assertEquals(s, "aaa"); - Assert.assertEquals(s2, "111"); - break; - case REMOVED: - Assert.assertEquals(s, "ddd"); - break; - case ADDED: - Assert.assertEquals(s, "eee"); - Assert.assertEquals(s2, "eee"); - break; - default: - Assert.fail(); - } - } - }); - } -} \ No newline at end of file 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-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java b/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java index bb1ff88c58..87523bfe0a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java +++ b/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java @@ -104,7 +104,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { public void installOnline() { int choose = JOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Download_Online_Sources"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (choose == JOptionPane.OK_OPTION) { initDialog(); @@ -237,7 +237,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { if (result) { int choose = FineJOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Work_After_Restart_Designer"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (choose == JOptionPane.OK_OPTION) { RestartHelper.restart(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index 5b17494da9..8dfb3ac484 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -6,7 +6,6 @@ import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.base.mode.DesignModeContext; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; @@ -25,6 +24,7 @@ import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.module.DesignModuleFactory; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; @@ -149,7 +149,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } private void refreshNameableCreator() { - if (DesignModeContext.isDuchampMode()) { + if (ChartEditContext.duchampMode()) { return; } HashMap paneMap = getHyperlinkMap(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java index 01854225dc..edf45b4ccc 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java @@ -472,11 +472,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { } protected Component[][] createToolBarComponents() { - return ChartEditContext.duchampMode() ? new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), isSort}, - new Component[]{null, fullScreenDisplay}, - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")), collapse}, - } : new Component[][]{ + return new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), isSort}, new Component[]{null, exportImages}, new Component[]{null, fullScreenDisplay}, @@ -485,10 +481,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { } protected Component[][] createToolBarComponentsWithOutSort() { - return ChartEditContext.duchampMode() ? new Component[][]{ - new Component[]{null, fullScreenDisplay}, - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")), collapse} - } : new Component[][]{ + return new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), exportImages}, new Component[]{null, fullScreenDisplay}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout")), collapse} diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 1f139bbabf..c77ac788b3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -221,7 +221,7 @@ public class XCardSwitchButton extends XButton { private void deleteCard(XCardSwitchButton button, int index){ String titleName = button.getContentLabel().getText(); int value = FineJOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Confirm_Dialog_Content") + "“" + titleName + "”", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (value != JOptionPane.OK_OPTION) { return; } @@ -402,7 +402,7 @@ public class XCardSwitchButton extends XButton { private void deleteTabLayout(SelectionModel selectionModel, FormDesigner designer){ String titleName = this.getContentLabel().getText(); int value = FineJOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Confirm_Dialog_Content") + "“" + titleName + "”", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (value != JOptionPane.OK_OPTION) { return; } diff --git a/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java b/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java index 3afe612537..bdda0b4db2 100644 --- a/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java +++ b/designer-form/src/main/java/com/fr/design/fit/toolbar/SwitchAction.java @@ -233,7 +233,7 @@ public class SwitchAction extends UpdateAction { int returnVal = FineJOptionPane.showConfirmDialog( DesignerContext.getDesignerFrame(), message, - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), YES_NO_OPTION); return returnVal == JOptionPane.YES_OPTION; } @@ -249,7 +249,7 @@ public class SwitchAction extends UpdateAction { int returnVal = FineJOptionPane.showConfirmDialog( DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Designer_Fit_Cover_File_Switch"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), YES_NO_OPTION); return returnVal == JOptionPane.YES_OPTION; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index e515dd1f35..94886f9d46 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -8,11 +8,11 @@ import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWBorderLayout; import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIPopupMenu; -import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -540,21 +540,26 @@ public class FormArea extends JComponent implements ScrollRulerComponent { } //获取在容器的绝对位置 Rectangle rec = ComponentUtils.getRelativeBounds(creator); + // 组件实际大小、位置要考虑缩放 int dWidth = getDesignerWidth(); - if (rec.width <= dWidth && rec.x < getHorizontalValue()) { + double recRealWidth = rec.width * designer.getScale(); + double recRealX = rec.x * designer.getScale(); + if (recRealWidth <= dWidth && recRealX < getHorizontalValue()) { //在边界内部且x位置小于水平滚动条的值 - horScrollBar.setValue(rec.x); - } else if (rec.x + rec.width > dWidth + horizontalValue) { + horScrollBar.setValue((int) recRealX); + } else if (recRealX + recRealWidth > dWidth + horizontalValue) { //超出边界宽度 - horScrollBar.setValue(rec.x + rec.width - dWidth); + horScrollBar.setValue((int) (recRealX + recRealWidth - dWidth)); } int dHeight = getDesignerHeight(); - if (rec.height < dHeight && rec.y < getVerticalValue()) { + double recRealHeight = rec.height * designer.getScale(); + double recRealY = rec.y * designer.getScale(); + if (recRealHeight < dHeight && recRealY < getVerticalValue()) { //在边界内部且y位置小于竖直滚动条的值 - verScrollBar.setValue(rec.y); - } else if (rec.y + rec.height > dHeight + verticalValue) { + verScrollBar.setValue((int) recRealY); + } else if (recRealY + recRealHeight > dHeight + verticalValue) { //超出边界高度 - verScrollBar.setValue(rec.y + rec.height - dHeight); + verScrollBar.setValue((int) (recRealY + recRealHeight - dHeight)); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java b/designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java index b5fac75e5a..295aae7c9c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java @@ -289,7 +289,7 @@ public class FormEditToolBar extends BasicPane { return; } int val = FineJOptionPane.showConfirmDialog(FormEditToolBar.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (val != JOptionPane.YES_OPTION) { return; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/group/ui/GroupFileDialog.java b/designer-form/src/main/java/com/fr/design/mainframe/share/group/ui/GroupFileDialog.java index f4b79944ea..9979e2d9cd 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/group/ui/GroupFileDialog.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/group/ui/GroupFileDialog.java @@ -123,6 +123,7 @@ abstract public class GroupFileDialog extends BaseGroupDialog { private UILabel creteNewNameLabel() { // 输入框前提示 UILabel newNameLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Group_Enter_New_Folder_Name")); + newNameLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Share_Group_Enter_New_Folder_Name")); newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setPreferredSize(new Dimension(84, 16)); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/DownloadSuitableThemeAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/DownloadSuitableThemeAction.java index 97e6d94013..cf5581cf8d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/DownloadSuitableThemeAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/actions/DownloadSuitableThemeAction.java @@ -209,7 +209,7 @@ public class DownloadSuitableThemeAction extends SharedComponentPopupAction { int returnVal = FineJOptionPane.showConfirmDialog( window, Toolkit.i18nText("Fine-Design_Share_Apply_Suitable_Theme_Tip"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), FineJOptionPane.OK_CANCEL_OPTION); if (returnVal == JOptionPane.YES_OPTION) { applyTheme(currentTemplate, theme.getName(), window); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/installation/TemplateThemeInstallation.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/installation/TemplateThemeInstallation.java index 4de568db7f..85ed94ee19 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/installation/TemplateThemeInstallation.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/installation/TemplateThemeInstallation.java @@ -199,7 +199,7 @@ public class TemplateThemeInstallation extends AsyncInstallation { int returnVal = FineJOptionPane.showConfirmDialog( window, Toolkit.i18nText("Fine-Design_Share_Apply_Suitable_Theme_Tip"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), FineJOptionPane.OK_CANCEL_OPTION); if (returnVal == JOptionPane.YES_OPTION) { applyTheme(currentFormTemplate, theme.getName(), window); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/widgetpackage/OnlineWidgetPackagesShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/widgetpackage/OnlineWidgetPackagesShowPane.java index d133cd0583..8a52051276 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/widgetpackage/OnlineWidgetPackagesShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/widgetpackage/OnlineWidgetPackagesShowPane.java @@ -82,7 +82,7 @@ public class OnlineWidgetPackagesShowPane extends AbstractOnlineWidgetShowPane { + Toolkit.i18nText("Fine-Design_Share_Total") + onlineWidgetSelectPane.getSharableWidgetNum() + Toolkit.i18nText("Fine-Design_Share_Piece"); - int returnValue = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), message, Toolkit.i18nText("Fine-Design_Basic_Confirm"), FineJOptionPane.YES_NO_OPTION); + int returnValue = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), message, Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), FineJOptionPane.YES_NO_OPTION); if (returnValue == FineJOptionPane.OK_OPTION && onlineWidgetSelectPane.getSharableWidgetNum() != 0) { downLoadPackage(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterConfigPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterConfigPane.java index 8808a5d754..1a88ae1502 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterConfigPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterConfigPane.java @@ -149,6 +149,7 @@ public abstract class FilterConfigPane extends JPanel { private FilterCheckBox createCheckBox(WidgetFilterInfo filterInfo) { final FilterCheckBox checkBox = new FilterCheckBox(filterInfo.getName(), filterInfo); + checkBox.setToolTipText(filterInfo.getName()); checkBox.setBackground(Color.WHITE); checkBox.addItemListener(new ItemListener() { @Override diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java index 3c9ae50207..3e3010aa4d 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java @@ -33,6 +33,7 @@ public class TextEditorMobileDefinePane extends BaseTextEditorMobileDefinePane { inputSettingPane = new MobileTextFieldInputSettingPane(); textSettingPane = new MobileTextEditSettingPane(); container.add(inputSettingPane); + container.add(textSettingPane); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index f672b9a232..661c1f7bf1 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -906,7 +906,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse return; } int returnValue = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(reportComposite), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Des_Remove_Work_Sheet"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.OK_CANCEL_OPTION); if (returnValue == JOptionPane.OK_OPTION) { if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java index 8e7c14297c..8b3d9a4782 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java @@ -238,7 +238,7 @@ public class DownloadComponentPackageGuide { themeConfirmDialog = GuideCreateUtils.showConfirmDialog( DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Share_Apply_Suitable_Theme_Tip"), - Toolkit.i18nText("Fine-Design_Basic_Confirm"), + Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), FineJOptionPane.OK_CANCEL_OPTION); return true; } diff --git a/designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java b/designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java index 1b1c1692f0..ee14a914e6 100644 --- a/designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java @@ -152,7 +152,7 @@ public class LayerReportPane extends BasicBeanPane { if (isLayerReportBox.isSelected()) { if (!ReportUtils.isLayerReportUsable(worksheet)) { int value = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_After_Changed_Some_Attributes_Are_Different") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (value != JOptionPane.YES_OPTION) { isLayerReportBox.setSelected(false); } diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java index 380809faf0..9ae4983227 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java @@ -298,7 +298,7 @@ public class ReportEnginePane extends BasicBeanPane { if (clientPaging.isSelected()) { if (!ReportUtils.isLayerReportUsable(worksheet)) { int value = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_After_Changed_Some_Attributes_Are_Different") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (value != JOptionPane.YES_OPTION) { clientPaging.setSelected(false); } 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 f22d44cb3f..0ce920d25d 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 @@ -332,7 +332,7 @@ public class EditToolBar extends BasicPane { return; } int val = FineJOptionPane.showConfirmDialog(EditToolBar.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (val != JOptionPane.YES_OPTION) { return; } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EventPane.java b/designer-realize/src/main/java/com/fr/design/webattr/EventPane.java index 347d942834..b64eda37c1 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EventPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EventPane.java @@ -173,7 +173,7 @@ public class EventPane extends BasicPane { } int val = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EventPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dialog_Prompt"), JOptionPane.YES_NO_OPTION); if (val != JOptionPane.YES_OPTION) { return; 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);