Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~harrison/design into release/10.0

 Conflicts:
	designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
feature/big-screen
Harrison 5 years ago
parent
commit
7e2851e146
  1. 13
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 3
      designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
  4. 15
      designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java
  5. 3
      designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java
  6. 3
      designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java
  7. 7
      designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
  8. 45
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  9. 7
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  10. 7
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  11. 5
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  12. 5
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  13. 7
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  14. 9
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  15. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  16. 1
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java
  17. 5
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java
  18. 289
      designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java
  19. 2
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  20. 5
      designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java
  21. 5
      designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
  22. 3
      designer-base/src/main/java/com/fr/design/extra/LoginWebPane.java
  23. 7
      designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
  24. 11
      designer-base/src/main/java/com/fr/design/extra/PluginInstalledPane.java
  25. 3
      designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java
  26. 5
      designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java
  27. 3
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  28. 3
      designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java
  29. 3
      designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java
  30. 11
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  31. 9
      designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
  32. 7
      designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
  33. 5
      designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
  34. 7
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
  35. 9
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
  36. 5
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java
  37. 7
      designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
  38. 7
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  39. 2
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  40. 25
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
  41. 6
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  42. 7
      designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
  43. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java
  44. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  45. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java
  46. 5
      designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
  47. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java
  48. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java
  49. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
  50. 26
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
  51. 3
      designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java
  52. 3
      designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java
  53. 5
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java
  54. 3
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  55. 13
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  56. 25
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  57. 11
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  58. 3
      designer-base/src/main/java/com/fr/design/mainframe/UndoStateEdit.java
  59. 4
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  60. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java
  61. 3
      designer-base/src/main/java/com/fr/design/remote/ui/AbstractListControlPane.java
  62. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java
  63. 3
      designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java
  64. 3
      designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  65. 2
      designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java
  66. 27
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java
  67. 3
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  68. 13
      designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
  69. 3
      designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java
  70. 3
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  71. 11
      designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java
  72. 19
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  73. 3
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  74. 5
      designer-base/src/main/java/com/fr/env/EnvListPane.java
  75. 15
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  76. 3
      designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js
  77. 47
      designer-base/src/test/java/com/fr/design/data/DesignTableDataManagerTest.java
  78. 129
      designer-base/src/test/java/com/fr/design/mainfarme/toolbar/ToolBarMenuDockTest.java
  79. 7
      designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java
  80. 9
      designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java
  81. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
  82. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  83. 30
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java
  84. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java
  85. 9
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  86. 11
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  87. 4
      designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java
  88. 5
      designer-form/src/main/java/com/fr/design/mainframe/widget/editors/ElementCaseToolBarPane.java
  89. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  90. 5
      designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java
  91. 3
      designer-realize/src/main/java/com/fr/design/headerfooter/HFContainer.java
  92. 6
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
  93. 5
      designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java
  94. 5
      designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java
  95. 3
      designer-realize/src/main/java/com/fr/design/report/SubReportPane.java
  96. 3
      designer-realize/src/main/java/com/fr/design/style/StylePane.java
  97. 4
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  98. 4
      designer-realize/src/main/java/com/fr/design/webattr/EventPane.java
  99. 3
      designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java
  100. 3
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

13
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -3,6 +3,7 @@ package com.fr.design;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
@ -91,8 +92,8 @@ public class EnvChangeEntrance {
strategy.showTip(new PopTip() {
@Override
public void show() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
UIManager.getString("OptionPane.messageDialogTitle"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
}
});
return false;
@ -127,8 +128,8 @@ public class EnvChangeEntrance {
strategy.showTip(new PopTip() {
@Override
public void show() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
UIManager.getString("OptionPane.messageDialogTitle"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
}
});
return false;
@ -137,8 +138,8 @@ public class EnvChangeEntrance {
strategy.showTip(new PopTip() {
@Override
public void show() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
UIManager.getString("OptionPane.messageDialogTitle"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
}
});

3
designer-base/src/main/java/com/fr/design/actions/community/UpAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
@ -38,7 +39,7 @@ public class UpAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);

2
designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

@ -21,7 +21,7 @@ import java.util.Map;
import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
import static javax.swing.JOptionPane.OK_OPTION;
import static javax.swing.JOptionPane.WARNING_MESSAGE;
import static javax.swing.JOptionPane.showConfirmDialog;
import static com.fr.design.dialog.FineJOptionPane.showConfirmDialog;
public final class WebPreviewUtils {

15
designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.file.export;
import com.fr.design.actions.JTemplateAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.iprogressbar.FRProgressBar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
@ -132,10 +133,10 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
E e = getEditingComponent();
if (!e.isALLSaved() && !DesignModeContext.isVcsMode()) {
e.stopEditing();
int returnVal = JOptionPane.showConfirmDialog(
int returnVal = FineJOptionPane.showConfirmDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + e.getEditingFILE() + "\" ?",
ProductConstants.PRODUCT_NAME,
Toolkit.i18nText("Fine-Design_Basic_Confirm"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE
);
@ -171,7 +172,7 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
this.setProgress(100);
FineLoggerFactory.getLogger().info("\"" + name + "\"" + Toolkit.i18nText("Fine-Design_Report_Finish_Export") + "!");
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Report_Exported_Successfully") + "\n" + name);
@ -180,10 +181,10 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
this.setProgress(100);
target.closeTemplate();
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Engine_Remote_Design_Permission_Denied"),
UIManager.getString("OptionPane.messageDialogTitle"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon")
);
@ -191,10 +192,10 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
this.setProgress(100);
target.closeTemplate();
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Report_Export_Failed") + "\n" + path,
UIManager.getString("OptionPane.messageDialogTitle"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon")
);

3
designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java

@ -6,6 +6,7 @@ package com.fr.design.actions.help;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
@ -47,7 +48,7 @@ public class ForumAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);

3
designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java

@ -6,6 +6,7 @@ package com.fr.design.actions.help;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.menu.MenuKeySet;
import com.fr.log.FineLoggerFactory;
@ -37,7 +38,7 @@ public class SupportQQAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(ProductConstants.SUPPORT_QQ));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);

7
designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java

@ -10,6 +10,7 @@ import com.fr.data.condition.ListCondition;
import com.fr.data.condition.ObjectCondition;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.UIFormula;
import com.fr.design.formula.VariableResolver;
@ -123,7 +124,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
ExpandMutableTreeNode parentTreeNode = getParentTreeNode();
boolean result = isExistedInParentTreeNode(parentTreeNode, liteCondition, false);
if (result) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_BindColumn_This_Condition_Has_Been_Existed"));
return;
}
@ -222,7 +223,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
return;
}
int returnVal = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
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"),
JOptionPane.OK_CANCEL_OPTION);
if (returnVal == JOptionPane.OK_OPTION) {
@ -610,7 +611,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
//修改的时候加入判断条件重复 REPORT-13441
boolean result = isExistedInParentTreeNode(parentTreeNode, liteCondition, true);
if (result) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_BindColumn_This_Condition_Has_Been_Existed"));
return;
}

45
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -83,6 +83,7 @@ public abstract class DesignTableDataManager {
//用于记录是否要弹出参数框
private static ThreadLocal<String> threadLocal = new ThreadLocal<String>();
private static Map<TableDataSource, Map<String, String[]>> columnCache = new HashMap<>();
/**
* 清除全局 数据集缓存.
@ -113,11 +114,13 @@ public abstract class DesignTableDataManager {
public static void closeTemplate(JTemplate<?, ?> template) {
if (template != null) {
columnCache.remove(getEditingTableDataSource());
dsListenersMap.remove(template.getPath());
}
}
public static void envChange() {
columnCache.clear();
dsListenersMap.clear();
dsNameChangedMap.clear();
clearGlobalDs();
@ -197,7 +200,47 @@ public abstract class DesignTableDataManager {
java.util.Map<String, TableDataWrapper> resMap = getAllEditingDataSet(source);
java.util.Map<String, TableDataWrapper> dsMap = getAllDataSetIncludingProcedure(resMap);
TableDataWrapper tabledataWrapper = dsMap.get(dsName);
return tabledataWrapper == null ? new String[0] : tabledataWrapper.calculateColumnNameList().toArray(new String[0]);
if (tabledataWrapper == null) {
return new String[0];
} else {
return getSelectedColumnNamesFromCache(source, dsName, tabledataWrapper);
}
}
private static String[] getSelectedColumnNamesFromCache(TableDataSource dataSource, String dsName, TableDataWrapper tableDataWrapper) {
Map<String, String[]> map = columnCache.get(dataSource);
if (map == null) {
map = new HashMap<>();
String[] columnNames = tableDataWrapper.calculateColumnNameList().toArray(new String[0]);
map.put(dsName, columnNames);
columnCache.put(dataSource, map);
return columnNames;
} else {
String[] columnNames = map.get(dsName);
if (columnNames == null) {
columnNames = tableDataWrapper.calculateColumnNameList().toArray(new String[0]);
map.put(dsName, columnNames);
return columnNames;
} else {
return columnNames;
}
}
}
public static void removeSelectedColumnNames(String dsName) {
columnCache.get(getEditingTableDataSource()).remove(dsName);
}
public static void addDsColumnNames(String dsName, String[] columnNames) {
TableDataSource dataSource = getEditingTableDataSource();
Map<String, String[]> map = columnCache.get(dataSource);
if (map == null) {
map = new HashMap<>();
map.put(dsName, columnNames);
columnCache.put(dataSource, map);
} else {
map.put(dsName, columnNames);
}
}
/**

7
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -17,6 +17,7 @@ import com.fr.design.data.datapane.preview.PreviewLabel;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.icombobox.FilterableComboBoxModel;
import com.fr.design.gui.icombobox.UIComboBox;
@ -332,7 +333,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
DBUtils.refreshDatabase();
String schema = StringUtils.isEmpty(schemaBox.getSelectedItem()) ? null : schemaBox.getSelectedItem();
DataCoreUtils.refreshTables(getConnection(), TableProcedure.TABLE, schema);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Successfully") + "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Database"),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Successfully") + "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Database"),
JOptionPane.INFORMATION_MESSAGE);
}
@ -438,7 +439,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Failed"), JOptionPane.ERROR_MESSAGE);
}
}
@ -462,7 +463,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
if (!connect) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
JOptionPane.showMessageDialog(designerFrame, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
FineJOptionPane.showMessageDialog(designerFrame, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Failed"), JOptionPane.ERROR_MESSAGE);
failedToFindTable();
return null;

7
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -5,6 +5,7 @@ import com.fr.data.TableDataSource;
import com.fr.data.api.StoreProcedureAssist;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ilist.ListModelElement;
@ -49,7 +50,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
if (StringUtils.isEmpty(tempName)) {
isNamePermitted = false;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"));
setIllegalIndex(editingIndex);
return;
}
@ -58,12 +59,12 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
&& isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) {
isNamePermitted = false;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", tempName));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", tempName));
setIllegalIndex(editingIndex);
} else if (editingType instanceof StoreProcedure && isIncludeUnderline(tempName)) {
isNamePermitted = false;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Stored_Procedure_Name_Tips"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Stored_Procedure_Name_Tips"));
setIllegalIndex(editingIndex);
}
if (nameableList.getSelectedValue() instanceof ListModelElement) {

5
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -18,6 +18,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.TableDataDefineProvider;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -279,6 +280,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
if (selectedNO == null) {
return;
}
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName());
dgEdit(((AbstractTableDataWrapper) selectedNO.getObject()).creatTableDataPane(), selectedNO.getName(), false);
}
}
@ -299,7 +301,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
return;
}
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + ":" + selectedNO.getName() + "?",
int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + ":" + selectedNO.getName() + "?",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
@ -310,6 +312,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
dataTree.setSelectionRow(dataTree.getRowCount() - 1);
fireDSChanged();
checkButtonEnabled();
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName());
}
}
}

5
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -4,6 +4,7 @@ import com.fr.data.impl.Connection;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
@ -43,7 +44,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
String tempName = getEditingName();
if (StringUtils.isEmpty(tempName)) {
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Empty_Name"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Empty_Name"));
setIllegalIndex(editingIndex);
isNamePermitted = false;
return;
@ -53,7 +54,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
isNamePermitted = false;
nameableList.stopEditing();
String message = Toolkit.i18nText("Fine-Design_Basic_Connection_Duplicate_Name", tempName);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), message);
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), message);
setIllegalIndex(editingIndex);
}
if (isNamePermitted && !ComparatorUtils.equals(tempName, selectedName)) {

7
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -14,6 +14,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel;
@ -303,7 +304,7 @@ public class PreviewTablePane extends BasicPane {
return;
}
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), columnErrMessage, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), columnErrMessage, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE);
}
private void populate(TableData tableData) throws Exception {
@ -394,8 +395,8 @@ public class PreviewTablePane extends BasicPane {
} catch (Exception e) {
if (!(e instanceof CancellationException)) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage(),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
}
dialog.setVisible(false);
} finally {

9
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -14,6 +14,7 @@ import com.fr.data.impl.XMLTableData;
import com.fr.design.actions.UpdateAction;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -222,7 +223,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
public void actionPerformed(ActionEvent arg0) {
String uri = ParameterHelper.analyze4Templatee(urlText.getText(), params);
if (!checkURL(uri)) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add_JS_warning"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add_JS_warning"));
return;
}
params = getEditorPaneParameter();
@ -234,10 +235,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (in == null) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
} else {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully"));
try {
in.close();
} catch (IOException e) {

3
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -17,6 +17,7 @@ import com.fr.design.data.datapane.sqlpane.SQLEditPane;
import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.data.tabledata.StoreProcedureWorkerListener;
import com.fr.design.data.tabledata.wrapper.StoreProcedureDataWrapper;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -239,7 +240,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
try {
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) {
JOptionPane.showMessageDialog(ProcedureDataPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
FineJOptionPane.showMessageDialog(ProcedureDataPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
}
}

1
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java

@ -65,6 +65,7 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
}
}
columnNameList = DesignTableDataManager.getColumnNamesByTableData(embeddedTableData);
DesignTableDataManager.addDsColumnNames(name, columnNameList.toArray(new String[0]));
return columnNameList;
}

5
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java

@ -9,6 +9,7 @@ import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.mainframe.DesignerContext;
@ -102,7 +103,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return columnNameList;
}
if (!createStore(false)) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_No_TableData"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_No_TableData"));
return new ArrayList<String>();
}
columnNameList = Arrays.asList(procedureDataModel.getColumnName());
@ -219,7 +220,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
} catch (Exception e) {
if (!(e instanceof CancellationException)) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage());
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage());
}
loadingBar.close();
}

289
designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java

@ -0,0 +1,289 @@
package com.fr.design.dialog;
import com.fr.invoke.Reflect;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import java.awt.Component;
import java.awt.HeadlessException;
import java.util.HashMap;
import java.util.Map;
/**
* @author Joe
* @version 10.0
* Created by Joe on 12/5/2019
*/
public class FineJOptionPane extends JOptionPane {
public final static String[] OPTION_DEFAULT = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_OK") };
public final static String[] OPTION_YES_NO = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No") };
public final static String[] OPTION_YES_NO_CANCEL = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel") };
public final static String[] OPTION_OK_CANCEL = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_OK"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel") };
//选项类型optionType 和 选项字符串数组 一一对应
private final static Map<Integer, String[]> OPTION_MAP = new HashMap<>();
static {
OPTION_MAP.put(DEFAULT_OPTION, OPTION_DEFAULT);
OPTION_MAP.put(YES_NO_OPTION, OPTION_YES_NO);
OPTION_MAP.put(YES_NO_CANCEL_OPTION, OPTION_YES_NO_CANCEL);
OPTION_MAP.put(OK_CANCEL_OPTION, OPTION_OK_CANCEL);
}
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 INPUT_DIALOG_TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips");
/**
* 使用默认 标题 消息类型 的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @throws HeadlessException
*/
public static void showMessageDialog(Component parentComponent, Object message)
throws HeadlessException {
showMessageDialog(parentComponent, message, MESSAGE_DIALOG_TITLE,
INFORMATION_MESSAGE);
}
/**
* 使用默认 Icon 的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param messageType 消息类型
* @throws HeadlessException
*/
public static void showMessageDialog(Component parentComponent, Object message,
String title, int messageType)
throws HeadlessException {
showMessageDialog(parentComponent, message, title, messageType, null);
}
/**
* 使用默认 选项类型选项 初始选项 的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param messageType 消息类型
* @param icon 图标
* @throws HeadlessException
*/
public static void showMessageDialog(Component parentComponent, Object message,
String title, int messageType, Icon icon)
throws HeadlessException {
showMessageDialog(parentComponent, message, title, DEFAULT_OPTION,
messageType, icon, OPTION_DEFAULT, null);
}
/**
* 自定义的消息提示弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @param messageType 消息类型
* @param icon 图标
* @param options 选项
* @param initialValue 初始选项
* @throws HeadlessException
*/
public static void showMessageDialog(Component parentComponent, Object message,
String title, int optionType, int messageType,
Icon icon, Object[] options, Object initialValue)
throws HeadlessException {
showOptionDialog(parentComponent, message, title, optionType,
messageType, icon, options, initialValue);
}
/**
* 使用默认 标题 选项类型 的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @throws HeadlessException
*/
public static int showConfirmDialog(Component parentComponent, Object message)
throws HeadlessException {
return showConfirmDialog(parentComponent, message,
CONFIRM_DIALOG_TITLE,
YES_NO_CANCEL_OPTION);
}
/**
* 使用默认 消息类型 的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @throws HeadlessException
*/
public static int showConfirmDialog(Component parentComponent, Object message,
String title, int optionType) throws HeadlessException {
return showConfirmDialog(parentComponent, message, title, optionType,
QUESTION_MESSAGE);
}
/**
* 使用默认 Icon 的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @param messageType 消息类型
* @throws HeadlessException
*/
public static int showConfirmDialog(Component parentComponent, Object message,
String title, int optionType, int messageType)
throws HeadlessException {
return showConfirmDialog(parentComponent, message, title, optionType,
messageType, null);
}
/**
* 根据 选项类型 获取对应 选项 且使用默认 初始选项 的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @param messageType 消息类型
* @param icon 图标
* @throws HeadlessException
*/
public static int showConfirmDialog(Component parentComponent, Object message,
String title, int optionType, int messageType, Icon icon)
throws HeadlessException {
return showConfirmDialog(parentComponent, message, title, optionType,
messageType, icon, OPTION_MAP.get(optionType), null);
}
/**
* 自定义的确认弹出框
* @param parentComponent 父容器
* @param message 具体的提示消息
* @param title 标题
* @param optionType 选项类型
* @param messageType 消息类型
* @param icon 图标
* @param options 选项
* @param initialValue 初始选项
* @throws HeadlessException
*/
public static int showConfirmDialog(Component parentComponent, Object message,
String title, int optionType, int messageType, Icon icon,
Object[] options, Object initialValue)
throws HeadlessException {
return showOptionDialog(parentComponent, message, title, optionType,
messageType, icon, options, initialValue);
}
/**
* 指定消息内容的输入弹出框
* @param message 消息内容
* @return
* @throws HeadlessException
*/
public static String showInputDialog(Object message)
throws HeadlessException {
return showInputDialog(null, message);
}
/**
* 使用默认 标题 消息类型 的输入弹出框
* @param parentComponent 父容器
* @param message 消息内容
* @return
* @throws HeadlessException
*/
public static String showInputDialog(Component parentComponent,
Object message) throws HeadlessException {
return showInputDialog(parentComponent, message, INPUT_DIALOG_TITLE, QUESTION_MESSAGE);
}
/**
* 使用默认 标题消息类型Icon 选项 的输入弹出框
* @param parentComponent 父容器
* @param message 消息类型
* @param initialSelectionValue 初始选项
* @return
*/
public static String showInputDialog(Component parentComponent, Object message,
Object initialSelectionValue) {
return (String)showInputDialog(parentComponent, message,
INPUT_DIALOG_TITLE, QUESTION_MESSAGE, null, null,
initialSelectionValue);
}
/**
* 使用默认 父容器消息内容 初始选项 的输入弹出框
* @param message 消息内容
* @param initialSelectionValue 初始选项
* @return
*/
public static String showInputDialog(Object message, Object initialSelectionValue) {
return showInputDialog(null, message, initialSelectionValue);
}
/**
* 使用默认 Icon选项 初始选项 的输入弹出框
* @param parentComponent 父容器
* @param message 消息内容
* @param title 标题
* @param messageType 消息类型
* @return
* @throws HeadlessException
*/
public static String showInputDialog(Component parentComponent,
Object message, String title, int messageType)
throws HeadlessException {
return (String)showInputDialog(parentComponent, message, title,
messageType, null, null, null);
}
/**
* 自定义的输入弹出框
* @param parentComponent 父容器
* @param message 消息内容
* @param title 标题
* @param messageType 消息类型
* @param icon 图标
* @param selectionValues 选项
* @param initialSelectionValue 初始选项
* @return
* @throws HeadlessException
*/
public static Object showInputDialog(Component parentComponent,
Object message, String title, int messageType, Icon icon,
Object[] selectionValues, Object initialSelectionValue)
throws HeadlessException {
JOptionPane pane = new JOptionPane(message, messageType,
OK_CANCEL_OPTION, icon,
OPTION_OK_CANCEL, null);
pane.setWantsInput(true);
pane.setSelectionValues(selectionValues);
pane.setInitialSelectionValue(initialSelectionValue);
pane.setComponentOrientation(((parentComponent == null) ?
getRootFrame() : parentComponent).getComponentOrientation());
int style = Reflect.on(JOptionPane.class).call("styleFromMessageType", messageType).get();
JDialog dialog = Reflect.on(pane).call("createDialog", parentComponent, title, style).get();
pane.selectInitialValue();
dialog.show();
dialog.dispose();
Object value = pane.getInputValue();
if (value == UNINITIALIZED_VALUE) {
return null;
}
return value;
}
}

2
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -167,7 +167,7 @@ public abstract class UIDialog extends JDialog {
try {
checkValid();
} catch (Exception exp) {
JOptionPane.showMessageDialog(this, exp.getMessage());
FineJOptionPane.showMessageDialog(this, exp.getMessage());
return;
}

5
designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java

@ -3,6 +3,7 @@ package com.fr.design.editor;
import com.fr.base.BaseFormula;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.ColumnIndexEditor;
import com.fr.design.editor.editor.ColumnNameEditor;
import com.fr.design.editor.editor.Editor;
@ -302,8 +303,8 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.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_Tool_Tips"), JOptionPane.YES_NO_OPTION);
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);
if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j);

5
designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java

@ -3,6 +3,7 @@ package com.fr.design.editor;
import com.fr.base.BaseFormula;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.ColumnNameEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
@ -283,8 +284,8 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.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_Tool_Tips"), JOptionPane.YES_NO_OPTION);
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);
if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j);

3
designer-base/src/main/java/com/fr/design/extra/LoginWebPane.java

@ -1,5 +1,6 @@
package com.fr.design.extra;
import com.fr.design.dialog.FineJOptionPane;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.event.EventHandler;
@ -46,7 +47,7 @@ public class LoginWebPane extends JFXPanel {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JOptionPane.showMessageDialog(LoginWebPane.this, message);
FineJOptionPane.showMessageDialog(LoginWebPane.this, message);
}
});
}

7
designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.config.MarketConfig;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel;
@ -181,14 +182,14 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Install_Success"));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
} else {
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});
} catch (Exception e1) {
JOptionPane.showMessageDialog(PluginFromStorePane.this, e1.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(PluginFromStorePane.this, e1.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}

11
designer-base/src/main/java/com/fr/design/extra/PluginInstalledPane.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.design.RestartHelper;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.plugin.context.PluginContext;
@ -67,9 +68,9 @@ public class PluginInstalledPane extends PluginAbstractViewPane {
@Override
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
JOptionPane.showMessageDialog(null, modifyMessage);
FineJOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});
@ -78,9 +79,9 @@ public class PluginInstalledPane extends PluginAbstractViewPane {
@Override
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
JOptionPane.showMessageDialog(null, modifyMessage);
FineJOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null,PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null,PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});
@ -135,7 +136,7 @@ public class PluginInstalledPane extends PluginAbstractViewPane {
try {
controlPane.deletePlugin(plugin);
} catch (Exception e) {
JOptionPane.showMessageDialog(PluginInstalledPane.this, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(PluginInstalledPane.this, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
if (rv == JOptionPane.OK_OPTION) {

3
designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.config.MarketConfig;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.exe.callback.InstallFromDiskCallback;
import com.fr.design.extra.exe.callback.InstallOnlineCallback;
import com.fr.design.bridge.exec.JSCallback;
@ -91,7 +92,7 @@ public class PluginOperateUtils {
@Override
public void run() {
int rv = JOptionPane.showConfirmDialog(
int rv = FineJOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Confirmed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),

5
designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.config.MarketConfig;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel;
@ -199,9 +200,9 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<List<PluginV
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Update_Success"));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
} else {
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
});

3
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.base.TemplateUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray;
@ -109,7 +110,7 @@ public class PluginUtils {
throw new com.fr.plugin.PluginVerifyException(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Connect_Server_Error"));
}
} catch (PluginVerifyException e) {
JOptionPane.showMessageDialog(null, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
return false;
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);

3
designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.base.TemplateUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
@ -104,7 +105,7 @@ public class PluginWebPane extends JFXPanel {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JOptionPane.showMessageDialog(PluginWebPane.this, message);
FineJOptionPane.showMessageDialog(PluginWebPane.this, message);
}
});
}

3
designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java

@ -1,5 +1,6 @@
package com.fr.design.extra;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
@ -138,7 +139,7 @@ public class QQLoginWebPane extends JFXPanel {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
JOptionPane.showMessageDialog(QQLoginWebPane.this, message);
FineJOptionPane.showMessageDialog(QQLoginWebPane.this, message);
}
});
}

11
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -2,6 +2,7 @@ package com.fr.design.extra;
import com.fr.base.FRContext;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.mainframe.DesignerContext;
@ -62,7 +63,7 @@ public class WebViewDlgHelper {
String mainJsPath = StableUtils.pathJoin(installHome, MAIN_JS_PATH);
File file = new File(mainJsPath);
if (!file.exists()) {
int rv = JOptionPane.showConfirmDialog(
int rv = FineJOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
@ -79,7 +80,7 @@ public class WebViewDlgHelper {
updateShopScripts(SHOP_SCRIPTS);
showPluginDlg();
} else {
int rv = JOptionPane.showConfirmDialog(
int rv = FineJOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install_Version"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
@ -199,7 +200,7 @@ public class WebViewDlgHelper {
private static void confirmDownLoadShopJS() {
int rv = JOptionPane.showConfirmDialog(
int rv = FineJOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
@ -277,7 +278,7 @@ public class WebViewDlgHelper {
CommonUtils.deleteFile(scriptZip);
}
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
}
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -300,7 +301,7 @@ public class WebViewDlgHelper {
JSONObject resultJSONObject = new JSONObject(text);
String isLatest = resultJSONObject.optString("result");
if (!ComparatorUtils.equals(isLatest, LATEST)) {
int rv = JOptionPane.showConfirmDialog(
int rv = FineJOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Update"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),

9
designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.design.extra.PluginUtils;
@ -41,7 +42,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
String switchedInfo = PluginOperateUtils.getSwitchedInfo(result);
jsCallback.execute("success");
FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
JOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
FineJOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
@ -50,7 +51,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -70,7 +71,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -80,7 +81,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
}else {
jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"), JOptionPane.ERROR_MESSAGE);
}
}
}

7
designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.log.FineLoggerFactory;
@ -38,7 +39,7 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
String switchedInfo = PluginOperateUtils.getSwitchedInfo(result);
jsCallback.execute("success");
FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
JOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
FineJOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success") + switchedInfo);
} else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){
int rv = JOptionPane.showOptionDialog(
null,
@ -47,7 +48,7 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -58,7 +59,7 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
}else {
jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));
JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}

5
designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginUtils;
import com.fr.plugin.manage.control.PluginTaskCallback;
@ -24,9 +25,9 @@ public class ModifyStatusCallback implements PluginTaskCallback{
if (result.isSuccess()) {
jsCallback.execute("success");
String modifyMessage = isActive ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Been_Disabled_Duplicate") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Plugin_Has_Been_Actived_Duplicate");
JOptionPane.showMessageDialog(null, modifyMessage);
FineJOptionPane.showMessageDialog(null, modifyMessage);
} else {
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}

7
designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginUtils;
import com.fr.log.FineLoggerFactory;
@ -27,7 +28,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
if (result.isSuccess()) {
jsCallback.execute("success");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Success"));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Success"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Success"));
}else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) {
int rv = JOptionPane.showOptionDialog(
null,
@ -36,7 +37,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -46,7 +47,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
} else {
jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Failed"));
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

9
designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.design.extra.PluginUtils;
@ -39,7 +40,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
if (result.isSuccess()) {
jsCallback.execute("success");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
@ -48,7 +49,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -68,7 +69,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -78,7 +79,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
}else {
jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed"));
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

5
designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java

@ -1,6 +1,7 @@
package com.fr.design.extra.exe.callback;
import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.log.FineLoggerFactory;
@ -33,11 +34,11 @@ public class UpdateOnlineCallback extends AbstractDealPreTaskCallback {
if (result.isSuccess()) {
jsCallback.execute("success");
FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
JOptionPane.showMessageDialog(null,pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
FineJOptionPane.showMessageDialog(null,pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
} else {
jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed"));
JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

7
designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java

@ -1,5 +1,6 @@
package com.fr.design.extra.tradition.callback;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginStatusCheckCompletePane;
import com.fr.design.extra.PluginUtils;
@ -32,7 +33,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
public void done(PluginTaskResult result){
if (result.isSuccess()) {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Update_Success"));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Successful"));
} else if (result.errorCode() == PluginErrorCode.OperationNotSupport) {
int rv = JOptionPane.showOptionDialog(
null,
@ -41,7 +42,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
);
if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) {
@ -50,7 +51,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
PluginManager.getController().update(pluginMarker, toPluginMarker, new UpdateOnlineCallback(pluginMarker, toPluginMarker, pane));
} else {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Delete_Failed"));
JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}

7
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -5,6 +5,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIScrollPopUpMenu;
import com.fr.design.i18n.Toolkit;
@ -678,8 +679,8 @@ public class MutilTempalteTabPane extends JComponent {
if (!specifiedTemplate.isALLSaved() && !DesignerMode.isVcsMode()) {
specifiedTemplate.stopEditing();
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
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);
if (returnVal == JOptionPane.YES_OPTION) {
specifiedTemplate.saveTemplate();
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName()));
@ -931,7 +932,7 @@ public class MutilTempalteTabPane extends JComponent {
//如果在权限编辑情况下,不允许切换到表单类型的工作簿
if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) {
DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex));
JOptionPane.showMessageDialog(MutilTempalteTabPane.this, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported")
FineJOptionPane.showMessageDialog(MutilTempalteTabPane.this, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported")
+ "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
MutilTempalteTabPane.this.repaint();
return;

2
designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java

File diff suppressed because one or more lines are too long

25
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -4,6 +4,7 @@
package com.fr.design.file;
import com.fr.base.FRContext;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itree.filetree.TemplateFileTree;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
@ -254,16 +255,16 @@ public class TemplateTreePane extends JPanel implements FileOperations {
? Toolkit.i18nText("Fine-Design_Basic_Confirm_Delete_Folder")
: Toolkit.i18nText("Fine-Design_Basic_Confirm_Delete_File");
if (JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
if (FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
tipContent,
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Confirm"),
YES_NO_OPTION)
== JOptionPane.YES_OPTION) {
// 删除所有选中的即可
if (!deleteNodes(Arrays.asList(treeNodes))) {
JOptionPane.showConfirmDialog(null,
FineJOptionPane.showConfirmDialog(null,
Toolkit.i18nText("Fine-Design_Basic_Delete_Failure"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}
@ -277,24 +278,24 @@ public class TemplateTreePane extends JPanel implements FileOperations {
if (deletableNodes.isEmpty()) {
// 提醒被锁定模板无法删除
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Unable_Delete_Locked_File"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE);
return;
}
if (JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
if (FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
tipContent,
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Confirm"),
YES_NO_OPTION)
== JOptionPane.YES_OPTION) {
// 删除其他
if (!deleteNodes(deletableNodes)) {
JOptionPane.showConfirmDialog(null,
FineJOptionPane.showConfirmDialog(null,
Toolkit.i18nText("Fine-Design_Basic_Delete_Failure"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}
@ -415,9 +416,9 @@ public class TemplateTreePane extends JPanel implements FileOperations {
}
if (!lockedNodes.isEmpty()) {
JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Warn_Rename_Lock_File"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE);
return true;
}

6
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -8,6 +8,7 @@ import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -583,14 +584,15 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// alex:继续往下面走,expression为null时告知不合法公式
}
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
FormulaPane.this,
/*
* alex:仅仅只需要根据expression是否为null作合法性判断
* 不需要eval
* TODO 但有个问题,有些函数的参数个数是有规定的,何以判别之
*/
(expression != null ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Valid_Formula") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Invalid_Formula")) + ".", ProductConstants.PRODUCT_NAME,
(expression != null ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Valid_Formula") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Invalid_Formula")) + ".",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.INFORMATION_MESSAGE);
}
}

7
designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java

@ -2,6 +2,7 @@ package com.fr.design.formula;
import com.fr.base.FRContext;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -161,11 +162,11 @@ public class JavaEditorPane extends BasicPane {
}
try {
WorkContext.getWorkResource().write(StableUtils.pathJoin(ProjectConstants.CLASSES_NAME, getJavaPath()), text.getBytes(EncodeConstants.ENCODING_UTF_8));
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Common_Save_Successfully") + "!");
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Common_Save_Successfully") + "!");
fireSaveActionListener();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Common_Save_Failed") + "!");
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Common_Save_Failed") + "!");
}
}
@ -191,7 +192,7 @@ public class JavaEditorPane extends BasicPane {
if (StringUtils.isEmpty(message)) {
message = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile_Success") + "!";
}
JOptionPane.showMessageDialog(null, message);
FineJOptionPane.showMessageDialog(null, message);
} catch (InterruptedException e1) {
FineLoggerFactory.getLogger().error(e1.getMessage(), e1);
Thread.currentThread().interrupt();

3
designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java

@ -1,6 +1,7 @@
package com.fr.design.gui.controlpane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ilist.JNameEdList;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.stable.Nameable;
@ -32,7 +33,7 @@ class ListControlPaneHelper {
try {
listControlPane.checkValid();
} catch (Exception exp) {
JOptionPane.showMessageDialog((Component) listControlPane, exp.getMessage());
FineJOptionPane.showMessageDialog((Component) listControlPane, exp.getMessage());
listControlPane.setSelectedIndex(idx);
return true;
}

3
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.controlpane;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolBarUI;
@ -249,7 +250,7 @@ abstract class UIControlPane extends JControlPane {
} catch (Exception exp) {
// 存在非法输入 拒绝隐藏
this.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(this, exp.getMessage());
FineJOptionPane.showMessageDialog(this, exp.getMessage());
this.requestFocus();
return;
}

3
designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java

@ -3,6 +3,7 @@ package com.fr.design.gui.frpane;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.write.submit.DBManipulationPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.javascript.Commit2DBJavaScriptPane;
@ -408,7 +409,7 @@ public class CommitTabbedPane extends JComponent implements MouseListener, Mous
selectedIndex = dbManipulationPaneList.size()-1;
commit2DBJavaScriptPane.updateCardPane();
} else if (isOverCloseIcon(x)){
int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CommitTab_Sure_To_Delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CommitTab_Remove")
int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CommitTab_Sure_To_Delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CommitTab_Remove")
, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (re == JOptionPane.OK_OPTION) {
dbManipulationPaneList.remove(getTabIndex(x));

5
designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.frpane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -127,7 +128,7 @@ public abstract class EditingStringListPane extends BasicBeanPane<List<String>>
setAddEnabled(false);
}
} else {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), newvalue + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Already_Exists_Not_Add_Repeat")+"!");
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), newvalue + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Already_Exists_Not_Add_Repeat")+"!");
}
}
});
@ -149,7 +150,7 @@ public abstract class EditingStringListPane extends BasicBeanPane<List<String>>
public void actionPerformed(ActionEvent e) {
Object selected = jlist.getSelectedValue();
if (selected != null) {
int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?");
int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?");
if (re == JOptionPane.OK_OPTION) {
JListUtils.removeSelectedListItems(jlist);
}

3
designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java

@ -5,6 +5,7 @@ import com.fr.data.impl.TreeNodeAttr;
import com.fr.data.impl.TreeNodeWrapper;
import com.fr.design.actions.UpdateAction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.ControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
@ -231,7 +232,7 @@ public class JTreeControlPane extends ControlPane {
public void actionPerformed(ActionEvent e) {
// TODO remove tree node
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
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);
if (val != JOptionPane.OK_OPTION) {
return;

3
designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.general.ComparatorUtils;
@ -113,7 +114,7 @@ public class UITabbedPane extends JTabbedPane{
* @param i tab索引
*/
public void doRemoveTab(int i){
int re = JOptionPane.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_Remove")
, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (re == JOptionPane.OK_OPTION) {
super.removeTabAt(i);

3
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java

@ -2,6 +2,7 @@ package com.fr.design.gui.frpane.tree.layer.config;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.ControlPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolbar;
@ -177,7 +178,7 @@ public class LayerDataControlPane extends ControlPane {
public void actionPerformed(ActionEvent e) {
// TODO remove tree node
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
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);
if (val != JOptionPane.OK_OPTION) {
return;

26
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -15,6 +15,8 @@ import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -23,6 +25,8 @@ import java.awt.FlowLayout;
import java.awt.FontMetrics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
@ -141,6 +145,28 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
attributeChange();
}
});
this.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
attributeChange();
}
});
UIComboCheckBox.this.popup.addPopupMenuListener(new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
attributeChange();
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// do nothing
}
});
}
};
editor.setEditable(false);

3
designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTableUI.java

@ -10,6 +10,7 @@ import javax.swing.event.MouseInputListener;
import com.fr.base.GraphHelper;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.itable.UITableUI;
import com.fr.design.mainframe.DesignerContext;
@ -74,7 +75,7 @@ public class UIMenuTableUI extends UITableUI{
@Override
public void mousePressed(MouseEvent e) {
if (e.getX() >= table.getWidth() - 20) {
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
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);
if (val == JOptionPane.OK_OPTION) {
uiTable.removeLine(table.rowAtPoint(e.getPoint()));

3
designer-base/src/main/java/com/fr/design/gui/itable/UITableUI.java

@ -19,6 +19,7 @@ import javax.swing.table.TableModel;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.stable.Constants;
@ -132,7 +133,7 @@ public class UITableUI extends BasicTableUI {
return;
}
if (!table.isEditing()) {
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
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);
if (val == JOptionPane.OK_OPTION) {
((UITable) table).removeLine(table.rowAtPoint(e.getPoint()));

5
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java

@ -1,6 +1,7 @@
package com.fr.design.gui.itableeditorpane;
import com.fr.base.BaseUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.log.FineLoggerFactory;
@ -207,7 +208,7 @@ public abstract class UITableModelAdapter<T extends Object> extends AbstractTabl
public void actionPerformed(ActionEvent e) {
final int selectedRow = table.getSelectedRow();
if (selectedRow > table.getRowCount() - 1 || selectedRow < 0) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No-Alternatives"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No-Alternatives"));
return;
}
stopCellEditing();
@ -251,7 +252,7 @@ public abstract class UITableModelAdapter<T extends Object> extends AbstractTabl
if(component == null){
component = DesignerContext.getDesignerFrame();
}
int val = JOptionPane.showConfirmDialog(component,
int val = FineJOptionPane.showConfirmDialog(component,
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);
if (val != JOptionPane.OK_OPTION) {

3
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java

@ -2,6 +2,7 @@ package com.fr.design.hyperlink;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
@ -122,7 +123,7 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
public void actionPerformed(ActionEvent e) {
String tpl = northPane.getReportletName();
if (StringUtils.isBlank(tpl)) {
JOptionPane.showMessageDialog(ReportletHyperlinkPane.this, Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Please_Select_Reportlet") + ".", Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(ReportletHyperlinkPane.this, Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Please_Select_Reportlet") + ".", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
northPane.requestButtonFocus();
return;
}

13
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -13,6 +13,7 @@ import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.event.TargetModifiedEvent;
@ -919,9 +920,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} else {
editingTemplate.stopEditing();
if (!editingTemplate.getEditingFILE().exists()) {
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + editingTemplate.getEditingFILE()
+ "\" ?", ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION,
+ "\" ?", Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.YES_OPTION && editingTemplate.saveTemplate()) {
editingTemplate.saveTemplate();
@ -1033,10 +1034,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
// p:判断一下,如何文件为空或者文件不存在,直接返回.
if (tplFile == null || !tplFile.exists()) {
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
this,
Toolkit.i18nText("Fine-Design_Basic_Warning_Template_Do_Not_Exsit"),
ProductConstants.PRODUCT_NAME,
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.INFORMATION_MESSAGE
);
DesignerFrameFileDealerPane.getInstance().refresh();
@ -1046,10 +1047,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
try {
openFile(tplFile);
} catch (DecryptTemplateException e) {
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
this,
Toolkit.i18nText("Fine-Design_Encrypt_Decrypt_Exception"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon")
);

25
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -11,6 +11,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.FileOperations;
import com.fr.design.file.FileToolbarStateChangeListener;
import com.fr.design.file.HistoryTemplateListCache;
@ -324,9 +325,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public void actionPerformed(ActionEvent evt) {
if (!selectedOperation.access()) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE);
return;
}
@ -466,9 +467,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
@Override
public void actionPerformed(ActionEvent evt) {
if (!selectedOperation.access()) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE);
return;
}
@ -477,9 +478,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
String lock = node.getLock();
if (lock != null && !lock.equals(node.getUserID())) {
// 提醒被锁定模板无法重命名
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Unable_Rename_Locked_File"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE);
return;
}
@ -506,9 +507,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public void actionPerformed(ActionEvent evt) {
if (!selectedOperation.access()) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
Toolkit.i18nText("Fine-Design_Basic_Alert"),
WARNING_MESSAGE);
return;
}
@ -705,9 +706,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
selectedOperation.refresh();
DesignerContext.getDesignerFrame().setTitle();
} else {
JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Rename_Failure"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}
@ -896,9 +897,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
selectedOperation.refresh();
this.dispose();
if (!success) {
JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Make_Failure"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}

11
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -21,6 +21,7 @@ import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.DesignerProxy;
import com.fr.design.designer.TargetComponent;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.InformationWarnPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.TemplateTreePane;
@ -540,7 +541,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
return false;
}
collectInfo();
@ -594,10 +595,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + "!",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Message"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE);
return false;
}
@ -618,10 +619,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
return saved;
} else {
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design-Basic_Save_Failure"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Message"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE);
return false;
}

3
designer-base/src/main/java/com/fr/design/mainframe/UndoStateEdit.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
@ -43,7 +44,7 @@ public class UndoStateEdit extends AbstractUndoableEdit {
public void undo() throws CannotUndoException {
super.undo();
if (cur.getAuthorityType() == BaseUndoState.AUTHORITY_STATE) {
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Undo_All_Authority_Operations") + "?",
int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Undo_All_Authority_Operations") + "?",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Undo"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.NO_OPTION) {
return;

4
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -528,14 +528,14 @@ public abstract class ToolBarMenuDock {
*/
public ShortCut[] createHelpShortCuts() {
final java.util.List<ShortCut> shortCuts = new ArrayList<ShortCut>();
shortCuts.add(new WebDemoAction());
// 英文,把 video 和帮助文档放到 Help 下面
if (GeneralContext.getLocale().equals(Locale.US)) {
shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction());
}
//远程不使用更新升级
//远程不使用更新升级,产品演示
if (WorkContext.getCurrent().isLocal()) {
shortCuts.add(new WebDemoAction());
shortCuts.add(new SoftwareUpdateAction());
}
if (AlphaFineConfigManager.isALPHALicAvailable()) {

5
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.vcs.ui;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.UITextPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
@ -61,7 +62,7 @@ public class FileVersionRowPanel extends JPanel {
confirmBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
if (JOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Vcs_Version_Revert_Confirm"), Toolkit.i18nText("Fine-Design_Vcs_Version_Revert_Title"),
if (FineJOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Vcs_Version_Revert_Confirm"), Toolkit.i18nText("Fine-Design_Vcs_Version_Revert_Title"),
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
vcsEntity.setUsername(VcsHelper.getInstance().getCurrentUsername());
WorkContext.getCurrent().get(VcsOperator.class).rollbackTo(vcsEntity);
@ -75,7 +76,7 @@ public class FileVersionRowPanel extends JPanel {
deleteBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
if (JOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Vcs_Delete-Confirm"), Toolkit.i18nText("Fine-Design_Vcs_Remove"),
if (FineJOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Vcs_Delete-Confirm"), Toolkit.i18nText("Fine-Design_Vcs_Remove"),
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
try {
WorkContext.getCurrent().get(VcsOperator.class).deleteVersion(vcsEntity.getFilename(), vcsEntity.getVersion());

3
designer-base/src/main/java/com/fr/design/remote/ui/AbstractListControlPane.java

@ -6,6 +6,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -367,7 +368,7 @@ public abstract class AbstractListControlPane extends BasicPane {
checkValid();
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
JOptionPane.showMessageDialog(AbstractListControlPane.this, exp.getMessage());
FineJOptionPane.showMessageDialog(AbstractListControlPane.this, exp.getMessage());
authorityList.setSelectedIndex(idx);
return true;
}

3
designer-base/src/main/java/com/fr/design/remote/ui/list/AddedMemberList.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.report.constant.RoleType;
@ -35,7 +36,7 @@ public class AddedMemberList extends MemberList {
"Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_Role_And_Its_Design_Authorities" :
"Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_User_And_Its_Design_Authorities";
if (member.isSelected() && member.hasAuthority()){
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle),
int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle),
Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (val == JOptionPane.OK_OPTION) {
member.setSelected(!member.isSelected());

3
designer-base/src/main/java/com/fr/design/remote/ui/list/AddingMemberList.java

@ -1,5 +1,6 @@
package com.fr.design.remote.ui.list;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.report.constant.RoleType;
@ -37,7 +38,7 @@ public class AddingMemberList extends MemberList {
"Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_Role_And_Its_Design_Authorities" :
"Fine-Design_Basic_Utils_Are_You_Sure_To_Delete_The_User_And_Its_Design_Authorities";
if (member.isSelected() && member.hasAuthority()){
int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle),
int val = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText(keyTitle),
Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (val == JOptionPane.OK_OPTION) {
member.setSelected(!member.isSelected());

3
designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -6,6 +6,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolbar;
@ -159,7 +160,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
*/
private void checkChanges() {
//如若有变化,则弹出下面的对话框
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Role_changed_Is_Refresh") + "?",
int returnVal = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Role_changed_Is_Refresh") + "?",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {
roleTree.refreshTreeNode();

2
designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java

@ -30,6 +30,7 @@ public class RecoverForDesigner implements Recover {
CommonIOUtils.copyFilesInDirByPath(StableUtils.pathJoin(installHome, ProjectConstants.LOGS_NAME,
UpdateConstants.INSTALL_LIB, UpdateConstants.DESIGNERBACKUPPATH),
StableUtils.pathJoin(StableUtils.getInstallHome(), ProjectConstants.LIB_NAME));
FineLoggerFactory.getLogger().error("Recover down for designer");
return true;
} catch (IOException e) {
FineLoggerFactory.getLogger().error("Recover error for designer", e);
@ -54,6 +55,7 @@ public class RecoverForDesigner implements Recover {
CommonIOUtils.copyFilesInDirByPath(StableUtils.pathJoin(installHome,ProjectConstants.LIB_NAME),
StableUtils.pathJoin(installBackup,UpdateConstants.DESIGNERBACKUPPATH));
DesignerContext.getDesignerFrame().prepareForExit();
FineLoggerFactory.getLogger().error("Backup down for designer");
return true;
} catch (IOException e) {
UpdateException exception = new UpdateException("Backup Exception for designer" + e.getMessage());

27
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

@ -7,16 +7,11 @@ import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.ui.dialog.UpdateMainDialog;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.stable.os.support.OSBasedAction;
import com.fr.stable.os.support.OSSupportCenter;
import com.fr.workspace.WorkContext;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -32,17 +27,6 @@ public class DesignerPushUpdateManager {
private DesignerUpdateInfo updateInfo;
static {
if (DesignerPushUpdateConfigManager.getInstance().isAutoPushUpdateEnabled()) {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {
getInstance().checkAndPop();
}
});
}
}
private DesignerPushUpdateManager() {
}
@ -53,6 +37,17 @@ public class DesignerPushUpdateManager {
return singleton;
}
public void preparePushUpdate() {
if (DesignerPushUpdateConfigManager.getInstance().isAutoPushUpdateEnabled()) {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {
getInstance().checkAndPop();
}
});
}
}
private void initUpdateInfo(String currentVersion, String latestVersion) {
String lastIgnoredVersion = DesignerPushUpdateConfigManager.getInstance().getLastIgnoredVersion();
String updatePushInfo = CloudCenter.getInstance().acquireUrlByKind("update.push");

3
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -5,6 +5,7 @@ import com.fr.decision.update.info.UpdateCallBack;
import com.fr.decision.update.info.UpdateProgressCallBack;
import com.fr.design.RestartHelper;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -608,7 +609,7 @@ public class UpdateMainDialog extends UIDialog {
public void onDownloadFailed() {
progressBar.setVisible(false);
deleteForDesignerUpdate(installLib);
JOptionPane.showMessageDialog(getParent(), Toolkit.i18nText("Fine-Design_Update_Info_Failed_Message"));
FineJOptionPane.showMessageDialog(getParent(), Toolkit.i18nText("Fine-Design_Update_Info_Failed_Message"));
helper.restartForUpdate(frame);
}
}.execute();

13
designer-base/src/main/java/com/fr/design/upm/UpmFinder.java

@ -2,6 +2,7 @@ package com.fr.design.upm;
import com.fr.base.FRContext;
import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoader;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
@ -64,18 +65,18 @@ public class UpmFinder {
if (flag) {
if (!checkUPMResourcesExist()){
// upm下载
int val = JOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
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);
if (val == JOptionPane.OK_OPTION){
try {
UpmResourceLoader.INSTANCE.download();
UpmResourceLoader.INSTANCE.install();
JOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"),
Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
JOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Updater_Download_Failed"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Updater_Download_Failed"),
Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE);
}
}
}

3
designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java

@ -1,5 +1,6 @@
package com.fr.design.utils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;
@ -27,7 +28,7 @@ public class BrowseUtils {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {

3
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -5,6 +5,7 @@ import com.fr.base.ServerConfig;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.UILookAndFeel;
import com.fr.design.mainframe.DesignerContext;
@ -176,7 +177,7 @@ public class DesignUtils {
@Override
public void run() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), final_msg);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), final_msg);
}
});
}

11
designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java

@ -16,6 +16,7 @@ import com.fr.data.util.function.SumFunction;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.border.UITitledBorder;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -324,7 +325,7 @@ public final class GUICoreUtils {
/**
* Gets window/frame to screen center.
* @param 窗口
* @param win 窗口
*/
public static void setWindowFullScreen(Window win) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
@ -341,7 +342,7 @@ public final class GUICoreUtils {
* Shows down component.
* 显示弹出关闭菜单
* @param popup 弹出菜单
* @param 父组件
* @param parentComponent 父组件
*/
public static void showPopupCloseMenu(JPopupMenu popup, Component parentComponent) {
if (popup == null) {// check null.
@ -537,7 +538,7 @@ public final class GUICoreUtils {
/**
* 产生一个Flow Pane, flowAligment是FlowLayout.LEFT, CENTER, RIGHT.
* @param comps 组件
* @param flowAlignement 对齐方式
* @param flowAlignment 对齐方式
* @param hSpace 水平间隔
* @return 面板
*/
@ -660,7 +661,7 @@ public final class GUICoreUtils {
/**
* it's a very good method, user can get treePath from treeNode.
* @param 节点
* @param treeNode 节点
* @return 路径
*/
public static TreePath getTreePath(TreeNode treeNode) {
@ -740,7 +741,7 @@ public final class GUICoreUtils {
return false;
}
int returnVal = JOptionPane.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_Remove"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {
int minSelectedIndex = nodeList.getMinSelectionIndex();

19
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -6,6 +6,7 @@ import com.fr.base.Icon;
import com.fr.base.IconManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -150,7 +151,7 @@ public class CustomIconPane extends BasicPane {
} else {
// add failed
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message2"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message2"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
}
}
}).setVisible(true);
@ -179,9 +180,9 @@ public class CustomIconPane extends BasicPane {
CustomIconPane.this.repaint();
} else {
// remove failed
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message2"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE);
}
}
@ -204,9 +205,9 @@ public class CustomIconPane extends BasicPane {
// do nothing
}
if (oldIcon == null) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
"Error",
"Error",
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.ERROR_MESSAGE);
}
@ -228,7 +229,7 @@ public class CustomIconPane extends BasicPane {
// 失败了再弄回去
iconManager.addIcon(oldIcon, true);
// edit failed
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message2"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message2"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
}
}
}).setVisible(true);
@ -425,9 +426,9 @@ public class CustomIconPane extends BasicPane {
return;
}
if (WidgetInfoConfig.getInstance().getIconManager().contains(nameTextField.getText())) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message3"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE);
}
}

3
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -17,6 +17,7 @@ import com.fr.design.data.tabledata.tabledatapane.FormatExplanationPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.Editor;
@ -584,7 +585,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return;
}
int returnVal = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(DBManipulationPane.this),
int returnVal = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(DBManipulationPane.this),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_sure_remove_item") + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Remove"), JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {

5
designer-base/src/main/java/com/fr/env/EnvListPane.java vendored

@ -1,6 +1,7 @@
package com.fr.env;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
@ -33,13 +34,13 @@ public class EnvListPane extends JListControlPane {
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
if (StringUtils.isEmpty(tempName)) {
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text"));
setIllegalIndex(editingIndex);
return;
}
if (!ComparatorUtils.equals(tempName, selectedName) && isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) {
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Duplicate_Name_Warn_Text", tempName));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Duplicate_Name_Warn_Text", tempName));
setIllegalIndex(editingIndex);
}
}

15
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -7,6 +7,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
@ -846,7 +847,7 @@ public class FILEChooserPane extends BasicPane {
saveDictionary();
dialogExit();
} else {
JOptionPane.showMessageDialog(this, Toolkit.i18nText("Fine-Design_Basic_App_Template_Report_Not_Exist"));
FineJOptionPane.showMessageDialog(this, Toolkit.i18nText("Fine-Design_Basic_App_Template_Report_Not_Exist"));
return;
}
}
@ -876,8 +877,8 @@ public class FILEChooserPane extends BasicPane {
if (access(selectedFile) && access(currentDirectory)) {
if (selectedFile.exists()) {
int selVal = JOptionPane.showConfirmDialog(dialog, Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Cover_The_Current_File") + " ?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE);
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);
if (selVal == JOptionPane.YES_OPTION) {
option = JOPTIONPANE_OK_OPTION;
saveDictionary();
@ -891,7 +892,7 @@ public class FILEChooserPane extends BasicPane {
saveDictionary();
}
} else {
JOptionPane.showMessageDialog(FILEChooserPane.this, Toolkit.i18nText("Fine-Design_Basic_App_Privilege_No") + "!", Toolkit.i18nText("Fine-Design_Basic_App_File_Message"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(FILEChooserPane.this, Toolkit.i18nText("Fine-Design_Basic_App_Privilege_No") + "!", Toolkit.i18nText("Fine-Design_Basic_App_File_Message"), JOptionPane.WARNING_MESSAGE);
}
}
@ -1553,7 +1554,7 @@ public class FILEChooserPane extends BasicPane {
if (access(currentDirectory)) {
new MkdirDialog();
} else {
JOptionPane.showMessageDialog(
FineJOptionPane.showMessageDialog(
FILEChooserPane.this,
Toolkit.i18nText("Fine-Design_Basic_App_Privilege_No") + "!",
Toolkit.i18nText("Fine-Design_Basic_App_File_Message"),
@ -1715,9 +1716,9 @@ public class FILEChooserPane extends BasicPane {
scrollPane.getVerticalScrollBar().setValue(value);
} else {
JOptionPane.showConfirmDialog(FILEChooserPane.this,
FineJOptionPane.showConfirmDialog(FILEChooserPane.this,
Toolkit.i18nText("Fine-Design_Basic_Make_Failure"),
UIManager.getString("OptionPane.messageDialogTitle"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE);
}

3
designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js

@ -104,8 +104,7 @@ function getMoreInfo() {
function getCloseButton() {
return BI.createWidget({
type: "bi.button",
text: "",
iconCls: "close-font",
text: String.fromCharCode(10005),
cls: "close-btn",
clear: true,
handler: function () {

47
designer-base/src/test/java/com/fr/design/data/DesignTableDataManagerTest.java

@ -1,11 +1,14 @@
package com.fr.design.data;
import com.fr.base.TableData;
import com.fr.data.TableDataSource;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.data.tabledata.wrapper.TableDataFactory;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig;
import com.fr.invoke.Reflect;
import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Test;
@ -23,6 +26,7 @@ import java.util.Map;
@SuppressStaticInitializationFor({"com.fr.design.data.tabledata.wrapper.TableDataFactory"})
public class DesignTableDataManagerTest {
@Test
public void testFireDataChange() {
@ -99,4 +103,47 @@ public class DesignTableDataManagerTest {
}
@Test
public void testGetSelectedColumnNames() throws Exception {
PowerMock.mockStatic(TableDataConfig.class);
PowerMock.mockStatic(TemplateTableDataWrapper.class);
TableDataConfig config = EasyMock.mock(TableDataConfig.class);
TableData td1 = EasyMock.mock(TableData.class);
TableData td2 = EasyMock.mock(TableData.class);
TableDataSource dataSource = EasyMock.mock(TableDataSource.class);
EasyMock.expect(config.getTableData("ds1")).andReturn(td1).anyTimes();
EasyMock.expect(config.getTableData("ds2")).andReturn(td2).anyTimes();
EasyMock.expect(dataSource.getTableData("ds1")).andReturn(td1).anyTimes();
EasyMock.expect(dataSource.getTableData("ds2")).andReturn(td2).anyTimes();
EasyMock.expect(TableDataConfig.getInstance()).andReturn(config).anyTimes();
PowerMock.mockStatic(TableDataFactory.class);
EasyMock.expect(TableDataFactory.getSortOfChineseNameOfServerData(config))
.andReturn(new String[]{"ds1", "ds2"}).anyTimes();
EasyMock.expect(TableDataFactory.getSortOfChineseNameOfTemplateData(dataSource))
.andReturn(new String[]{"ds1", "ds2"});
Map<TableDataSource, Map<String, String[]>> cache = Reflect.on(DesignTableDataManager.class).field(
"columnCache").get();
Map<String, String[]> map = new HashMap<>();
map.put("ds1", new String[]{"a", "b", "c"});
cache.put(dataSource, map);
ProcedureConfig proConfig = EasyMock.mock(ProcedureConfig.class);
Map<String, StoreProcedure> procedureMap = new HashMap<>();
EasyMock.expect(proConfig.getProcedures()).andReturn(procedureMap).anyTimes();
PowerMock.mockStatic(ProcedureConfig.class);
EasyMock.expect(ProcedureConfig.getInstance()).andReturn(proConfig).anyTimes();
EasyMock.replay(config, proConfig, dataSource);
PowerMock.replay(TableDataFactory.class, TableDataConfig.class, ProcedureConfig.class,
TemplateTableDataWrapper.class);
Assert.assertEquals(new String[]{"a", "b", "c"},
DesignTableDataManager.getSelectedColumnNames(dataSource, "ds1"));
}
@Test
public void testAddDsColumnNames() {
DesignTableDataManager.addDsColumnNames("ds1", new String[]{"a", "b", "c"});
Map<TableDataSource, Map<String, String[]>> map = Reflect.on(DesignTableDataManager.class).field(
"columnCache").get();
Assert.assertEquals(new String[]{"a", "b", "c"}, map.get(null).get("ds1"));
}
}

129
designer-base/src/test/java/com/fr/design/mainfarme/toolbar/ToolBarMenuDockTest.java

@ -0,0 +1,129 @@
package com.fr.design.mainfarme.toolbar;
import java.util.Locale;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.help.AboutAction;
import com.fr.design.actions.help.FineUIAction;
import com.fr.design.actions.help.TutorialAction;
import com.fr.design.actions.help.WebDemoAction;
import com.fr.design.actions.help.alphafine.AlphaFineAction;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.actions.SoftwareUpdateAction;
import com.fr.general.GeneralContext;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import org.easymock.EasyMock;
import org.easymock.Mock;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
/**
* @author Lucian.Chen
* @version 10.0
* Created by Lucian.Chen on 2019/12/11
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({
ToolBarMenuDock.class,
GeneralContext.class,
Locale.class,
WorkContext.class,
DesignerEnvManager.class,
AlphaFineConfigManager.class})
public class ToolBarMenuDockTest {
@Mock
VideoAction videoAction;
@Mock
TutorialAction tutorialAction;
@Mock
WebDemoAction webDemoAction;
@Mock
SoftwareUpdateAction softwareUpdateAction;
@Mock
AlphaFineAction alphaFineAction;
@Mock
FineUIAction fineUIAction;
@Mock
AboutAction aboutAction;
@Before
public void testCreateHelpShortCutsBefore() {
try {
PowerMock.expectNew(VideoAction.class).andReturn(videoAction).anyTimes();
PowerMock.expectNew(TutorialAction.class).andReturn(tutorialAction).anyTimes();
PowerMock.expectNew(WebDemoAction.class).andReturn(webDemoAction).anyTimes();
PowerMock.expectNew(SoftwareUpdateAction.class).andReturn(softwareUpdateAction).anyTimes();
PowerMock.expectNew(AlphaFineAction.class).andReturn(alphaFineAction).anyTimes();
PowerMock.expectNew(FineUIAction.class).andReturn(fineUIAction).anyTimes();
PowerMock.expectNew(AboutAction.class).andReturn(aboutAction).anyTimes();
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
@Test
public void testCreateHelpShortCuts() {
// 处理判断条件
GeneralContext context = EasyMock.createMock(GeneralContext.class);
PowerMock.mockStatic(GeneralContext.class);
EasyMock.expect(GeneralContext.getLocale()).andReturn(Locale.CHINA).once();
EasyMock.expect(GeneralContext.getLocale()).andReturn(Locale.US).once();
Workspace workspace = EasyMock.createMock(Workspace.class);
PowerMock.mockStatic(WorkContext.class);
EasyMock.expect(WorkContext.getCurrent()).andReturn(workspace).anyTimes();
EasyMock.expect(workspace.isLocal()).andReturn(false).once();
EasyMock.expect(workspace.isLocal()).andReturn(true).once();
DesignerEnvManager envManager = EasyMock.createMock(DesignerEnvManager.class);
PowerMock.mockStatic(DesignerEnvManager.class);
EasyMock.expect(DesignerEnvManager.getEnvManager()).andReturn(envManager).anyTimes();
EasyMock.expect(envManager.isOpenDebug()).andReturn(false).once();
EasyMock.expect(envManager.isOpenDebug()).andReturn(true).once();
AlphaFineConfigManager configManager = EasyMock.createMock(AlphaFineConfigManager.class);
PowerMock.mockStatic(AlphaFineConfigManager.class);
EasyMock.expect(AlphaFineConfigManager.isALPHALicAvailable()).andReturn(false).once();
EasyMock.expect(AlphaFineConfigManager.isALPHALicAvailable()).andReturn(true).once();
SupportOSImpl osImpl = EasyMock.createMock(SupportOSImpl.class);
Whitebox.setInternalState(SupportOSImpl.class, "FINEUI", osImpl);
EasyMock.expect(osImpl.support()).andReturn(false).anyTimes();
EasyMock.replay(context, workspace, envManager, configManager, osImpl);
PowerMock.replayAll();
ToolBarMenuDock menuDock = new ToolBarMenuDock() {
@Override
public ShortCut[] createNewFileShortCuts() {
return new ShortCut[0];
}
};
ShortCut[] shortCuts1 = new ShortCut[] {SeparatorDef.DEFAULT, aboutAction};
ShortCut[] shortCuts2 = new ShortCut[] {videoAction, tutorialAction, webDemoAction,
softwareUpdateAction, alphaFineAction, SeparatorDef.DEFAULT, aboutAction};
Assert.assertEquals(menuDock.createHelpShortCuts(), shortCuts1);
Assert.assertEquals(menuDock.createHelpShortCuts(), shortCuts2);
}
}

7
designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

@ -13,6 +13,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener;
import com.fr.design.event.UIObserver;
@ -327,15 +328,15 @@ public class MapGroupExtensionPane extends BasicPane implements UIObserver {
}
private void showRenameWaring(String newName){
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), "\"" + newName + "\"" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Has_Been_Existed")
+ "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alert"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), "\"" + newName + "\"" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Has_Been_Existed")
+ "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
}
private JMenuItem createRenameItem() {
JMenuItem renameItem = new JMenuItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Rename"));
renameItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String newName = JOptionPane.showInputDialog(DesignerContext.getDesignerFrame().getContentPane(),
String newName = FineJOptionPane.showInputDialog(DesignerContext.getDesignerFrame().getContentPane(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Rename"), groupExtensionPane.getSelectedObject());
if (StringUtils.isNotBlank(newName)) {
String oldName = Utils.objectToString(groupExtensionPane.getSelectedObject());

9
designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java

@ -2,6 +2,7 @@ package com.fr.van.chart;
import com.fr.chart.base.ChartConstants;
import com.fr.design.RestartHelper;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
@ -80,7 +81,8 @@ 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"), null, JOptionPane.YES_NO_OPTION);
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);
if (choose == JOptionPane.OK_OPTION) {
initDialog();
@ -203,13 +205,14 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
dialog.dispose();
if (result) {
int choose = JOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Work_After_Restart_Designer"), null, JOptionPane.YES_NO_OPTION);
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);
if (choose == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
} else {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Dependence_Install_Failed"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Dependence_Install_Failed"));
}
}

3
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.custom.component;
import com.fr.chart.chartattr.Chart;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
@ -115,7 +116,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
customTypeList.get(index).getCheckBox().setSelected(true);
//彈出警告框
JOptionPane.showMessageDialog(new JPanel(), MASSAGE,"", JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(new JPanel(), MASSAGE,com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
}
//点击后更新已选顺序

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -157,6 +157,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
private void checkPositionPane() {
if (positionPane == null) {
return;
}
TwoTuple<String[], Integer[]> result = getPositionNamesAndValues();
if (result == null) {
return;
@ -182,8 +185,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
positionPane.setLayout(new BorderLayout());
positionPane.add(getLabelPositionPane(comps, row, col), BorderLayout.CENTER);
if (parent != null) {
parent.initListener(positionPane);
}
}
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){

30
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -3,6 +3,9 @@ package com.fr.van.chart.map.designer.type;
import com.fr.base.Parameter;
import com.fr.base.Utils;
import com.fr.decision.webservice.v10.map.WMSFactory;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListPane;
@ -15,10 +18,12 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.base.ViewCenter;
@ -34,6 +39,7 @@ import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.stable.ArrayUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
@ -223,17 +229,33 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
sourceTitleLabel = createSourceTitleLabel();
boolean hasRefreshButton = !WorkContext.getCurrent().isLocal();
UIButton button = new UIButton(IOUtils.readIcon("/com/fr/design/images/control/refresh.png"));
button.setToolTipText(Toolkit.i18nText("Fine-Design_Chart_Update_Remote_Map_JSON"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GEOJSONHelper.reset();
GEOJSONHelper.getInstance();
}
});
double p = TableLayout.PREFERRED;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {d, e};
double[] rowSize = {p, p};
double[] columnSize = hasRefreshButton ? new double[]{d + 10, e - 20, 20} : new double[]{d, e};
Component[] comps = hasRefreshButton ? new Component[]{sourceTitleLabel, sourceComboBox, button} : new Component[]{sourceTitleLabel, sourceComboBox};
double hGap = hasRefreshButton ? 0 : TableLayout4VanChartHelper.COMPONENT_INTERVAL;
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{sourceTitleLabel,sourceComboBox},
comps,
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, hGap, LayoutConstants.VGAP_LARGE);
}
private JPanel createGISLayerPane() {
@ -406,7 +428,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
if(list != null && list.size() > 0) {
resetWMSLayerPane(list);
} else {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Invalid_WMS"));
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Invalid_WMS"));
}
}
}.execute();

3
designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java

@ -4,6 +4,7 @@
package com.fr.design.designer.creator;
import com.fr.base.BaseUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.FormDesigner;
@ -183,7 +184,7 @@ public abstract class XWidgetCreator extends XCreator {
*/
public void ChangeCreatorName(FormDesigner designer, XCreator creator) {
String oldName = creator.toData().getWidgetName();
String value = JOptionPane.showInputDialog(designer, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Change_Widget_Name_Discription"), oldName);
String value = FineJOptionPane.showInputDialog(designer, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Change_Widget_Name_Discription"), oldName);
if (value != null) {
designer.renameCreator(creator, value);
}

9
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -12,6 +12,7 @@ import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XButton;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIPopupMenu;
@ -210,8 +211,8 @@ public class XCardSwitchButton extends XButton {
//删除card,同时修改其他switchbutton和tabfit的index
private void deleteCard(XCardSwitchButton button, int index){
String titleName = button.getContentLabel().getText();
int value = JOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Confirm_Dialog_Content") + "“" + titleName + "”",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION);
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);
if (value != JOptionPane.OK_OPTION) {
return;
}
@ -352,8 +353,8 @@ public class XCardSwitchButton extends XButton {
//删除tab布局
private void deleteTabLayout(SelectionModel selectionModel, FormDesigner designer){
String titleName = this.getContentLabel().getText();
int value = JOptionPane.showConfirmDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Confirm_Dialog_Content") + "“" + titleName + "”",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION);
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);
if (value != JOptionPane.OK_OPTION) {
return;
}

11
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -37,6 +37,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.util.XCreatorConstants;
@ -388,8 +389,8 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
}
private void addParaPaneTooltips() {
JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Please_Drag_ParaPane"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Please_Drag_ParaPane"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
}
/**
@ -635,8 +636,8 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
return false;
}
if (this.getTarget().isNameExist(newName)) {
JOptionPane.showMessageDialog(this, "\"" + newName + "\"" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Has_Been_Existed")
+ "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alert"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(this, "\"" + newName + "\"" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Has_Been_Existed")
+ "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
return false;
}
creator.resetCreatorName(newName);
@ -645,7 +646,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
}
public void showMessageDialog(String message) {
JOptionPane.showMessageDialog(this, message, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alert"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(this, message, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
FormSelectionUtils.rebuildSelection(this);
repaint();
}

4
designer-form/src/main/java/com/fr/design/mainframe/FormEditToolBar.java

@ -4,6 +4,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
@ -287,7 +288,8 @@ public class FormEditToolBar extends BasicPane {
if (i < 0 || !(listModel.getElementAt(i) instanceof FormToolBarButton)) {
return;
}
int val = JOptionPane.showConfirmDialog(FormEditToolBar.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", "Message", JOptionPane.YES_NO_OPTION);
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);
if (val != JOptionPane.YES_OPTION) {
return;
}

5
designer-form/src/main/java/com/fr/design/mainframe/widget/editors/ElementCaseToolBarPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.widget.editors;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -98,7 +99,7 @@ public class ElementCaseToolBarPane extends BasicBeanPane<FormToolBarManager[]>
northToolBar.validate();
northToolBar.repaint();
} else {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Choose_One_Button"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Choose_One_Button"));
}
}
});
@ -123,7 +124,7 @@ public class ElementCaseToolBarPane extends BasicBeanPane<FormToolBarManager[]>
southToolBar.validate();
southToolBar.repaint();
} else {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Choose_One_Button"));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Choose_One_Button"));
}
}
});

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -88,9 +88,9 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
unavailableTipLabel.setForeground(Color.gray);
panel.add(unavailableTipLabel, BorderLayout.NORTH);
allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Full_Screen"));
panel.add(allowFullCheckBox);
panel.add(allowFullCheckBox,BorderLayout.CENTER);
functionalWhenUnactivatedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Functional_When_Unactivated"));
panel.add(functionalWhenUnactivatedCheckBox);
panel.add(functionalWhenUnactivatedCheckBox, BorderLayout.SOUTH);
return panel;
}

5
designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java

@ -3,6 +3,7 @@ package com.fr.design.cell.editor;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dscolumn.DSColumnPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.Grid;
@ -71,8 +72,8 @@ public class DSColumnCellEditor extends AbstractCellEditor implements DialogActi
try {
this.dsColumnPane.populate(DesignTableDataManager.getEditingTableDataSource(), cellElement);
} catch (Exception exp) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(grid), exp.getMessage(),
ProductConstants.APP_NAME, JOptionPane.ERROR_MESSAGE);
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(grid), exp.getMessage(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE);
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
}

3
designer-realize/src/main/java/com/fr/design/headerfooter/HFContainer.java

@ -24,6 +24,7 @@ import javax.swing.event.ChangeListener;
import com.fr.base.headerfooter.HFElement;
import com.fr.base.headerfooter.NewLineHFElement;
import com.fr.design.dialog.FineJOptionPane;
/**
@ -283,7 +284,7 @@ public class HFContainer extends JPanel implements Scrollable {
Object obj = evt.getSource();
if (obj instanceof HFComponent) {
int returnVal = JOptionPane.showConfirmDialog(
int returnVal = FineJOptionPane.showConfirmDialog(
SwingUtilities.getWindowAncestor(HFContainer.this),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_HF_Are_You_Sure_To_Delete_It") + "?",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Delete"),

6
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -26,6 +26,7 @@ import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
@ -875,7 +876,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(reportComposite), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_At_Least_One_Visual_Worksheet") + "!");
return;
}
int returnValue = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(reportComposite), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Des_Remove_Work_Sheet"), ProductConstants.APP_NAME,
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"),
JOptionPane.OK_CANCEL_OPTION);
if (returnValue == JOptionPane.OK_OPTION) {
if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) {
@ -927,7 +929,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
return;
}
String newName = JOptionPane.showInputDialog(reportComposite, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Rename") + ":", reportComposite.getEditingWorkBook().getReportName(selectedIndex));
String newName = FineJOptionPane.showInputDialog(reportComposite, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Rename") + ":", reportComposite.getEditingWorkBook().getReportName(selectedIndex));
if (newName != null) {
// marks:判断是否重名
boolean isExisted = false;

5
designer-realize/src/main/java/com/fr/design/report/LayerReportPane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.IntegerEditor;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.FRExplainLabel;
@ -150,8 +151,8 @@ public class LayerReportPane extends BasicBeanPane<LayerReportAttr> {
public void checkValid() throws Exception {
if (isLayerReportBox.isSelected()) {
if (!ReportUtils.isLayerReportUsable(worksheet)) {
int value = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_After_Changed_Some_Attributes_Are_Different") + "?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION);
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);
if (value != JOptionPane.YES_OPTION) {
isLayerReportBox.setSelected(false);
}

5
designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.style.StylePane;
import com.fr.design.utils.gui.GUICoreUtils;
@ -31,14 +32,14 @@ public class ReportStylePane extends StylePane {
popupMenu.add(menuItem);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String name = JOptionPane.showInputDialog(getParent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Input_The_Name_Of_Gloabel_Style"));
String name = FineJOptionPane.showInputDialog(getParent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Input_The_Name_Of_Gloabel_Style"));
if (ComparatorUtils.equals(name, "")) {
return;
}
if (ServerPreferenceConfig.getInstance().getStyle(name) == null) {
ServerPreferenceConfig.getInstance().putStyle(name, ReportStylePane.this.updateBean());
} else {
JOptionPane.showMessageDialog(getParent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_This_Name_Has_Exsit") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Warning"), JOptionPane.WARNING_MESSAGE);
FineJOptionPane.showMessageDialog(getParent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_This_Name_Has_Exsit") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Warning"), JOptionPane.WARNING_MESSAGE);
}
}
});

3
designer-realize/src/main/java/com/fr/design/report/SubReportPane.java

@ -2,6 +2,7 @@ package com.fr.design.report;
import com.fr.base.core.KV;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -62,7 +63,7 @@ public class SubReportPane extends BasicPane {
if (chooseFILE != null && chooseFILE.exists()) {
pathTextField.setText(chooseFILE.prefix() + chooseFILE.getPath());
} else {
JOptionPane.showConfirmDialog(SubReportPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sub_Report_Message1"),
FineJOptionPane.showConfirmDialog(SubReportPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sub_Report_Message1"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sub_Report_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
chooseFILE = null;
pathTextField.setText("");

3
designer-realize/src/main/java/com/fr/design/style/StylePane.java

@ -9,6 +9,7 @@ import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.core.StyleUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
@ -358,7 +359,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
this.alignmentPane.checkValid();
}
} catch (Exception exp) {
JOptionPane.showMessageDialog(this, exp.getMessage());
FineJOptionPane.showMessageDialog(this, exp.getMessage());
return editing;
}

4
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -6,6 +6,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.fun.ExportToolBarProvider;
import com.fr.design.fun.ExtraButtonToolBarProvider;
import com.fr.design.gui.ibutton.UIButton;
@ -323,7 +324,8 @@ public class EditToolBar extends BasicPane {
if (i < 0 || !(listModel.getElementAt(i) instanceof ToolBarButton)) {
return;
}
int val = JOptionPane.showConfirmDialog(EditToolBar.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", "Message", JOptionPane.YES_NO_OPTION);
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);
if (val != JOptionPane.YES_OPTION) {
return;
}

4
designer-realize/src/main/java/com/fr/design/webattr/EventPane.java

@ -2,6 +2,7 @@ package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.javascript.ListenerEditPane;
@ -168,7 +169,8 @@ public class EventPane extends BasicPane {
return;
}
int val = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EventPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Are_You_Sure_To_Delete_The_Data") + "?", "Message",
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"),
JOptionPane.YES_NO_OPTION);
if (val != JOptionPane.YES_OPTION) {
return;

3
designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java

@ -7,6 +7,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
@ -161,7 +162,7 @@ public class ServerPrinterPane extends BasicPane {
return;
}
int returnVal = JOptionPane.showConfirmDialog(ServerPrinterPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Are_You_Sure_To_Delete_The_Selected_Printer")
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);
if (returnVal == JOptionPane.OK_OPTION) {
((DefaultListModel) printerList.getModel()).remove(selectedIndex);

3
designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

@ -3,6 +3,7 @@ package com.fr.design.webattr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.ToolBar;
@ -86,7 +87,7 @@ public class ToolBarPane extends BasicBeanPane<ToolBar> {
public Component add(Component comp) {
if (comp instanceof ToolBarButton) {
if (isPopulateFinished() && ((ToolBarButton) comp).getWidget().getClass().isAnnotationPresent(OldPrintMethod.class)) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_New_Print_Tip"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_New_Print_Tip"));
return comp;
}
this.ftoolbar.addButton((ToolBarButton) comp);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save