Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design_10.0 into release/10.0

# Conflicts:
#	designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPane.java
research/10.0
kerry 6 years ago
parent
commit
76ed9d29e9
  1. 32
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 4
      designer-base/src/main/java/com/fr/design/actions/ExitAuthorityEditAction.java
  3. 6
      designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
  4. 6
      designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
  5. 6
      designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
  6. 6
      designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
  7. 6
      designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
  8. 6
      designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
  9. 6
      designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
  10. 4
      designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java
  11. 4
      designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java
  12. 4
      designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java
  13. 4
      designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java
  14. 4
      designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java
  15. 12
      designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java
  16. 109
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  17. 6
      designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
  18. 10
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
  19. 4
      designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
  20. 8
      designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
  21. 30
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  22. 4
      designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java
  23. 34
      designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java
  24. 6
      designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java
  25. 6
      designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java
  26. 6
      designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java
  27. 74
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  28. 4
      designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java
  29. 30
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
  30. 4
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
  31. 19
      designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
  32. 4
      designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java
  33. 4
      designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java
  34. 25
      designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java
  35. 4
      designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java
  36. 4
      designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
  37. 4
      designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java
  38. 6
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  39. 4
      designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java
  40. 40
      designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
  41. 4
      designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
  42. 4
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  43. 6
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  44. 28
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  45. 20
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  46. 4
      designer-base/src/main/java/com/fr/design/data/datapane/EditOrNewLabel.java
  47. 4
      designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java
  48. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ReportTableDataPane.java
  49. 31
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
  50. 4
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java
  51. 39
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  52. 8
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java
  53. 14
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  54. 26
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
  55. 8
      designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
  56. 29
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  57. 4
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java
  58. 10
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  59. 18
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  60. 50
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  61. 12
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JNDIDefPane.java
  62. 4
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewLabel.java
  63. 22
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
  64. 26
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  65. 2
      designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java
  66. 20
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
  67. 8
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java
  68. 24
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  69. 20
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  70. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java
  71. 20
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
  72. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  73. 66
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  74. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  75. 14
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  76. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/OneListTableModel.java
  77. 20
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  78. 12
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java
  79. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java
  80. 44
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java
  81. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java
  82. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java
  83. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TreeTableDataPane.java
  84. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java
  85. 4
      designer-base/src/main/java/com/fr/design/dialog/BasicPane.java
  86. 6
      designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java
  87. 10
      designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
  88. 6
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  89. 22
      designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java
  90. 18
      designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
  91. 72
      designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java
  92. 4
      designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java
  93. 4
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java
  94. 4
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java
  95. 4
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java
  96. 8
      designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
  97. 4
      designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java
  98. 4
      designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java
  99. 4
      designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java
  100. 6
      designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java
  101. Some files were not shown because too many files have changed in this diff Show More

32
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -21,6 +21,7 @@ import com.fr.general.GeneralContext;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.xml.GeneralXMLTools; import com.fr.general.xml.GeneralXMLTools;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
@ -55,6 +56,7 @@ import java.util.GregorianCalendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.logging.FileHandler; import java.util.logging.FileHandler;
@ -205,7 +207,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
String installHome = StableUtils.getInstallHome(); String installHome = StableUtils.getInstallHome();
if (installHome != null && !".".equals(installHome)) { if (installHome != null && !".".equals(installHome)) {
String name = Inter.getLocText("FR-Engine_DEFAULT"); String name = com.fr.design.i18n.Toolkit.i18nText("FR-Engine_DEFAULT");
String envPath = designerEnvManager.getDefaultenvPath(installHome); String envPath = designerEnvManager.getDefaultenvPath(installHome);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath)); designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));
designerEnvManager.setCurEnvName(name); designerEnvManager.setCurEnvName(name);
@ -507,7 +509,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return env; return env;
} }
} }
String name = Inter.getLocText(new String[]{"Default", "Utils-Report_Runtime_Env"}); String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Workspace_Default");
LocalDesignerWorkspaceInfo newDefaultEnv = LocalDesignerWorkspaceInfo.create(name, defaultenvPath); LocalDesignerWorkspaceInfo newDefaultEnv = LocalDesignerWorkspaceInfo.create(name, defaultenvPath);
this.putEnv(name, newDefaultEnv); this.putEnv(name, newDefaultEnv);
return newDefaultEnv; return newDefaultEnv;
@ -530,7 +532,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
} }
} }
return Inter.getLocText(new String[]{"Default", "Utils-Report_Runtime_Env"}); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Workspace_Default");
} }
@ -700,6 +702,28 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return this.language; return this.language;
} }
/**
* 返回语言类型
*/
public Locale getLocale() {
// 性能
if (language <= 1) {
return Locale.CHINA;
}
Locale[] locales = supportLocale();
if (language <= locales.length) {
return locales[language - 1];
}
return Locale.CHINA;
}
// 当前系统支持的语言
protected Locale[] supportLocale() {
Inter.getInstance();
Map<Locale, String> languageMap = InterProviderFactory.getProvider().getSupportLocaleMap();
return languageMap.keySet().toArray(new Locale[languageMap.size()]);
}
/** /**
* 设置语言参数 * 设置语言参数
*/ */
@ -1459,7 +1483,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if ((tmpVal = reader.getAttrAsString("webinfLocation", null)) != null) { if ((tmpVal = reader.getAttrAsString("webinfLocation", null)) != null) {
// marks:兼容6.1的 // marks:兼容6.1的
// marks:设置默认的目录. // marks:设置默认的目录.
String curReportServerName = Inter.getLocText("Server-Embedded_Server"); String curReportServerName = com.fr.design.i18n.Toolkit.i18nText("Server-Embedded_Server");
LocalDesignerWorkspaceInfo reportServer = LocalDesignerWorkspaceInfo.create(curReportServerName, tmpVal); LocalDesignerWorkspaceInfo reportServer = LocalDesignerWorkspaceInfo.create(curReportServerName, tmpVal);
this.putEnv(curReportServerName, reportServer); this.putEnv(curReportServerName, reportServer);

4
designer-base/src/main/java/com/fr/design/actions/ExitAuthorityEditAction.java

@ -6,7 +6,7 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
import com.fr.general.Inter;
/** /**
* Author : daisy * Author : daisy
@ -17,7 +17,7 @@ public class ExitAuthorityEditAction extends TemplateComponentAction {
public ExitAuthorityEditAction(TargetComponent t) { public ExitAuthorityEditAction(TargetComponent t) {
super(t); super(t);
this.setName(Inter.getLocText(new String[]{"Exit", "DashBoard-Potence", "Edit"})); this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Authority_Edit_Status_Exit"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/exit_authority_edit.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/exit_authority_edit.png"));
} }

6
designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -44,7 +44,7 @@ public class BBSAction extends UpdateAction
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -61,7 +61,7 @@ public class BBSAction extends UpdateAction
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BBS"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BBS");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/community/BugAction.java

@ -5,7 +5,7 @@ import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -52,7 +52,7 @@ public void actionPerformed(ActionEvent arg0)
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BUG"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BUG");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java

@ -5,7 +5,7 @@ import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class NeedAction extends UpdateAction
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class NeedAction extends UpdateAction
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_NEED"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_NEED");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java

@ -5,7 +5,7 @@ import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -56,7 +56,7 @@ public void actionPerformed(ActionEvent arg0)
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_QUESTIONS"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_QUESTIONS");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/community/SignAction.java

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class SignAction extends UpdateAction
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class SignAction extends UpdateAction
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_SIGN"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_SIGN");
} }
@Override @Override

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

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class UpAction extends UpdateAction
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class UpAction extends UpdateAction
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_UPDATE"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_UPDATE");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -45,7 +45,7 @@ public class VideoAction extends UpdateAction
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -63,7 +63,7 @@ public class VideoAction extends UpdateAction
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_VIDEO"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_VIDEO");
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java

@ -6,7 +6,7 @@ package com.fr.design.actions.edit;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
@ -20,7 +20,7 @@ public class CopyAction extends TemplateComponentAction {
public CopyAction(TargetComponent t) { public CopyAction(TargetComponent t) {
super(t); super(t);
this.setName(Inter.getLocText("M_Edit-Copy")); this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Copy"));
this.setMnemonic('C'); this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));

4
designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java

@ -10,7 +10,7 @@ import javax.swing.KeyStroke;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
@ -24,7 +24,7 @@ public class CutAction extends TemplateComponentAction {
public CutAction(TargetComponent t) { public CutAction(TargetComponent t) {
super(t); super(t);
this.setName(Inter.getLocText("M_Edit-Cut")); this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Cut"));
this.setMnemonic('T'); this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));

4
designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java

@ -10,7 +10,7 @@ import javax.swing.KeyStroke;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
@ -24,7 +24,7 @@ public class PasteAction extends TemplateComponentAction {
public PasteAction(TargetComponent t) { public PasteAction(TargetComponent t) {
super(t); super(t);
this.setName(Inter.getLocText("M_Edit-Paste")); this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Paste"));
this.setMnemonic('P'); this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)); this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));

4
designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java

@ -7,7 +7,7 @@ import java.awt.event.ActionEvent;
import com.fr.design.actions.JTemplateAction; import com.fr.design.actions.JTemplateAction;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.general.Inter;
/** /**
* Close Report. * Close Report.
@ -19,7 +19,7 @@ public class CloseTemplateAction extends JTemplateAction<JTemplate<?, ?>> {
public CloseTemplateAction(JTemplate<?, ?> jt) { public CloseTemplateAction(JTemplate<?, ?> jt) {
super(jt); super(jt);
this.setName(Inter.getLocText("M-Close_Template")); this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Close_Template"));
this.setMnemonic('C'); this.setMnemonic('C');
} }

4
designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java

@ -4,14 +4,14 @@ import java.awt.event.ActionEvent;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.TemplatePane; import com.fr.design.mainframe.TemplatePane;
import com.fr.general.Inter;
public class EditEnvAction extends UpdateAction { public class EditEnvAction extends UpdateAction {
public EditEnvAction() { public EditEnvAction() {
this.setName(Inter.getLocText("M-Others") + "..."); this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Others") + "...");
} }
@Override @Override

12
designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java

@ -11,7 +11,7 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -95,8 +95,8 @@ public class LocalePane extends BasicPane {
}); });
tabbedPane.addTab(Inter.getLocText("Preference-Predefined"), new UIScrollPane(predefinedTable)); tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Predefined"), new UIScrollPane(predefinedTable));
tabbedPane.addTab(Inter.getLocText("Preference-Custom"), new UIScrollPane(customTable)); tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Custom"), new UIScrollPane(customTable));
loadData(); loadData();
} }
@ -144,7 +144,7 @@ public class LocalePane extends BasicPane {
keyVector.addAll(sortKeys); keyVector.addAll(sortKeys);
predefineTableModel.addColumn(Inter.getLocText("Key"), keyVector); predefineTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Key"), keyVector);
for (Map.Entry<Locale, Vector<String>> entry : data.entrySet()) { for (Map.Entry<Locale, Vector<String>> entry : data.entrySet()) {
predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue()); predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue());
} }
@ -159,7 +159,7 @@ public class LocalePane extends BasicPane {
List<Properties> list = new ArrayList<Properties>(); List<Properties> list = new ArrayList<Properties>();
Set<String> keys = new HashSet<String>(); Set<String> keys = new HashSet<String>();
customTableModel.addColumn(Inter.getLocText("Key")); customTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Key"));
for (FileNode fileNode : fileNodes) { for (FileNode fileNode : fileNodes) {
String fileName = fileNode.getName(); String fileName = fileNode.getName();
if (fileName.endsWith(".properties")) { if (fileName.endsWith(".properties")) {
@ -216,6 +216,6 @@ public class LocalePane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Preference-Locale"); return com.fr.design.i18n.Toolkit.i18nText("Preference-Locale");
} }
} }

109
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -23,8 +23,9 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.general.log.Log4jConfig; import com.fr.general.log.Log4jConfig;
import com.fr.locale.InterProviderFactory;
import com.fr.third.apache.log4j.Level; import com.fr.third.apache.log4j.Level;
import javax.swing.*; import javax.swing.*;
@ -128,8 +129,8 @@ public class PreferencePane extends BasicPane {
// 语言选项 // 语言选项
private void initLanguageItems() { private void initLanguageItems() {
LANGUAGE.clear(); LANGUAGE.clear();
Map<Locale, String> map = Inter.getSupportLocaleMap(); Map<Locale, String> map = InterProviderFactory.getProvider().getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default")); LANGUAGE.add(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Language_Default"));
for (Locale locale : map.keySet()) { for (Locale locale : map.keySet()) {
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale)); LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
} }
@ -141,9 +142,9 @@ public class PreferencePane extends BasicPane {
UITabbedPane jtabPane = new UITabbedPane(); UITabbedPane jtabPane = new UITabbedPane();
JPanel generalPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel generalPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
jtabPane.addTab(Inter.getLocText("FR-Designer_General"), generalPane); jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_General"), generalPane);
JPanel advancePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel advancePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
jtabPane.addTab(Inter.getLocText("FR-Designer_Advanced"), advancePane); jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Advanced"), advancePane);
contentPane.add(jtabPane, BorderLayout.NORTH); contentPane.add(jtabPane, BorderLayout.NORTH);
@ -166,14 +167,12 @@ public class PreferencePane extends BasicPane {
createJdkHomePane(advancePane); createJdkHomePane(advancePane);
String[] message = new String[]{"Display", "Oracle_All_Tables"}; JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Oracle_All_Tables"));
String[] sign = new String[]{"Oracle"}; oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Show_All_Oracle_Tables"));
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + Inter.getLocText("FR-Designer_Oracle_All_Tables"));
oracleSpace = new UICheckBox(Inter.getLocText(message, sign));
oraclePane.add(oracleSpace); oraclePane.add(oracleSpace);
JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Product_improve")); JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Product_improve"));
joinProductImprove = new UICheckBox(Inter.getLocText("FR-Designer_Join_Product_improve")); joinProductImprove = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Join_Product_improve"));
improvePane.add(joinProductImprove); improvePane.add(joinProductImprove);
JPanel spaceUpPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel spaceUpPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -185,22 +184,22 @@ public class PreferencePane extends BasicPane {
private static String getLocaledLanguage(String key, Locale locale) { private static String getLocaledLanguage(String key, Locale locale) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(Inter.getLocText(key)).append("("); sb.append(com.fr.design.i18n.Toolkit.i18nText(key)).append("(");
sb.append(Inter.getLocText(key, locale)).append(")"); sb.append(com.fr.design.i18n.Toolkit.i18nText(key)).append(")");
return sb.toString(); return sb.toString();
} }
private void createFunctionPane(JPanel generalPane) { private void createFunctionPane(JPanel generalPane) {
JPanel functionPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preference-Function")); JPanel functionPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference-Function"));
generalPane.add(functionPane); generalPane.add(functionPane);
//添加supportUndo选择项 //添加supportUndo选择项
supportUndoCheckBox = new UICheckBox(Inter.getLocText("Preference-Support_Undo")); supportUndoCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Undo"));
functionPane.add(supportUndoCheckBox); functionPane.add(supportUndoCheckBox);
//添加maxUndoLimit //添加maxUndoLimit
//String[] undoTimes = {"最大撤销次数","5次","10次","15次","20次","50次"}; //String[] undoTimes = {"最大撤销次数","5次","10次","15次","20次","50次"};
String[] undoTimes = {Inter.getLocText("FR-Designer_max_undo_limit"), MAX_UNDO_LIMIT_5 + Inter.getLocText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_10 + Inter.getLocText("FR-Designer_time(s)") String[] undoTimes = {com.fr.design.i18n.Toolkit.i18nText("FR-Designer_max_undo_limit"), MAX_UNDO_LIMIT_5 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_10 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)")
, MAX_UNDO_LIMIT_15 + Inter.getLocText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_20 + Inter.getLocText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_50 + Inter.getLocText("FR-Designer_time(s)")}; , MAX_UNDO_LIMIT_15 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_20 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_50 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)")};
maxUndoLimit = new UIComboBox(undoTimes); maxUndoLimit = new UIComboBox(undoTimes);
functionPane.add(maxUndoLimit); functionPane.add(maxUndoLimit);
@ -214,21 +213,21 @@ public class PreferencePane extends BasicPane {
//添加supportDefaultParentCalculate选择项 //添加supportDefaultParentCalculate选择项
supportDefaultParentCalculateCheckBox = new UICheckBox( supportDefaultParentCalculateCheckBox = new UICheckBox(
Inter.getLocText("Preference-Support_Default_Parent_Calculate")); com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Default_Parent_Calculate"));
functionPane.add(supportDefaultParentCalculateCheckBox); functionPane.add(supportDefaultParentCalculateCheckBox);
} }
private void createEditPane(JPanel generalPane) { private void createEditPane(JPanel generalPane) {
//samuel:编辑器设置 //samuel:编辑器设置
JPanel editPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText(new String[]{"Editor", "Set"})); JPanel editPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Editor_Preference"));
generalPane.add(editPane); generalPane.add(editPane);
//设置是否支持将字符串编辑为公式 //设置是否支持将字符串编辑为公式
supportStringToFormulaBox = new UICheckBox(Inter.getLocText("FR-Designer_Surport_String_To_Formula")); supportStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Support_String_To_Formula"));
editPane.add(supportStringToFormulaBox); editPane.add(supportStringToFormulaBox);
//是否默认转化 //是否默认转化
defaultStringToFormulaBox = new UICheckBox(Inter.getLocText("FR-Designer_Always")); defaultStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Always"));
editPane.add(defaultStringToFormulaBox); editPane.add(defaultStringToFormulaBox);
//不支持转化则不能默认执行 //不支持转化则不能默认执行
@ -238,7 +237,7 @@ public class PreferencePane extends BasicPane {
} }
}); });
JPanel keyStrokePane = new JPanel(new BorderLayout()); JPanel keyStrokePane = new JPanel(new BorderLayout());
keyStrokePane.add(new UILabel(Inter.getLocText("Support-Auto_Complete_Shortcut") + ":"), BorderLayout.WEST); keyStrokePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Support-Auto_Complete_Shortcut") + ":"), BorderLayout.WEST);
shortCutLabel = new UILabel(); shortCutLabel = new UILabel();
keyStrokePane.add(shortCutLabel, BorderLayout.CENTER); keyStrokePane.add(shortCutLabel, BorderLayout.CENTER);
editPane.add(keyStrokePane); editPane.add(keyStrokePane);
@ -268,7 +267,7 @@ public class PreferencePane extends BasicPane {
requestFocusInWindow(); requestFocusInWindow();
label = new UILabel(text); label = new UILabel(text);
add(GUICoreUtils.createBorderLayoutPane( add(GUICoreUtils.createBorderLayoutPane(
new UILabel(Inter.getLocText("Support-Current_Auto_Complete_Shortcut") + ":"), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Support-Current_Auto_Complete_Shortcut") + ":"),
BorderLayout.WEST, BorderLayout.WEST,
label, label,
BorderLayout.CENTER), BorderLayout.CENTER),
@ -302,24 +301,24 @@ public class PreferencePane extends BasicPane {
private void createGuiOfGridPane(JPanel generalPane) { private void createGuiOfGridPane(JPanel generalPane) {
// GridPane // GridPane
JPanel guiOfGridPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preference-Setting_Grid")); JPanel guiOfGridPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-Setting_Grid"));
generalPane.add(guiOfGridPane); generalPane.add(guiOfGridPane);
supportCellEditorDefCheckBox = new UICheckBox(Inter.getLocText("Preference-Support_Cell_Editor_Definition")); supportCellEditorDefCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Cell_Editor_Definition"));
guiOfGridPane.add(supportCellEditorDefCheckBox); guiOfGridPane.add(supportCellEditorDefCheckBox);
isDragPermitedCheckBox = new UICheckBox(Inter.getLocText("Preference-Is_Drag_Permited")); isDragPermitedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Is_Drag_Permited"));
guiOfGridPane.add(isDragPermitedCheckBox); guiOfGridPane.add(isDragPermitedCheckBox);
} }
private void createColorSettingPane(JPanel generalPane) { private void createColorSettingPane(JPanel generalPane) {
// Color Setting Pane // Color Setting Pane
JPanel colorSettingPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preference-Setting_Colors")); JPanel colorSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-Setting_Colors"));
generalPane.add(colorSettingPane); generalPane.add(colorSettingPane);
new UILabel(Inter.getLocText("Preference-Grid_Line_Color")); new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Grid_Line_Color"));
new UILabel(Inter.getLocText("Preference-Pagination_Line_Color")); new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Pagination_Line_Color"));
gridLineColorTBButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); gridLineColorTBButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
gridLineColorTBButton.setEnabled(this.isEnabled()); gridLineColorTBButton.setEnabled(this.isEnabled());
@ -328,10 +327,10 @@ public class PreferencePane extends BasicPane {
paginationLineColorTBButton.setEnabled(this.isEnabled()); paginationLineColorTBButton.setEnabled(this.isEnabled());
JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
leftPane.add(new UILabel(Inter.getLocText("Preference-Grid_Line_Color") + ":")); leftPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Grid_Line_Color") + ":"));
leftPane.add(gridLineColorTBButton); leftPane.add(gridLineColorTBButton);
JPanel rightPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel rightPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
rightPane.add(new UILabel(Inter.getLocText("Preference-Pagination_Line_Color") + ":")); rightPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Pagination_Line_Color") + ":"));
rightPane.add(paginationLineColorTBButton); rightPane.add(paginationLineColorTBButton);
colorSettingPane.add(leftPane); colorSettingPane.add(leftPane);
colorSettingPane.add(rightPane); colorSettingPane.add(rightPane);
@ -341,9 +340,9 @@ public class PreferencePane extends BasicPane {
//richer:选择导出log文件的目录. //richer:选择导出log文件的目录.
JPanel logPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); JPanel logPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
advancePane.add(logPane); advancePane.add(logPane);
JPanel logExportPane = FRGUIPaneFactory.createTitledBorderPane("log" + Inter.getLocText("FR-Designer_Export_Setting")); JPanel logExportPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Export_Setting"));
logPane.add(logExportPane); logPane.add(logExportPane);
UILabel logLabel = new UILabel(Inter.getLocText("FR-Designer_Select_Export_Log_Directory") + ":"); UILabel logLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Select_Export_Log_Directory") + ":");
logExportPane.add(logLabel, BorderLayout.WEST); logExportPane.add(logLabel, BorderLayout.WEST);
logExportDirectoryField = new UITextField(24); logExportDirectoryField = new UITextField(24);
logExportPane.add(logExportDirectoryField, BorderLayout.CENTER); logExportPane.add(logExportDirectoryField, BorderLayout.CENTER);
@ -362,7 +361,7 @@ public class PreferencePane extends BasicPane {
} }
}); });
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + Inter.getLocText("FR-Designer_Level_Setting")); JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Level_Setting"));
logPane.add(logLevelPane); logPane.add(logLevelPane);
logLevelComboBox = new UIComboBox(LOG); logLevelComboBox = new UIComboBox(LOG);
logLevelPane.add(logLevelComboBox); logLevelPane.add(logLevelComboBox);
@ -377,12 +376,12 @@ public class PreferencePane extends BasicPane {
private void createLanPane(JPanel generalPane) { private void createLanPane(JPanel generalPane) {
// ben:选择版本语言; // ben:选择版本语言;
JPanel languageAndDashBoard_pane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); JPanel languageAndDashBoard_pane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
JPanel LanguagePane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Choose_Language")); JPanel LanguagePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Choose_Language"));
generalPane.add(languageAndDashBoard_pane); generalPane.add(languageAndDashBoard_pane);
languageAndDashBoard_pane.add(LanguagePane); languageAndDashBoard_pane.add(LanguagePane);
languageComboBox = new UIComboBox(LANGUAGE.toArray()); languageComboBox = new UIComboBox(LANGUAGE.toArray());
languageComboBox.setFont(FRFont.getInstance("Dialog", Font.PLAIN, 12));//为了在中文系统中显示韩文 languageComboBox.setFont(FRFont.getInstance("Dialog", Font.PLAIN, 12));//为了在中文系统中显示韩文
ActionLabel languageLabel = new ActionLabel(Inter.getLocText("FR-Designer_Designer_Language")); ActionLabel languageLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Designer_Language"));
languageLabel.addActionListener(new ActionListener() { languageLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -396,7 +395,7 @@ public class PreferencePane extends BasicPane {
dlg.setVisible(true); dlg.setVisible(true);
} }
}); });
UILabel noticeLabel = new UILabel(Inter.getLocText("FR-Designer_Work_After_Restart_Designer"));//sail:提示重启后生效 UILabel noticeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));//sail:提示重启后生效
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double rowSize[] = {p}; double rowSize[] = {p};
double columnSize[] = {p, p, p}; double columnSize[] = {p, p, p};
@ -431,16 +430,16 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {p}; double rowSize[] = {p};
// 长度单位选择 // 长度单位选择
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Setting-Ruler-Units")); JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Setting-Ruler-Units"));
advancePane.add(lengthPane); advancePane.add(lengthPane);
pageLengthComboBox = new UIComboBox(new String[]{Inter.getLocText("FR-Designer_PageSetup-mm"), Inter.getLocText("FR-Designer_Unit_CM"), Inter.getLocText("FR-Designer_Unit_INCH")}); pageLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer_PageSetup-mm"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH")});
pageLengthComboBox.setPreferredSize(new Dimension(80, 20)); pageLengthComboBox.setPreferredSize(new Dimension(80, 20));
pageLengthComboBox.setMinimumSize(new Dimension(80, 20)); pageLengthComboBox.setMinimumSize(new Dimension(80, 20));
reportLengthComboBox = new UIComboBox(new String[]{Inter.getLocText("FR-Designer_PageSetup-mm"), Inter.getLocText("FR-Designer_Unit_CM"), Inter.getLocText("FR-Designer_Unit_INCH"), Inter.getLocText("FR-Designer_Unit_PT")}); reportLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer_PageSetup-mm"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_PT")});
reportLengthComboBox.setPreferredSize(new Dimension(80, 20)); reportLengthComboBox.setPreferredSize(new Dimension(80, 20));
reportLengthComboBox.setMinimumSize(new Dimension(80, 20)); reportLengthComboBox.setMinimumSize(new Dimension(80, 20));
UILabel pagelengthLabel = new UILabel(Inter.getLocText("FR-Designer_Page-Setup-Scale-Units") + ":"); UILabel pagelengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Page-Setup-Scale-Units") + ":");
UILabel reportLengthLabel = new UILabel(Inter.getLocText("FR-Designer_Report-Design-Ruler-Units") + ":"); UILabel reportLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Report-Design-Ruler-Units") + ":");
Component[][] lengthComponents = { Component[][] lengthComponents = {
{pagelengthLabel, pageLengthComboBox, reportLengthLabel, reportLengthComboBox}, {pagelengthLabel, pageLengthComboBox, reportLengthLabel, reportLengthComboBox},
}; };
@ -453,13 +452,13 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {p}; double rowSize[] = {p};
double columnSize[] = {p, p, p}; double columnSize[] = {p, p, p};
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Web_Preview_Port_Setting")); JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Web_Preview_Port_Setting"));
advancePane.add(serverPortPane); advancePane.add(serverPortPane);
portEditor = new IntegerEditor(); portEditor = new IntegerEditor();
portEditor.setPreferredSize(new Dimension(80, 20)); portEditor.setPreferredSize(new Dimension(80, 20));
portEditor.setMinimumSize(new Dimension(80, 20)); portEditor.setMinimumSize(new Dimension(80, 20));
UILabel notiJlabel = new UILabel(Inter.getLocText("FR-Designer_Work_After_Restart_Designer")); UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(Inter.getLocText("FR-Designer_Web_Preview_Port") + ":"); UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Web_Preview_Port") + ":");
Component[][] portComponents = { Component[][] portComponents = {
{serverPortLabel, portEditor, notiJlabel}, {serverPortLabel, portEditor, notiJlabel},
}; };
@ -472,7 +471,7 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {p}; double rowSize[] = {p};
double columnSize[] = {p, p, p}; double columnSize[] = {p, p, p};
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preference-JDK_Home")); JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-JDK_Home"));
advancePane.add(serverPortPane); advancePane.add(serverPortPane);
jdkHomeTextField = new UITextField(); jdkHomeTextField = new UITextField();
UIButton chooseBtn = new UIButton("..."); UIButton chooseBtn = new UIButton("...");
@ -494,8 +493,8 @@ public class PreferencePane extends BasicPane {
} }
}); });
panel.setPreferredSize(new Dimension(300, 20)); panel.setPreferredSize(new Dimension(300, 20));
UILabel notiJlabel = new UILabel(Inter.getLocText("FR-Designer_Work_After_Restart_Designer")); UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(Inter.getLocText("Preference-JDK_Home") + ":"); UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-JDK_Home") + ":");
Component[][] portComponents = { Component[][] portComponents = {
{serverPortLabel, panel, notiJlabel}, {serverPortLabel, panel, notiJlabel},
}; };
@ -504,9 +503,9 @@ public class PreferencePane extends BasicPane {
} }
private JPanel createMemoryPane() { private JPanel createMemoryPane() {
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preference_CachingTemplate")); JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplate"));
UILabel memoryLabel = new UILabel(Inter.getLocText("FR-Designer_Preference_MaxCachingTemplate")); UILabel memoryLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_MaxCachingTemplate"));
UILabel memoryTipLabel = new UILabel(Inter.getLocText("FR-Designer_Preference_CachingTemplateTip")); UILabel memoryTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplateTip"));
memoryTipLabel.setBorder(BorderFactory.createEmptyBorder( 0, CACHING_GAP, 0, 0)); memoryTipLabel.setBorder(BorderFactory.createEmptyBorder( 0, CACHING_GAP, 0, 0));
cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT); cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT);
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout());
@ -519,7 +518,7 @@ public class PreferencePane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("M_Window-Preference"); return com.fr.design.i18n.Toolkit.i18nText("M_Window-Preference");
} }
/** /**
@ -672,12 +671,12 @@ public class PreferencePane extends BasicPane {
} }
int rv = JOptionPane.showOptionDialog( int rv = JOptionPane.showOptionDialog(
null, null,
Inter.getLocText("FR-Designer_Language_Change_Successful"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Language_Change_Successful"),
Inter.getLocText("FR-Designer-Plugin_Warning"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE, JOptionPane.INFORMATION_MESSAGE,
null, null,
new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")}, new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Restart_Designer"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Restart_Designer_Later")},
null null
); );
if (rv == JOptionPane.OK_OPTION) { if (rv == JOptionPane.OK_OPTION) {

6
designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java

@ -15,7 +15,7 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.WorkContextCallback; import com.fr.workspace.WorkContextCallback;
@ -109,7 +109,7 @@ public class SwitchExistEnv extends MenuDef {
try { try {
workspace = DesignerWorkspaceGenerator.generate(selectedEnv); workspace = DesignerWorkspaceGenerator.generate(selectedEnv);
if (workspace == null) { if (workspace == null) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"FR-Designer_M-SwitchWorkspace", "Failed"}), JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Switch_Workspace_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon")); null, 0, UIManager.getIcon("OptionPane.errorIcon"));
return; return;
} }
@ -125,7 +125,7 @@ public class SwitchExistEnv extends MenuDef {
} }
}); });
} catch (AuthException exception) { } catch (AuthException exception) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"), JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon")); null, 0, UIManager.getIcon("OptionPane.errorIcon"));
} }
} }

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

@ -8,7 +8,7 @@ import com.fr.design.utils.DesignUtils;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.general.web.ParameterConstants; import com.fr.general.web.ParameterConstants;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.web.AbstractWebletCreator; import com.fr.stable.web.AbstractWebletCreator;
@ -52,8 +52,8 @@ public final class WebPreviewUtils {
browseUrl(currentTemplate, baseRoute, map, actionType, jt); browseUrl(currentTemplate, baseRoute, map, actionType, jt);
} else { } else {
// 说明模板没有保存在报表运行环境下面,提示用户 // 说明模板没有保存在报表运行环境下面,提示用户
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Web_Preview_Message"), int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
Inter.getLocText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) { if (JOptionPane.OK_OPTION == selVal) {
if (!jt.saveAsTemplate2Env()) { if (!jt.saveAsTemplate2Env()) {
@ -96,8 +96,8 @@ public final class WebPreviewUtils {
DesignUtils.visitEnvServerByParameters(baseRoute, parameterNameList.toArray(new String[parameterNameList.size()]), parameterValueList.toArray(new String[parameterValueList.size()])); DesignUtils.visitEnvServerByParameters(baseRoute, parameterNameList.toArray(new String[parameterNameList.size()]), parameterValueList.toArray(new String[parameterValueList.size()]));
} }
} else { } else {
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Web_Preview_Message"), int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
Inter.getLocText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) { if (JOptionPane.OK_OPTION == selVal) {
if (!jt.saveAsTemplate()) { if (!jt.saveAsTemplate()) {
return; return;

4
designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java

@ -6,7 +6,7 @@ package com.fr.design.actions.help;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -39,7 +39,7 @@ public class AboutAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Help-About_Software"); return com.fr.design.i18n.Toolkit.i18nText("M_Help-About_Software");
} }
@Override @Override

8
designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java

@ -20,7 +20,7 @@ import javax.swing.KeyStroke;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -42,14 +42,14 @@ public class AboutDialog extends JDialog implements ActionListener {
JPanel defaultPane=FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel defaultPane=FRGUIPaneFactory.createBorderLayout_L_Pane();
this.setContentPane(defaultPane); this.setContentPane(defaultPane);
okButton = new UIButton(Inter.getLocText("OK")); okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
okButton.addActionListener(this); okButton.addActionListener(this);
tabbedPane = new UITabbedPane(); tabbedPane = new UITabbedPane();
sysPane = new SystemInfoPane(); sysPane = new SystemInfoPane();
tabbedPane.addTab(Inter.getLocText("About"), aboutPanel); tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("About"), aboutPanel);
tabbedPane.addTab(Inter.getLocText("System"), sysPane); tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("System"), sysPane);
buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
buttonPanel.add(okButton); buttonPanel.add(okButton);

30
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -11,7 +11,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
@ -50,38 +50,40 @@ public class AboutPane extends JPanel {
getBuildTitle(), getBuildTitle(),
GeneralUtils.readFullBuildNO(), GeneralUtils.readFullBuildNO(),
new String[]{ new String[]{
Inter.getLocText("FR-Designer-Basic_Copy_Build_NO"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Copy_Build_NO"),
Inter.getLocText("FR-Designer-Basic_Copy_Build_NO_OK") com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Copy_Build_NO_OK")
}); });
contentPane.add(buildCopyPane); contentPane.add(buildCopyPane);
BoxCenterAligmentPane boxCenterAlignmentPane = new BoxCenterAligmentPane(getCopyRight()); BoxCenterAligmentPane boxCenterAlignmentPane = new BoxCenterAligmentPane(getCopyRight());
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("About-All_Rights_Reserved")); boxCenterAlignmentPane = new BoxCenterAligmentPane(com.fr.design.i18n.Toolkit.i18nText("About-All_Rights_Reserved"));
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
contentPane.add(new BoxCenterAlignmentCopyablePane( contentPane.add(new BoxCenterAlignmentCopyablePane(
Inter.getLocText("FR-Designer-Basic_Activation_Key"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Activation_Key"),
DesignerEnvManager.getEnvManager().getActivationKey(), DesignerEnvManager.getEnvManager().getActivationKey(),
new String[]{ new String[]{
Inter.getLocText("FR-Designer-Basic_Copy_Activation_Key"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Copy_Activation_Key"),
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Activation_Key_Copy_OK")
})); }));
addPhoneAndQQPane(contentPane); addPhoneAndQQPane(contentPane);
// 官网 // 官网
JPanel urlActionPane = getURLActionPane(Inter.getLocText("FR-Designer_Official_Website"), CloudCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Official_Website"), CloudCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL));
// 支持邮箱 // 支持邮箱
String defaultEmail = CloudCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL); String defaultEmail = CloudCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL);
JPanel emailPane = getEmailActionPane(Inter.getLocText("FR-Designer_Support_Email"), CloudCenter.getInstance().acquireUrlByKind("support.email." + FRContext.getLocale(), defaultEmail)); JPanel emailPane = getEmailActionPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Support_Email"), CloudCenter.getInstance().acquireUrlByKind("support.email." + FRContext.getLocale(), defaultEmail));
contentPane.add(urlActionPane); contentPane.add(urlActionPane);
contentPane.add(emailPane); contentPane.add(emailPane);
contentPane.add(getRemarkPane()); if (FRContext.getLocale().equals(Locale.CHINA) || FRContext.getLocale().equals(Locale.TAIWAN)){
contentPane.add(getRemarkPane());
}
if (shouldShowThanks()) { if (shouldShowThanks()) {
addThankPane(contentPane); addThankPane(contentPane);
@ -94,7 +96,7 @@ public class AboutPane extends JPanel {
if (FRContext.getLocale().equals(Locale.US)) { if (FRContext.getLocale().equals(Locale.US)) {
return; return;
} }
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + CloudCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE)); boxCenterAlignmentPane = new BoxCenterAligmentPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Service_Phone") + CloudCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE));
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
// 繁体版不显示QQ // 繁体版不显示QQ
if (FRContext.getLocale().equals(Locale.TAIWAN)) { if (FRContext.getLocale().equals(Locale.TAIWAN)) {
@ -116,7 +118,7 @@ public class AboutPane extends JPanel {
} }
private JPanel getRemarkPane(){ private JPanel getRemarkPane(){
String remark = Inter.getLocText("Fine-Designer_About_Remark_Info",PRESIDENT_PHONE); String remark = com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_About_Remark_Info",PRESIDENT_PHONE);
UILabel label = new UILabel(); UILabel label = new UILabel();
label.setSize(new Dimension(580,30)); label.setSize(new Dimension(580,30));
@ -173,12 +175,12 @@ public class AboutPane extends JPanel {
} }
private String getCopyRight() { private String getCopyRight() {
return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL, return append(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL,
ProductConstants.HISTORY, StringUtils.BLANK, CloudCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME)); ProductConstants.HISTORY, StringUtils.BLANK, CloudCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME));
} }
private String getBuildTitle() { private String getBuildTitle() {
return append(ProductConstants.APP_NAME, Inter.getLocText("FR-Designer_About_Version"), return append(ProductConstants.APP_NAME, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_About_Version"),
StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX);
} }

4
designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java

@ -6,7 +6,7 @@ import com.fr.design.dialog.BasicDialog;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -46,7 +46,7 @@ public class FeedBackAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("product_feedback"); return com.fr.design.i18n.Toolkit.i18nText("product_feedback");
} }
@Override @Override

34
designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java

@ -20,7 +20,6 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -68,9 +67,9 @@ public class FeedBackPane extends BasicPane {
private static final int TEL_MAX_LENGTH = 11; private static final int TEL_MAX_LENGTH = 11;
private static final String ALLOWED_INTEGER_TYPE = "0123456789"; private static final String ALLOWED_INTEGER_TYPE = "0123456789";
private SwingWorker worker; private SwingWorker worker;
private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Send"), true); private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Send"), true);
private UIButton ok = new UIButton(Inter.getLocText("OK")); private UIButton ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
private UIButton cancle = new UIButton(Inter.getLocText("Cancel")); private UIButton cancle = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
private int ifHasBeenWriten = 0; private int ifHasBeenWriten = 0;
private UITextArea detailField; private UITextArea detailField;
private boolean isSendSuccessful = false; private boolean isSendSuccessful = false;
@ -97,7 +96,7 @@ public class FeedBackPane extends BasicPane {
public FeedBackPane() { public FeedBackPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
initDetailArea(); initDetailArea();
UILabel tip = new UILabel(Inter.getLocText("feedback_info")); UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("feedback_info"));
tip.setBorder(TIP_BORDER); tip.setBorder(TIP_BORDER);
this.add(tip, BorderLayout.NORTH); this.add(tip, BorderLayout.NORTH);
UIScrollPane scrollPane = new UIScrollPane(initDetailPane()); UIScrollPane scrollPane = new UIScrollPane(initDetailPane());
@ -136,7 +135,7 @@ public class FeedBackPane extends BasicPane {
} }
}; };
this.detailField.setForeground(Color.gray); this.detailField.setForeground(Color.gray);
this.detailField.setText(Inter.getLocText("feedback_tip")); this.detailField.setText(com.fr.design.i18n.Toolkit.i18nText("feedback_tip"));
detailField.addKeyListener(new KeyAdapter() { detailField.addKeyListener(new KeyAdapter() {
@Override @Override
@ -157,7 +156,7 @@ public class FeedBackPane extends BasicPane {
detailField.setForeground(Color.black); detailField.setForeground(Color.black);
String text = detailField.getText(); String text = detailField.getText();
// 判断在中文输入状态是否还包含提示符 要删掉 // 判断在中文输入状态是否还包含提示符 要删掉
String tip = Inter.getLocText("feedback_tip"); String tip = com.fr.design.i18n.Toolkit.i18nText("feedback_tip");
if (text.contains(tip)) { if (text.contains(tip)) {
text = text.substring(0, text.indexOf(tip)); text = text.substring(0, text.indexOf(tip));
detailField.setText(text); detailField.setText(text);
@ -180,11 +179,11 @@ public class FeedBackPane extends BasicPane {
private JPanel initDetailPane() { private JPanel initDetailPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
UILabel info = new UILabel(Inter.getLocText("detail_description") + ":"); UILabel info = new UILabel(com.fr.design.i18n.Toolkit.i18nText("detail_description") + ":");
info.setBorder(INNER_LEFT_BORDER); info.setBorder(INNER_LEFT_BORDER);
JPanel contactPane = getContactPane(); JPanel contactPane = getContactPane();
contactPane.setBorder(INNER_LEFT_BORDER); contactPane.setBorder(INNER_LEFT_BORDER);
UILabel contact = new UILabel(Inter.getLocText("contact_info") + ":"); UILabel contact = new UILabel(com.fr.design.i18n.Toolkit.i18nText("contact_info") + ":");
contact.setBorder(INNER_LEFT_BORDER); contact.setBorder(INNER_LEFT_BORDER);
JPanel jPanel = new JPanel(); JPanel jPanel = new JPanel();
jPanel.add(detailField); jPanel.add(detailField);
@ -207,8 +206,8 @@ public class FeedBackPane extends BasicPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel("QQ:", SwingConstants.RIGHT), qq}, new Component[]{new UILabel("QQ:", SwingConstants.RIGHT), qq},
new Component[]{new UILabel(Inter.getLocText("email") + ":", SwingConstants.RIGHT), email}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("email") + ":", SwingConstants.RIGHT), email},
new Component[]{new UILabel(Inter.getLocText("mobile_number") + ":", SwingConstants.RIGHT), phone} new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("mobile_number") + ":", SwingConstants.RIGHT), phone}
}; };
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
double[] columnSize = {p, p}; double[] columnSize = {p, p};
@ -220,7 +219,7 @@ public class FeedBackPane extends BasicPane {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, GAP, 0)); JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, GAP, 0));
controlPane.add(buttonsPane, BorderLayout.EAST); controlPane.add(buttonsPane, BorderLayout.EAST);
sendButton = new UIButton(Inter.getLocText("Send")); sendButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Send"));
buttonsPane.add(sendButton); buttonsPane.add(sendButton);
buttonsPane.setBorder(SEND_BORDER); buttonsPane.setBorder(SEND_BORDER);
sendButton.addActionListener(new ActionListener() { sendButton.addActionListener(new ActionListener() {
@ -236,7 +235,7 @@ public class FeedBackPane extends BasicPane {
private void doWithSendPane() { private void doWithSendPane() {
Object[] options = new Object[]{ok, cancle}; Object[] options = new Object[]{ok, cancle};
send = new JOptionPane(Inter.getLocText("sending"), send = new JOptionPane(com.fr.design.i18n.Toolkit.i18nText("sending"),
JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]);
ok.setEnabled(false); ok.setEnabled(false);
ok.addActionListener(new ActionListener() { ok.addActionListener(new ActionListener() {
@ -247,7 +246,7 @@ public class FeedBackPane extends BasicPane {
feedbackDialog.dispose(); feedbackDialog.dispose();
} else { } else {
ok.setEnabled(false); ok.setEnabled(false);
send.setMessage(Inter.getLocText("sending")); send.setMessage(com.fr.design.i18n.Toolkit.i18nText("sending"));
setWorker(send); setWorker(send);
worker.execute(); worker.execute();
} }
@ -293,12 +292,9 @@ public class FeedBackPane extends BasicPane {
if (model) { if (model) {
//发送成功 //发送成功
isSendSuccessful = true; isSendSuccessful = true;
send.setMessage(Inter.getLocText("HJS-Send_Successfully") + "!"); send.setMessage(com.fr.design.i18n.Toolkit.i18nText("HJS-Send_Successfully") + "!");
} else { } else {
isSendSuccessful = false; isSendSuccessful = false;
String[] message = new String[]{"HJS-Send_Failed", "try_resending"};
String[] operator = new String[]{",", ""};
send.setMessage(Inter.getLocText(message, operator));
} }
} catch (Exception e) { } catch (Exception e) {
isSendSuccessful = false; isSendSuccessful = false;
@ -313,7 +309,7 @@ public class FeedBackPane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("product_feedback"); return com.fr.design.i18n.Toolkit.i18nText("product_feedback");
} }

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

@ -8,7 +8,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -48,7 +48,7 @@ public class ForumAction extends UpdateAction {
try { try {
Desktop.getDesktop().browse(new URI(url)); Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -66,7 +66,7 @@ public class ForumAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Forum"); return com.fr.design.i18n.Toolkit.i18nText("Forum");
} }
@Override @Override

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

@ -7,7 +7,7 @@ package com.fr.design.actions.help;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -37,7 +37,7 @@ public class SupportQQAction extends UpdateAction {
try { try {
Desktop.getDesktop().browse(new URI(ProductConstants.SUPPORT_QQ)); Desktop.getDesktop().browse(new URI(ProductConstants.SUPPORT_QQ));
} catch (IOException exp) { } catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) { } catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -52,7 +52,7 @@ public class SupportQQAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Support_QQ"); return com.fr.design.i18n.Toolkit.i18nText("Support_QQ");
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java

@ -12,7 +12,7 @@ import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel; import javax.swing.table.TableColumnModel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
public class SystemInfoPane extends JPanel { public class SystemInfoPane extends JPanel {
@ -25,8 +25,8 @@ public class SystemInfoPane extends JPanel {
return false; return false;
} }
}; };
tableModel.addColumn(Inter.getLocText("Property")); tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Property"));
tableModel.addColumn(Inter.getLocText("Value")); tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Value"));
Properties properties = System.getProperties(); Properties properties = System.getProperties();
Object[] keys = new Object[properties.size()]; Object[] keys = new Object[properties.size()];

74
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -1,24 +1,28 @@
package com.fr.design.actions.help; package com.fr.design.actions.help;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.Inter; import com.fr.general.http.HttpToolbox;
import com.fr.general.http.HttpClient; import com.fr.stable.CommonUtils;
import com.fr.stable.OperatingSystem; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.StatusLine;
import com.fr.third.org.apache.http.client.methods.HttpGet;
import javax.swing.KeyStroke;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.net.URI;
public class TutorialAction extends UpdateAction { public class TutorialAction extends UpdateAction {
@ -56,28 +60,44 @@ public class TutorialAction extends UpdateAction {
* @param evt 事件 * @param evt 事件
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
String helpURL = CloudCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale()); String helpURL = CloudCenter.getInstance().acquireUrlByKind(createDocKey());
if (isServerOnline(helpURL)) {
if (helpURL != null) { try {
HttpClient client = new HttpClient(helpURL); Desktop.getDesktop().browse(new URI(helpURL));
if(client.getResponseCode() != -1) { return;
try { } catch (Exception e) {
Desktop.getDesktop().browse(new URI(helpURL));
return;
} catch (Exception e) {
//出了异常的话, 依然打开本地教程
}
} }
} }
if (OperatingSystem.isMacOS()) { if (OperatingSystem.isUnix()) {
nativeExcuteMacInstallHomePrograms("helptutorial.app"); nativeExcuteMacInstallHomePrograms("helptutorial.app");
} } else {
else {
Utils.nativeExcuteInstallHomePrograms("helptutorial.exe"); Utils.nativeExcuteInstallHomePrograms("helptutorial.exe");
} }
} }
// 生成帮助文档 sitecenter key, help.zh_CN.10
protected String createDocKey() {
String locale = FRContext.getLocale().toString();
return CommonUtils.join(new String[]{ "help", locale, ProductConstants.MAIN_VERSION }, ".");
}
// 判断是否可以访问在线文档
protected boolean isServerOnline(String url) {
if (StringUtils.isEmpty(url)) {
return false;
}
HttpGet getHelp = new HttpGet(url);
try {
StatusLine statusLine = HttpToolbox.getHttpClient(url).execute(getHelp).getStatusLine();
return statusLine.getStatusCode() == HttpStatus.SC_OK;
} catch (Exception ignore) {
// 网络异常
return false;
}
}
public static final MenuKeySet HELP_TUTORIAL = new MenuKeySet() { public static final MenuKeySet HELP_TUTORIAL = new MenuKeySet() {
@Override @Override
public char getMnemonic() { public char getMnemonic() {
@ -86,7 +106,7 @@ public class TutorialAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_HELP"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP");
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java

@ -3,7 +3,7 @@ package com.fr.design.actions.help;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.start.ServerStarter; import com.fr.start.ServerStarter;
import javax.swing.*; import javax.swing.*;
@ -34,7 +34,7 @@ public class WebDemoAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Product_Demo"); return com.fr.design.i18n.Toolkit.i18nText("FR-Product_Demo");
} }
@Override @Override

30
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java

@ -8,7 +8,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import javax.swing.*; import javax.swing.*;
@ -87,28 +87,28 @@ public class AlphaFineConfigPane extends BasicPane {
double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP}; double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP};
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_SearchRange")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_SearchRange"));
isContainRecommendCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_Recommend")); isContainRecommendCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Recommend"));
isContainActionCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Set")); isContainActionCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set"));
isContainPluginCheckbox = new UICheckBox(Inter.getLocText("FR-Designer-Plugin_Addon")); isContainPluginCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Addon"));
isContainDocumentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_COMMUNITY_HELP")); isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP"));
isContainTemplateCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates")); isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates"));
isContainFileContentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates_Content")); isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates_Content"));
JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize); JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize);
northPane.add(searchConfigPane); northPane.add(searchConfigPane);
contentPane.add(northPane); contentPane.add(northPane);
} }
private void createShortcutsPane(JPanel contentPane) { private void createShortcutsPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Shortcut_Config")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Shortcut_Config"));
shortcutsField = new UITextField(); shortcutsField = new UITextField();
shortcutsField.setEditable(false); shortcutsField.setEditable(false);
shortcutsField.selectAll(); shortcutsField.selectAll();
shortcutsField.setPreferredSize(new Dimension(100, 20)); shortcutsField.setPreferredSize(new Dimension(100, 20));
initFieldListener(); initFieldListener();
northPane.add(new UILabel(Inter.getLocText("FR-Designer_Open") + ":")); northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Open") + ":"));
northPane.add(shortcutsField); northPane.add(shortcutsField);
UILabel label = new UILabel(Inter.getLocText("FR-Designer-AlphaFine_SetShortcuts")); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-AlphaFine_SetShortcuts"));
label.setForeground(Color.RED); label.setForeground(Color.RED);
northPane.add(label); northPane.add(label);
contentPane.add(northPane); contentPane.add(northPane);
@ -138,8 +138,8 @@ public class AlphaFineConfigPane extends BasicPane {
} }
private void createOnlinePane(JPanel contentPane) { private void createOnlinePane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_EnableInternet")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableInternet"));
isSearchOnlineCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableInternetSearch")); isSearchOnlineCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableInternetSearch"));
isSearchOnlineCheckbox.addActionListener(new ActionListener() { isSearchOnlineCheckbox.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -162,8 +162,8 @@ public class AlphaFineConfigPane extends BasicPane {
} }
private void createOpenPane(JPanel contentPane) { private void createOpenPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Enable")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Enable"));
isEnabledCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableAlphaFine")); isEnabledCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableAlphaFine"));
northPane.add(isEnabledCheckbox); northPane.add(isEnabledCheckbox);
contentPane.add(northPane); contentPane.add(northPane);
} }

4
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java

@ -4,7 +4,7 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -67,7 +67,7 @@ public class RemindPane extends JPanel {
} }
}); });
noRemindLabel = new UILabel(Inter.getLocText("FR-Designer-Alphafine_No_Remind")); noRemindLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Alphafine_No_Remind"));
noRemindLabel.setFont(MEDIUM_FONT); noRemindLabel.setFont(MEDIUM_FONT);
noRemindLabel.setForeground(Color.WHITE); noRemindLabel.setForeground(Color.WHITE);
checkLabel = new UILabel(); checkLabel = new UILabel();

19
designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java

@ -8,18 +8,17 @@ import com.fr.design.data.datapane.connect.ConnectionShowPane;
import com.fr.design.data.datapane.connect.DatabaseConnectionPane; import com.fr.design.data.datapane.connect.DatabaseConnectionPane;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.NameInspector;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory;
import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
import javax.swing.KeyStroke; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.Map; import java.util.Map;
@ -44,7 +43,7 @@ public class ConnectionListAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Server-Define_Data_Connection"); return com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection");
} }
@Override @Override
@ -130,17 +129,9 @@ public class ConnectionListAction extends UpdateAction {
*/ */
public static int isConnectionMapContainsRename(ConnectionConfig datasourceManager) { public static int isConnectionMapContainsRename(ConnectionConfig datasourceManager) {
Map<String, Connection> tableDataMap = datasourceManager.getConnections(); Map<String, Connection> tableDataMap = datasourceManager.getConnections();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!"; if (tableDataMap.containsKey(NameInspector.ILLEGAL_NAME_HOLDER)) {
if (tableDataMap.containsKey(rename)) { return datasourceManager.getConnectionIndex(NameInspector.ILLEGAL_NAME_HOLDER);
return datasourceManager.getConnectionIndex(rename);
} }
//todo 这边同上面和远程修改数据集属性有关先屏蔽
// for (int i = tableDataRenameIndex; i >= 1; i--) {
// rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + i + "!";
// if (nameTableDataMap.map.containsKey(rename)) {
// return nameTableDataMap.map.indexOf(rename);
// }
// }
return -1; return -1;
} }

4
designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java

@ -13,7 +13,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.file.FunctionConfig; import com.fr.file.FunctionConfig;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.Worker; import com.fr.transaction.Worker;
@ -76,7 +76,7 @@ public class FunctionManagerAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Server-Function_Manager"); return com.fr.design.i18n.Toolkit.i18nText("M_Server-Function_Manager");
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java

@ -14,7 +14,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.design.parameter.ParameterManagerPane; import com.fr.design.parameter.ParameterManagerPane;
import com.fr.general.Inter;
import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
@ -83,7 +83,7 @@ public class GlobalParameterAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Server-Global_Parameters"); return com.fr.design.i18n.Toolkit.i18nText("M_Server-Global_Parameters");
} }
@Override @Override

25
designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java

@ -14,12 +14,13 @@ import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.data.tabledata.tabledatapane.TableDataManagerPane; import com.fr.design.data.tabledata.tabledatapane.TableDataManagerPane;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.NameInspector;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.file.ProcedureConfig; import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
@ -52,7 +53,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("DS-Server_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData");
} }
@Override @Override
@ -128,14 +129,6 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
globalTableDataDialog.setVisible(true); globalTableDataDialog.setVisible(true);
} }
/**
* 是否正常更新完datasourceManager
*
* @param datasourceManager
* @param tableDataManagerPane
* @param databaseListDialog
* @return
*/
private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) { private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) {
boolean isFailed = false; boolean isFailed = false;
// //
@ -156,17 +149,9 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
*/ */
public int isTableDataMapContainsRename(TableDataConfig datasourceManager) { public int isTableDataMapContainsRename(TableDataConfig datasourceManager) {
Map<String, TableData> tableDataMap = datasourceManager.getTableDatas(); Map<String, TableData> tableDataMap = datasourceManager.getTableDatas();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!"; if (tableDataMap.containsKey(NameInspector.ILLEGAL_NAME_HOLDER)) {
if (tableDataMap.containsKey(rename)) { return datasourceManager.getTableDataIndex(NameInspector.ILLEGAL_NAME_HOLDER);
return datasourceManager.getTableDataIndex(rename);
} }
//todo 这边同上面和远程修改数据集属性有关先屏蔽
// for (int i = tableDataRenameIndex; i >= 1; i--) {
// rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + i + "!";
// if (nameTableDataMap.map.containsKey(rename)) {
// return nameTableDataMap.map.indexOf(rename);
// }
// }
return -1; return -1;
} }

4
designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -33,7 +33,7 @@ public class PlatformManagerAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Server-Platform_Manager"); return com.fr.design.i18n.Toolkit.i18nText("M_Server-Platform_Manager");
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java

@ -4,7 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.extra.WebViewDlgHelper; import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -36,7 +36,7 @@ public class PluginManagerAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("FR-Designer-Plugin_Manager"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Manager");
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java

@ -11,7 +11,7 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.file.ProcedureConfig; import com.fr.file.ProcedureConfig;
import com.fr.general.Inter;
import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
@ -20,7 +20,7 @@ import java.awt.event.ActionEvent;
public class ProcedureListAction extends UpdateAction { public class ProcedureListAction extends UpdateAction {
public ProcedureListAction() { public ProcedureListAction() {
this.setName(Inter.getLocText("Datasource-Stored_Procedure") + "(P)" + "..."); this.setName(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure") + "(P)" + "...");
this.setMnemonic('P'); this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png"));
} }

6
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -8,7 +8,7 @@ import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.Dimension; import java.awt.Dimension;
@ -35,14 +35,14 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
JPanel propertyChangePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel propertyChangePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(propertyChangePane); this.add(propertyChangePane);
propertyChangePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property") + ":", null)); propertyChangePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Property") + ":", null));
// 选择要改变的属性. // 选择要改变的属性.
JPanel addItemPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel addItemPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
ToolBarDef toolbarDef = new ToolBarDef(); ToolBarDef toolbarDef = new ToolBarDef();
menuDef = new CellHighlightAddMenuDef(); menuDef = new CellHighlightAddMenuDef();
menuDef.setName(Inter.getLocText("Highlight-Click_to_Choose_Property_To_Modify")); menuDef.setName(com.fr.design.i18n.Toolkit.i18nText("Highlight-Click_to_Choose_Property_To_Modify"));
menuDef.setIconPath("com/fr/design/images/control/addPopup.png"); menuDef.setIconPath("com/fr/design/images/control/addPopup.png");
toolbarDef.addShortCut(menuDef); toolbarDef.addShortCut(menuDef);

4
designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java

@ -32,7 +32,7 @@ import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.ColumnIndexEditor; import com.fr.design.editor.editor.ColumnIndexEditor;
import com.fr.design.editor.editor.ColumnNameEditor; import com.fr.design.editor.editor.ColumnNameEditor;
import com.fr.design.editor.editor.Editor; import com.fr.design.editor.editor.Editor;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -121,7 +121,7 @@ public class DSColumnLiteConditionPane extends LiteConditionPane<CommonCondition
keyColumnPane.setPreferredSize(new Dimension(175, keyColumnPane.getPreferredSize().height)); keyColumnPane.setPreferredSize(new Dimension(175, keyColumnPane.getPreferredSize().height));
conditionOPComboBox.setPreferredSize(new Dimension(80, 20)); conditionOPComboBox.setPreferredSize(new Dimension(80, 20));
Component[][] components = { Component[][] components = {
{ new UILabel(Inter.getLocText("Utils-Available_Columns") + ":"), new UILabel(Inter.getLocText("FR-ConditionB_Operator") + ":"), { new UILabel(com.fr.design.i18n.Toolkit.i18nText("Utils-Available_Columns") + ":"), new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-ConditionB_Operator") + ":"),
new UILabel() }, { keyColumnPane, conditionOPComboBox, conditionValuePane } }; new UILabel() }, { keyColumnPane, conditionOPComboBox, conditionValuePane } };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

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

@ -22,7 +22,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.data.Condition; import com.fr.general.data.Condition;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -54,16 +54,16 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// peter:这两个变量在弹出公式编辑器的时候,需要用. // peter:这两个变量在弹出公式编辑器的时候,需要用.
private UIRadioButton commonRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_Common")); private UIRadioButton commonRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Common"));
private UIRadioButton formulaRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_Formula")); private UIRadioButton formulaRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula"));
private JPanel conditionCardPane; private JPanel conditionCardPane;
protected BasicBeanPane<T> defaultConditionPane; protected BasicBeanPane<T> defaultConditionPane;
// card2 // card2
private UITextArea formulaTextArea; private UITextArea formulaTextArea;
private UIButton modifyButton; private UIButton modifyButton;
private UIButton addButton; private UIButton addButton;
private UIRadioButton andRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_ConditionB-AND") + " "); private UIRadioButton andRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-AND") + " ");
private UIRadioButton orRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_ConditionB-OR")); private UIRadioButton orRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-OR"));
protected JTree conditionsTree;// Conditions protected JTree conditionsTree;// Conditions
private UIButton removeButton; private UIButton removeButton;
private UIButton moveUpButton; private UIButton moveUpButton;
@ -124,7 +124,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
boolean result = isExistedInParentTreeNode(parentTreeNode, newJoinCondition); boolean result = isExistedInParentTreeNode(parentTreeNode, newJoinCondition);
if (result) { if (result) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this), JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
Inter.getLocText("BindColumn-This_Condition_has_been_existed")); com.fr.design.i18n.Toolkit.i18nText("BindColumn-This_Condition_has_been_existed"));
return; return;
} }
@ -223,7 +223,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
} }
int returnVal = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this), int returnVal = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + "?", Inter.getLocText("FR-Designer_Remove"), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"),
JOptionPane.OK_CANCEL_OPTION); JOptionPane.OK_CANCEL_OPTION);
if (returnVal == JOptionPane.OK_OPTION) { if (returnVal == JOptionPane.OK_OPTION) {
DefaultTreeModel treeModel = (DefaultTreeModel) conditionsTree.getModel(); DefaultTreeModel treeModel = (DefaultTreeModel) conditionsTree.getModel();
@ -447,30 +447,30 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private void initButtonPane(JPanel buttonPane) { private void initButtonPane(JPanel buttonPane) {
removeButton = new UIButton(Inter.getLocText("FR-Designer_Remove")); removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
buttonPane.add(removeButton); buttonPane.add(removeButton);
removeButton.setIcon(BaseUtils.readIcon("com/fr/base/images/cell/control/remove.png")); removeButton.setIcon(BaseUtils.readIcon("com/fr/base/images/cell/control/remove.png"));
removeButton.setEnabled(false); removeButton.setEnabled(false);
removeButton.addActionListener(actionListener3); removeButton.addActionListener(actionListener3);
moveUpButton = new UIButton(Inter.getLocText("Utils-Move_Up")); moveUpButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
buttonPane.add(moveUpButton); buttonPane.add(moveUpButton);
moveUpButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/up.png")); moveUpButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/up.png"));
moveUpButton.addActionListener(actionListener4); moveUpButton.addActionListener(actionListener4);
moveDownButton = new UIButton(Inter.getLocText("Utils-Move_Down")); moveDownButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
buttonPane.add(moveDownButton); buttonPane.add(moveDownButton);
moveDownButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/down.png")); moveDownButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/down.png"));
moveDownButton.addActionListener(actionListener5); moveDownButton.addActionListener(actionListener5);
// peter:加括号 // peter:加括号
bracketButton = new UIButton(Inter.getLocText("ConditionB-Add_bracket")); bracketButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("ConditionB-Add_bracket"));
buttonPane.add(bracketButton); buttonPane.add(bracketButton);
bracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/bracket.png")); bracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/bracket.png"));
bracketButton.addActionListener(actionListener6); bracketButton.addActionListener(actionListener6);
// peter:去掉括号 // peter:去掉括号
unBracketButton = new UIButton(Inter.getLocText("ConditionB-Remove_bracket")); unBracketButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("ConditionB-Remove_bracket"));
buttonPane.add(unBracketButton); buttonPane.add(unBracketButton);
unBracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/unBracket.png")); unBracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/unBracket.png"));
unBracketButton.addActionListener(actionListener7); unBracketButton.addActionListener(actionListener7);
@ -492,7 +492,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
this.add(conditonTypePane, BorderLayout.NORTH); this.add(conditonTypePane, BorderLayout.NORTH);
conditonTypePane.setBorder(new ModLineBorder(ModLineBorder.BOTTOM)); conditonTypePane.setBorder(new ModLineBorder(ModLineBorder.BOTTOM));
UILabel conditionTypeLabel = new UILabel(Inter.getLocText("FR-Designer_Type") + ":"); UILabel conditionTypeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Type") + ":");
conditonTypePane.add(conditionTypeLabel, BorderLayout.WEST); conditonTypePane.add(conditionTypeLabel, BorderLayout.WEST);
conditionTypeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, DOWN_PADDING, 0)); conditionTypeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, DOWN_PADDING, 0));
@ -530,10 +530,10 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
formulaPane.setPreferredSize(new Dimension(450, 40)); formulaPane.setPreferredSize(new Dimension(450, 40));
formulaConditionPane.add(formulaPane, BorderLayout.CENTER); formulaConditionPane.add(formulaPane, BorderLayout.CENTER);
formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2)); formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2));
formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST); formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);
formulaTextArea = new UITextArea(); formulaTextArea = new UITextArea();
formulaPane.add(new JScrollPane(formulaTextArea), BorderLayout.CENTER); formulaPane.add(new JScrollPane(formulaTextArea), BorderLayout.CENTER);
UIButton editFormulaButton = new UIButton(Inter.getLocText("FR-Designer_LiteCondition_Define")); UIButton editFormulaButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Define"));
formulaPane.add(GUICoreUtils.createBorderPane(editFormulaButton, BorderLayout.NORTH), BorderLayout.EAST); formulaPane.add(GUICoreUtils.createBorderPane(editFormulaButton, BorderLayout.NORTH), BorderLayout.EAST);
editFormulaButton.addActionListener(actionListener1); editFormulaButton.addActionListener(actionListener1);
applyCardsPane(); applyCardsPane();
@ -564,14 +564,14 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
addControlPane.add(Box.createHorizontalStrut(STRUT_ONE)); addControlPane.add(Box.createHorizontalStrut(STRUT_ONE));
addButton = new UIButton(Inter.getLocText("FR-Designer_Add"), BaseUtils.readIcon("com/fr/base/images/cell/control/add.png")); addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"), BaseUtils.readIcon("com/fr/base/images/cell/control/add.png"));
addButton.setMnemonic('A'); addButton.setMnemonic('A');
addControlPane.add(addButton); addControlPane.add(addButton);
addButton.addActionListener(actionListener2); addButton.addActionListener(actionListener2);
addControlPane.add(Box.createHorizontalStrut(STRUT_TWO)); addControlPane.add(Box.createHorizontalStrut(STRUT_TWO));
modifyButton = new UIButton(Inter.getLocText("FR-Designer_Modify"), BaseUtils.readIcon("com/fr/base/images/cell/control/rename.png")); modifyButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Modify"), BaseUtils.readIcon("com/fr/base/images/cell/control/rename.png"));
modifyButton.setMnemonic('M'); modifyButton.setMnemonic('M');
addControlPane.add(modifyButton); addControlPane.add(modifyButton);
modifyButton.addActionListener(actionListener8); modifyButton.addActionListener(actionListener8);
@ -583,7 +583,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer-Submit_Condition"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Submit_Condition");
} }
// samuel:移出来,方便调用 // samuel:移出来,方便调用
@ -654,10 +654,10 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private void applyCardsPane() { private void applyCardsPane() {
CardLayout cl = (CardLayout) (conditionCardPane.getLayout()); CardLayout cl = (CardLayout) (conditionCardPane.getLayout());
if (this.commonRadioButton.isSelected()) { if (this.commonRadioButton.isSelected()) {
this.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_LiteCondition_Common_Condition"), null)); this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Common_Condition"), null));
cl.show(conditionCardPane, "DEFAULT"); cl.show(conditionCardPane, "DEFAULT");
} else { } else {
this.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_LiteCondition_Formula_Condition"), null)); this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula_Condition"), null));
cl.show(conditionCardPane, "FORMULA"); cl.show(conditionCardPane, "FORMULA");
} }
} }

4
designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java

@ -19,7 +19,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition> { public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition> {
@ -79,7 +79,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPane(); conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPane();
Component[][] components = { { new UILabel(Inter.getLocText("FR-Designer_ConditionB-Operator") + ":"), new UILabel() }, Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_ConditionB-Operator") + ":"), new UILabel() },
{ conditionOPComboBox, conditionValuePane } }; { conditionOPComboBox, conditionValuePane } };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

4
designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java

@ -9,7 +9,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
public abstract class SingleConditionPane<T> extends BasicPane { public abstract class SingleConditionPane<T> extends BasicPane {
private static final long serialVersionUID = -4274960170813368817L; private static final long serialVersionUID = -4274960170813368817L;
@ -26,7 +26,7 @@ public abstract class SingleConditionPane<T> extends BasicPane {
if(cancel == null) { if(cancel == null) {
cancel = new UIButton(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png")); cancel = new UIButton(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
cancel.setToolTipText(Inter.getLocText("FR-Action_Remove")); cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Action_Remove"));
cancel.addActionListener(cancleListener); cancel.addActionListener(cancleListener);
cancel.setMargin(new Insets(0, 0, 0, 0)); cancel.setMargin(new Insets(0, 0, 0, 0));
} }

6
designer-base/src/main/java/com/fr/design/constants/UIConstants.java

@ -4,7 +4,7 @@
package com.fr.design.constants; package com.fr.design.constants;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.general.Inter;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import javax.swing.*; import javax.swing.*;
@ -219,7 +219,7 @@ public interface UIConstants {
@Override @Override
public String toString() { public String toString() {
return Inter.getLocText("Loading") + "..."; return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Loading") + "...";
} }
}; };
/** /**
@ -228,7 +228,7 @@ public interface UIConstants {
public static final Object CONNECTION_FAILED = new Object() { public static final Object CONNECTION_FAILED = new Object() {
public String toString() { public String toString() {
return Inter.getLocText(new String[]{"Database", "Datasource-Connection_failed"}) + "!"; return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed") + "!";
} }
}; };

28
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.data.api.StoreProcedureAssist;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -26,7 +27,6 @@ import com.fr.design.mainframe.DockingView;
import com.fr.design.menu.LineSeparator; import com.fr.design.menu.LineSeparator;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -36,7 +36,11 @@ import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.tree.TreeCellEditor; import javax.swing.tree.TreeCellEditor;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.ActionEvent;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.EventObject; import java.util.EventObject;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -75,7 +79,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/ */
@Override @Override
public String getViewTitle() { public String getViewTitle() {
return Inter.getLocText("FR-Designer_TableData"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableData");
} }
/** /**
@ -117,18 +121,14 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
dg.setButtonEnabled(true); dg.setButtonEnabled(true);
String tempName = nPanel.getObjectName(); String tempName = nPanel.getObjectName();
if (StringUtils.isBlank(tempName)) { if (StringUtils.isBlank(tempName)) {
nPanel.setShowText(Inter.getLocText(new String[]{"DS-TableData", "ISEMPTY", "PLEASE", "GIVE-NAME"}, new String[]{"", ",", "", "!"})); nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Table_Data_Empty_Name_Tips"));
dg.setButtonEnabled(false); dg.setButtonEnabled(false);
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) { } else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) {
String[] waring = new String[]{"DS-TableData", "Utils-has_been_existed", "PLEASE", "Rename"}; nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", tempName));
String[] sign = new String[]{tempName, ",", "", "!"};
nPanel.setShowText(Inter.getLocText(waring, sign));
dg.setButtonEnabled(false); dg.setButtonEnabled(false);
} else if (isProcedureName(oldName)) { } else if (isProcedureName(oldName)) {
if (isIncludeUnderline(tempName)) { if (isIncludeUnderline(tempName)) {
String[] datasource_underline = new String[]{"Datasource-Stored_Procedure", "Name", "can_not_include_underline"}; nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Stored_Procedure_Name_Tips"));
String[] sign = new String[]{"", "", "!"};
nPanel.setShowText(Inter.getLocText(datasource_underline, sign));
dg.setButtonEnabled(false); dg.setButtonEnabled(false);
} }
} else { } else {
@ -138,12 +138,12 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
} }
private boolean isProcedureName(String oldName) { private boolean isProcedureName(String oldName) {
return oldName.length() >= PROCEDURE_NAME_INDEX && ComparatorUtils.equals(type, Inter.getLocText("Datasource-Stored_Procedure")); return oldName.length() >= PROCEDURE_NAME_INDEX && ComparatorUtils.equals(type, com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"));
} }
private boolean isIncludeUnderline(String name) { private boolean isIncludeUnderline(String name) {
return ComparatorUtils.equals(name.indexOf(StoreProcedure.SPLIT), -1) ? false : true; return ComparatorUtils.equals(name.indexOf(StoreProcedureAssist.GROUP_MARKER), -1) ? false : true;
} }
public abstract TableDataTree getDataTree(); public abstract TableDataTree getDataTree();
@ -383,7 +383,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
private TableDataTree dataTree; private TableDataTree dataTree;
public PreviewTableDataAction(TableDataTree dataTree) { public PreviewTableDataAction(TableDataTree dataTree) {
this.setName(Inter.getLocText("FR-Designer_Preview")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
this.setMnemonic('p'); this.setMnemonic('p');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.PREVIEW_ICON_PATH)); this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.PREVIEW_ICON_PATH));
this.dataTree = dataTree; this.dataTree = dataTree;
@ -422,7 +422,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
protected class ConnectionTableAction extends com.fr.design.actions.server.ConnectionListAction { protected class ConnectionTableAction extends com.fr.design.actions.server.ConnectionListAction {
public ConnectionTableAction() { public ConnectionTableAction() {
this.setName(Inter.getLocText("Server-Define_Data_Connection")); this.setName(com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection"));
this.setMnemonic('D'); this.setMnemonic('D');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_CONNECTION_ICON_PATH)); this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_CONNECTION_ICON_PATH));
} }

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

@ -33,7 +33,7 @@ import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -208,9 +208,9 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} }
protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) { protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) {
UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database") + ":"); UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database") + ":");
UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model") + ":"); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model") + ":");
UILabel l3 = new UILabel(Inter.getLocText("FR-Designer_Table") + ":"); UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Table") + ":");
if (labelSize > 0) { if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 25); Dimension pSize = new Dimension(labelSize, 25);
@ -248,7 +248,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
@Override @Override
protected com.fr.data.impl.Connection doInBackground() { protected com.fr.data.impl.Connection doInBackground() {
schemaBox.setRefreshingModel(true); schemaBox.setRefreshingModel(true);
schemaBox.addItem(Inter.getLocText("FR-Designer_Loading") + "..."); schemaBox.addItem(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Loading") + "...");
schemaBox.setSelectedItem(null); schemaBox.setSelectedItem(null);
schemaBox.setRefreshingModel(false); schemaBox.setRefreshingModel(false);
return getConnection(); return getConnection();
@ -327,7 +327,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
DBUtils.refreshDatabase(); DBUtils.refreshDatabase();
String schema = StringUtils.isEmpty(schemaBox.getSelectedItem()) ? null : schemaBox.getSelectedItem(); String schema = StringUtils.isEmpty(schemaBox.getSelectedItem()) ? null : schemaBox.getSelectedItem();
DataCoreUtils.refreshTables(getConnection(), TableProcedure.TABLE, schema); DataCoreUtils.refreshTables(getConnection(), TableProcedure.TABLE, schema);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Refresh_Successfully") + "!", Inter.getLocText("FR-Designer_Refresh_Database"), JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh_Successfully") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh_Database"),
JOptionPane.INFORMATION_MESSAGE); JOptionPane.INFORMATION_MESSAGE);
} }
@ -405,7 +405,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
String schema = StringUtils.isEmpty(this.schemaBox.getSelectedItem()) ? null : this.schemaBox.getSelectedItem(); String schema = StringUtils.isEmpty(this.schemaBox.getSelectedItem()) ? null : this.schemaBox.getSelectedItem();
TableProcedure[] sqlTableArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.TABLE, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace()); TableProcedure[] sqlTableArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.TABLE, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace());
if (sqlTableArray.length > 0) { if (sqlTableArray.length > 0) {
ExpandMutableTreeNode tableTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + Inter.getLocText("FR-Designer_SQL-Table")); ExpandMutableTreeNode tableTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"));
rootTreeNode.add(tableTreeNode); rootTreeNode.add(tableTreeNode);
for (int i = 0; i < sqlTableArray.length; i++) { for (int i = 0; i < sqlTableArray.length; i++) {
ExpandMutableTreeNode tableChildTreeNode = new ExpandMutableTreeNode(sqlTableArray[i]); ExpandMutableTreeNode tableChildTreeNode = new ExpandMutableTreeNode(sqlTableArray[i]);
@ -414,7 +414,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} }
TableProcedure[] sqlViewArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.VIEW, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace()); TableProcedure[] sqlViewArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.VIEW, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace());
if (sqlViewArray.length > 0) { if (sqlViewArray.length > 0) {
ExpandMutableTreeNode viewTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + Inter.getLocText("FR-Designer_SQL-View")); ExpandMutableTreeNode viewTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"));
rootTreeNode.add(viewTreeNode); rootTreeNode.add(viewTreeNode);
for (int i = 0; i < sqlViewArray.length; i++) { for (int i = 0; i < sqlViewArray.length; i++) {
ExpandMutableTreeNode viewChildTreeNode = new ExpandMutableTreeNode(sqlViewArray[i]); ExpandMutableTreeNode viewChildTreeNode = new ExpandMutableTreeNode(sqlViewArray[i]);
@ -455,8 +455,8 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} }
if (!connect) { if (!connect) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
JOptionPane.showMessageDialog(designerFrame, Inter.getLocText("Datasource-Connection_failed"), JOptionPane.showMessageDialog(designerFrame, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"),
Inter.getLocText("FR-Designer_Failed"), JOptionPane.INFORMATION_MESSAGE); com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Failed"), JOptionPane.INFORMATION_MESSAGE);
failedToFindTable(); failedToFindTable();
return null; return null;
} }

4
designer-base/src/main/java/com/fr/design/data/datapane/EditOrNewLabel.java

@ -7,7 +7,7 @@ import javax.swing.JPanel;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.data.datapane.FlashLookLabelMouseAdapter.ReleaseAction; import com.fr.design.data.datapane.FlashLookLabelMouseAdapter.ReleaseAction;
import com.fr.general.Inter;
public class EditOrNewLabel extends UILabel { public class EditOrNewLabel extends UILabel {
@ -16,7 +16,7 @@ public class EditOrNewLabel extends UILabel {
public EditOrNewLabel(Editable editable, JPanel editPane) { public EditOrNewLabel(Editable editable, JPanel editPane) {
super(BaseUtils.readIcon("/com/fr/design/images/m_file/edit.png")); super(BaseUtils.readIcon("/com/fr/design/images/m_file/edit.png"));
this.setToolTipText(Inter.getLocText("Edit")); this.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Edit"));
this.setCursor(new Cursor(Cursor.HAND_CURSOR)); this.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.editable = editable; this.editable = editable;
this.editTablePane = editPane; this.editTablePane = editPane;

4
designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java

@ -7,7 +7,7 @@ import java.awt.event.ActionListener;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.general.Inter;
@ -19,7 +19,7 @@ public class RefreshLabel extends UIButton {
this.refreshable = refreshable; this.refreshable = refreshable;
this.setToolTipText(Inter.getLocText("Refresh_Database")); this.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Refresh_Database"));
this.setCursor(new Cursor(Cursor.HAND_CURSOR)); this.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.addActionListener(new ActionListener() { this.addActionListener(new ActionListener() {

4
designer-base/src/main/java/com/fr/design/data/datapane/ReportTableDataPane.java

@ -7,7 +7,7 @@ import com.fr.data.TableDataSource;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -36,7 +36,7 @@ public class ReportTableDataPane extends LoadingBasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Report_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Report_TableData");
} }
public void populate(TableDataSource tds) { public void populate(TableDataSource tds) {

31
designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java

@ -8,8 +8,7 @@ import com.fr.data.impl.*;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.tabledata.tabledatapane.*; import com.fr.design.data.tabledata.tabledatapane.*;
import com.fr.design.fun.TableDataCreatorProvider;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import java.util.ArrayList; import java.util.ArrayList;
@ -32,32 +31,32 @@ public class TableDataCreatorProducer {
} }
public TableDataNameObjectCreator[] createReportTableDataCreator() { public TableDataNameObjectCreator[] createReportTableDataCreator() {
TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(Inter.getLocText("DS-Database_Query"), TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("DS-Database_Query"),
"ds", "ds",
"/com/fr/design/images/data/database.png", DBTableData.class, DBTableDataPane.class); "/com/fr/design/images/data/database.png", DBTableData.class, DBTableDataPane.class);
TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(Inter.getLocText("DS-Class"), TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Class"),
"/com/fr/design/images/data/source/classTableData.png", ClassTableData.class, ClassTableDataPane.class); "/com/fr/design/images/data/source/classTableData.png", ClassTableData.class, ClassTableDataPane.class);
TableDataNameObjectCreator table = new TableDataNameObjectCreator(Inter.getLocText("DS-Embedded_TableData"), TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Embedded"),
"Embedded", "Embedded",
"/com/fr/design/images/data/dataTable.png", EmbeddedTableData.class, EmbeddedTableDataPane.class); "/com/fr/design/images/data/dataTable.png", EmbeddedTableData.class, EmbeddedTableDataPane.class);
TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(Inter.getLocText("DS-Relation_TableData"), TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Relation"),
"Multi", "Multi",
"/com/fr/design/images/data/multi.png", ConditionTableData.class, MultiTDTableDataPane.class) { "/com/fr/design/images/data/multi.png", ConditionTableData.class, MultiTDTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { public boolean isNeedParameterWhenPopulateJControlPane() {
return true; return true;
} }
}; };
TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(Inter.getLocText(new String[]{"File", "DS-TableData"}), TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_File"),
"File", "File",
"/com/fr/design/images/data/file.png", FileTableData.class, FileTableDataSmallHeightPane.class); "/com/fr/design/images/data/file.png", FileTableData.class, FileTableDataSmallHeightPane.class);
TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(Inter.getLocText(new String[]{"Tree", "DS-TableData"}), TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Tree"),
"Tree", "Tree",
"/com/fr/design/images/data/tree.png", RecursionTableData.class, TreeTableDataPane.class) { "/com/fr/design/images/data/tree.png", RecursionTableData.class, TreeTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { public boolean isNeedParameterWhenPopulateJControlPane() {
return true; return true;
} }
}; };
TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(Inter.getLocText("Datasource-Stored_Procedure"), TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"),
"Proc", "Proc",
"/com/fr/design/images/data/store_procedure.png", "/com/fr/design/images/data/store_procedure.png",
StoreProcedure.class, ProcedureDataPane.class) { StoreProcedure.class, ProcedureDataPane.class) {
@ -70,28 +69,28 @@ public class TableDataCreatorProducer {
} }
public TableDataNameObjectCreator[] createServerTableDataCreator() { public TableDataNameObjectCreator[] createServerTableDataCreator() {
TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(Inter.getLocText("DS-Database_Query"), "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class, TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Database_Query"), "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class,
DBTableDataPane.class); DBTableDataPane.class);
TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(Inter.getLocText("DS-Class"), "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class, TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Class"), "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class,
ClassTableDataPane.class); ClassTableDataPane.class);
TableDataNameObjectCreator table = new TableDataNameObjectCreator(Inter.getLocText("DS-Embedded_TableData"), "/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class, TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Embedded"), "/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class,
EmbeddedTableDataPane.class); EmbeddedTableDataPane.class);
TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(Inter.getLocText(new String[]{"File", "DS-TableData"}), "/com/fr/design/images/data/file.png", FileTableData.class, TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_File"), "/com/fr/design/images/data/file.png", FileTableData.class,
FileTableDataSmallPane.class); FileTableDataSmallPane.class);
TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(Inter.getLocText(new String[]{"Tree", "DS-TableData"}), "/com/fr/design/images/data/tree.png", TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Tree"), "/com/fr/design/images/data/tree.png",
RecursionTableData.class, GlobalTreeTableDataPane.class) { RecursionTableData.class, GlobalTreeTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { public boolean isNeedParameterWhenPopulateJControlPane() {
return true; return true;
} }
}; };
TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(Inter.getLocText("DS-Relation_TableData"), "/com/fr/design/images/data/multi.png", TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Relation"), "/com/fr/design/images/data/multi.png",
ConditionTableData.class, GlobalMultiTDTableDataPane.class) { ConditionTableData.class, GlobalMultiTDTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { public boolean isNeedParameterWhenPopulateJControlPane() {
return true; return true;
} }
}; };
TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(Inter.getLocText("Datasource-Stored_Procedure"), "/com/fr/design/images/data/store_procedure.png", TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Stored_Procedure"), "/com/fr/design/images/data/store_procedure.png",
StoreProcedure.class, ProcedureDataPane.class) { StoreProcedure.class, ProcedureDataPane.class) {
public boolean shouldInsertSeparator() { public boolean shouldInsertSeparator() {
return true; return true;

4
designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java

@ -8,7 +8,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.icon.WarningIcon; import com.fr.design.icon.WarningIcon;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -113,7 +113,7 @@ public class TableDataNameObjectCreator extends NameObjectCreator {
* @return 提示 * @return 提示
*/ */
public String createTooltip() { public String createTooltip() {
return b ? Inter.getLocText("Connect_SQL_Cannot_Null") : null; return b ? com.fr.design.i18n.Toolkit.i18nText("Connect_SQL_Cannot_Null") : null;
} }
public String getPrefix() { public String getPrefix() {

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

@ -2,22 +2,29 @@ package com.fr.design.data.datapane;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.data.api.StoreProcedureAssist;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ProcedureConfig; import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.*; import javax.swing.*;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/** /**
* TableDataList Pane. * TableDataList Pane.
@ -29,7 +36,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
public TableDataPaneListPane() { public TableDataPaneListPane() {
super(); super();
dsNameChangedMap.clear(); dsNameChangedMap.clear();
this.addEditingListner(new PropertyChangeAdapter() { this.addEditingListener(new PropertyChangeAdapter() {
@Override @Override
public void propertyChange() { public void propertyChange() {
isNamePermitted = true; isNamePermitted = true;
@ -40,30 +47,24 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
String tempName = getEditingName(); String tempName = getEditingName();
Object editingType = getEditingType(); Object editingType = getEditingType();
if (StringUtils.isEmpty(tempName)) { if (StringUtils.isEmpty(tempName)) {
String[] warning = new String[]{"NOT_NULL_Des", "Please_Rename"};
String[] sign = new String[]{",", "!"};
isNamePermitted = false; isNamePermitted = false;
nameableList.stopEditing(); nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(warning, sign)); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Table_Data_Empty_Name_Tips"));
setWarnigText(editingIndex); setIllegalIndex(editingIndex);
return; return;
} }
if (!ComparatorUtils.equals(tempName, selectedName) if (!ComparatorUtils.equals(tempName, selectedName)
&& isNameRepeted(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) { && isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) {
String[] waning = new String[]{"already_exists", "TableData", "Please_Rename"};
String[] sign = new String[]{"", tempName + ",", "!"};
isNamePermitted = false; isNamePermitted = false;
nameableList.stopEditing(); nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(waning, sign)); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", tempName));
setWarnigText(editingIndex); setIllegalIndex(editingIndex);
} else if (editingType instanceof StoreProcedure && isIncludeUnderline(tempName)) { } else if (editingType instanceof StoreProcedure && isIncludeUnderline(tempName)) {
String[] datasource_underline = new String[]{"Datasource-Stored_Procedure", "Name", "can_not_include_underline"};
String[] sign = new String[]{"", "", "!"};
isNamePermitted = false; isNamePermitted = false;
nameableList.stopEditing(); nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(datasource_underline, sign)); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Stored_Procedure_Name_Tips"));
setWarnigText(editingIndex); setIllegalIndex(editingIndex);
} }
if (nameableList.getSelectedValue() instanceof ListModelElement) { if (nameableList.getSelectedValue() instanceof ListModelElement) {
Nameable selected = ((ListModelElement) nameableList.getSelectedValue()).wrapper; Nameable selected = ((ListModelElement) nameableList.getSelectedValue()).wrapper;
@ -102,7 +103,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
} }
private boolean isIncludeUnderline(String name) { private boolean isIncludeUnderline(String name) {
return ComparatorUtils.equals(name.indexOf(StoreProcedure.SPLIT), -1) ? false : true; return ComparatorUtils.equals(name.indexOf(StoreProcedureAssist.GROUP_MARKER), -1) ? false : true;
} }
/** /**
@ -246,9 +247,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
NameObject nameObject = (NameObject) tableDataArray[i]; NameObject nameObject = (NameObject) tableDataArray[i];
if (exsitTableDataNameList.contains(nameObject.getName())) { if (exsitTableDataNameList.contains(nameObject.getName())) {
String[] waring = new String[]{"TableData", "Error_TableDataNameRepeat"}; throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", nameObject.getName()));
String[] sign = new String[]{": " + nameObject.getName()};
throw new Exception(Inter.getLocText(waring, sign));
} }
exsitTableDataNameList.add(nameObject.getName()); exsitTableDataNameList.add(nameObject.getName());

8
designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java

@ -12,7 +12,7 @@ import com.fr.design.data.tabledata.wrapper.StoreProcedureNameWrapper;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.gui.itree.refreshabletree.UserObjectOP; import com.fr.design.gui.itree.refreshabletree.UserObjectOP;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import java.util.*; import java.util.*;
@ -100,19 +100,19 @@ public class TableDataSourceOP implements UserObjectOP<TableDataWrapper> {
} }
private ExpandMutableTreeNode initTemplateDataNode(Map<String, TableDataWrapper> templateDataMap) { private ExpandMutableTreeNode initTemplateDataNode(Map<String, TableDataWrapper> templateDataMap) {
ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(Inter.getLocText("DS-TableData"), TEMPLATE_TABLE_DATA), true); ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("DS-TableData"), TEMPLATE_TABLE_DATA), true);
templateNode.addChildTreeNodes(getNodeArrayFromMap(templateDataMap)); templateNode.addChildTreeNodes(getNodeArrayFromMap(templateDataMap));
return templateNode; return templateNode;
} }
private ExpandMutableTreeNode initServerDataNode(Map<String, TableDataWrapper> serverDataMap) { private ExpandMutableTreeNode initServerDataNode(Map<String, TableDataWrapper> serverDataMap) {
ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(Inter.getLocText("DS-Server_TableData"), SERVER_TABLE_DATA), false); ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData"), SERVER_TABLE_DATA), false);
templateNode.addChildTreeNodes(getNodeArrayFromMap(serverDataMap)); templateNode.addChildTreeNodes(getNodeArrayFromMap(serverDataMap));
return templateNode; return templateNode;
} }
private ExpandMutableTreeNode initStoreProcedureNode(Map<String, TableDataWrapper> storeProcedureMap) { private ExpandMutableTreeNode initStoreProcedureNode(Map<String, TableDataWrapper> storeProcedureMap) {
ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(Inter.getLocText("Datasource-Stored_Procedure"), STORE_PRECEDURE_DATA), false); ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"), STORE_PRECEDURE_DATA), false);
templateNode.addChildTreeNodes(getNodeArrayFromMap(storeProcedureMap)); templateNode.addChildTreeNodes(getNodeArrayFromMap(storeProcedureMap));
return templateNode; return templateNode;
} }

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

@ -29,7 +29,7 @@ import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -84,7 +84,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
ToolTipManager.sharedInstance().registerComponent(dataTree); ToolTipManager.sharedInstance().registerComponent(dataTree);
ToolTipManager.sharedInstance().setDismissDelay(3000); ToolTipManager.sharedInstance().setDismissDelay(3000);
ToolTipManager.sharedInstance().setInitialDelay(0); ToolTipManager.sharedInstance().setInitialDelay(0);
addMenuDef = new MenuDef(Inter.getLocText("FR-Action_Add")); addMenuDef = new MenuDef(com.fr.design.i18n.Toolkit.i18nText("FR-Action_Add"));
addMenuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH); addMenuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH);
createAddMenuDef(); createAddMenuDef();
@ -162,7 +162,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
protected void initbuttonGroup() { protected void initbuttonGroup() {
// Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; // Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")};
final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA};
String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; String[] textArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Source_Type_Template"), com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData")};
buttonGroup = new UIHeadGroup(textArray) { buttonGroup = new UIHeadGroup(textArray) {
public void tabChanged(int index) { public void tabChanged(int index) {
if (op != null) { if (op != null) {
@ -233,7 +233,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class EditAction extends UpdateAction { private class EditAction extends UpdateAction {
public EditAction() { public EditAction() {
this.setName(Inter.getLocText("FR-Designer_Edit")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit"));
this.setMnemonic('E'); this.setMnemonic('E');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_EDIT_ICON_PATH)); this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_EDIT_ICON_PATH));
} }
@ -250,7 +250,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class RemoveAction extends UpdateAction { private class RemoveAction extends UpdateAction {
public RemoveAction() { public RemoveAction() {
this.setName(Inter.getLocText("FR-Designer_Remove")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
this.setMnemonic('R'); this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH)); this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
} }
@ -263,8 +263,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
return; return;
} }
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?", int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?",
Inter.getLocText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) { if (returnVal == JOptionPane.OK_OPTION) {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧 // richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
op.removeAction(selectedNO.getName()); op.removeAction(selectedNO.getName());

26
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java

@ -16,7 +16,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -53,7 +53,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
public TreeTableDataDictPane(String treeName) { public TreeTableDataDictPane(String treeName) {
this.setLayout(new BorderLayout(5, 30)); this.setLayout(new BorderLayout(5, 30));
this.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 0));
selectTableDataLabel = new UILabel(Inter.getLocText(new String[]{"Please_Select", "Single", "DS-TableData"}) + " :"); selectTableDataLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_TableData_Select_One") + " :");
setTableDataNameComboBox(treeName); setTableDataNameComboBox(treeName);
tableDataNameComboBox.setPreferredSize(new Dimension(180, 20)); tableDataNameComboBox.setPreferredSize(new Dimension(180, 20));
JPanel tableFlowPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); JPanel tableFlowPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
@ -68,8 +68,8 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
this.add(tableFlowPane, BorderLayout.NORTH); this.add(tableFlowPane, BorderLayout.NORTH);
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
parentMarkRadio = new UIRadioButton(Inter.getLocText("FR-Designer_Build_Tree_Accord_Parent_Marked_Filed"), true); parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Parent_Marked_Filed"), true);
lengthMarkRadio = new UIRadioButton(Inter.getLocText("FR-Designer_Build_Tree_Accord_Marked_Filed_Length")); lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Marked_Filed_Length"));
parentMarkRadio.addActionListener(new ActionListener() { parentMarkRadio.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (isBuildByParentFiled()) { if (isBuildByParentFiled()) {
@ -90,15 +90,15 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
markButtonGroup.add(parentMarkRadio); markButtonGroup.add(parentMarkRadio);
markButtonGroup.add(lengthMarkRadio); markButtonGroup.add(lengthMarkRadio);
originFieldDependsOnParentLabel = new UILabel(Inter.getLocText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT); originFieldDependsOnParentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
parentFieldLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Parent_Marked_Field") + " :", SwingConstants.RIGHT); parentFieldLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
treeDataFieldLabel1 = new UILabel(" " + Inter.getLocText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT); treeDataFieldLabel1 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnLengthLabel = new UILabel(Inter.getLocText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT); originFieldDependsOnLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
treeDataFieldLabel2 = new UILabel(" " + Inter.getLocText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT); treeDataFieldLabel2 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
// originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(Inter.getLocText("Columns"))}); // originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
// parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(Inter.getLocText("Columns"))}); // parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
// originFieldDependsOnLengthPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(Inter.getLocText("Columns"))}); // originFieldDependsOnLengthPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()});
parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()});
originFieldDependsOnLengthPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); originFieldDependsOnLengthPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()});
@ -127,7 +127,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
buildTreePanel.add(xxx, BorderLayout.CENTER); buildTreePanel.add(xxx, BorderLayout.CENTER);
centerPane.add(buildTreePanel, BorderLayout.NORTH); centerPane.add(buildTreePanel, BorderLayout.NORTH);
JPanel previewPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel previewPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
UIButton treeDataPreviewButton = new UIButton(Inter.getLocText("FR-Designer_Preview")); UIButton treeDataPreviewButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
previewPanel.add(treeDataPreviewButton); previewPanel.add(treeDataPreviewButton);
treeDataPreviewButton.addActionListener(new ActionListener() { treeDataPreviewButton.addActionListener(new ActionListener() {
@Override @Override

8
designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java

@ -9,7 +9,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerBean; import com.fr.design.mainframe.DesignerBean;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -38,9 +38,9 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
rs.add(tableNameComboBox, BorderLayout.CENTER); rs.add(tableNameComboBox, BorderLayout.CENTER);
rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER)); rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER));
UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT); UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database"), UILabel.LEFT);
UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model"), UILabel.LEFT);
UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT); UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Select_Table"), UILabel.LEFT);
if (labelSize > 0) { if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 20); Dimension pSize = new Dimension(labelSize, 20);

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

@ -8,9 +8,9 @@ import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
@ -18,40 +18,43 @@ import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.*; import javax.swing.*;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* Connection List Pane. * Connection List Pane.
*/ */
public class ConnectionListPane extends JListControlPane implements ConnectionShowPane { public class ConnectionListPane extends JListControlPane implements ConnectionShowPane {
public static final String TITLE_NAME = Inter.getLocText("Server-Define_Data_Connection"); public static final String TITLE_NAME = Toolkit.i18nText("Server-Define_Data_Connection");
private boolean isNamePermitted = true; private boolean isNamePermitted = true;
private HashMap<String, String> renameMap = new HashMap<String, String>(); private HashMap<String, String> renameMap = new HashMap<String, String>();
public ConnectionListPane() { public ConnectionListPane() {
renameMap.clear(); renameMap.clear();
this.addEditingListner(new PropertyChangeAdapter() { this.addEditingListener(new PropertyChangeAdapter() {
public void propertyChange() { public void propertyChange() {
isNamePermitted = true; isNamePermitted = true;
String[] allListNames = nameableList.getAllNames(); String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
String tempName = getEditingName(); String tempName = getEditingName();
if (StringUtils.isEmpty(tempName)) { if (StringUtils.isEmpty(tempName)) {
String[] warning = new String[]{"NOT_NULL_Des", "Please_Rename"};
String[] sign = new String[]{",", "!"};
nameableList.stopEditing(); nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), Inter.getLocText(warning, sign)); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Empty_Name"));
setWarnigText(editingIndex); setIllegalIndex(editingIndex);
isNamePermitted = false; isNamePermitted = false;
return; return;
} }
if (!ComparatorUtils.equals(tempName, selectedName) if (!ComparatorUtils.equals(tempName, selectedName)
&& isNameRepeted(new List[]{Arrays.asList(allListNames)}, tempName)) { && isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) {
isNamePermitted = false; isNamePermitted = false;
nameableList.stopEditing(); nameableList.stopEditing();
String message = Inter.getLocText(new String[]{"Utils-has_been_existed", "DashBoard-ConnectionList", "Please_Rename"}, new String[]{"", tempName + ",", "!"}); String message = Toolkit.i18nText("Fine-Design_Connection_Duplicate_Name", tempName);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), message); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), message);
setWarnigText(editingIndex); setIllegalIndex(editingIndex);
} }
if (isNamePermitted && !ComparatorUtils.equals(tempName, selectedName)) { if (isNamePermitted && !ComparatorUtils.equals(tempName, selectedName)) {
rename(selectedName, tempName); rename(selectedName, tempName);
@ -63,9 +66,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
protected void rename(String oldName, String newName) { protected void rename(String oldName, String newName) {
if (renameMap.containsKey(selectedName)) { renameMap.remove(selectedName);
renameMap.remove(selectedName);
}
renameMap.put(selectedName, newName); renameMap.put(selectedName, newName);
} }

4
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java

@ -5,7 +5,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -28,7 +28,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Server-Define_Data_Connection"); return com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection");
} }
public HashMap<String, String> getRenameMap() { public HashMap<String, String> getRenameMap() {

10
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -14,7 +14,7 @@ import com.fr.design.gui.ilist.TableViewList;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.*; import javax.swing.*;
@ -112,15 +112,15 @@ public class ConnectionTableProcedurePane extends BasicPane {
// 根据环境是否为中文设置不同的显示 // 根据环境是否为中文设置不同的显示
if (GeneralContext.isChineseEnv()) { if (GeneralContext.isChineseEnv()) {
first.add(new UILabel(Inter.getLocText("FR-Designer_SQL-Table"), first.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"),
BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING)); BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
second.add(new UILabel(Inter.getLocText("FR-Designer_SQL-View"), second.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"),
BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING)); BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
} else { } else {
UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING); UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING);
UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING); UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING);
ui1.setToolTipText(Inter.getLocText("FR-Designer_SQL-Table")); ui1.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"));
ui2.setToolTipText(Inter.getLocText("FR-Designer_SQL-View")); ui2.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"));
first.add(ui1); first.add(ui1);
second.add(ui2); second.add(ui2);
} }

18
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -13,7 +13,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
@ -48,8 +48,8 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
newCharSetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); newCharSetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
message = new UILabel(); message = new UILabel();
uiLabel = new UILabel(); uiLabel = new UILabel();
okButton = new UIButton(Inter.getLocText("OK")); okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
cancelButton = new UIButton(Inter.getLocText("Cancel")); cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
@ -57,7 +57,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
// 按钮. // 按钮.
JPanel testPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); JPanel testPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
northPane.add(testPane, BorderLayout.NORTH); northPane.add(testPane, BorderLayout.NORTH);
UIButton testButton = new UIButton(Inter.getLocText("Datasource-Test_Connection")); UIButton testButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection"));
testPane.add(testButton); testPane.add(testButton);
testButton.addActionListener(testConnectionActionListener); testButton.addActionListener(testConnectionActionListener);
testPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 4)); testPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 4));
@ -70,11 +70,11 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
northPane.add(chartSetPane); northPane.add(chartSetPane);
chartSetPane.setBorder(BorderFactory.createTitledBorder( chartSetPane.setBorder(BorderFactory.createTitledBorder(
new ModLineBorder(ModLineBorder.TOP), new ModLineBorder(ModLineBorder.TOP),
Inter.getLocText("Datasource-Convert_Charset") com.fr.design.i18n.Toolkit.i18nText("Datasource-Convert_Charset")
)); ));
chartSetPane.add(GUICoreUtils.createNamedPane(originalCharSetComboBox, Inter.getLocText("Datasource-Original_Charset") + ":")); chartSetPane.add(GUICoreUtils.createNamedPane(originalCharSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Datasource-Original_Charset") + ":"));
chartSetPane.add(GUICoreUtils.createNamedPane(newCharSetComboBox, Inter.getLocText("Datasource-New_Charset") + ":")); chartSetPane.add(GUICoreUtils.createNamedPane(newCharSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Datasource-New_Charset") + ":"));
} }
} }
@ -163,11 +163,11 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
private void initDialogPane() { private void initDialogPane() {
message.setText(Inter.getLocText("Datasource-Test_Connection") + "..."); message.setText(com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection") + "...");
message.setBorder(BorderFactory.createEmptyBorder(8, 5, 0, 0)); message.setBorder(BorderFactory.createEmptyBorder(8, 5, 0, 0));
okButton.setEnabled(false); okButton.setEnabled(false);
dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this), Inter.getLocText("Datasource-Test_Connection"), true); dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this), com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection"), true);
dialog.setSize(new Dimension(268, 118)); dialog.setSize(new Dimension(268, 118));
okButton.setEnabled(false); okButton.setEnabled(false);
JPanel jp = new JPanel(); JPanel jp = new JPanel();

50
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -18,7 +18,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.editor.IntegerEditor; import com.fr.design.editor.editor.IntegerEditor;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -74,9 +74,9 @@ public class JDBCDefPane extends JPanel {
private IntegerEditor DBCP_MAX_WAIT = new IntegerEditor(); private IntegerEditor DBCP_MAX_WAIT = new IntegerEditor();
private UITextField DBCP_VALIDATION_QUERY = new UITextField(); private UITextField DBCP_VALIDATION_QUERY = new UITextField();
private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{Inter.getLocText("No"), Inter.getLocText("Yes")}); private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("No"), com.fr.design.i18n.Toolkit.i18nText("Yes")});
private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{Inter.getLocText("No"), Inter.getLocText("Yes")}); private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("No"), com.fr.design.i18n.Toolkit.i18nText("Yes")});
private UIComboBox DBCP_TESTWHILEIDLE = new UIComboBox(new String[]{Inter.getLocText("No"), Inter.getLocText("Yes")}); private UIComboBox DBCP_TESTWHILEIDLE = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("No"), com.fr.design.i18n.Toolkit.i18nText("Yes")});
private IntegerEditor DBCP_TIMEBETWEENEVICTIONRUNSMILLS = new IntegerEditor(); private IntegerEditor DBCP_TIMEBETWEENEVICTIONRUNSMILLS = new IntegerEditor();
private IntegerEditor DBCP_NUMTESTSPEREVICTIONRUN = new IntegerEditor(); private IntegerEditor DBCP_NUMTESTSPEREVICTIONRUN = new IntegerEditor();
@ -104,13 +104,13 @@ public class JDBCDefPane extends JPanel {
userNameTextField.setName(USER_NAME); userNameTextField.setName(USER_NAME);
passwordTextField = new UIPassWordField(15); passwordTextField = new UIPassWordField(15);
dbtypeButton = new UIButton("."); dbtypeButton = new UIButton(".");
dbtypeButton.setToolTipText(Inter.getLocText("Click-Get_Default_URL")); dbtypeButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Click-Get_Default_URL"));
dbtypeButton.addActionListener(dbtypeButtonActionListener); dbtypeButton.addActionListener(dbtypeButtonActionListener);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
JPanel dbtypePane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel dbtypePane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
dbtypePane.add(new UILabel((Inter.getLocText("Database") + ":"))); dbtypePane.add(new UILabel((com.fr.design.i18n.Toolkit.i18nText("Database") + ":")));
JPanel dbtypeComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel dbtypeComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
Component[][] dbtypeComComponents = {{dbtypeComboBox}}; Component[][] dbtypeComComponents = {{dbtypeComboBox}};
double[] dbtypeRowSize = {p}; double[] dbtypeRowSize = {p};
@ -118,7 +118,7 @@ public class JDBCDefPane extends JPanel {
dbtypeComPane = TableLayoutHelper.createTableLayoutPane(dbtypeComComponents, dbtypeRowSize, dbtypeColumnSize); dbtypeComPane = TableLayoutHelper.createTableLayoutPane(dbtypeComComponents, dbtypeRowSize, dbtypeColumnSize);
JPanel driverPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel driverPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
driverPane.add(new UILabel(Inter.getLocText("Driver") + ":")); driverPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Driver") + ":"));
JPanel urlPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel urlPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
urlPane.add(new UILabel("URL:")); urlPane.add(new UILabel("URL:"));
@ -129,15 +129,15 @@ public class JDBCDefPane extends JPanel {
urlComPane = TableLayoutHelper.createCommonTableLayoutPane(urlComComponents, urlRowSize, urlColumnSize, 4); urlComPane = TableLayoutHelper.createCommonTableLayoutPane(urlComComponents, urlRowSize, urlColumnSize, 4);
JPanel userPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel userPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
userPane.add(new UILabel(Inter.getLocText("Username") + ":")); userPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Username") + ":"));
JPanel userComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel userComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
Component[][] userComComponents = {{userNameTextField, new UILabel(Inter.getLocText("Password") + ":"), passwordTextField}}; Component[][] userComComponents = {{userNameTextField, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Password") + ":"), passwordTextField}};
double[] userRowSize = {p}; double[] userRowSize = {p};
double[] userColumnSize = {f, p, f}; double[] userColumnSize = {f, p, f};
userComPane = TableLayoutHelper.createCommonTableLayoutPane(userComComponents, userRowSize, userColumnSize, 4); userComPane = TableLayoutHelper.createCommonTableLayoutPane(userComComponents, userRowSize, userColumnSize, 4);
JPanel passwordPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel passwordPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
passwordPane.add(new UILabel(Inter.getLocText("Password") + ":")); passwordPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Password") + ":"));
Component[][] components = {{dbtypePane, dbtypeComPane}, {driverPane, driverComboBox}, {urlPane, urlComPane}, {userPane, userComPane},}; Component[][] components = {{dbtypePane, dbtypeComPane}, {driverPane, driverComboBox}, {urlPane, urlComPane}, {userPane, userComPane},};
@ -148,7 +148,7 @@ public class JDBCDefPane extends JPanel {
JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
innerthis.add(southPanel); innerthis.add(southPanel);
southPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 4, 20)); southPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 4, 20));
ActionLabel actionLabel = new ActionLabel(Inter.getLocText("ConnectionPool_Attr")); ActionLabel actionLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("ConnectionPool_Attr"));
southPanel.add(actionLabel, BorderLayout.EAST); southPanel.add(actionLabel, BorderLayout.EAST);
actionLabel.addActionListener(new ActionListener() { actionLabel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -289,7 +289,7 @@ public class JDBCDefPane extends JPanel {
if (ComparatorUtils.equals(dbtypeComboBox.getSelectedItem(), ("Access"))) { if (ComparatorUtils.equals(dbtypeComboBox.getSelectedItem(), ("Access"))) {
// ben:这个能不能换种处理方案- - // ben:这个能不能换种处理方案- -
JFileChooser filechooser = new JFileChooser(); JFileChooser filechooser = new JFileChooser();
filechooser.setDialogTitle(Inter.getLocText("Open")); filechooser.setDialogTitle(com.fr.design.i18n.Toolkit.i18nText("Open"));
filechooser.setMultiSelectionEnabled(false); filechooser.setMultiSelectionEnabled(false);
filechooser.addChoosableFileFilter(new ChooseFileFilter(new String[]{"accdb", "mdb"}, "Microsoft Office Access")); filechooser.addChoosableFileFilter(new ChooseFileFilter(new String[]{"accdb", "mdb"}, "Microsoft Office Access"));
int result = filechooser.showOpenDialog(DesignerContext.getDesignerFrame()); int result = filechooser.showOpenDialog(DesignerContext.getDesignerFrame());
@ -331,19 +331,19 @@ public class JDBCDefPane extends JPanel {
double[] rowSize = {f, f, f, f, f, f, f, f, f, f, f, f}; double[] rowSize = {f, f, f, f, f, f, f, f, f, f, f, f};
double[] columnSize = {f, f}; double[] columnSize = {f, f};
Component[][] comps = { Component[][] comps = {
{new UILabel(Inter.getLocText("DBCP_INITIAL_SIZE") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_INITIAL_SIZE") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE},
{new UILabel(Inter.getLocText("DBCP_MAX_ACTIVE") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MAX_ACTIVE") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE},
{new UILabel(Inter.getLocText("DBCP_MAX_IDLE") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MAX_IDLE") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE},
{new UILabel(Inter.getLocText("DBCP_MIN_IDLE") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MIN_IDLE") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE},
{new UILabel(Inter.getLocText(new String[] {"DBCP_MAX_WAIT", "Milliseconds"},new String[] {"(", "):"}) , SwingConstants.RIGHT), DBCP_MAX_WAIT}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Max_Wait_Time") + ":" , SwingConstants.RIGHT), DBCP_MAX_WAIT},
{new UILabel(Inter.getLocText("DBCP_VALIDATION_QUERY") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_VALIDATION_QUERY") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY},
{new UILabel(Inter.getLocText("DBCP_TEST_ON_BORROW") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_ON_BORROW") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW},
{new UILabel(Inter.getLocText("DBCP_TEST_ON_RETURN") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_ON_RETURN") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN},
{new UILabel(Inter.getLocText("DBCP_TEST_WHILE_IDLE") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_WHILE_IDLE") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE},
{new UILabel(Inter.getLocText(new String[] {"DBCP_TIME_BETWEEN_EVICTIONRUNSMILLIS", "Milliseconds"}, new String[] {"(", "):"}), SwingConstants.RIGHT), {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Evictionruns_millis") + ":", SwingConstants.RIGHT),
DBCP_TIMEBETWEENEVICTIONRUNSMILLS}, DBCP_TIMEBETWEENEVICTIONRUNSMILLS},
{new UILabel(Inter.getLocText("DBCP_NUM_TEST_PER_EVCTION_RUN") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_NUM_TEST_PER_EVCTION_RUN") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN},
{new UILabel(Inter.getLocText(new String[] {"DBCP_MIN_EVICTABLE_IDLE_TIMEMILLIS", "Sche-Second"}, new String[] {"(", "):"}) , SwingConstants.RIGHT), {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Mix_Evictable_Idle_Time_Millis") + ":" , SwingConstants.RIGHT),
DBCP_MINEVICTABLEIDLETIMEMILLIS}}; DBCP_MINEVICTABLEIDLETIMEMILLIS}};
JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSize, columnSize, 10, 4); JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSize, columnSize, 10, 4);
@ -353,7 +353,7 @@ public class JDBCDefPane extends JPanel {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("ConnectionPool_Attr"); return com.fr.design.i18n.Toolkit.i18nText("ConnectionPool_Attr");
} }
} }

12
designer-base/src/main/java/com/fr/design/data/datapane/connect/JNDIDefPane.java

@ -30,7 +30,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
public class JNDIDefPane extends JPanel { public class JNDIDefPane extends JPanel {
@ -73,12 +73,12 @@ public class JNDIDefPane extends JPanel {
// NorthPane // NorthPane
JPanel nContentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); JPanel nContentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
innerthis.add(nContentPane); innerthis.add(nContentPane);
nContentPane.add(new UILabel(Inter.getLocText("Datasource-JNDI_Name") + ":")); nContentPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Datasource-JNDI_Name") + ":"));
jndiNameTextField = new UITextField(20); jndiNameTextField = new UITextField(20);
nContentPane.add(jndiNameTextField, BorderLayout.NORTH); nContentPane.add(jndiNameTextField, BorderLayout.NORTH);
// CenterPane // CenterPane
JPanel outcenterPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Datasource-Context")); JPanel outcenterPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Datasource-Context"));
innerthis.add(outcenterPane); innerthis.add(outcenterPane);
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
outcenterPane.add(centerPane); outcenterPane.add(centerPane);
@ -105,7 +105,7 @@ public class JNDIDefPane extends JPanel {
centerPane.add(actionPane); centerPane.add(actionPane);
actionPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 6)); actionPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 6));
ActionLabel actionLabel = new ActionLabel(Inter.getLocText("Datasource-Other_Attributes")); ActionLabel actionLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("Datasource-Other_Attributes"));
actionPane.add(actionLabel, BorderLayout.EAST); actionPane.add(actionLabel, BorderLayout.EAST);
actionLabel.addActionListener(new ActionListener() { actionLabel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -115,7 +115,7 @@ public class JNDIDefPane extends JPanel {
}); });
// South Description // South Description
UILabel explainLabe11l = new FRExplainLabel(Inter.getLocText("Datasource-JNDI_DES")); UILabel explainLabe11l = new FRExplainLabel(com.fr.design.i18n.Toolkit.i18nText("Datasource-JNDI_DES"));
innerthis.add(new JScrollPane(explainLabe11l)); innerthis.add(new JScrollPane(explainLabe11l));
} }
@ -235,7 +235,7 @@ public class JNDIDefPane extends JPanel {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Datasource-Other_Attributes"); return com.fr.design.i18n.Toolkit.i18nText("Datasource-Other_Attributes");
} }
} }

4
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewLabel.java

@ -7,7 +7,7 @@ import java.awt.event.ActionListener;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.general.Inter;
@ -17,7 +17,7 @@ public class PreviewLabel extends UIButton {
public PreviewLabel(Previewable previewable) { public PreviewLabel(Previewable previewable) {
super(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); super(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
this.setToolTipText(Inter.getLocText("Preview")); this.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Preview"));
this.setCursor(new Cursor(Cursor.HAND_CURSOR)); this.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.previewable = previewable; this.previewable = previewable;
this.addActionListener(new ActionListener() { this.addActionListener(new ActionListener() {

22
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java

@ -6,7 +6,7 @@ import com.fr.data.AbstractDataModel;
import com.fr.data.impl.EmbeddedTableData.EmbeddedTDDataModel; import com.fr.data.impl.EmbeddedTableData.EmbeddedTDDataModel;
import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.Inter;
import com.fr.general.data.DataModel; import com.fr.general.data.DataModel;
import com.fr.general.data.TableDataException; import com.fr.general.data.TableDataException;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -100,7 +100,7 @@ public class PreviewTableModel extends AbstractTableModel {
} catch (TableDataException e) { } catch (TableDataException e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
DesignUtils.errorMessage(e.getMessage()); DesignUtils.errorMessage(e.getMessage());
return Inter.getLocText("FR-Designer_Error"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Error");
} }
} }
@ -149,7 +149,7 @@ public class PreviewTableModel extends AbstractTableModel {
} }
public String getColumnName(int column) { public String getColumnName(int column) {
return Inter.getLocText("FR-Designer_Error"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Error");
} }
public int getColumnCount() { public int getColumnCount() {
@ -166,7 +166,7 @@ public class PreviewTableModel extends AbstractTableModel {
private String checkType(int column) { private String checkType(int column) {
if (dateIndexs.contain(column)) { if (dateIndexs.contain(column)) {
String s = Inter.getLocText("FR-Designer_Date"); String s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date");
return ("(" + s + ")"); return ("(" + s + ")");
} }
@ -187,25 +187,25 @@ public class PreviewTableModel extends AbstractTableModel {
if (o == null) { if (o == null) {
s = "?"; s = "?";
} else if (o instanceof String) { } else if (o instanceof String) {
s = Inter.getLocText("FR-Designer_Parameter_String"); s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter_String");
if (!WorkContext.getCurrent().isLocal() && dataModel instanceof EmbeddedTDDataModel) { if (!WorkContext.getCurrent().isLocal() && dataModel instanceof EmbeddedTDDataModel) {
Class clzz = ((EmbeddedTDDataModel) dataModel).getColumnClass(column); Class clzz = ((EmbeddedTDDataModel) dataModel).getColumnClass(column);
if (clzz != null) { if (clzz != null) {
if (Number.class.isAssignableFrom(clzz)) { if (Number.class.isAssignableFrom(clzz)) {
s = Inter.getLocText("FR-Designer_Number");//bigdecimal s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Number");//bigdecimal
} else if (java.sql.Date.class.isAssignableFrom(clzz)) { } else if (java.sql.Date.class.isAssignableFrom(clzz)) {
s = Inter.getLocText("FR-Designer_Date"); s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date");
} }
} }
} }
} else if (o instanceof Integer) { } else if (o instanceof Integer) {
s = Inter.getLocText("FR-Designer_Integer"); s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Integer");
} else if (o instanceof Double || o instanceof Float) { } else if (o instanceof Double || o instanceof Float) {
s = Inter.getLocText("FR-Designer_Double"); s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Double");
} else if (o instanceof java.sql.Date || o instanceof java.util.Date) { } else if (o instanceof java.sql.Date || o instanceof java.util.Date) {
s = Inter.getLocText("FR-Designer_Date"); s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date");
} else if (o instanceof Number) { } else if (o instanceof Number) {
s = Inter.getLocText("FR-Designer_Number");//bigdecimal s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Number");//bigdecimal
} else { } else {
s = "?"; s = "?";
} }

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

@ -26,7 +26,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.function.TIME; import com.fr.function.TIME;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import javax.swing.*; import javax.swing.*;
@ -78,7 +78,7 @@ public class PreviewTablePane extends BasicPane {
JPanel currentPreviewPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel currentPreviewPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
previewNumberPanel.add(currentPreviewPanel); previewNumberPanel.add(currentPreviewPanel);
currentPreviewPanel.add(new UILabel(Inter.getLocText("FR-Designer_Current_Preview_Rows") + ":")); currentPreviewPanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Current_Preview_Rows") + ":"));
currentRowsField = new UINumberField(); currentRowsField = new UINumberField();
currentPreviewPanel.add(currentRowsField); currentPreviewPanel.add(currentRowsField);
@ -88,7 +88,7 @@ public class PreviewTablePane extends BasicPane {
JPanel maxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel maxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
previewNumberPanel.add(maxPanel); previewNumberPanel.add(maxPanel);
maxPanel.add(new UILabel(Inter.getLocText("Datasource-Maximum_Number_of_Preview_Rows") + ":")); maxPanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Datasource-Maximum_Number_of_Preview_Rows") + ":"));
maxPreviewNumberField = new UINumberField(); maxPreviewNumberField = new UINumberField();
maxPanel.add(maxPreviewNumberField); maxPanel.add(maxPreviewNumberField);
@ -155,7 +155,7 @@ public class PreviewTablePane extends BasicPane {
if (this.dialog == null) { if (this.dialog == null) {
this.dialog = this.showWindow(DesignerContext.getDesignerFrame()); this.dialog = this.showWindow(DesignerContext.getDesignerFrame());
} }
progressBar = new AutoProgressBar(this, Inter.getLocText("FR-Designer_Loading_Data"), "", 0, 100) { progressBar = new AutoProgressBar(this, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Loading_Data"), "", 0, 100) {
public void doMonitorCanceled() { public void doMonitorCanceled() {
if (getWorker() != null) { if (getWorker() != null) {
getWorker().cancel(true); getWorker().cancel(true);
@ -171,7 +171,7 @@ public class PreviewTablePane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Preview"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
} }
private void addLoadedListener(LoadedEventListener l) { private void addLoadedListener(LoadedEventListener l) {
@ -265,7 +265,7 @@ public class PreviewTablePane extends BasicPane {
*/ */
public static EmbeddedTableData previewTableData(TableData tableData, final int keyIndex, final int valueIndex) { public static EmbeddedTableData previewTableData(TableData tableData, final int keyIndex, final int valueIndex) {
PreviewTablePane previewTablePane = new PreviewTablePane(); PreviewTablePane previewTablePane = new PreviewTablePane();
previewTablePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Data"))); previewTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Data")));
try { try {
previewTablePane.populate(tableData); previewTablePane.populate(tableData);
previewTablePane.resetPreviewTableColumnColor(); previewTablePane.resetPreviewTableColumnColor();
@ -295,13 +295,13 @@ public class PreviewTablePane extends BasicPane {
try { try {
int choiceColumn = Integer.parseInt(columnErrMessage.trim()); int choiceColumn = Integer.parseInt(columnErrMessage.trim());
int tatalColumn = Integer.parseInt(tatolColumnErrMessage.trim()); int tatalColumn = Integer.parseInt(tatolColumnErrMessage.trim());
columnErrMessage = Inter.getLocText(new String[]{"Ser", String.valueOf(choiceColumn + 1), "Column_Does_Not_Exsit", ", ", "Total", String.valueOf(tatalColumn), "Column" + "!"}); columnErrMessage = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Preview_Warn_Text", choiceColumn + 1, tatalColumn);
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
return; return;
} }
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), columnErrMessage, Inter.getLocText("FR-Designer_Error"), JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), columnErrMessage, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Error"), JOptionPane.ERROR_MESSAGE);
} }
private void populate(TableData tableData) throws Exception { private void populate(TableData tableData) throws Exception {
@ -314,7 +314,7 @@ public class PreviewTablePane extends BasicPane {
} }
private void previewTableDataSQL() throws Exception { private void previewTableDataSQL() throws Exception {
connectionBar = new AutoProgressBar(this, Inter.getLocText("Utils-Now_create_connection"), "", 0, 100) { connectionBar = new AutoProgressBar(this, com.fr.design.i18n.Toolkit.i18nText("Utils-Now_create_connection"), "", 0, 100) {
public void doMonitorCanceled() { public void doMonitorCanceled() {
getWorker().cancel(true); getWorker().cancel(true);
getDialog().setVisible(false); getDialog().setVisible(false);
@ -362,7 +362,7 @@ public class PreviewTablePane extends BasicPane {
boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase()); boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase());
if (!status) { if (!status) {
connectionBar.close(); connectionBar.close();
throw new Exception(Inter.getLocText("Datasource-Connection_failed")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"));
} }
} }
connectionBar.close(); connectionBar.close();
@ -420,7 +420,7 @@ public class PreviewTablePane extends BasicPane {
public static void previewStoreData(final ProcedureDataModel storeProcedureDataModel, final int keyIndex, final int valueIndex) { public static void previewStoreData(final ProcedureDataModel storeProcedureDataModel, final int keyIndex, final int valueIndex) {
final PreviewTablePane previewTablePane = new PreviewTablePane(); final PreviewTablePane previewTablePane = new PreviewTablePane();
previewTablePane.storeProcedureDataModel = storeProcedureDataModel; previewTablePane.storeProcedureDataModel = storeProcedureDataModel;
previewTablePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Data"))); previewTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Data")));
try { try {
previewTablePane.populateStoreDataSQL(); previewTablePane.populateStoreDataSQL();
@ -451,7 +451,7 @@ public class PreviewTablePane extends BasicPane {
for (int i = 0; i < tableSize; i++) { for (int i = 0; i < tableSize; i++) {
PreviewTablePane previewTablePane = new PreviewTablePane(); PreviewTablePane previewTablePane = new PreviewTablePane();
previewTablePane.storeProcedureDataModel = storeProcedureDataModels[i]; previewTablePane.storeProcedureDataModel = storeProcedureDataModels[i];
previewTablePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Data"))); previewTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Data")));
try { try {
previewTablePane.populateStoreDataSQL(); previewTablePane.populateStoreDataSQL();
} catch (Exception e) { } catch (Exception e) {
@ -464,7 +464,7 @@ public class PreviewTablePane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Preview"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
} }
}; };

2
designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java

File diff suppressed because one or more lines are too long

20
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java

@ -7,7 +7,7 @@ import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.CursorEditor; import com.fr.design.editor.editor.CursorEditor;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.CellEditorListener; import javax.swing.event.CellEditorListener;
@ -117,24 +117,24 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
private int getParameterType (Object value) { private int getParameterType (Object value) {
String type; String type;
if(value instanceof CursorEditor) if(value instanceof CursorEditor)
type= Inter.getLocText("Cursor"); type= com.fr.design.i18n.Toolkit.i18nText("Cursor");
else if(value instanceof String ){ else if(value instanceof String ){
if(((String) value).length() > 0 && ((String) value).charAt(0) == '=') if(((String) value).length() > 0 && ((String) value).charAt(0) == '=')
type = Inter.getLocText("Formula"); type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else else
type = Inter.getLocText("Parameter-String"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
}else if(value instanceof Integer) }else if(value instanceof Integer)
type = Inter.getLocText("Integer"); type = com.fr.design.i18n.Toolkit.i18nText("Integer");
else if(value instanceof Double) else if(value instanceof Double)
type = Inter.getLocText("Double"); type = com.fr.design.i18n.Toolkit.i18nText("Double");
else if(value instanceof Date) else if(value instanceof Date)
type = Inter.getLocText("Date"); type = com.fr.design.i18n.Toolkit.i18nText("Date");
else if(value instanceof Boolean) else if(value instanceof Boolean)
type = Inter.getLocText("Parameter-Boolean"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
else if(value instanceof BaseFormula) else if(value instanceof BaseFormula)
type = Inter.getLocText("Formula"); type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else else
type = Inter.getLocText("Parameter-String"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
return StoreProcedureParameterPane.getInfo4Value(type); return StoreProcedureParameterPane.getInfo4Value(type);
} }

8
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java

@ -4,7 +4,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.filetree.ClassFileTree; import com.fr.design.gui.itree.filetree.ClassFileTree;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.TreeSelectionModel; import javax.swing.tree.TreeSelectionModel;
@ -20,7 +20,7 @@ public class ClassNameSelectPane extends BasicPane {
this.add(webDirectoryPane, BorderLayout.NORTH); this.add(webDirectoryPane, BorderLayout.NORTH);
webDirectoryPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); webDirectoryPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
webDirectoryPane.add(new UILabel( webDirectoryPane.add(new UILabel(
Inter.getLocText("Function-Choose_Function_Class") + ":")); com.fr.design.i18n.Toolkit.i18nText("Function-Choose_Function_Class") + ":"));
classFileTree = new ClassFileTree(); classFileTree = new ClassFileTree();
classFileTree.refreshEnv(); classFileTree.refreshEnv();
@ -31,7 +31,7 @@ public class ClassNameSelectPane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Function-Function_Class_Name"); return com.fr.design.i18n.Toolkit.i18nText("Function-Function_Class_Name");
} }
/* /*
@ -53,7 +53,7 @@ public class ClassNameSelectPane extends BasicPane {
public void checkValid() throws Exception { public void checkValid() throws Exception {
String classPath = classFileTree.getSelectedClassPath(); String classPath = classFileTree.getSelectedClassPath();
if (classPath == null) { if (classPath == null) {
throw new Exception(Inter.getLocText("Function-The_selected_file_cannot_be_null")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Function-The_selected_file_cannot_be_null"));
} }
} }
} }

24
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -15,9 +15,10 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.*;
@ -44,7 +45,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
classNameTextField = new UITextField(36); classNameTextField = new UITextField(36);
reportletNamePane.add(classNameTextField); reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(Inter.getLocText("Select")); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Select"));
browserButton.setPreferredSize(new Dimension( browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width, browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height)); classNameTextField.getPreferredSize().height));
@ -63,7 +64,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
dlg.setVisible(true); dlg.setVisible(true);
} }
}); });
UIButton editButton = new UIButton(Inter.getLocText("Edit")); UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Edit"));
editButton.setPreferredSize(new Dimension( editButton.setPreferredSize(new Dimension(
editButton.getPreferredSize().width, editButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height)); classNameTextField.getPreferredSize().height));
@ -89,11 +90,10 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
}); });
Component[][] components = { Component[][] components = {
{new UILabel(Inter.getLocText("DS-Class_Name") + ":"), reportletNamePane}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("DS-Class_Name") + ":"), reportletNamePane},
{null, new UILabel(Inter.getLocText("Function-The_class_must_implement_the_interface") + "\"com.fr.data.Tabledata\"")}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Function-The_class_must_implement_the_interface") + "\"com.fr.data.Tabledata\"")},
{null, new UILabel(Inter.getLocText("Example") + ":\"com.fr.data.impl.ArrayTableData\"")}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Example") + ":\"com.fr.data.impl.ArrayTableData\"")},
{null,new UILabel(Inter.getLocText(new String[]{"Function-The_class_must_be_located_in","Function-J2EE_server"}, {null,new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Class_Location_Description", StableUtils.pathJoin(ProjectConstants.WEBINF_NAME, ProjectConstants.CLASSES_NAME)))}
new String[]{" ","\"",File.separator,ProjectConstants.WEBINF_NAME,File.separator,"classes\""}))}
}; };
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
@ -112,7 +112,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
new RemoveParaAction() new RemoveParaAction()
}; };
} }
}, " " + Inter.getLocText("FR-Designer_TableData-Default-Para")); }, " " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableData-Default-Para"));
jpanel.add(editorPane, BorderLayout.CENTER); jpanel.add(editorPane, BorderLayout.CENTER);
@ -121,7 +121,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
public class AddParaAction extends UITableEditAction { public class AddParaAction extends UITableEditAction {
public AddParaAction() { public AddParaAction() {
this.setName(Inter.getLocText("FR-Designer_Add")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
@ -137,7 +137,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
} }
private class RemoveParaAction extends UITableEditAction { private class RemoveParaAction extends UITableEditAction {
public RemoveParaAction() { public RemoveParaAction() {
this.setName(Inter.getLocText("FR-Designer_Remove")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/remove.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/remove.png"));
} }
@ -155,7 +155,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Class_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Class_TableData");
} }
@Override @Override

20
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -35,7 +35,7 @@ import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.sql.SqlUtils; import com.fr.general.sql.SqlUtils;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -54,8 +54,8 @@ import java.util.List;
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> { public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
private static final int BOTTOM = 6; private static final int BOTTOM = 6;
private static final String PREVIEW_BUTTON = Inter.getLocText("FR-Designer_Preview"); private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
private static final String REFRESH_BUTTON = Inter.getLocText("FR-Designer_Refresh"); private static final String REFRESH_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh");
private ConnectionTableProcedurePane connectionTableProcedurePane; private ConnectionTableProcedurePane connectionTableProcedurePane;
private UITableEditorPane<ParameterProvider> editorPane; private UITableEditorPane<ParameterProvider> editorPane;
@ -133,7 +133,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
JPanel paraMeanPane = new JPanel(new BorderLayout()); JPanel paraMeanPane = new JPanel(new BorderLayout());
paraMeanPane.setPreferredSize(new Dimension(680, 90)); paraMeanPane.setPreferredSize(new Dimension(680, 90));
UILabel paraMean = new UILabel(Inter.getLocText("FR-Designer-Datasource-Param_DES")); UILabel paraMean = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Datasource-Param_DES"));
paraMeanPane.add(paraMean, BorderLayout.CENTER); paraMeanPane.add(paraMean, BorderLayout.CENTER);
@ -171,7 +171,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer-DS-Database_Query"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-DS-Database_Query");
} }
private void refresh() { private void refresh() {
@ -195,7 +195,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
toolBarDef.addShortCut(SeparatorDef.DEFAULT); toolBarDef.addShortCut(SeparatorDef.DEFAULT);
toolBarDef.addShortCut(dbTableDataMenuHandler.createQueryAction()); toolBarDef.addShortCut(dbTableDataMenuHandler.createQueryAction());
} }
isShareCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Share_DBTableData")); isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Is_Share_DBTableData"));
isShareCheckBox.setBackground(Color.WHITE); isShareCheckBox.setBackground(Color.WHITE);
maxPanel = new MaxMemRowCountPanel(); maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null); maxPanel.setBorder(null);
@ -271,10 +271,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) { if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) {
try { try {
throw new Exception(Inter.getLocText("FR-Designer_Connect_SQL_Cannot_Null") + "."); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) { } catch (Exception e) {
// JOptionPane.showMessageDialog(DBTableDataPane.this, // JOptionPane.showMessageDialog(DBTableDataPane.this,
// Inter.getLocText("Connect_SQL_Cannot_Null") + "."); // com.fr.design.i18n.Toolkit.i18nText("Connect_SQL_Cannot_Null") + ".");
} }
} }
@ -328,13 +328,13 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
private class EditPageQueryAction extends UpdateAction { private class EditPageQueryAction extends UpdateAction {
public EditPageQueryAction() { public EditPageQueryAction() {
this.setName(Inter.getLocText("FR-Designer-LayerPageReport_PageQuery")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-LayerPageReport_PageQuery"));
this.setMnemonic('L'); this.setMnemonic('L');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png"));
} }
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final QueryPane pane = new QueryPane(Inter.getLocText("FR-Designer-LayerPageReport_Define_PageQuerySQL")); final QueryPane pane = new QueryPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-LayerPageReport_Define_PageQuerySQL"));
pane.populate(pageQuery); pane.populate(pageQuery);
BasicDialog dialog = pane.showWindow(DesignerContext.getDesignerFrame()); BasicDialog dialog = pane.showWindow(DesignerContext.getDesignerFrame());
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java

@ -7,7 +7,7 @@ import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.ilist.CheckBoxList.CheckBoxListSelectionChangeListener; import com.fr.design.gui.ilist.CheckBoxList.CheckBoxListSelectionChangeListener;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import com.fr.general.data.DataModel; import com.fr.general.data.DataModel;
import com.fr.general.data.TableDataException; import com.fr.general.data.TableDataException;
import com.fr.script.Calculator; import com.fr.script.Calculator;
@ -27,7 +27,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane<DecoratedTable
while (serverTableDataNameIterator.hasNext()) { while (serverTableDataNameIterator.hasNext()) {
tableDataNameList.add((String)serverTableDataNameIterator.next()); tableDataNameList.add((String)serverTableDataNameIterator.next());
} }
availableTableDataNameList = new CheckBoxList(tableDataNameList.toArray(new String[0]), CheckBoxList.SelectedState.NONE,Inter.getLocText("FR-Designer_Chart_Field_Name")); availableTableDataNameList = new CheckBoxList(tableDataNameList.toArray(new String[0]), CheckBoxList.SelectedState.NONE,com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Chart_Field_Name"));
this.add(availableTableDataNameList, BorderLayout.WEST); this.add(availableTableDataNameList, BorderLayout.WEST);
availableTableDataNameList.addCheckBoxListSelectionChangeListener(this); availableTableDataNameList.addCheckBoxListSelectionChangeListener(this);
@ -68,7 +68,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane<DecoratedTable
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Relation_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Relation_TableData");
} }
/** /**

20
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java

@ -23,7 +23,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
public class EmbeddedTableDataDefinedPane extends BasicPane{ public class EmbeddedTableDataDefinedPane extends BasicPane{
@ -33,10 +33,10 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
private UIButton del; private UIButton del;
private static String[] TYPE = { private static String[] TYPE = {
Inter.getLocText("String"), com.fr.design.i18n.Toolkit.i18nText("String"),
Inter.getLocText("Integer"), com.fr.design.i18n.Toolkit.i18nText("Integer"),
Inter.getLocText("Double"), com.fr.design.i18n.Toolkit.i18nText("Double"),
Inter.getLocText("Date") com.fr.design.i18n.Toolkit.i18nText("Date")
}; };
public EmbeddedTableDataDefinedPane() { public EmbeddedTableDataDefinedPane() {
@ -68,8 +68,8 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
tableColumn.setMaxWidth(30); tableColumn.setMaxWidth(30);
// 控制按钮 // 控制按钮
add = new UIButton(Inter.getLocText("Add")); add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Add"));
del = new UIButton(Inter.getLocText("Delete")); del = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Delete"));
JPanel buttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel buttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
// buttonPane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); // buttonPane.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
buttonPane.add(add); buttonPane.add(add);
@ -93,7 +93,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"Column", "Set"}); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Embedded_Column_Setting");
} }
public void checkValid() throws Exception { public void checkValid() throws Exception {
@ -213,8 +213,8 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
private EmbeddedTableData embeddedTableData; private EmbeddedTableData embeddedTableData;
private String[] COLUMN_NAME = { private String[] COLUMN_NAME = {
"", "",
Inter.getLocText("ColumnName"), com.fr.design.i18n.Toolkit.i18nText("ColumnName"),
Inter.getLocText("Type") com.fr.design.i18n.Toolkit.i18nText("Type")
}; };
private int sum = 0; private int sum = 0;

10
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -32,7 +32,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -107,7 +107,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
private void initOtherNorthPaneComponents(JPanel northPane) { private void initOtherNorthPaneComponents(JPanel northPane) {
// 表结构设置 // 表结构设置
columnSetButton = new UIButton(Inter.getLocText(new String[]{"Table", "Design"})); columnSetButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Embedded_Table_Design"));
columnSetButton.setMnemonic('C'); columnSetButton.setMnemonic('C');
northPane.add(columnSetButton); northPane.add(columnSetButton);
columnSetButton.addActionListener(new ActionListener() { columnSetButton.addActionListener(new ActionListener() {
@ -134,7 +134,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
}); });
// DataSourceEditor-Insert_Row // DataSourceEditor-Insert_Row
insertRowButton = new UIButton(Inter.getLocText("Utils-Insert_Row")); insertRowButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Insert_Row"));
insertRowButton.setMnemonic('I'); insertRowButton.setMnemonic('I');
northPane.add(insertRowButton); northPane.add(insertRowButton);
insertRowButton.addActionListener(new ActionListener() { insertRowButton.addActionListener(new ActionListener() {
@ -144,7 +144,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
}); });
// DataSourceEditor-Remove_Row // DataSourceEditor-Remove_Row
removeRowButton = new UIButton(Inter.getLocText("Utils-Delete_Row")); removeRowButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Delete_Row"));
removeRowButton.setMnemonic('R'); removeRowButton.setMnemonic('R');
northPane.add(removeRowButton); northPane.add(removeRowButton);
removeRowButton.addActionListener(new ActionListener() { removeRowButton.addActionListener(new ActionListener() {
@ -157,7 +157,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Embedded_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Embedded_TableData");
} }

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

@ -36,7 +36,7 @@ import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.data.DataSource; import com.fr.general.data.DataSource;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
@ -123,7 +123,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
this.setLayout(new BorderLayout(gap,0)); this.setLayout(new BorderLayout(gap,0));
JPanel northPanel = new JPanel(new BorderLayout()); JPanel northPanel = new JPanel(new BorderLayout());
JPanel type = new JPanel(); JPanel type = new JPanel();
type.add(new UILabel(Inter.getLocText("Utils-File_type") + ":")); type.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Utils-File_type") + ":"));
String[] item = {"TXT", "Excel", "XML"}; String[] item = {"TXT", "Excel", "XML"};
fileTypeComboBox = new UIComboBox(item); fileTypeComboBox = new UIComboBox(item);
fileTypeComboBox.setPreferredSize(new Dimension(100, 20)); fileTypeComboBox.setPreferredSize(new Dimension(100, 20));
@ -133,7 +133,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
// 最上面的pane,文件选择 // 最上面的pane,文件选择
JPanel centerPanel = new JPanel(); JPanel centerPanel = new JPanel();
centerPanel.setPreferredSize(new Dimension(522, 200)); centerPanel.setPreferredSize(new Dimension(522, 200));
centerPanel.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer-File_address"))); centerPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-File_address")));
addToCenterPanel(centerPanel); addToCenterPanel(centerPanel);
// 下面的pane,参数面板 // 下面的pane,参数面板
@ -151,7 +151,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
JPanel setPanel = new JPanel(); JPanel setPanel = new JPanel();
southPanel.add(setPanel, BorderLayout.CENTER); southPanel.add(setPanel, BorderLayout.CENTER);
setPanel.setPreferredSize(new Dimension(setPanelWidth, 460)); setPanel.setPreferredSize(new Dimension(setPanelWidth, 460));
setPanel.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Set"))); setPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set")));
JPanel controlPane = textSetPanel(width,height); JPanel controlPane = textSetPanel(width,height);
setPanel.add(controlPane, BorderLayout.NORTH); setPanel.add(controlPane, BorderLayout.NORTH);
fileTypeComboBox.addActionListener(getFileTypeListener(setPanel,width,height)); fileTypeComboBox.addActionListener(getFileTypeListener(setPanel,width,height));
@ -162,7 +162,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
private void addToCenterPanel(JPanel centerPanel){ private void addToCenterPanel(JPanel centerPanel){
localFileRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-Local_file") + ":", true); localFileRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Local_file") + ":", true);
urlFileRadioButton = new UIRadioButton("URL:", false); urlFileRadioButton = new UIRadioButton("URL:", false);
ButtonGroup bg = new ButtonGroup(); ButtonGroup bg = new ButtonGroup();
bg.add(localFileRadioButton); bg.add(localFileRadioButton);
@ -176,10 +176,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
urlText = new UITextField(); urlText = new UITextField();
urlText.setPreferredSize(new Dimension(195, 20)); urlText.setPreferredSize(new Dimension(195, 20));
urlText.setEditable(false); urlText.setEditable(false);
chooseFile = new UIButton(Inter.getLocText("FR-Designer_Selection")); chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Selection"));
chooseFile.addActionListener(chooseFileListener); chooseFile.addActionListener(chooseFileListener);
testConnection = new UIButton(Inter.getLocText("Datasource-Test_Connection")); testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection"));
testConnection.setEnabled(false); testConnection.setEnabled(false);
testConnection.addActionListener(testConnectionListener);// 测试连接按钮 testConnection.addActionListener(testConnectionListener);// 测试连接按钮
@ -199,7 +199,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
centerPanel.add(filePath, BorderLayout.NORTH); centerPanel.add(filePath, BorderLayout.NORTH);
// 中间的pane,提示信息 // 中间的pane,提示信息
String tipContent = Inter.getLocText("FR-Designer-Type_Parameter") + "reportlets/excel/FineReport${abc}." + "txt" + "<br>" String tipContent = com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Type_Parameter") + "reportlets/excel/FineReport${abc}." + "txt" + "<br>"
+ "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + "&nbsp</body> </html> "; + "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + "&nbsp</body> </html> ";
tips = new UILabel(tipContent); tips = new UILabel(tipContent);
centerPanel.add(tips, BorderLayout.CENTER); centerPanel.add(tips, BorderLayout.CENTER);
@ -209,7 +209,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
public void actionPerformed(ActionEvent arg0) { public void actionPerformed(ActionEvent arg0) {
String uri = ParameterHelper.analyze4Templatee( urlText.getText(), params); String uri = ParameterHelper.analyze4Templatee( urlText.getText(), params);
if (!checkURL(uri)) { if (!checkURL(uri)) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), Inter.getLocText("FR-Designer_Add_JS_warning")); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add_JS_warning"));
return; return;
} }
params = getEditorPaneParameter(); params = getEditorPaneParameter();
@ -221,10 +221,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
if (in == null) { if (in == null) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_failed"), JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon")); null, 0, UIManager.getIcon("OptionPane.errorIcon"));
} else { } else {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_successfully")); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Datasource-Connection_successfully"));
try { try {
in.close(); in.close();
} catch (IOException e) { } catch (IOException e) {
@ -236,7 +236,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private void previewPanel(JPanel jPanel){ private void previewPanel(JPanel jPanel){
JPanel previewPanel = new JPanel(new BorderLayout()); JPanel previewPanel = new JPanel(new BorderLayout());
UIButton preview = new UIButton(Inter.getLocText("FR-Designer_Preview")); UIButton preview = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
preview.addActionListener(new ActionListener() { preview.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
preview(); preview();
@ -257,7 +257,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
controlPane.setLayout(new BorderLayout(8,8)); controlPane.setLayout(new BorderLayout(8,8));
controlPane.setPreferredSize(new Dimension(width, height)); controlPane.setPreferredSize(new Dimension(width, height));
JPanel comboboxPanel = new JPanel(new BorderLayout(8,8)); JPanel comboboxPanel = new JPanel(new BorderLayout(8,8));
encodeLabel = new UILabel(Inter.getLocText("FR-Designer-Encoding_Type") + ":"); encodeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Encoding_Type") + ":");
encodingComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); encodingComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
encodingComboBox.setSelectedIndex(4); encodingComboBox.setSelectedIndex(4);
encodingComboBox.setPreferredSize(new Dimension(90, 20)); encodingComboBox.setPreferredSize(new Dimension(90, 20));
@ -288,7 +288,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
JPanel northPane = new JPanel(new BorderLayout(8,8)); JPanel northPane = new JPanel(new BorderLayout(8,8));
controlPane.setLayout(new BorderLayout()); controlPane.setLayout(new BorderLayout());
controlPane.setPreferredSize(new Dimension(width,height)); controlPane.setPreferredSize(new Dimension(width,height));
needColumnNameCheckBox = new UICheckBox(Inter.getLocText("FR-Designer-FirstRow_IS_ColumnName"), false); needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-FirstRow_IS_ColumnName"), false);
needColumnNameCheckBox.setPreferredSize(new Dimension(checkBoxWidth, 20)); needColumnNameCheckBox.setPreferredSize(new Dimension(checkBoxWidth, 20));
northPane.add(needColumnNameCheckBox, BorderLayout.EAST); northPane.add(needColumnNameCheckBox, BorderLayout.EAST);
controlPane.add(northPane, BorderLayout.NORTH); controlPane.add(northPane, BorderLayout.NORTH);
@ -314,7 +314,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
if (urlFileRadioButton.isSelected()) { if (urlFileRadioButton.isSelected()) {
String url = urlText.getText().trim(); String url = urlText.getText().trim();
if (!checkURL(url)) { if (!checkURL(url)) {
throw new Exception(Inter.getLocText("FR-Designer_Add_JS_warning")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add_JS_warning"));
} }
} }
@ -347,16 +347,16 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double columnSize[] = {f, p, p}; double columnSize[] = {f, p, p};
double rowSize[] = {B, B, B, B, B, B, B}; double rowSize[] = {B, B, B, B, B, B, B};
needColumnNameCheckBox = new UICheckBox(Inter.getLocText("FR-Designer-FirstRow_IS_ColumnName"), true); needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-FirstRow_IS_ColumnName"), true);
dismenberLabel = new UILabel(Inter.getLocText("FR-Designer_Dismenber") + ":"); dismenberLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Dismenber") + ":");
tableDismemberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_TableDismember"), false); tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"), false);
tableDismemberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_TableDismember")); tableDismemberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"));
spaceDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Space"), true); spaceDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"), true);
spaceDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_Space")); spaceDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"));
commaDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_CommaDismenber"), false); commaDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"), false);
commaDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_CommaDismenber")); commaDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"));
otherDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Other") + ":", false); otherDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other") + ":", false);
otherDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_Other")); otherDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other"));
otherDismenberTextField = new UITextField(8); otherDismenberTextField = new UITextField(8);
otherDismenberTextField.setEditable(false); otherDismenberTextField.setEditable(false);
otherDismenberRadioButton.addChangeListener(new ChangeListener() { otherDismenberRadioButton.addChangeListener(new ChangeListener() {
@ -374,8 +374,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
bg2.add(spaceDismenberRadioButton); bg2.add(spaceDismenberRadioButton);
bg2.add(commaDismenberRadioButton); bg2.add(commaDismenberRadioButton);
bg2.add(otherDismenberRadioButton); bg2.add(otherDismenberRadioButton);
igoreOneMoreDelimiterCheckBox = new UICheckBox(Inter.getLocText("FR-Designer-Series_Dismenber_As_Single"), true); igoreOneMoreDelimiterCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Series_Dismenber_As_Single"), true);
encodeLabel = new UILabel(Inter.getLocText("FR-Designer-Encoding_Type") + ":"); encodeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Encoding_Type") + ":");
charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
Component[][] comps = { Component[][] comps = {
{encodeLabel,charsetComboBox,null}, {encodeLabel,charsetComboBox,null},
@ -475,7 +475,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} else { } else {
setPanel.add(textSetPanel(width,height), BorderLayout.NORTH); setPanel.add(textSetPanel(width,height), BorderLayout.NORTH);
} }
String tipContent = Inter.getLocText("FR-Designer-Type_Parameter") + "reportlets/excel/FineReport${abc}." + getFileSuffixToString() + "<br>" String tipContent = com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Type_Parameter") + "reportlets/excel/FineReport${abc}." + getFileSuffixToString() + "<br>"
+ "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + "&nbsp</body> </html> "; + "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + "&nbsp</body> </html> ";
tips.setText(tipContent); tips.setText(tipContent);
setPanel.revalidate(); setPanel.revalidate();
@ -487,7 +487,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshAction extends UITableEditAction { private class RefreshAction extends UITableEditAction {
public RefreshAction() { public RefreshAction() {
this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }
@ -759,7 +759,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"File", "DS-TableData"}); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_File");
} }
private void preview() { private void preview() {
@ -782,7 +782,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
xmlNodeTree = new XMLNodeTree(); xmlNodeTree = new XMLNodeTree();
this.add(new JScrollPane(xmlNodeTree)); this.add(new JScrollPane(xmlNodeTree));
keyPointLaber = new UILabel(Inter.getLocText("FR-Designer_KeyPoint") + ":"); keyPointLaber = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_KeyPoint") + ":");
refreshAction = new RefreshParameterAction(); refreshAction = new RefreshParameterAction();
ToolBarDef toolbarDef = new ToolBarDef(); ToolBarDef toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(refreshAction); toolbarDef.addShortCut(refreshAction);
@ -800,7 +800,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshParameterAction extends UpdateAction { private class RefreshParameterAction extends UpdateAction {
public RefreshParameterAction() { public RefreshParameterAction() {
this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
this.setMnemonic('r'); this.setMnemonic('r');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }
@ -939,7 +939,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} }
private void loadedTreeModel(){ private void loadedTreeModel(){
ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(Inter.getLocText("FR-Designer_loadedTreeModel")); ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_loadedTreeModel"));
rootTreeNode.setExpanded(false); rootTreeNode.setExpanded(false);
rootTreeNode.setAllowsChildren(false); rootTreeNode.setAllowsChildren(false);
DefaultTreeModel loadedTreeModel = new DefaultTreeModel(rootTreeNode); DefaultTreeModel loadedTreeModel = new DefaultTreeModel(rootTreeNode);

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.general.Inter;
public class MaxMemRowCountPanel extends UIToolbar { public class MaxMemRowCountPanel extends UIToolbar {
private static final int ALL_IN_MEMORY = 0; private static final int ALL_IN_MEMORY = 0;
@ -51,7 +51,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.setFloatable(false); this.setFloatable(false);
this.setRollover(true); this.setRollover(true);
this.setBackground(UIConstants.NORMAL_BACKGROUND); this.setBackground(UIConstants.NORMAL_BACKGROUND);
String[] cacheList = { Inter.getLocText("Save_All_Records_In_Memory"), Inter.getLocText("Max-Mem-Row-Count") }; String[] cacheList = { com.fr.design.i18n.Toolkit.i18nText("Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Max-Mem-Row-Count") };
switchCache = new UIComboBox(cacheList); switchCache = new UIComboBox(cacheList);
switchCache.addActionListener(switchStateL); switchCache.addActionListener(switchStateL);
numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1); numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
@ -73,7 +73,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
switchCache.setSelectedIndex(MAX_IN_MEMORY); switchCache.setSelectedIndex(MAX_IN_MEMORY);
this.add(new UILabel(" ")); this.add(new UILabel(" "));
this.add(numberSpinner); this.add(numberSpinner);
this.add(new UILabel(" " + Inter.getLocText("Row"))); this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Row")));
this.validate(); this.validate();
this.repaint(); this.repaint();
} }

14
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -18,7 +18,7 @@ import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableEditorPane; import com.fr.design.gui.itableeditorpane.UITableEditorPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -66,7 +66,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
jpanel.setLayout(new BorderLayout()); jpanel.setLayout(new BorderLayout());
JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
UILabel chooseTableData = new UILabel(Inter.getLocText(new String[]{"Select_Data_Set", "Merge"})); UILabel chooseTableData = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Select_To_Merge"));
UIButton previewButton = new UIButton(); UIButton previewButton = new UIButton();
previewButton.setIcon(BaseUtils.readIcon("/com/fr/web/images/preview.png")); previewButton.setIcon(BaseUtils.readIcon("/com/fr/web/images/preview.png"));
previewButton.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); previewButton.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -88,7 +88,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
} }
private void initAllBarPane(String multiName) { private void initAllBarPane(String multiName) {
UILabel headLabel = new UILabel(Inter.getLocText("Multi_nam_formula")); UILabel headLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Multi_nam_formula"));
setResMap(); setResMap();
int len = resMap.size(); int len = resMap.size();
// 10个正好不会出现滚动条 // 10个正好不会出现滚动条
@ -131,7 +131,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
public UITableEditAction[] createAction() { public UITableEditAction[] createAction() {
return new UITableEditAction[]{new RefreshAction()}; return new UITableEditAction[]{new RefreshAction()};
} }
}, " " + Inter.getLocText(new String[]{"DS-TableData", "DEFAULT", "Parameter"})); }, " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Default_Parameter"));
jpanel.add(editorPane, BorderLayout.CENTER); jpanel.add(editorPane, BorderLayout.CENTER);
@ -140,7 +140,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
private class RefreshAction extends UITableEditAction { private class RefreshAction extends UITableEditAction {
public RefreshAction() { public RefreshAction() {
this.setName(Inter.getLocText("Refresh")); this.setName(com.fr.design.i18n.Toolkit.i18nText("Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }
@ -190,7 +190,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Relation_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Relation_TableData");
} }
@Override @Override
@ -307,7 +307,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
formulaButton.setEnabled(false); formulaButton.setEnabled(false);
formulaButton.setPreferredSize(new Dimension(25, 23)); formulaButton.setPreferredSize(new Dimension(25, 23));
formulaButton.addActionListener(getFormulaActionListener()); formulaButton.addActionListener(getFormulaActionListener());
rightPanel.add(new UILabel(Inter.getLocText("Conditions_formula") + " =")); rightPanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Conditions_formula") + " ="));
rightPanel.add(formulaContentTextField); rightPanel.add(formulaContentTextField);
rightPanel.add(formulaButton); rightPanel.add(formulaButton);

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/OneListTableModel.java

@ -9,7 +9,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.Inter;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
//august:按理说,这个只有一列 就不该用jtable。不过这样总比之前用ArrayTableModel好 //august:按理说,这个只有一列 就不该用jtable。不过这样总比之前用ArrayTableModel好
@ -64,7 +64,7 @@ public abstract class OneListTableModel<T> extends UITableModelAdapter<T> {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
super.actionPerformed(e); super.actionPerformed(e);
FILEChooserPane fileChooser = FILEChooserPane.getInstance(false, false, true, new ChooseFileFilter("js", "javascript" + Inter.getLocText("File"))); FILEChooserPane fileChooser = FILEChooserPane.getInstance(false, false, true, new ChooseFileFilter("js", "javascript" + com.fr.design.i18n.Toolkit.i18nText("File")));
if(fileChooser.showOpenDialog(DesignerContext.getDesignerFrame()) == FILEChooserPane.OK_OPTION) { if(fileChooser.showOpenDialog(DesignerContext.getDesignerFrame()) == FILEChooserPane.OK_OPTION) {
final FILE file = fileChooser.getSelectedFILE(); final FILE file = fileChooser.getSelectedFILE();
if(file == null) { if(file == null) {
@ -90,7 +90,7 @@ public abstract class OneListTableModel<T> extends UITableModelAdapter<T> {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
super.actionPerformed(e); super.actionPerformed(e);
FILEChooserPane fileChooser = FILEChooserPane.getInstance(false, false, true, new ChooseFileFilter("css", "css" + Inter.getLocText("File"))); FILEChooserPane fileChooser = FILEChooserPane.getInstance(false, false, true, new ChooseFileFilter("css", "css" + com.fr.design.i18n.Toolkit.i18nText("File")));
if(fileChooser.showOpenDialog(DesignerContext.getDesignerFrame()) == FILEChooserPane.OK_OPTION) { if(fileChooser.showOpenDialog(DesignerContext.getDesignerFrame()) == FILEChooserPane.OK_OPTION) {
final FILE file = fileChooser.getSelectedFILE(); final FILE file = fileChooser.getSelectedFILE();
if(file == null) { if(file == null) {

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

@ -28,7 +28,7 @@ import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -51,7 +51,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
"com.mysql.jdbc.Driver", "com.mysql.jdbc.Driver",
"org.gjt.mm.mysql.Driver" "org.gjt.mm.mysql.Driver"
}; // 需要隐藏面板的数据库的驱动 }; // 需要隐藏面板的数据库的驱动
private static final String PREVIEW_BUTTON = Inter.getLocText("FR-Designer_Preview"); private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
private ConnectionTableProcedurePane connectionTableProcedurePane; private ConnectionTableProcedurePane connectionTableProcedurePane;
private JPanel cardpane; private JPanel cardpane;
private CardLayout cardLayout; private CardLayout cardLayout;
@ -88,7 +88,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
storeProcedureContextPane.setPreferredSize(new Dimension(680, 600)); storeProcedureContextPane.setPreferredSize(new Dimension(680, 600));
JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
namePane.add(new UILabel(Inter.getLocText("FR-Designer_Datasource-Stored_Procedure") + ":")); namePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Datasource-Stored_Procedure") + ":"));
namePane.add(queryText); namePane.add(queryText);
inAutoeditorPane = new UITableEditorPane<StoreProcedureParameter>(new StoreProcedureTableModel()); inAutoeditorPane = new UITableEditorPane<StoreProcedureParameter>(new StoreProcedureTableModel());
autoEditorPane = new UITableEditorPane<StoreProcedureParameter>(new AutoStoreProcedureTableModel()); autoEditorPane = new UITableEditorPane<StoreProcedureParameter>(new AutoStoreProcedureTableModel());
@ -153,7 +153,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
toolBarDef.addShortCut(new PreviewAction()); toolBarDef.addShortCut(new PreviewAction());
toolBarDef.addShortCut(new RefreshAction()); toolBarDef.addShortCut(new RefreshAction());
toolBarDef.addShortCut(SeparatorDef.DEFAULT); toolBarDef.addShortCut(SeparatorDef.DEFAULT);
isShareCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Share_DBTableData")); isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Is_Share_DBTableData"));
maxPanel = new MaxMemRowCountPanel(); maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null); maxPanel.setBorder(null);
UIToolbar toolbar = ToolBarDef.createJToolBar(); UIToolbar toolbar = ToolBarDef.createJToolBar();
@ -170,7 +170,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Datasource-Stored_Procedure"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Datasource-Stored_Procedure");
} }
@Override @Override
@ -196,7 +196,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
warningLabel.setText(StringUtils.EMPTY); warningLabel.setText(StringUtils.EMPTY);
} catch (Exception ex) { } catch (Exception ex) {
if (ex instanceof SQLException) { if (ex instanceof SQLException) {
warningLabel.setText(Inter.getLocText(new String[]{"Database", "Datasource-Connection_failed"})); warningLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"));
} else { } else {
warningLabel.setText(ex.getMessage()); warningLabel.setText(ex.getMessage());
} }
@ -237,9 +237,9 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
if (StringUtils.isBlank(dbName)) { if (StringUtils.isBlank(dbName)) {
try { try {
throw new Exception(Inter.getLocText("FR-Designer_Connect_SQL_Cannot_Null") + "."); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) { } catch (Exception e) {
JOptionPane.showMessageDialog(ProcedureDataPane.this, Inter.getLocText("FR-Designer_Connect_SQL_Cannot_Null") + "."); JOptionPane.showMessageDialog(ProcedureDataPane.this, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
} }
} }
@ -319,7 +319,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
storeProcedureContext.setText(procedureText); storeProcedureContext.setText(procedureText);
warningLabel.setText(""); warningLabel.setText("");
} catch (Exception e) { } catch (Exception e) {
warningLabel.setText(Inter.getLocText(new String[]{"Database", "Datasource-Connection_failed"})); warningLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"));
storeProcedureContext.setText(""); storeProcedureContext.setText("");
editorPane.populate(new StoreProcedureParameter[0]); editorPane.populate(new StoreProcedureParameter[0]);
} }
@ -357,7 +357,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
protected class RefreshAction extends UITableEditAction { protected class RefreshAction extends UITableEditAction {
public RefreshAction() { public RefreshAction() {
this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
} }

12
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureListPane.java

@ -22,7 +22,7 @@ import java.util.List;
public class ProcedureListPane extends JListControlPane { public class ProcedureListPane extends JListControlPane {
public ProcedureListPane() { public ProcedureListPane() {
super(); super();
this.addEditingListner(new PropertyChangeAdapter() { this.addEditingListener(new PropertyChangeAdapter() {
@Override @Override
public void propertyChange() { public void propertyChange() {
TableDataSource source = DesignTableDataManager.getEditingTableDataSource(); TableDataSource source = DesignTableDataManager.getEditingTableDataSource();
@ -33,16 +33,16 @@ public class ProcedureListPane extends JListControlPane {
String tempName = getEditingName(); String tempName = getEditingName();
if(StringUtils.isEmpty(tempName)) { if(StringUtils.isEmpty(tempName)) {
nameableList.stopEditing(); nameableList.stopEditing();
//JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), Inter.getLocText("NOT_NULL_Des") + "," + Inter.getLocText("Please_Rename") + "!"); //JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), com.fr.design.i18n.Toolkit.i18nText("NOT_NULL_Des") + "," + com.fr.design.i18n.Toolkit.i18nText("Please_Rename") + "!");
setWarnigText(nameableList.getSelectedIndex()); setIllegalIndex(nameableList.getSelectedIndex());
return; return;
} }
for(int i = 0; i < allDSNames.length; i++) { for(int i = 0; i < allDSNames.length; i++) {
String dsname = allDSNames[i]; String dsname = allDSNames[i];
if (ComparatorUtils.equals(dsname, tempName)) { if (ComparatorUtils.equals(dsname, tempName)) {
// JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), Inter.getLocText(new String[]{"already_exists", "TableData"}) // JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), com.fr.design.i18n.Toolkit.i18nText(new String[]{"already_exists", "TableData"})
// + tempName + "," + Inter.getLocText("Please_Rename") + "!"); // + tempName + "," + com.fr.design.i18n.Toolkit.i18nText("Please_Rename") + "!");
setWarnigText(nameableList.getSelectedIndex()); setIllegalIndex(nameableList.getSelectedIndex());
break; break;
} }
} }

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java

@ -5,7 +5,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.ProcedureConfig; import com.fr.file.ProcedureConfig;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -22,7 +22,7 @@ public class ProcedureManagerPane extends LoadingBasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Datasource-Stored_Procedure"); return com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure");
} }
public void populate(ProcedureConfig procedureConfig) { public void populate(ProcedureConfig procedureConfig) {

44
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java

@ -13,7 +13,7 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import javax.swing.*; import javax.swing.*;
@ -29,13 +29,13 @@ public class StoreProcedureParameterPane extends BasicPane {
}; };
private static NameObject[] nameAndValue = new NameObject[]{ private static NameObject[] nameAndValue = new NameObject[]{
new NameObject(Inter.getLocText("Cursor"), StoreProcedureConstants.CURSOR), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Cursor"), StoreProcedureConstants.CURSOR),
new NameObject(Inter.getLocText("Parameter-String"), StoreProcedureConstants.VARCHAR), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-String"), StoreProcedureConstants.VARCHAR),
new NameObject(Inter.getLocText("Integer"), StoreProcedureConstants.INTEGER), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Integer"), StoreProcedureConstants.INTEGER),
new NameObject(Inter.getLocText("Double"), StoreProcedureConstants.DECIMAL), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Double"), StoreProcedureConstants.DECIMAL),
new NameObject(Inter.getLocText("Date"), StoreProcedureConstants.DATE), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Date"), StoreProcedureConstants.DATE),
new NameObject(Inter.getLocText("Parameter-Boolean"), StoreProcedureConstants.BOOLEAN), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"), StoreProcedureConstants.BOOLEAN),
new NameObject(Inter.getLocText("Formula"), StoreProcedureConstants.FORMULA), new NameObject(com.fr.design.i18n.Toolkit.i18nText("Formula"), StoreProcedureConstants.FORMULA),
new NameObject("IN",StoreProcedureConstants.IN), new NameObject("IN",StoreProcedureConstants.IN),
new NameObject("OUT",StoreProcedureConstants.OUT), new NameObject("OUT",StoreProcedureConstants.OUT),
new NameObject("INOUT",StoreProcedureConstants.INOUT) new NameObject("INOUT",StoreProcedureConstants.INOUT)
@ -61,7 +61,7 @@ public class StoreProcedureParameterPane extends BasicPane {
public void checkValid() throws Exception{ public void checkValid() throws Exception{
StoreProcedureParameter spp=this.update(); StoreProcedureParameter spp=this.update();
if(spp.getSchema()!= StoreProcedureConstants.OUT && spp.getType() == StoreProcedureConstants.CURSOR){ if(spp.getSchema()!= StoreProcedureConstants.OUT && spp.getType() == StoreProcedureConstants.CURSOR){
throw new Exception(Inter.getLocText("IN_and_INOUT_type_not_as_cursor")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("IN_and_INOUT_type_not_as_cursor"));
} }
} }
@ -71,11 +71,11 @@ public class StoreProcedureParameterPane extends BasicPane {
schemaCombo = new UIComboBox(); schemaCombo = new UIComboBox();
initUIComboBox(schemaCombo, schemaName); initUIComboBox(schemaCombo, schemaName);
JPanel namePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel namePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
namePane.add(new UILabel(" " + Inter.getLocText("Name") + ":"), BorderLayout.WEST); namePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Name") + ":"), BorderLayout.WEST);
nameField = new UITextField(10); nameField = new UITextField(10);
namePane.add(nameField, BorderLayout.CENTER); namePane.add(nameField, BorderLayout.CENTER);
namePane.add(new UILabel(" "), BorderLayout.EAST); namePane.add(new UILabel(" "), BorderLayout.EAST);
valuePane.add(new UILabel(" " + Inter.getLocText("CellWrite-InsertRow_DEFAULT") + ":"), BorderLayout.WEST); valuePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("CellWrite-InsertRow_DEFAULT") + ":"), BorderLayout.WEST);
valuePane.add(valueEditPane, BorderLayout.CENTER); valuePane.add(valueEditPane, BorderLayout.CENTER);
valuePane.add(new UILabel(" "), BorderLayout.EAST); valuePane.add(new UILabel(" "), BorderLayout.EAST);
Component[][] components = {{null}, Component[][] components = {{null},
@ -95,7 +95,7 @@ public class StoreProcedureParameterPane extends BasicPane {
private JPanel addPane(String s, int i, UIComboBox combo){ private JPanel addPane(String s, int i, UIComboBox combo){
JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(new UILabel(" " + Inter.getLocText(s) + ":"), BorderLayout.WEST); pane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText(s) + ":"), BorderLayout.WEST);
combo.setSelectedIndex(i); combo.setSelectedIndex(i);
pane.add(combo, BorderLayout.CENTER); pane.add(combo, BorderLayout.CENTER);
pane.add(new UILabel(" "), BorderLayout.EAST); pane.add(new UILabel(" "), BorderLayout.EAST);
@ -105,7 +105,7 @@ public class StoreProcedureParameterPane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Parameter"); return com.fr.design.i18n.Toolkit.i18nText("Parameter");
} }
public void populate(StoreProcedureParameter stpParameter) { public void populate(StoreProcedureParameter stpParameter) {
@ -124,24 +124,24 @@ public class StoreProcedureParameterPane extends BasicPane {
Object value = valueEditPane.update(); Object value = valueEditPane.update();
String type = ""; String type = "";
if(value instanceof CursorEditor) if(value instanceof CursorEditor)
type=Inter.getLocText("Cursor"); type=com.fr.design.i18n.Toolkit.i18nText("Cursor");
else if(value instanceof String ){ else if(value instanceof String ){
if(((String) value).length() > 0 && ((String) value).charAt(0) == '=') if(((String) value).length() > 0 && ((String) value).charAt(0) == '=')
type = Inter.getLocText("Formula"); type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else else
type = Inter.getLocText("Parameter-String"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
}else if(value instanceof Integer) }else if(value instanceof Integer)
type = Inter.getLocText("Integer"); type = com.fr.design.i18n.Toolkit.i18nText("Integer");
else if(value instanceof Double) else if(value instanceof Double)
type = Inter.getLocText("Double"); type = com.fr.design.i18n.Toolkit.i18nText("Double");
else if(value instanceof Date) else if(value instanceof Date)
type = Inter.getLocText("Date"); type = com.fr.design.i18n.Toolkit.i18nText("Date");
else if(value instanceof Boolean) else if(value instanceof Boolean)
type = Inter.getLocText("Parameter-Boolean"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
else if(value instanceof BaseFormula) else if(value instanceof BaseFormula)
type = Inter.getLocText("Formula"); type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else else
type = Inter.getLocText("Parameter-String"); type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
int typeVl = getInfo4Value(type); int typeVl = getInfo4Value(type);
p.setType(typeVl); p.setType(typeVl);
String schema = (String)schemaCombo.getSelectedItem(); String schema = (String)schemaCombo.getSelectedItem();

10
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java

@ -13,12 +13,12 @@ import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.Inter;
public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedureParameter> { public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedureParameter> {
public StoreProcedureTableModel() { public StoreProcedureTableModel() {
super(new String[] { Inter.getLocText("Parameter"), Inter.getLocText("Type"), Inter.getLocText("Model"), Inter.getLocText("Value") }); super(new String[] { com.fr.design.i18n.Toolkit.i18nText("Parameter"), com.fr.design.i18n.Toolkit.i18nText("Type"), com.fr.design.i18n.Toolkit.i18nText("Model"), com.fr.design.i18n.Toolkit.i18nText("Value") });
if (shouldResponseDoubleClickAction()) { if (shouldResponseDoubleClickAction()) {
table.addMouseListener(new MouseAdapter() { table.addMouseListener(new MouseAdapter() {
@ -36,7 +36,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane(); final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(spp); pane.populate(spp);
pane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("Parameter"))); pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame()); BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() { stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -90,7 +90,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = new StoreProcedureParameter(); StoreProcedureParameter para = new StoreProcedureParameter();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane(); final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(para); pane.populate(para);
pane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("Parameter"))); pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame()); BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() { stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -112,7 +112,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = getSelectedValue(); StoreProcedureParameter para = getSelectedValue();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane(); final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(para); pane.populate(para);
pane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("Parameter"))); pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame()); BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() { stpEditDialog.addDialogActionListener(new DialogActionAdapter() {

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -62,7 +62,7 @@ public class TableDataManagerPane extends LoadingBasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("DS-Server_TableData"); return com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData");
} }
public void populate(TableDataConfig tableDataConfig) { public void populate(TableDataConfig tableDataConfig) {

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/TreeTableDataPane.java

@ -3,7 +3,7 @@ package com.fr.design.data.tabledata.tabledatapane;
import com.fr.design.data.datapane.TreeTableDataDictPane; import com.fr.design.data.datapane.TreeTableDataDictPane;
import com.fr.data.impl.RecursionTableData; import com.fr.data.impl.RecursionTableData;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import java.awt.*; import java.awt.*;
@ -39,7 +39,7 @@ public class TreeTableDataPane extends AbstractTableDataPane<RecursionTableData>
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"Tree", "DS-TableData"}); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Tabledata_Type_Tree");
} }
} }

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

@ -14,7 +14,7 @@ import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
@ -79,7 +79,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
getWorker().cancel(true); getWorker().cancel(true);
} }
}); });
loadingBar = new AutoProgressBar(dialog, Inter.getLocText("FR-Designer_Loading_Data"), "", 0, 100) { loadingBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Loading_Data"), "", 0, 100) {
public void doMonitorCanceled() { public void doMonitorCanceled() {
getDialog().setVisible(false); getDialog().setVisible(false);
getWorker().cancel(true); getWorker().cancel(true);
@ -101,7 +101,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return columnNameList; return columnNameList;
} }
if (!createStore(false)) { if (!createStore(false)) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Engine_No-tableData")); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Engine_No-tableData"));
return new ArrayList<String>(); return new ArrayList<String>();
} }
columnNameList = Arrays.asList(procedureDataModel.getColumnName()); columnNameList = Arrays.asList(procedureDataModel.getColumnName());
@ -176,7 +176,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return null; return null;
} }
}.execute(); }.execute();
connectionBar = new AutoProgressBar(dialog, Inter.getLocText("Utils-Now_create_connection"), "", 0, 100) { connectionBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("Utils-Now_create_connection"), "", 0, 100) {
public void doMonitorCanceled() { public void doMonitorCanceled() {
connectionBar.close(); connectionBar.close();
worker.cancel(true); worker.cancel(true);
@ -194,7 +194,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
connectionBar.close(); connectionBar.close();
// bug 61345 预览失败时,关闭窗口 // bug 61345 预览失败时,关闭窗口
dialog.setVisible(false); dialog.setVisible(false);
throw new Exception(Inter.getLocText("Datasource-Connection_failed")); throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"));
} }
connectionBar.close(); connectionBar.close();
storeProcedure.resetDataModelList(); storeProcedure.resetDataModelList();

4
designer-base/src/main/java/com/fr/design/dialog/BasicPane.java

@ -2,7 +2,7 @@ package com.fr.design.dialog;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.general.Inter;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -309,7 +309,7 @@ public abstract class BasicPane extends JPanel {
nameTextField = new UITextField(30); nameTextField = new UITextField(30);
JPanel northPane = new JPanel(new BorderLayout(4, 4)); JPanel northPane = new JPanel(new BorderLayout(4, 4));
northPane.add(new UILabel(Inter.getLocText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.WEST); northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Hyperlink_Name") + ":"), BorderLayout.WEST);
northPane.add(nameTextField, BorderLayout.CENTER); northPane.add(nameTextField, BorderLayout.CENTER);
northPane.add(showfield = new UILabel(" "), BorderLayout.EAST); northPane.add(showfield = new UILabel(" "), BorderLayout.EAST);
showfield.setForeground(new Color(204, 0, 1)); showfield.setForeground(new Color(204, 0, 1));

6
designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java

@ -23,7 +23,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
public class InformationWarnPane extends JPanel{ public class InformationWarnPane extends JPanel{
@ -80,7 +80,7 @@ public class InformationWarnPane extends JPanel{
}); });
arrow.setBounds(90,100,30,30); arrow.setBounds(90,100,30,30);
UILabel more = new UILabel("<html><font color='blue'FACE='MicroSoft YaHei'>"+Inter.getLocText("More-information")+"</font></html>"); UILabel more = new UILabel("<html><font color='blue'FACE='MicroSoft YaHei'>"+com.fr.design.i18n.Toolkit.i18nText("More-information")+"</font></html>");
more.setBounds(125,102,55,25); more.setBounds(125,102,55,25);
moreText = new UITextArea(moreInfo); moreText = new UITextArea(moreInfo);
@ -149,7 +149,7 @@ public class InformationWarnPane extends JPanel{
private JPanel createControlButtonPane() { private JPanel createControlButtonPane() {
controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
okButton = new UIButton("<html><font FACE='MicroSoft YaHei'>" + Inter.getLocText("OK") + "</font></html>") { okButton = new UIButton("<html><font FACE='MicroSoft YaHei'>" + com.fr.design.i18n.Toolkit.i18nText("OK") + "</font></html>") {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
// TODO Auto-generated method stub // TODO Auto-generated method stub

10
designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java

@ -19,7 +19,7 @@ import javax.swing.JSeparator;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
/** /**
* Wizard dialog. * Wizard dialog.
@ -104,25 +104,25 @@ public class JWizardDialog extends BasicDialog {
workArea.setLayout(cardLayout); workArea.setLayout(cardLayout);
// Buttons // Buttons
buttonBack = new UIButton(Inter.getLocText("Previous")); buttonBack = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Previous"));
buttonBack.addActionListener(new ActionListener() { buttonBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
back(); back();
} }
}); });
buttonNext = new UIButton(Inter.getLocText("Next")); buttonNext = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Next"));
buttonNext.addActionListener(new ActionListener() { buttonNext.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
next(); next();
} }
}); });
buttonFinish = new UIButton(Inter.getLocText("Finish")); buttonFinish = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Finish"));
buttonFinish.addActionListener(new ActionListener() { buttonFinish.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
finish(); finish();
} }
}); });
buttonCancel = new UIButton(Inter.getLocText("Cancel")); buttonCancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
buttonCancel.addActionListener(new ActionListener() { buttonCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
cancel(); cancel();

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

@ -4,7 +4,7 @@ import com.fr.base.FRContext;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -100,7 +100,7 @@ public abstract class UIDialog extends JDialog {
} }
private void addCancelButton(JPanel buttonsPane) { private void addCancelButton(JPanel buttonsPane) {
cancelButton = new UIButton(Inter.getLocText("Cancel")); cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
cancelButton.setName(CANCEL_BUTTON); cancelButton.setName(CANCEL_BUTTON);
cancelButton.setMnemonic('C'); cancelButton.setMnemonic('C');
buttonsPane.add(cancelButton); buttonsPane.add(cancelButton);
@ -113,7 +113,7 @@ public abstract class UIDialog extends JDialog {
} }
private void addOkButton(JPanel buttonsPane) { private void addOkButton(JPanel buttonsPane) {
okButton = new UIButton(Inter.getLocText("OK")); okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
okButton.setName(OK_BUTTON); okButton.setName(OK_BUTTON);
okButton.setMnemonic('O'); okButton.setMnemonic('O');
buttonsPane.add(okButton); buttonsPane.add(okButton);

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

@ -20,7 +20,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -67,7 +67,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane(); JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout()); content.setLayout(new BorderLayout());
content.add(new DoubleDeckValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))}), BorderLayout.NORTH); content.add(new DoubleDeckValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))}), BorderLayout.NORTH);
GUICoreUtils.centerWindow(jf); GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400); jf.setSize(290, 400);
jf.setVisible(true); jf.setVisible(true);
@ -97,7 +97,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
if (globalNameListener != null) { if (globalNameListener != null) {
globalNameListener.setGlobalName(Inter.getLocText("CellWrite-InsertRow_Policy")); globalNameListener.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("CellWrite-InsertRow_Policy"));
} }
Object oldValue = currentEditor.getValue(); Object oldValue = currentEditor.getValue();
setCurrentEditor(upButton.getSelectedIndex()); setCurrentEditor(upButton.getSelectedIndex());
@ -116,7 +116,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Values-Editor"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
} }
public Editor getCurrentEditor() { public Editor getCurrentEditor() {
@ -164,7 +164,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (globalNameListener != null) { if (globalNameListener != null) {
globalNameListener.setGlobalName(Inter.getLocText("CellWrite-InsertRow_Policy")); globalNameListener.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("CellWrite-InsertRow_Policy"));
} }
Object oldValue = currentEditor.getValue(); Object oldValue = currentEditor.getValue();
setCurrentEditor(j); setCurrentEditor(j);
@ -222,7 +222,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
String name = currentEditor.getName(); String name = currentEditor.getName();
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
//bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了?
if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Formula"))) {
columnIndex = ((FormulaEditor) currentEditor).getFormula(); columnIndex = ((FormulaEditor) currentEditor).getFormula();
} }
@ -238,7 +238,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY; Object columnName = StringUtils.EMPTY;
if (ComparatorUtils.equals(name, Inter.getLocText("FR-Designer_Formula"))) { if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString()); columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
} }
@ -254,7 +254,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY; Object columnName = StringUtils.EMPTY;
if (ComparatorUtils.equals(name, Inter.getLocText("FR-Designer_Formula"))) { if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString()); columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
} }
@ -283,7 +283,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
int i; int i;
boolean containFormulaType = false; boolean containFormulaType = false;
for (i = 0; i < cards.length; i++) { for (i = 0; i < cards.length; i++) {
if (ComparatorUtils.equals(cards[i].getName(), Inter.getLocText("FR-Engine_Parameter-Formula"))) { if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Parameter-Formula"))) {
containFormulaType = true; containFormulaType = true;
break; break;
} }
@ -302,8 +302,8 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) { if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) { if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Edit_String_To_Formula") int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
+ "?", Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION); + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) { if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j); setCurrentEditor(j);

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

@ -18,7 +18,7 @@ import com.fr.design.gui.imenu.UIPopupEastAttrMenu;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -101,7 +101,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Values-Editor"); return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
} }
public Editor getCurrentEditor() { public Editor getCurrentEditor() {
@ -153,7 +153,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (globalNameListener != null) { if (globalNameListener != null) {
globalNameListener.setGlobalName(Inter.getLocText("CellWrite-InsertRow_Policy")); globalNameListener.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("CellWrite-InsertRow_Policy"));
} }
Object oldValue = currentEditor.getValue(); Object oldValue = currentEditor.getValue();
setCurrentEditor(j); setCurrentEditor(j);
@ -207,7 +207,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
//bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了?
//MoMeak:我也想注释了,但是有bug啊。。。 //MoMeak:我也想注释了,但是有bug啊。。。
if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Formula"))) {
columnIndex = ((FormulaEditor) currentEditor).getFormula(); columnIndex = ((FormulaEditor) currentEditor).getFormula();
} }
@ -219,7 +219,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY; Object columnName = StringUtils.EMPTY;
if (ComparatorUtils.equals(name, Inter.getLocText("FR-Designer_Formula"))) { if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString()); columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
} }
@ -235,7 +235,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY; Object columnName = StringUtils.EMPTY;
if (ComparatorUtils.equals(name, Inter.getLocText("FR-Designer_Formula"))) { if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString()); columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
} }
@ -264,7 +264,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
int i; int i;
boolean containFormulaType = false; boolean containFormulaType = false;
for (i = 0; i < cards.length; i++) { for (i = 0; i < cards.length; i++) {
if (ComparatorUtils.equals(cards[i].getName(), Inter.getLocText("FR-Engine_Parameter-Formula"))) { if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Parameter-Formula"))) {
containFormulaType = true; containFormulaType = true;
break; break;
} }
@ -283,8 +283,8 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) { if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) { if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Edit_String_To_Formula") int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
+ "?", Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION); + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) { if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j); setCurrentEditor(j);

72
designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java

@ -20,7 +20,7 @@ import com.fr.design.editor.editor.WidgetNameEditor;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -83,7 +83,7 @@ public class ValueEditorPaneFactory {
* @return 返回公式编辑器面板 * @return 返回公式编辑器面板
*/ */
public static ValueEditorPane createFormulaValueEditorPane() { public static ValueEditorPane createFormulaValueEditorPane() {
return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))}, return createValueEditorPane(new Editor[]{new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))},
StringUtils.EMPTY, StringUtils.EMPTY); StringUtils.EMPTY, StringUtils.EMPTY);
} }
@ -227,12 +227,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] basicEditors() { public static Editor<?>[] basicEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new SpinnerIntegerEditor(), new SpinnerIntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor formulaEditor
}; };
@ -244,15 +244,15 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] formEditors() { public static Editor<?>[] formEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new WidgetNameEditor(Inter.getLocText("FR-Designer_Widget")) new WidgetNameEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Widget"))
}; };
} }
@ -262,16 +262,16 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] extendedEditors() { public static Editor<?>[] extendedEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")) new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell"))
}; };
} }
@ -281,17 +281,17 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] extendedCellGroupEditors() { public static Editor<?>[] extendedCellGroupEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) new ColumnRowGroupEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Cell_Group"))
}; };
} }
@ -302,8 +302,8 @@ public class ValueEditorPaneFactory {
*/ */
public static Editor<?>[] cellGroupEditor() { public static Editor<?>[] cellGroupEditor() {
return new Editor[]{ return new Editor[]{
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) new ColumnRowGroupEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Cell_Group"))
}; };
} }
@ -316,7 +316,7 @@ public class ValueEditorPaneFactory {
*/ */
public static Editor<?>[] URLEditors(String popupName, String textEditorValue) { public static Editor<?>[] URLEditors(String popupName, String textEditorValue) {
return new Editor[]{ return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName), new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None") : popupName),
new TextEditor() new TextEditor()
}; };
} }
@ -330,9 +330,9 @@ public class ValueEditorPaneFactory {
*/ */
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) { public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{ return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName), new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None") : popupName),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")) new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))
}; };
} }
@ -342,20 +342,20 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] allEditors() { public static Editor<?>[] allEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
// formulaEditor.setEnabled(true); // formulaEditor.setEnabled(true);
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
new ColumnSelectedEditor(), new ColumnSelectedEditor(),
//23328 allEditors中删除控件选项 //23328 allEditors中删除控件选项
// new WidgetNameEditor(Inter.getLocText("Widget")) // new WidgetNameEditor(com.fr.design.i18n.Toolkit.i18nText("Widget"))
}; };
} }
@ -369,7 +369,7 @@ public class ValueEditorPaneFactory {
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
}; };
} }
@ -380,12 +380,12 @@ public class ValueEditorPaneFactory {
* @return 编辑器 * @return 编辑器
*/ */
public static Editor<?>[] noCRnoColumnEditors() { public static Editor<?>[] noCRnoColumnEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
@ -398,7 +398,7 @@ public class ValueEditorPaneFactory {
* @return 编辑器 * @return 编辑器
*/ */
public static Editor<?>[] numberEditors() { public static Editor<?>[] numberEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
@ -413,9 +413,9 @@ public class ValueEditorPaneFactory {
* @return 编辑器 * @return 编辑器
*/ */
public static Editor<?>[] dateEditors() { public static Editor<?>[] dateEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
}; };
@ -427,14 +427,14 @@ public class ValueEditorPaneFactory {
* @return 存储过程的编辑器 * @return 存储过程的编辑器
*/ */
public static Editor<?>[] StoreProcedureEditors() { public static Editor<?>[] StoreProcedureEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
formulaEditor.setEnabled(true); formulaEditor.setEnabled(true);
return new Editor[]{ return new Editor[]{
new CursorEditor(), new CursorEditor(),
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor formulaEditor
}; };
@ -451,10 +451,10 @@ public class ValueEditorPaneFactory {
list.add(new TextEditor()); list.add(new TextEditor());
list.add(new IntegerEditor()); list.add(new IntegerEditor());
list.add(new DoubleEditor()); list.add(new DoubleEditor());
list.add(new DateEditor(true, Inter.getLocText("FR-Designer_Date"))); list.add(new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")));
list.add(new BooleanEditor()); list.add(new BooleanEditor());
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
formulaEditor.setEnabled(true); formulaEditor.setEnabled(true);
list.add(formulaEditor); list.add(formulaEditor);
@ -493,12 +493,12 @@ public class ValueEditorPaneFactory {
JPanel paneLeft = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel paneLeft = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneLeft); pane.add(paneLeft);
paneLeft.add(new UILabel(" " + Inter.getLocText("FR-Designer_Actual_Value") + ":"), BorderLayout.NORTH); paneLeft.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Actual_Value") + ":"), BorderLayout.NORTH);
paneLeft.add(keyColumnPane, BorderLayout.CENTER); paneLeft.add(keyColumnPane, BorderLayout.CENTER);
JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneRight); pane.add(paneRight);
paneRight.add(new UILabel(" " + Inter.getLocText("FR-Designer_Display_Value") + ":"), BorderLayout.NORTH); paneRight.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(valueDictPane, BorderLayout.CENTER); paneRight.add(valueDictPane, BorderLayout.CENTER);

4
designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java

@ -5,7 +5,7 @@ package com.fr.design.editor.editor;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -42,7 +42,7 @@ public class BooleanEditor extends Editor<Boolean> {
booleanCheckBox = new UICheckBox("true"); booleanCheckBox = new UICheckBox("true");
this.add(booleanCheckBox, BorderLayout.CENTER); this.add(booleanCheckBox, BorderLayout.CENTER);
this.setValue(value); this.setValue(value);
this.setName(Inter.getLocText("Parameter-Boolean")); this.setName(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"));
booleanCheckBox.addItemListener(new ItemListener() { booleanCheckBox.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {

4
designer-base/src/main/java/com/fr/design/editor/editor/ColumnIndexEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.design.gui.icombobox.IntComboBox; import com.fr.design.gui.icombobox.IntComboBox;
import com.fr.general.Inter;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -26,7 +26,7 @@ public class ColumnIndexEditor extends Editor<Object> {
* @param value * @param value
*/ */
public ColumnIndexEditor(int value) { public ColumnIndexEditor(int value) {
this(value, Inter.getLocText("Datasource-Column_Index")); this(value, com.fr.design.i18n.Toolkit.i18nText("Datasource-Column_Index"));
} }
public ColumnIndexEditor(int value, String name) { public ColumnIndexEditor(int value, String name) {

4
designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -23,7 +23,7 @@ public class ColumnNameEditor extends ColumnIndexEditor {
} }
public ColumnNameEditor(String[] columnNames) { public ColumnNameEditor(String[] columnNames) {
this(columnNames, Inter.getLocText("ColumnName")); this(columnNames, com.fr.design.i18n.Toolkit.i18nText("ColumnName"));
} }
public ColumnNameEditor(final String[] columnNames, String name) { public ColumnNameEditor(final String[] columnNames, String name) {

4
designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -6,7 +6,7 @@ import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.general.data.TableDataColumn; import com.fr.general.data.TableDataColumn;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -28,7 +28,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
protected String[] columnNames; protected String[] columnNames;
public ColumnSelectedEditor() { public ColumnSelectedEditor() {
this.setName(Inter.getLocText(new String[]{"Data", "Columns"})); this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_DS_Column"));
this.setLayout(FRGUIPaneFactory.createLeftZeroLayout()); this.setLayout(FRGUIPaneFactory.createLeftZeroLayout());
tableDataComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource()); tableDataComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource());
columnNames = new String[0]; columnNames = new String[0];

8
designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java

@ -5,17 +5,17 @@ import java.awt.Dimension;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
//TODO:august what's this? //TODO:august what's this?
public class CursorEditor extends Editor<CursorEditor> { public class CursorEditor extends Editor<CursorEditor> {
private UILabel label; private UILabel label;
public CursorEditor(){ public CursorEditor(){
this.setLayout(FRGUIPaneFactory.createCenterFlowLayout()); this.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
label = new UILabel(Inter.getLocText("Cursor")); label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
this.add(label); this.add(label);
this.setPreferredSize(new Dimension(10,20)); this.setPreferredSize(new Dimension(10,20));
this.setName(Inter.getLocText("Cursor")); this.setName(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
this.setEnabled(false); this.setEnabled(false);
} }
@ -36,7 +36,7 @@ public class CursorEditor extends Editor<CursorEditor> {
@Override @Override
public void setValue(CursorEditor value) { public void setValue(CursorEditor value) {
label.setText(Inter.getLocText("Cursor")); label.setText(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
} }
} }

4
designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.general.Inter;
/** /**
* 双精度编辑器 * 双精度编辑器
@ -16,7 +16,7 @@ public class DoubleEditor extends NumberEditor<Double> {
} }
public DoubleEditor(Double value) { public DoubleEditor(Double value) {
super(value, Inter.getLocText("Parameter-Double")); super(value, com.fr.design.i18n.Toolkit.i18nText("Parameter-Double"));
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.general.Inter;
/** /**
* 单精度型编辑器 * 单精度型编辑器
@ -16,7 +16,7 @@ public class FloatEditor extends NumberEditor<Float> {
} }
public FloatEditor(Float value) { public FloatEditor(Float value) {
super(value, Inter.getLocText("Parameter-Float")); super(value, com.fr.design.i18n.Toolkit.i18nText("Parameter-Float"));
} }
@Override @Override

4
designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.general.Inter;
/** /**
* 整数编辑器 * 整数编辑器
@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor<Integer> {
} }
public IntegerEditor(Integer value) { public IntegerEditor(Integer value) {
super(value, Inter.getLocText("FR-Designer_Parameter_Integer")); super(value, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter_Integer"));
} }
@Override @Override

6
designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java

@ -5,7 +5,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icombobox.IntComboBox; import com.fr.design.gui.icombobox.IntComboBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -51,8 +51,8 @@ public class OldColumnIndexEditor extends Editor {
} }
protected void initComponents() { protected void initComponents() {
indexCheckBox = new UIRadioButton(Inter.getLocText("Datasource-Column_Index")); indexCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Column_Index"));
nameCheckBox = new UIRadioButton(Inter.getLocText("ColumnName")); nameCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("ColumnName"));
indexCheckBox.addActionListener(actionListener); indexCheckBox.addActionListener(actionListener);
nameCheckBox.addActionListener(actionListener); nameCheckBox.addActionListener(actionListener);
javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup(); javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup();

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

Loading…
Cancel
Save