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. 28
      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. 66
      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. 21
      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. 27
      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. 27
      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.Inter;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.EnvChangedListener;
@ -55,6 +56,7 @@ import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.FileHandler;
@ -205,7 +207,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
String installHome = StableUtils.getInstallHome();
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);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));
designerEnvManager.setCurEnvName(name);
@ -507,7 +509,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
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);
this.putEnv(name, 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;
}
/**
* 返回语言类型
*/
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) {
// marks:兼容6.1的
// 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);
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.file.HistoryTemplateListPane;
import com.fr.design.mainframe.*;
import com.fr.general.Inter;
/**
* Author : daisy
@ -17,7 +17,7 @@ public class ExitAuthorityEditAction extends TemplateComponentAction {
public ExitAuthorityEditAction(TargetComponent 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"));
}

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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -44,7 +44,7 @@ public class BBSAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -61,7 +61,7 @@ public class BBSAction extends UpdateAction
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BBS");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BBS");
}
@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.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -52,7 +52,7 @@ public void actionPerformed(ActionEvent arg0)
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BUG");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BUG");
}
@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.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class NeedAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class NeedAction extends UpdateAction
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_NEED");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_NEED");
}
@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.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -56,7 +56,7 @@ public void actionPerformed(ActionEvent arg0)
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_QUESTIONS");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_QUESTIONS");
}
@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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class SignAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class SignAction extends UpdateAction
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_SIGN");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_SIGN");
}
@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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -39,7 +39,7 @@ public class UpAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -57,7 +57,7 @@ public class UpAction extends UpdateAction
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_UPDATE");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_UPDATE");
}
@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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -45,7 +45,7 @@ public class VideoAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -63,7 +63,7 @@ public class VideoAction extends UpdateAction
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_VIDEO");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_VIDEO");
}
@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.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.KeyEvent;
@ -20,7 +20,7 @@ public class CopyAction extends TemplateComponentAction {
public CopyAction(TargetComponent 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.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
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.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
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) {
super(t);
this.setName(Inter.getLocText("M_Edit-Cut"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Cut"));
this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
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.design.actions.TemplateComponentAction;
import com.fr.design.designer.TargetComponent;
import com.fr.general.Inter;
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) {
super(t);
this.setName(Inter.getLocText("M_Edit-Paste"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
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.mainframe.JTemplate;
import com.fr.general.Inter;
/**
* Close Report.
@ -19,7 +19,7 @@ public class CloseTemplateAction extends JTemplateAction<JTemplate<?, ?>> {
public CloseTemplateAction(JTemplate<?, ?> jt) {
super(jt);
this.setName(Inter.getLocText("M-Close_Template"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Close_Template"));
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.mainframe.TemplatePane;
import com.fr.general.Inter;
public class EditEnvAction extends UpdateAction {
public EditEnvAction() {
this.setName(Inter.getLocText("M-Others") + "...");
this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Others") + "...");
}
@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.file.filetree.FileNode;
import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
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(Inter.getLocText("Preference-Custom"), new UIScrollPane(customTable));
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Predefined"), new UIScrollPane(predefinedTable));
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Custom"), new UIScrollPane(customTable));
loadData();
}
@ -144,7 +144,7 @@ public class LocalePane extends BasicPane {
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()) {
predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue());
}
@ -159,7 +159,7 @@ public class LocalePane extends BasicPane {
List<Properties> list = new ArrayList<Properties>();
Set<String> keys = new HashSet<String>();
customTableModel.addColumn(Inter.getLocText("Key"));
customTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Key"));
for (FileNode fileNode : fileNodes) {
String fileName = fileNode.getName();
if (fileName.endsWith(".properties")) {
@ -216,6 +216,6 @@ public class LocalePane extends BasicPane {
@Override
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.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.general.log.Log4jConfig;
import com.fr.locale.InterProviderFactory;
import com.fr.third.apache.log4j.Level;
import javax.swing.*;
@ -128,8 +129,8 @@ public class PreferencePane extends BasicPane {
// 语言选项
private void initLanguageItems() {
LANGUAGE.clear();
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
Map<Locale, String> map = InterProviderFactory.getProvider().getSupportLocaleMap();
LANGUAGE.add(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Language_Default"));
for (Locale locale : map.keySet()) {
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
@ -141,9 +142,9 @@ public class PreferencePane extends BasicPane {
UITabbedPane jtabPane = new UITabbedPane();
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();
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);
@ -166,14 +167,12 @@ public class PreferencePane extends BasicPane {
createJdkHomePane(advancePane);
String[] message = new String[]{"Display", "Oracle_All_Tables"};
String[] sign = new String[]{"Oracle"};
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + Inter.getLocText("FR-Designer_Oracle_All_Tables"));
oracleSpace = new UICheckBox(Inter.getLocText(message, sign));
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Oracle_All_Tables"));
oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Show_All_Oracle_Tables"));
oraclePane.add(oracleSpace);
JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Product_improve"));
joinProductImprove = new UICheckBox(Inter.getLocText("FR-Designer_Join_Product_improve"));
JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Product_improve"));
joinProductImprove = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Join_Product_improve"));
improvePane.add(joinProductImprove);
JPanel spaceUpPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -185,22 +184,22 @@ public class PreferencePane extends BasicPane {
private static String getLocaledLanguage(String key, Locale locale) {
StringBuilder sb = new StringBuilder();
sb.append(Inter.getLocText(key)).append("(");
sb.append(Inter.getLocText(key, locale)).append(")");
sb.append(com.fr.design.i18n.Toolkit.i18nText(key)).append("(");
sb.append(com.fr.design.i18n.Toolkit.i18nText(key)).append(")");
return sb.toString();
}
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);
//添加supportUndo选择项
supportUndoCheckBox = new UICheckBox(Inter.getLocText("Preference-Support_Undo"));
supportUndoCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Undo"));
functionPane.add(supportUndoCheckBox);
//添加maxUndoLimit
//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)")
, 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)")};
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 + 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);
functionPane.add(maxUndoLimit);
@ -214,21 +213,21 @@ public class PreferencePane extends BasicPane {
//添加supportDefaultParentCalculate选择项
supportDefaultParentCalculateCheckBox = new UICheckBox(
Inter.getLocText("Preference-Support_Default_Parent_Calculate"));
com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Default_Parent_Calculate"));
functionPane.add(supportDefaultParentCalculateCheckBox);
}
private void createEditPane(JPanel generalPane) {
//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);
//设置是否支持将字符串编辑为公式
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);
//是否默认转化
defaultStringToFormulaBox = new UICheckBox(Inter.getLocText("FR-Designer_Always"));
defaultStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Always"));
editPane.add(defaultStringToFormulaBox);
//不支持转化则不能默认执行
@ -238,7 +237,7 @@ public class PreferencePane extends BasicPane {
}
});
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();
keyStrokePane.add(shortCutLabel, BorderLayout.CENTER);
editPane.add(keyStrokePane);
@ -268,7 +267,7 @@ public class PreferencePane extends BasicPane {
requestFocusInWindow();
label = new UILabel(text);
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,
label,
BorderLayout.CENTER),
@ -302,24 +301,24 @@ public class PreferencePane extends BasicPane {
private void createGuiOfGridPane(JPanel generalPane) {
// 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);
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);
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);
}
private void createColorSettingPane(JPanel generalPane) {
// 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);
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.setEnabled(this.isEnabled());
@ -328,10 +327,10 @@ public class PreferencePane extends BasicPane {
paginationLineColorTBButton.setEnabled(this.isEnabled());
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);
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);
colorSettingPane.add(leftPane);
colorSettingPane.add(rightPane);
@ -341,9 +340,9 @@ public class PreferencePane extends BasicPane {
//richer:选择导出log文件的目录.
JPanel logPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
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);
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);
logExportDirectoryField = new UITextField(24);
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);
logLevelComboBox = new UIComboBox(LOG);
logLevelPane.add(logLevelComboBox);
@ -377,12 +376,12 @@ public class PreferencePane extends BasicPane {
private void createLanPane(JPanel generalPane) {
// ben:选择版本语言;
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);
languageAndDashBoard_pane.add(LanguagePane);
languageComboBox = new UIComboBox(LANGUAGE.toArray());
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() {
@Override
public void actionPerformed(ActionEvent e) {
@ -396,7 +395,7 @@ public class PreferencePane extends BasicPane {
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 rowSize[] = {p};
double columnSize[] = {p, p, p};
@ -431,16 +430,16 @@ public class PreferencePane extends BasicPane {
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);
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.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.setMinimumSize(new Dimension(80, 20));
UILabel pagelengthLabel = new UILabel(Inter.getLocText("FR-Designer_Page-Setup-Scale-Units") + ":");
UILabel reportLengthLabel = new UILabel(Inter.getLocText("FR-Designer_Report-Design-Ruler-Units") + ":");
UILabel pagelengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Page-Setup-Scale-Units") + ":");
UILabel reportLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Report-Design-Ruler-Units") + ":");
Component[][] lengthComponents = {
{pagelengthLabel, pageLengthComboBox, reportLengthLabel, reportLengthComboBox},
};
@ -453,13 +452,13 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {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);
portEditor = new IntegerEditor();
portEditor.setPreferredSize(new Dimension(80, 20));
portEditor.setMinimumSize(new Dimension(80, 20));
UILabel notiJlabel = new UILabel(Inter.getLocText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(Inter.getLocText("FR-Designer_Web_Preview_Port") + ":");
UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Web_Preview_Port") + ":");
Component[][] portComponents = {
{serverPortLabel, portEditor, notiJlabel},
};
@ -472,7 +471,7 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {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);
jdkHomeTextField = new UITextField();
UIButton chooseBtn = new UIButton("...");
@ -494,8 +493,8 @@ public class PreferencePane extends BasicPane {
}
});
panel.setPreferredSize(new Dimension(300, 20));
UILabel notiJlabel = new UILabel(Inter.getLocText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(Inter.getLocText("Preference-JDK_Home") + ":");
UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));
UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-JDK_Home") + ":");
Component[][] portComponents = {
{serverPortLabel, panel, notiJlabel},
};
@ -504,9 +503,9 @@ public class PreferencePane extends BasicPane {
}
private JPanel createMemoryPane() {
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preference_CachingTemplate"));
UILabel memoryLabel = new UILabel(Inter.getLocText("FR-Designer_Preference_MaxCachingTemplate"));
UILabel memoryTipLabel = new UILabel(Inter.getLocText("FR-Designer_Preference_CachingTemplateTip"));
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplate"));
UILabel memoryLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_MaxCachingTemplate"));
UILabel memoryTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplateTip"));
memoryTipLabel.setBorder(BorderFactory.createEmptyBorder( 0, CACHING_GAP, 0, 0));
cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT);
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout());
@ -519,7 +518,7 @@ public class PreferencePane extends BasicPane {
@Override
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(
null,
Inter.getLocText("FR-Designer_Language_Change_Successful"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Language_Change_Successful"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
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
);
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.utils.DesignUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.EnvChangedListener;
import com.fr.workspace.WorkContext;
import com.fr.workspace.WorkContextCallback;
@ -109,7 +109,7 @@ public class SwitchExistEnv extends MenuDef {
try {
workspace = DesignerWorkspaceGenerator.generate(selectedEnv);
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"));
return;
}
@ -125,7 +125,7 @@ public class SwitchExistEnv extends MenuDef {
}
});
} 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"));
}
}

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.FileNodeFILE;
import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.general.web.ParameterConstants;
import com.fr.stable.project.ProjectConstants;
import com.fr.stable.web.AbstractWebletCreator;
@ -52,8 +52,8 @@ public final class WebPreviewUtils {
browseUrl(currentTemplate, baseRoute, map, actionType, jt);
} else {
// 说明模板没有保存在报表运行环境下面,提示用户
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Web_Preview_Message"),
Inter.getLocText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) {
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()]));
}
} else {
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Web_Preview_Message"),
Inter.getLocText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) {
if (!jt.saveAsTemplate()) {
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.mainframe.DesignerContext;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -39,7 +39,7 @@ public class AboutAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("M_Help-About_Software");
return com.fr.design.i18n.Toolkit.i18nText("M_Help-About_Software");
}
@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.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants;
import com.fr.design.utils.gui.GUICoreUtils;
@ -42,14 +42,14 @@ public class AboutDialog extends JDialog implements ActionListener {
JPanel defaultPane=FRGUIPaneFactory.createBorderLayout_L_Pane();
this.setContentPane(defaultPane);
okButton = new UIButton(Inter.getLocText("OK"));
okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
okButton.addActionListener(this);
tabbedPane = new UITabbedPane();
sysPane = new SystemInfoPane();
tabbedPane.addTab(Inter.getLocText("About"), aboutPanel);
tabbedPane.addTab(Inter.getLocText("System"), sysPane);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("About"), aboutPanel);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("System"), sysPane);
buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
buttonPanel.add(okButton);

28
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.general.CloudCenter;
import com.fr.general.GeneralUtils;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
@ -50,38 +50,40 @@ public class AboutPane extends JPanel {
getBuildTitle(),
GeneralUtils.readFullBuildNO(),
new String[]{
Inter.getLocText("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"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Copy_Build_NO_OK")
});
contentPane.add(buildCopyPane);
BoxCenterAligmentPane boxCenterAlignmentPane = new BoxCenterAligmentPane(getCopyRight());
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(new BoxCenterAlignmentCopyablePane(
Inter.getLocText("FR-Designer-Basic_Activation_Key"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Activation_Key"),
DesignerEnvManager.getEnvManager().getActivationKey(),
new String[]{
Inter.getLocText("FR-Designer-Basic_Copy_Activation_Key"),
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK")
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Copy_Activation_Key"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Activation_Key_Copy_OK")
}));
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);
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(emailPane);
if (FRContext.getLocale().equals(Locale.CHINA) || FRContext.getLocale().equals(Locale.TAIWAN)){
contentPane.add(getRemarkPane());
}
if (shouldShowThanks()) {
addThankPane(contentPane);
@ -94,7 +96,7 @@ public class AboutPane extends JPanel {
if (FRContext.getLocale().equals(Locale.US)) {
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);
// 繁体版不显示QQ
if (FRContext.getLocale().equals(Locale.TAIWAN)) {
@ -116,7 +118,7 @@ public class AboutPane extends JPanel {
}
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();
label.setSize(new Dimension(580,30));
@ -173,12 +175,12 @@ public class AboutPane extends JPanel {
}
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));
}
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);
}

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.DesignerFrame;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -46,7 +46,7 @@ public class FeedBackAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("product_feedback");
return com.fr.design.i18n.Toolkit.i18nText("product_feedback");
}
@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.utils.DesignUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
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 String ALLOWED_INTEGER_TYPE = "0123456789";
private SwingWorker worker;
private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Send"), true);
private UIButton ok = new UIButton(Inter.getLocText("OK"));
private UIButton cancle = new UIButton(Inter.getLocText("Cancel"));
private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Send"), true);
private UIButton ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
private UIButton cancle = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
private int ifHasBeenWriten = 0;
private UITextArea detailField;
private boolean isSendSuccessful = false;
@ -97,7 +96,7 @@ public class FeedBackPane extends BasicPane {
public FeedBackPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
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);
this.add(tip, BorderLayout.NORTH);
UIScrollPane scrollPane = new UIScrollPane(initDetailPane());
@ -136,7 +135,7 @@ public class FeedBackPane extends BasicPane {
}
};
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() {
@Override
@ -157,7 +156,7 @@ public class FeedBackPane extends BasicPane {
detailField.setForeground(Color.black);
String text = detailField.getText();
// 判断在中文输入状态是否还包含提示符 要删掉
String tip = Inter.getLocText("feedback_tip");
String tip = com.fr.design.i18n.Toolkit.i18nText("feedback_tip");
if (text.contains(tip)) {
text = text.substring(0, text.indexOf(tip));
detailField.setText(text);
@ -180,11 +179,11 @@ public class FeedBackPane extends BasicPane {
private JPanel initDetailPane() {
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);
JPanel contactPane = getContactPane();
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);
JPanel jPanel = new JPanel();
jPanel.add(detailField);
@ -207,8 +206,8 @@ public class FeedBackPane extends BasicPane {
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel("QQ:", SwingConstants.RIGHT), qq},
new Component[]{new UILabel(Inter.getLocText("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("email") + ":", SwingConstants.RIGHT), email},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("mobile_number") + ":", SwingConstants.RIGHT), phone}
};
double[] rowSize = {p, p, p};
double[] columnSize = {p, p};
@ -220,7 +219,7 @@ public class FeedBackPane extends BasicPane {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, GAP, 0));
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.setBorder(SEND_BORDER);
sendButton.addActionListener(new ActionListener() {
@ -236,7 +235,7 @@ public class FeedBackPane extends BasicPane {
private void doWithSendPane() {
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]);
ok.setEnabled(false);
ok.addActionListener(new ActionListener() {
@ -247,7 +246,7 @@ public class FeedBackPane extends BasicPane {
feedbackDialog.dispose();
} else {
ok.setEnabled(false);
send.setMessage(Inter.getLocText("sending"));
send.setMessage(com.fr.design.i18n.Toolkit.i18nText("sending"));
setWorker(send);
worker.execute();
}
@ -293,12 +292,9 @@ public class FeedBackPane extends BasicPane {
if (model) {
//发送成功
isSendSuccessful = true;
send.setMessage(Inter.getLocText("HJS-Send_Successfully") + "!");
send.setMessage(com.fr.design.i18n.Toolkit.i18nText("HJS-Send_Successfully") + "!");
} else {
isSendSuccessful = false;
String[] message = new String[]{"HJS-Send_Failed", "try_resending"};
String[] operator = new String[]{",", ""};
send.setMessage(Inter.getLocText(message, operator));
}
} catch (Exception e) {
isSendSuccessful = false;
@ -313,7 +309,7 @@ public class FeedBackPane extends BasicPane {
@Override
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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -48,7 +48,7 @@ public class ForumAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(url));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -66,7 +66,7 @@ public class ForumAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("Forum");
return com.fr.design.i18n.Toolkit.i18nText("Forum");
}
@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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants;
@ -37,7 +37,7 @@ public class SupportQQAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(ProductConstants.SUPPORT_QQ));
} 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);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@ -52,7 +52,7 @@ public class SupportQQAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("Support_QQ");
return com.fr.design.i18n.Toolkit.i18nText("Support_QQ");
}
@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 com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.ProductConstants;
public class SystemInfoPane extends JPanel {
@ -25,8 +25,8 @@ public class SystemInfoPane extends JPanel {
return false;
}
};
tableModel.addColumn(Inter.getLocText("Property"));
tableModel.addColumn(Inter.getLocText("Value"));
tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Property"));
tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Value"));
Properties properties = System.getProperties();
Object[] keys = new Object[properties.size()];

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

@ -1,24 +1,28 @@
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.FRContext;
import com.fr.base.Utils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.Inter;
import com.fr.general.http.HttpClient;
import com.fr.stable.OperatingSystem;
import com.fr.general.http.HttpToolbox;
import com.fr.stable.CommonUtils;
import com.fr.stable.ProductConstants;
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 {
@ -56,28 +60,44 @@ public class TutorialAction extends UpdateAction {
* @param evt 事件
*/
public void actionPerformed(ActionEvent evt) {
String helpURL = CloudCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale());
if (helpURL != null) {
HttpClient client = new HttpClient(helpURL);
if(client.getResponseCode() != -1) {
String helpURL = CloudCenter.getInstance().acquireUrlByKind(createDocKey());
if (isServerOnline(helpURL)) {
try {
Desktop.getDesktop().browse(new URI(helpURL));
return;
} catch (Exception e) {
//出了异常的话, 依然打开本地教程
}
}
}
if (OperatingSystem.isMacOS()) {
if (OperatingSystem.isUnix()) {
nativeExcuteMacInstallHomePrograms("helptutorial.app");
}
else {
} else {
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() {
@Override
public char getMnemonic() {
@ -86,7 +106,7 @@ public class TutorialAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_HELP");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP");
}
@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.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.start.ServerStarter;
import javax.swing.*;
@ -34,7 +34,7 @@ public class WebDemoAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("FR-Product_Demo");
return com.fr.design.i18n.Toolkit.i18nText("FR-Product_Demo");
}
@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.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import javax.swing.*;
@ -87,28 +87,28 @@ public class AlphaFineConfigPane extends BasicPane {
double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP};
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_SearchRange"));
isContainRecommendCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_Recommend"));
isContainActionCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Set"));
isContainPluginCheckbox = new UICheckBox(Inter.getLocText("FR-Designer-Plugin_Addon"));
isContainDocumentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_COMMUNITY_HELP"));
isContainTemplateCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates"));
isContainFileContentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates_Content"));
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_SearchRange"));
isContainRecommendCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Recommend"));
isContainActionCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set"));
isContainPluginCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Addon"));
isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP"));
isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates"));
isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates_Content"));
JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize);
northPane.add(searchConfigPane);
contentPane.add(northPane);
}
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.setEditable(false);
shortcutsField.selectAll();
shortcutsField.setPreferredSize(new Dimension(100, 20));
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);
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);
northPane.add(label);
contentPane.add(northPane);
@ -138,8 +138,8 @@ public class AlphaFineConfigPane extends BasicPane {
}
private void createOnlinePane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_EnableInternet"));
isSearchOnlineCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableInternetSearch"));
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableInternet"));
isSearchOnlineCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableInternetSearch"));
isSearchOnlineCheckbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -162,8 +162,8 @@ public class AlphaFineConfigPane extends BasicPane {
}
private void createOpenPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Enable"));
isEnabledCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableAlphaFine"));
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Enable"));
isEnabledCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_EnableAlphaFine"));
northPane.add(isEnabledCheckbox);
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.ilable.UILabel;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import javax.swing.*;
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.setForeground(Color.WHITE);
checkLabel = new UILabel();

21
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.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.NameInspector;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet;
import com.fr.file.ConnectionConfig;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade;
import javax.swing.KeyStroke;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Map;
@ -44,7 +43,7 @@ public class ConnectionListAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("Server-Define_Data_Connection");
return com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection");
}
@Override
@ -130,17 +129,9 @@ public class ConnectionListAction extends UpdateAction {
*/
public static int isConnectionMapContainsRename(ConnectionConfig datasourceManager) {
Map<String, Connection> tableDataMap = datasourceManager.getConnections();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!";
if (tableDataMap.containsKey(rename)) {
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);
// }
// }
if (tableDataMap.containsKey(NameInspector.ILLEGAL_NAME_HOLDER)) {
return datasourceManager.getConnectionIndex(NameInspector.ILLEGAL_NAME_HOLDER);
}
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.file.FunctionConfig;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
@ -76,7 +76,7 @@ public class FunctionManagerAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("M_Server-Function_Manager");
return com.fr.design.i18n.Toolkit.i18nText("M_Server-Function_Manager");
}
@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.menu.MenuKeySet;
import com.fr.design.parameter.ParameterManagerPane;
import com.fr.general.Inter;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade;
@ -83,7 +83,7 @@ public class GlobalParameterAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("M_Server-Global_Parameters");
return com.fr.design.i18n.Toolkit.i18nText("M_Server-Global_Parameters");
}
@Override

27
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.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.NameInspector;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet;
import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations;
@ -52,7 +53,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
@Override
public String getMenuName() {
return Inter.getLocText("DS-Server_TableData");
return com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData");
}
@Override
@ -128,14 +129,6 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
globalTableDataDialog.setVisible(true);
}
/**
* 是否正常更新完datasourceManager
*
* @param datasourceManager
* @param tableDataManagerPane
* @param databaseListDialog
* @return
*/
private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) {
boolean isFailed = false;
//
@ -156,17 +149,9 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
*/
public int isTableDataMapContainsRename(TableDataConfig datasourceManager) {
Map<String, TableData> tableDataMap = datasourceManager.getTableDatas();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!";
if (tableDataMap.containsKey(rename)) {
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);
// }
// }
if (tableDataMap.containsKey(NameInspector.ILLEGAL_NAME_HOLDER)) {
return datasourceManager.getTableDataIndex(NameInspector.ILLEGAL_NAME_HOLDER);
}
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.menu.MenuKeySet;
import com.fr.design.utils.DesignUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -33,7 +33,7 @@ public class PlatformManagerAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("M_Server-Platform_Manager");
return com.fr.design.i18n.Toolkit.i18nText("M_Server-Platform_Manager");
}
@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.extra.WebViewDlgHelper;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -36,7 +36,7 @@ public class PluginManagerAction extends UpdateAction {
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer-Plugin_Manager");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Manager");
}
@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.DesignerFrame;
import com.fr.file.ProcedureConfig;
import com.fr.general.Inter;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade;
@ -20,7 +20,7 @@ import java.awt.event.ActionEvent;
public class ProcedureListAction extends UpdateAction {
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.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.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.Dimension;
@ -35,14 +35,14 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
JPanel propertyChangePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
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();
ToolBarDef toolbarDef = new ToolBarDef();
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");
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.ColumnNameEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -121,7 +121,7 @@ public class DSColumnLiteConditionPane extends LiteConditionPane<CommonCondition
keyColumnPane.setPreferredSize(new Dimension(175, keyColumnPane.getPreferredSize().height));
conditionOPComboBox.setPreferredSize(new Dimension(80, 20));
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 } };
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.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.data.Condition;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
@ -54,16 +54,16 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private static final long serialVersionUID = 1L;
// peter:这两个变量在弹出公式编辑器的时候,需要用.
private UIRadioButton commonRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_Common"));
private UIRadioButton formulaRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_Formula"));
private UIRadioButton commonRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Common"));
private UIRadioButton formulaRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula"));
private JPanel conditionCardPane;
protected BasicBeanPane<T> defaultConditionPane;
// card2
private UITextArea formulaTextArea;
private UIButton modifyButton;
private UIButton addButton;
private UIRadioButton andRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_ConditionB-AND") + " ");
private UIRadioButton orRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_LiteCondition_ConditionB-OR"));
private UIRadioButton andRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-AND") + " ");
private UIRadioButton orRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-OR"));
protected JTree conditionsTree;// Conditions
private UIButton removeButton;
private UIButton moveUpButton;
@ -124,7 +124,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
boolean result = isExistedInParentTreeNode(parentTreeNode, newJoinCondition);
if (result) {
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;
}
@ -223,7 +223,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
}
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);
if (returnVal == JOptionPane.OK_OPTION) {
DefaultTreeModel treeModel = (DefaultTreeModel) conditionsTree.getModel();
@ -447,30 +447,30 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
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);
removeButton.setIcon(BaseUtils.readIcon("com/fr/base/images/cell/control/remove.png"));
removeButton.setEnabled(false);
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);
moveUpButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/up.png"));
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);
moveDownButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/down.png"));
moveDownButton.addActionListener(actionListener5);
// peter:加括号
bracketButton = new UIButton(Inter.getLocText("ConditionB-Add_bracket"));
bracketButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("ConditionB-Add_bracket"));
buttonPane.add(bracketButton);
bracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/bracket.png"));
bracketButton.addActionListener(actionListener6);
// peter:去掉括号
unBracketButton = new UIButton(Inter.getLocText("ConditionB-Remove_bracket"));
unBracketButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("ConditionB-Remove_bracket"));
buttonPane.add(unBracketButton);
unBracketButton.setIcon(BaseUtils.readIcon("com/fr/design/images/condition/unBracket.png"));
unBracketButton.addActionListener(actionListener7);
@ -492,7 +492,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
this.add(conditonTypePane, BorderLayout.NORTH);
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);
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));
formulaConditionPane.add(formulaPane, BorderLayout.CENTER);
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();
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);
editFormulaButton.addActionListener(actionListener1);
applyCardsPane();
@ -564,14 +564,14 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
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');
addControlPane.add(addButton);
addButton.addActionListener(actionListener2);
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');
addControlPane.add(modifyButton);
modifyButton.addActionListener(actionListener8);
@ -583,7 +583,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer-Submit_Condition");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Submit_Condition");
}
// samuel:移出来,方便调用
@ -654,10 +654,10 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private void applyCardsPane() {
CardLayout cl = (CardLayout) (conditionCardPane.getLayout());
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");
} 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");
}
}

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.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition> {
@ -79,7 +79,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
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 } };
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.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
public abstract class SingleConditionPane<T> extends BasicPane {
private static final long serialVersionUID = -4274960170813368817L;
@ -26,7 +26,7 @@ public abstract class SingleConditionPane<T> extends BasicPane {
if(cancel == null) {
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.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;
import com.fr.base.BaseUtils;
import com.fr.general.Inter;
import com.fr.stable.Constants;
import javax.swing.*;
@ -219,7 +219,7 @@ public interface UIConstants {
@Override
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 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.TableData;
import com.fr.data.TableDataSource;
import com.fr.data.api.StoreProcedureAssist;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.DesignModelAdapter;
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.MenuDef;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
@ -36,7 +36,11 @@ import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.tree.TreeCellEditor;
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.HashMap;
import java.util.Map;
@ -75,7 +79,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/
@Override
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);
String tempName = nPanel.getObjectName();
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);
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) {
String[] waring = new String[]{"DS-TableData", "Utils-has_been_existed", "PLEASE", "Rename"};
String[] sign = new String[]{tempName, ",", "", "!"};
nPanel.setShowText(Inter.getLocText(waring, sign));
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", tempName));
dg.setButtonEnabled(false);
} else if (isProcedureName(oldName)) {
if (isIncludeUnderline(tempName)) {
String[] datasource_underline = new String[]{"Datasource-Stored_Procedure", "Name", "can_not_include_underline"};
String[] sign = new String[]{"", "", "!"};
nPanel.setShowText(Inter.getLocText(datasource_underline, sign));
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Stored_Procedure_Name_Tips"));
dg.setButtonEnabled(false);
}
} else {
@ -138,12 +138,12 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
}
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) {
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();
@ -383,7 +383,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
private 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.setSmallIcon(BaseUtils.readIcon(IconPathConstants.PREVIEW_ICON_PATH));
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 {
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.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.file.ConnectionConfig;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
@ -208,9 +208,9 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) {
UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database") + ":");
UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model") + ":");
UILabel l3 = new UILabel(Inter.getLocText("FR-Designer_Table") + ":");
UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database") + ":");
UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model") + ":");
UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Table") + ":");
if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 25);
@ -248,7 +248,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
@Override
protected com.fr.data.impl.Connection doInBackground() {
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.setRefreshingModel(false);
return getConnection();
@ -327,7 +327,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
DBUtils.refreshDatabase();
String schema = StringUtils.isEmpty(schemaBox.getSelectedItem()) ? null : schemaBox.getSelectedItem();
DataCoreUtils.refreshTables(getConnection(), TableProcedure.TABLE, schema);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), 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);
}
@ -405,7 +405,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
String schema = StringUtils.isEmpty(this.schemaBox.getSelectedItem()) ? null : this.schemaBox.getSelectedItem();
TableProcedure[] sqlTableArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.TABLE, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace());
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);
for (int i = 0; i < sqlTableArray.length; 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());
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);
for (int i = 0; i < sqlViewArray.length; i++) {
ExpandMutableTreeNode viewChildTreeNode = new ExpandMutableTreeNode(sqlViewArray[i]);
@ -455,8 +455,8 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
if (!connect) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
JOptionPane.showMessageDialog(designerFrame, Inter.getLocText("Datasource-Connection_failed"),
Inter.getLocText("FR-Designer_Failed"), JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(designerFrame, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Connection_Failed"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Failed"), JOptionPane.INFORMATION_MESSAGE);
failedToFindTable();
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.design.data.datapane.FlashLookLabelMouseAdapter.ReleaseAction;
import com.fr.general.Inter;
public class EditOrNewLabel extends UILabel {
@ -16,7 +16,7 @@ public class EditOrNewLabel extends UILabel {
public EditOrNewLabel(Editable editable, JPanel editPane) {
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.editable = editable;
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.design.gui.ibutton.UIButton;
import com.fr.general.Inter;
@ -19,7 +19,7 @@ public class RefreshLabel extends UIButton {
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.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.frpane.LoadingBasicPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -36,7 +36,7 @@ public class ReportTableDataPane extends LoadingBasicPane {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Report_TableData");
return com.fr.design.i18n.Toolkit.i18nText("DS-Report_TableData");
}
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.design.ExtraDesignClassManager;
import com.fr.design.data.tabledata.tabledatapane.*;
import com.fr.design.fun.TableDataCreatorProvider;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import java.util.ArrayList;
@ -32,32 +31,32 @@ public class TableDataCreatorProducer {
}
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",
"/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);
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",
"/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",
"/com/fr/design/images/data/multi.png", ConditionTableData.class, MultiTDTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() {
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",
"/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",
"/com/fr/design/images/data/tree.png", RecursionTableData.class, TreeTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() {
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",
"/com/fr/design/images/data/store_procedure.png",
StoreProcedure.class, ProcedureDataPane.class) {
@ -70,28 +69,28 @@ public class TableDataCreatorProducer {
}
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);
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);
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);
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);
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) {
public boolean isNeedParameterWhenPopulateJControlPane() {
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) {
public boolean isNeedParameterWhenPopulateJControlPane() {
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) {
public boolean shouldInsertSeparator() {
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.icon.WarningIcon;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -113,7 +113,7 @@ public class TableDataNameObjectCreator extends NameObjectCreator {
* @return 提示
*/
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() {

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.data.TableDataSource;
import com.fr.data.api.StoreProcedureAssist;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter;
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.
@ -29,7 +36,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
public TableDataPaneListPane() {
super();
dsNameChangedMap.clear();
this.addEditingListner(new PropertyChangeAdapter() {
this.addEditingListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
isNamePermitted = true;
@ -40,30 +47,24 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
String tempName = getEditingName();
Object editingType = getEditingType();
if (StringUtils.isEmpty(tempName)) {
String[] warning = new String[]{"NOT_NULL_Des", "Please_Rename"};
String[] sign = new String[]{",", "!"};
isNamePermitted = false;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(warning, sign));
setWarnigText(editingIndex);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Table_Data_Empty_Name_Tips"));
setIllegalIndex(editingIndex);
return;
}
if (!ComparatorUtils.equals(tempName, selectedName)
&& isNameRepeted(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) {
String[] waning = new String[]{"already_exists", "TableData", "Please_Rename"};
String[] sign = new String[]{"", tempName + ",", "!"};
&& isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) {
isNamePermitted = false;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(waning, sign));
setWarnigText(editingIndex);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", tempName));
setIllegalIndex(editingIndex);
} 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;
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Inter.getLocText(datasource_underline, sign));
setWarnigText(editingIndex);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Stored_Procedure_Name_Tips"));
setIllegalIndex(editingIndex);
}
if (nameableList.getSelectedValue() instanceof ListModelElement) {
Nameable selected = ((ListModelElement) nameableList.getSelectedValue()).wrapper;
@ -102,7 +103,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
}
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];
if (exsitTableDataNameList.contains(nameObject.getName())) {
String[] waring = new String[]{"TableData", "Error_TableDataNameRepeat"};
String[] sign = new String[]{": " + nameObject.getName()};
throw new Exception(Inter.getLocText(waring, sign));
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Table_Data_Duplicate_Name_Tips", 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.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.gui.itree.refreshabletree.UserObjectOP;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import java.util.*;
@ -100,19 +100,19 @@ public class TableDataSourceOP implements UserObjectOP<TableDataWrapper> {
}
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));
return templateNode;
}
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));
return templateNode;
}
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));
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.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
@ -84,7 +84,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
ToolTipManager.sharedInstance().registerComponent(dataTree);
ToolTipManager.sharedInstance().setDismissDelay(3000);
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);
createAddMenuDef();
@ -162,7 +162,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
protected void initbuttonGroup() {
// 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};
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) {
public void tabChanged(int index) {
if (op != null) {
@ -233,7 +233,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class EditAction extends UpdateAction {
public EditAction() {
this.setName(Inter.getLocText("FR-Designer_Edit"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit"));
this.setMnemonic('E');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_EDIT_ICON_PATH));
}
@ -250,7 +250,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class RemoveAction extends UpdateAction {
public RemoveAction() {
this.setName(Inter.getLocText("FR-Designer_Remove"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
}
@ -263,8 +263,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
return;
}
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?",
Inter.getLocText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?",
com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
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.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.StringUtils;
@ -53,7 +53,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
public TreeTableDataDictPane(String treeName) {
this.setLayout(new BorderLayout(5, 30));
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);
tableDataNameComboBox.setPreferredSize(new Dimension(180, 20));
JPanel tableFlowPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
@ -68,8 +68,8 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
this.add(tableFlowPane, BorderLayout.NORTH);
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
parentMarkRadio = new UIRadioButton(Inter.getLocText("FR-Designer_Build_Tree_Accord_Parent_Marked_Filed"), true);
lengthMarkRadio = new UIRadioButton(Inter.getLocText("FR-Designer_Build_Tree_Accord_Marked_Filed_Length"));
parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Parent_Marked_Filed"), true);
lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Marked_Filed_Length"));
parentMarkRadio.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isBuildByParentFiled()) {
@ -90,15 +90,15 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
markButtonGroup.add(parentMarkRadio);
markButtonGroup.add(lengthMarkRadio);
originFieldDependsOnParentLabel = new UILabel(Inter.getLocText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
parentFieldLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
treeDataFieldLabel1 = new UILabel(" " + Inter.getLocText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnLengthLabel = new UILabel(Inter.getLocText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
treeDataFieldLabel2 = new UILabel(" " + Inter.getLocText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnParentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
parentFieldLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
treeDataFieldLabel1 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
originFieldDependsOnLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", 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"))});
// parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(Inter.getLocText("Columns"))});
// originFieldDependsOnLengthPane = 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(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
// originFieldDependsOnLengthPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
originFieldDependsOnParentPane = 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()});
@ -127,7 +127,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
buildTreePanel.add(xxx, BorderLayout.CENTER);
centerPane.add(buildTreePanel, BorderLayout.NORTH);
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);
treeDataPreviewButton.addActionListener(new ActionListener() {
@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.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -38,9 +38,9 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
rs.add(tableNameComboBox, BorderLayout.CENTER);
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));
UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT);
UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT);
UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT);
UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database"), UILabel.LEFT);
UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model"), UILabel.LEFT);
UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Database_Select_Table"), UILabel.LEFT);
if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 20);

27
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.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
@ -18,40 +18,43 @@ import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter;
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.
*/
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 HashMap<String, String> renameMap = new HashMap<String, String>();
public ConnectionListPane() {
renameMap.clear();
this.addEditingListner(new PropertyChangeAdapter() {
this.addEditingListener(new PropertyChangeAdapter() {
public void propertyChange() {
isNamePermitted = true;
String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
String tempName = getEditingName();
if (StringUtils.isEmpty(tempName)) {
String[] warning = new String[]{"NOT_NULL_Des", "Please_Rename"};
String[] sign = new String[]{",", "!"};
nameableList.stopEditing();
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), Inter.getLocText(warning, sign));
setWarnigText(editingIndex);
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ConnectionListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Empty_Name"));
setIllegalIndex(editingIndex);
isNamePermitted = false;
return;
}
if (!ComparatorUtils.equals(tempName, selectedName)
&& isNameRepeted(new List[]{Arrays.asList(allListNames)}, tempName)) {
&& isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) {
isNamePermitted = false;
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);
setWarnigText(editingIndex);
setIllegalIndex(editingIndex);
}
if (isNamePermitted && !ComparatorUtils.equals(tempName, selectedName)) {
rename(selectedName, tempName);
@ -63,9 +66,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
protected void rename(String oldName, String newName) {
if (renameMap.containsKey(selectedName)) {
renameMap.remove(selectedName);
}
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.layout.FRGUIPaneFactory;
import com.fr.file.ConnectionConfig;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -28,7 +28,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio
@Override
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() {

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.dialog.BasicPane;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import javax.swing.*;
@ -112,15 +112,15 @@ public class ConnectionTableProcedurePane extends BasicPane {
// 根据环境是否为中文设置不同的显示
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));
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));
} else {
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);
ui1.setToolTipText(Inter.getLocText("FR-Designer_SQL-Table"));
ui2.setToolTipText(Inter.getLocText("FR-Designer_SQL-View"));
ui1.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"));
ui2.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"));
first.add(ui1);
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.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
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);
message = new UILabel();
uiLabel = new UILabel();
okButton = new UIButton(Inter.getLocText("OK"));
cancelButton = new UIButton(Inter.getLocText("Cancel"));
okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("OK"));
cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
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();
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);
testButton.addActionListener(testConnectionActionListener);
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);
chartSetPane.setBorder(BorderFactory.createTitledBorder(
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(newCharSetComboBox, Inter.getLocText("Datasource-New_Charset") + ":"));
chartSetPane.add(GUICoreUtils.createNamedPane(originalCharSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Datasource-Original_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() {
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));
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));
okButton.setEnabled(false);
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.file.filter.ChooseFileFilter;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -74,9 +74,9 @@ public class JDBCDefPane extends JPanel {
private IntegerEditor DBCP_MAX_WAIT = new IntegerEditor();
private UITextField DBCP_VALIDATION_QUERY = new UITextField();
private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{Inter.getLocText("No"), Inter.getLocText("Yes")});
private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{Inter.getLocText("No"), Inter.getLocText("Yes")});
private UIComboBox DBCP_TESTWHILEIDLE = 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[]{com.fr.design.i18n.Toolkit.i18nText("No"), com.fr.design.i18n.Toolkit.i18nText("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_NUMTESTSPEREVICTIONRUN = new IntegerEditor();
@ -104,13 +104,13 @@ public class JDBCDefPane extends JPanel {
userNameTextField.setName(USER_NAME);
passwordTextField = new UIPassWordField(15);
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);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
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();
Component[][] dbtypeComComponents = {{dbtypeComboBox}};
double[] dbtypeRowSize = {p};
@ -118,7 +118,7 @@ public class JDBCDefPane extends JPanel {
dbtypeComPane = TableLayoutHelper.createTableLayoutPane(dbtypeComComponents, dbtypeRowSize, dbtypeColumnSize);
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();
urlPane.add(new UILabel("URL:"));
@ -129,15 +129,15 @@ public class JDBCDefPane extends JPanel {
urlComPane = TableLayoutHelper.createCommonTableLayoutPane(urlComComponents, urlRowSize, urlColumnSize, 4);
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();
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[] userColumnSize = {f, p, f};
userComPane = TableLayoutHelper.createCommonTableLayoutPane(userComComponents, userRowSize, userColumnSize, 4);
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},};
@ -148,7 +148,7 @@ public class JDBCDefPane extends JPanel {
JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
innerthis.add(southPanel);
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);
actionLabel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -289,7 +289,7 @@ public class JDBCDefPane extends JPanel {
if (ComparatorUtils.equals(dbtypeComboBox.getSelectedItem(), ("Access"))) {
// ben:这个能不能换种处理方案- -
JFileChooser filechooser = new JFileChooser();
filechooser.setDialogTitle(Inter.getLocText("Open"));
filechooser.setDialogTitle(com.fr.design.i18n.Toolkit.i18nText("Open"));
filechooser.setMultiSelectionEnabled(false);
filechooser.addChoosableFileFilter(new ChooseFileFilter(new String[]{"accdb", "mdb"}, "Microsoft Office Access"));
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[] columnSize = {f, f};
Component[][] comps = {
{new UILabel(Inter.getLocText("DBCP_INITIAL_SIZE") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE},
{new UILabel(Inter.getLocText("DBCP_MAX_ACTIVE") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE},
{new UILabel(Inter.getLocText("DBCP_MAX_IDLE") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE},
{new UILabel(Inter.getLocText("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(Inter.getLocText("DBCP_VALIDATION_QUERY") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY},
{new UILabel(Inter.getLocText("DBCP_TEST_ON_BORROW") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW},
{new UILabel(Inter.getLocText("DBCP_TEST_ON_RETURN") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN},
{new UILabel(Inter.getLocText("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("DBCP_INITIAL_SIZE") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MAX_ACTIVE") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MAX_IDLE") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_MIN_IDLE") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Max_Wait_Time") + ":" , SwingConstants.RIGHT), DBCP_MAX_WAIT},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_VALIDATION_QUERY") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_ON_BORROW") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_ON_RETURN") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DBCP_TEST_WHILE_IDLE") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Evictionruns_millis") + ":", SwingConstants.RIGHT),
DBCP_TIMEBETWEENEVICTIONRUNSMILLS},
{new UILabel(Inter.getLocText("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("DBCP_NUM_TEST_PER_EVCTION_RUN") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Connection_Pool_Mix_Evictable_Idle_Time_Millis") + ":" , SwingConstants.RIGHT),
DBCP_MINEVICTABLEIDLETIMEMILLIS}};
JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSize, columnSize, 10, 4);
@ -353,7 +353,7 @@ public class JDBCDefPane extends JPanel {
@Override
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.dialog.BasicPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
public class JNDIDefPane extends JPanel {
@ -73,12 +73,12 @@ public class JNDIDefPane extends JPanel {
// NorthPane
JPanel nContentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
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);
nContentPane.add(jndiNameTextField, BorderLayout.NORTH);
// CenterPane
JPanel outcenterPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Datasource-Context"));
JPanel outcenterPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Datasource-Context"));
innerthis.add(outcenterPane);
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
outcenterPane.add(centerPane);
@ -105,7 +105,7 @@ public class JNDIDefPane extends JPanel {
centerPane.add(actionPane);
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);
actionLabel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -115,7 +115,7 @@ public class JNDIDefPane extends JPanel {
});
// 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));
}
@ -235,7 +235,7 @@ public class JNDIDefPane extends JPanel {
@Override
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.design.gui.ibutton.UIButton;
import com.fr.general.Inter;
@ -17,7 +17,7 @@ public class PreviewLabel extends UIButton {
public PreviewLabel(Previewable previewable) {
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.previewable = previewable;
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.storeproc.ProcedureDataModel;
import com.fr.design.utils.DesignUtils;
import com.fr.general.Inter;
import com.fr.general.data.DataModel;
import com.fr.general.data.TableDataException;
import com.fr.stable.StringUtils;
@ -100,7 +100,7 @@ public class PreviewTableModel extends AbstractTableModel {
} catch (TableDataException e) {
FRContext.getLogger().error(e.getMessage(), e);
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) {
return Inter.getLocText("FR-Designer_Error");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Error");
}
public int getColumnCount() {
@ -166,7 +166,7 @@ public class PreviewTableModel extends AbstractTableModel {
private String checkType(int 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 + ")");
}
@ -187,25 +187,25 @@ public class PreviewTableModel extends AbstractTableModel {
if (o == null) {
s = "?";
} 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) {
Class clzz = ((EmbeddedTDDataModel) dataModel).getColumnClass(column);
if (clzz != null) {
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)) {
s = Inter.getLocText("FR-Designer_Date");
s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date");
}
}
}
} 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) {
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) {
s = Inter.getLocText("FR-Designer_Date");
s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date");
} else if (o instanceof Number) {
s = Inter.getLocText("FR-Designer_Number");//bigdecimal
s = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Number");//bigdecimal
} else {
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.function.TIME;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import javax.swing.*;
@ -78,7 +78,7 @@ public class PreviewTablePane extends BasicPane {
JPanel currentPreviewPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
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();
currentPreviewPanel.add(currentRowsField);
@ -88,7 +88,7 @@ public class PreviewTablePane extends BasicPane {
JPanel maxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
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();
maxPanel.add(maxPreviewNumberField);
@ -155,7 +155,7 @@ public class PreviewTablePane extends BasicPane {
if (this.dialog == null) {
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() {
if (getWorker() != null) {
getWorker().cancel(true);
@ -171,7 +171,7 @@ public class PreviewTablePane extends BasicPane {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Preview");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
}
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) {
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 {
previewTablePane.populate(tableData);
previewTablePane.resetPreviewTableColumnColor();
@ -295,13 +295,13 @@ public class PreviewTablePane extends BasicPane {
try {
int choiceColumn = Integer.parseInt(columnErrMessage.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) {
FRContext.getLogger().error(e.getMessage(), e);
return;
}
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 {
@ -314,7 +314,7 @@ public class PreviewTablePane extends BasicPane {
}
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() {
getWorker().cancel(true);
getDialog().setVisible(false);
@ -362,7 +362,7 @@ public class PreviewTablePane extends BasicPane {
boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase());
if (!status) {
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();
@ -420,7 +420,7 @@ public class PreviewTablePane extends BasicPane {
public static void previewStoreData(final ProcedureDataModel storeProcedureDataModel, final int keyIndex, final int valueIndex) {
final PreviewTablePane previewTablePane = new PreviewTablePane();
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 {
previewTablePane.populateStoreDataSQL();
@ -451,7 +451,7 @@ public class PreviewTablePane extends BasicPane {
for (int i = 0; i < tableSize; i++) {
PreviewTablePane previewTablePane = new PreviewTablePane();
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 {
previewTablePane.populateStoreDataSQL();
} catch (Exception e) {
@ -464,7 +464,7 @@ public class PreviewTablePane extends BasicPane {
@Override
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.gui.itableeditorpane.ParameterTableModel;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import javax.swing.*;
import javax.swing.event.CellEditorListener;
@ -117,24 +117,24 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
private int getParameterType (Object value) {
String type;
if(value instanceof CursorEditor)
type= Inter.getLocText("Cursor");
type= com.fr.design.i18n.Toolkit.i18nText("Cursor");
else if(value instanceof String ){
if(((String) value).length() > 0 && ((String) value).charAt(0) == '=')
type = Inter.getLocText("Formula");
type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else
type = Inter.getLocText("Parameter-String");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
}else if(value instanceof Integer)
type = Inter.getLocText("Integer");
type = com.fr.design.i18n.Toolkit.i18nText("Integer");
else if(value instanceof Double)
type = Inter.getLocText("Double");
type = com.fr.design.i18n.Toolkit.i18nText("Double");
else if(value instanceof Date)
type = Inter.getLocText("Date");
type = com.fr.design.i18n.Toolkit.i18nText("Date");
else if(value instanceof Boolean)
type = Inter.getLocText("Parameter-Boolean");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
else if(value instanceof BaseFormula)
type = Inter.getLocText("Formula");
type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else
type = Inter.getLocText("Parameter-String");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
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.itree.filetree.ClassFileTree;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*;
import javax.swing.tree.TreeSelectionModel;
@ -20,7 +20,7 @@ public class ClassNameSelectPane extends BasicPane {
this.add(webDirectoryPane, BorderLayout.NORTH);
webDirectoryPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
webDirectoryPane.add(new UILabel(
Inter.getLocText("Function-Choose_Function_Class") + ":"));
com.fr.design.i18n.Toolkit.i18nText("Function-Choose_Function_Class") + ":"));
classFileTree = new ClassFileTree();
classFileTree.refreshEnv();
@ -31,7 +31,7 @@ public class ClassNameSelectPane extends BasicPane {
@Override
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 {
String classPath = classFileTree.getSelectedClassPath();
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.TableLayoutHelper;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants;
import javax.swing.*;
@ -44,7 +45,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
classNameTextField = new UITextField(36);
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.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
@ -63,7 +64,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
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.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
@ -89,11 +90,10 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
});
Component[][] components = {
{new UILabel(Inter.getLocText("DS-Class_Name") + ":"), reportletNamePane},
{null, new UILabel(Inter.getLocText("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(Inter.getLocText(new String[]{"Function-The_class_must_be_located_in","Function-J2EE_server"},
new String[]{" ","\"",File.separator,ProjectConstants.WEBINF_NAME,File.separator,"classes\""}))}
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("DS-Class_Name") + ":"), reportletNamePane},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Function-The_class_must_implement_the_interface") + "\"com.fr.data.Tabledata\"")},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Example") + ":\"com.fr.data.impl.ArrayTableData\"")},
{null,new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Class_Location_Description", StableUtils.pathJoin(ProjectConstants.WEBINF_NAME, ProjectConstants.CLASSES_NAME)))}
};
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.add(northPane, BorderLayout.NORTH);
@ -112,7 +112,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
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);
@ -121,7 +121,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
public class AddParaAction extends UITableEditAction {
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"));
}
@ -137,7 +137,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
}
private class RemoveParaAction extends UITableEditAction {
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"));
}
@ -155,7 +155,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Class_TableData");
return com.fr.design.i18n.Toolkit.i18nText("DS-Class_TableData");
}
@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.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.sql.SqlUtils;
import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils;
@ -54,8 +54,8 @@ import java.util.List;
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
private static final int BOTTOM = 6;
private static final String PREVIEW_BUTTON = Inter.getLocText("FR-Designer_Preview");
private static final String REFRESH_BUTTON = Inter.getLocText("FR-Designer_Refresh");
private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
private static final String REFRESH_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh");
private ConnectionTableProcedurePane connectionTableProcedurePane;
private UITableEditorPane<ParameterProvider> editorPane;
@ -133,7 +133,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
JPanel paraMeanPane = new JPanel(new BorderLayout());
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);
@ -171,7 +171,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override
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() {
@ -195,7 +195,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
toolBarDef.addShortCut(SeparatorDef.DEFAULT);
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);
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
@ -271,10 +271,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) {
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) {
// 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 {
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.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png"));
}
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);
BasicDialog dialog = pane.showWindow(DesignerContext.getDesignerFrame());
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.layout.FRGUIPaneFactory;
import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import com.fr.general.data.DataModel;
import com.fr.general.data.TableDataException;
import com.fr.script.Calculator;
@ -27,7 +27,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane<DecoratedTable
while (serverTableDataNameIterator.hasNext()) {
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);
availableTableDataNameList.addCheckBoxListSelectionChangeListener(this);
@ -68,7 +68,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane<DecoratedTable
@Override
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.dialog.BasicPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
public class EmbeddedTableDataDefinedPane extends BasicPane{
@ -33,10 +33,10 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
private UIButton del;
private static String[] TYPE = {
Inter.getLocText("String"),
Inter.getLocText("Integer"),
Inter.getLocText("Double"),
Inter.getLocText("Date")
com.fr.design.i18n.Toolkit.i18nText("String"),
com.fr.design.i18n.Toolkit.i18nText("Integer"),
com.fr.design.i18n.Toolkit.i18nText("Double"),
com.fr.design.i18n.Toolkit.i18nText("Date")
};
public EmbeddedTableDataDefinedPane() {
@ -68,8 +68,8 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
tableColumn.setMaxWidth(30);
// 控制按钮
add = new UIButton(Inter.getLocText("Add"));
del = new UIButton(Inter.getLocText("Delete"));
add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Add"));
del = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Delete"));
JPanel buttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
// buttonPane.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
buttonPane.add(add);
@ -93,7 +93,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
@Override
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 {
@ -213,8 +213,8 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
private EmbeddedTableData embeddedTableData;
private String[] COLUMN_NAME = {
"",
Inter.getLocText("ColumnName"),
Inter.getLocText("Type")
com.fr.design.i18n.Toolkit.i18nText("ColumnName"),
com.fr.design.i18n.Toolkit.i18nText("Type")
};
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.DialogActionAdapter;
import com.fr.general.DateUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
@ -107,7 +107,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
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');
northPane.add(columnSetButton);
columnSetButton.addActionListener(new ActionListener() {
@ -134,7 +134,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
});
// 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');
northPane.add(insertRowButton);
insertRowButton.addActionListener(new ActionListener() {
@ -144,7 +144,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
});
// 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');
northPane.add(removeRowButton);
removeRowButton.addActionListener(new ActionListener() {
@ -157,7 +157,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
@Override
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.filter.ChooseFileFilter;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.data.DataSource;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
@ -123,7 +123,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
this.setLayout(new BorderLayout(gap,0));
JPanel northPanel = new JPanel(new BorderLayout());
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"};
fileTypeComboBox = new UIComboBox(item);
fileTypeComboBox.setPreferredSize(new Dimension(100, 20));
@ -133,7 +133,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
// 最上面的pane,文件选择
JPanel centerPanel = new JPanel();
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);
// 下面的pane,参数面板
@ -151,7 +151,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
JPanel setPanel = new JPanel();
southPanel.add(setPanel, BorderLayout.CENTER);
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);
setPanel.add(controlPane, BorderLayout.NORTH);
fileTypeComboBox.addActionListener(getFileTypeListener(setPanel,width,height));
@ -162,7 +162,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
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);
ButtonGroup bg = new ButtonGroup();
bg.add(localFileRadioButton);
@ -176,10 +176,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
urlText = new UITextField();
urlText.setPreferredSize(new Dimension(195, 20));
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);
testConnection = new UIButton(Inter.getLocText("Datasource-Test_Connection"));
testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection"));
testConnection.setEnabled(false);
testConnection.addActionListener(testConnectionListener);// 测试连接按钮
@ -199,7 +199,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
centerPanel.add(filePath, BorderLayout.NORTH);
// 中间的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> ";
tips = new UILabel(tipContent);
centerPanel.add(tips, BorderLayout.CENTER);
@ -209,7 +209,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
public void actionPerformed(ActionEvent arg0) {
String uri = ParameterHelper.analyze4Templatee( urlText.getText(), params);
if (!checkURL(uri)) {
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), 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;
}
params = getEditorPaneParameter();
@ -221,10 +221,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
FRContext.getLogger().error(e.getMessage(), e);
}
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"));
} else {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_successfully"));
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Datasource-Connection_successfully"));
try {
in.close();
} catch (IOException e) {
@ -236,7 +236,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private void previewPanel(JPanel jPanel){
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() {
public void actionPerformed(ActionEvent e) {
preview();
@ -257,7 +257,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
controlPane.setLayout(new BorderLayout(8,8));
controlPane.setPreferredSize(new Dimension(width, height));
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.setSelectedIndex(4);
encodingComboBox.setPreferredSize(new Dimension(90, 20));
@ -288,7 +288,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
JPanel northPane = new JPanel(new BorderLayout(8,8));
controlPane.setLayout(new BorderLayout());
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));
northPane.add(needColumnNameCheckBox, BorderLayout.EAST);
controlPane.add(northPane, BorderLayout.NORTH);
@ -314,7 +314,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
if (urlFileRadioButton.isSelected()) {
String url = urlText.getText().trim();
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 columnSize[] = {f, p, p};
double rowSize[] = {B, B, B, B, B, B, B};
needColumnNameCheckBox = new UICheckBox(Inter.getLocText("FR-Designer-FirstRow_IS_ColumnName"), true);
dismenberLabel = new UILabel(Inter.getLocText("FR-Designer_Dismenber") + ":");
tableDismemberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_TableDismember"), false);
tableDismemberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_TableDismember"));
spaceDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Space"), true);
spaceDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_Space"));
commaDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_CommaDismenber"), false);
commaDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_CommaDismenber"));
otherDismenberRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Other") + ":", false);
otherDismenberRadioButton.setToolTipText(Inter.getLocText("FR-Designer_Other"));
needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-FirstRow_IS_ColumnName"), true);
dismenberLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Dismenber") + ":");
tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"), false);
tableDismemberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"));
spaceDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"), true);
spaceDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"));
commaDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"), false);
commaDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"));
otherDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other") + ":", false);
otherDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other"));
otherDismenberTextField = new UITextField(8);
otherDismenberTextField.setEditable(false);
otherDismenberRadioButton.addChangeListener(new ChangeListener() {
@ -374,8 +374,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
bg2.add(spaceDismenberRadioButton);
bg2.add(commaDismenberRadioButton);
bg2.add(otherDismenberRadioButton);
igoreOneMoreDelimiterCheckBox = new UICheckBox(Inter.getLocText("FR-Designer-Series_Dismenber_As_Single"), true);
encodeLabel = new UILabel(Inter.getLocText("FR-Designer-Encoding_Type") + ":");
igoreOneMoreDelimiterCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Series_Dismenber_As_Single"), true);
encodeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Encoding_Type") + ":");
charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
Component[][] comps = {
{encodeLabel,charsetComboBox,null},
@ -475,7 +475,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
} else {
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> ";
tips.setText(tipContent);
setPanel.revalidate();
@ -487,7 +487,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshAction extends UITableEditAction {
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"));
}
@ -759,7 +759,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
@Override
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() {
@ -782,7 +782,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
xmlNodeTree = new 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();
ToolBarDef toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(refreshAction);
@ -800,7 +800,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshParameterAction extends UpdateAction {
public RefreshParameterAction() {
this.setName(Inter.getLocText("FR-Designer_Refresh"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
this.setMnemonic('r');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
@ -939,7 +939,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
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.setAllowsChildren(false);
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.ispinner.UISpinner;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.general.Inter;
public class MaxMemRowCountPanel extends UIToolbar {
private static final int ALL_IN_MEMORY = 0;
@ -51,7 +51,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.setFloatable(false);
this.setRollover(true);
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.addActionListener(switchStateL);
numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
@ -73,7 +73,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
switchCache.setSelectedIndex(MAX_IN_MEMORY);
this.add(new UILabel(" "));
this.add(numberSpinner);
this.add(new UILabel(" " + Inter.getLocText("Row")));
this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Row")));
this.validate();
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.itextfield.UITextField;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
@ -66,7 +66,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
jpanel.setLayout(new BorderLayout());
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();
previewButton.setIcon(BaseUtils.readIcon("/com/fr/web/images/preview.png"));
previewButton.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -88,7 +88,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
}
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();
int len = resMap.size();
// 10个正好不会出现滚动条
@ -131,7 +131,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
public UITableEditAction[] createAction() {
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);
@ -140,7 +140,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
private class RefreshAction extends UITableEditAction {
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"));
}
@ -190,7 +190,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Relation_TableData");
return com.fr.design.i18n.Toolkit.i18nText("DS-Relation_TableData");
}
@Override
@ -307,7 +307,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
formulaButton.setEnabled(false);
formulaButton.setPreferredSize(new Dimension(25, 23));
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(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.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.Inter;
import com.fr.stable.CoreConstants;
//august:按理说,这个只有一列 就不该用jtable。不过这样总比之前用ArrayTableModel好
@ -64,7 +64,7 @@ public abstract class OneListTableModel<T> extends UITableModelAdapter<T> {
@Override
public void actionPerformed(ActionEvent 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) {
final FILE file = fileChooser.getSelectedFILE();
if(file == null) {
@ -90,7 +90,7 @@ public abstract class OneListTableModel<T> extends UITableModelAdapter<T> {
@Override
public void actionPerformed(ActionEvent 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) {
final FILE file = fileChooser.getSelectedFILE();
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.utils.gui.GUICoreUtils;
import com.fr.file.ConnectionConfig;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -51,7 +51,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
"com.mysql.jdbc.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 JPanel cardpane;
private CardLayout cardLayout;
@ -88,7 +88,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
storeProcedureContextPane.setPreferredSize(new Dimension(680, 600));
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);
inAutoeditorPane = new UITableEditorPane<StoreProcedureParameter>(new StoreProcedureTableModel());
autoEditorPane = new UITableEditorPane<StoreProcedureParameter>(new AutoStoreProcedureTableModel());
@ -153,7 +153,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
toolBarDef.addShortCut(new PreviewAction());
toolBarDef.addShortCut(new RefreshAction());
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.setBorder(null);
UIToolbar toolbar = ToolBarDef.createJToolBar();
@ -170,7 +170,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Datasource-Stored_Procedure");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Datasource-Stored_Procedure");
}
@Override
@ -196,7 +196,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
warningLabel.setText(StringUtils.EMPTY);
} catch (Exception ex) {
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 {
warningLabel.setText(ex.getMessage());
}
@ -237,9 +237,9 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
if (StringUtils.isBlank(dbName)) {
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) {
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);
warningLabel.setText("");
} 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("");
editorPane.populate(new StoreProcedureParameter[0]);
}
@ -357,7 +357,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
protected class RefreshAction extends UITableEditAction {
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"));
}

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 ProcedureListPane() {
super();
this.addEditingListner(new PropertyChangeAdapter() {
this.addEditingListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
TableDataSource source = DesignTableDataManager.getEditingTableDataSource();
@ -33,16 +33,16 @@ public class ProcedureListPane extends JListControlPane {
String tempName = getEditingName();
if(StringUtils.isEmpty(tempName)) {
nameableList.stopEditing();
//JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), Inter.getLocText("NOT_NULL_Des") + "," + Inter.getLocText("Please_Rename") + "!");
setWarnigText(nameableList.getSelectedIndex());
//JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), com.fr.design.i18n.Toolkit.i18nText("NOT_NULL_Des") + "," + com.fr.design.i18n.Toolkit.i18nText("Please_Rename") + "!");
setIllegalIndex(nameableList.getSelectedIndex());
return;
}
for(int i = 0; i < allDSNames.length; i++) {
String dsname = allDSNames[i];
if (ComparatorUtils.equals(dsname, tempName)) {
// JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), Inter.getLocText(new String[]{"already_exists", "TableData"})
// + tempName + "," + Inter.getLocText("Please_Rename") + "!");
setWarnigText(nameableList.getSelectedIndex());
// JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ProcedureListPane.this), com.fr.design.i18n.Toolkit.i18nText(new String[]{"already_exists", "TableData"})
// + tempName + "," + com.fr.design.i18n.Toolkit.i18nText("Please_Rename") + "!");
setIllegalIndex(nameableList.getSelectedIndex());
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.layout.FRGUIPaneFactory;
import com.fr.file.ProcedureConfig;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -22,7 +22,7 @@ public class ProcedureManagerPane extends LoadingBasicPane {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("Datasource-Stored_Procedure");
return com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure");
}
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import javax.swing.*;
@ -29,13 +29,13 @@ public class StoreProcedureParameterPane extends BasicPane {
};
private static NameObject[] nameAndValue = new NameObject[]{
new NameObject(Inter.getLocText("Cursor"), StoreProcedureConstants.CURSOR),
new NameObject(Inter.getLocText("Parameter-String"), StoreProcedureConstants.VARCHAR),
new NameObject(Inter.getLocText("Integer"), StoreProcedureConstants.INTEGER),
new NameObject(Inter.getLocText("Double"), StoreProcedureConstants.DECIMAL),
new NameObject(Inter.getLocText("Date"), StoreProcedureConstants.DATE),
new NameObject(Inter.getLocText("Parameter-Boolean"), StoreProcedureConstants.BOOLEAN),
new NameObject(Inter.getLocText("Formula"), StoreProcedureConstants.FORMULA),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Cursor"), StoreProcedureConstants.CURSOR),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-String"), StoreProcedureConstants.VARCHAR),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Integer"), StoreProcedureConstants.INTEGER),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Double"), StoreProcedureConstants.DECIMAL),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Date"), StoreProcedureConstants.DATE),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"), StoreProcedureConstants.BOOLEAN),
new NameObject(com.fr.design.i18n.Toolkit.i18nText("Formula"), StoreProcedureConstants.FORMULA),
new NameObject("IN",StoreProcedureConstants.IN),
new NameObject("OUT",StoreProcedureConstants.OUT),
new NameObject("INOUT",StoreProcedureConstants.INOUT)
@ -61,7 +61,7 @@ public class StoreProcedureParameterPane extends BasicPane {
public void checkValid() throws Exception{
StoreProcedureParameter spp=this.update();
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();
initUIComboBox(schemaCombo, schemaName);
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);
namePane.add(nameField, BorderLayout.CENTER);
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(new UILabel(" "), BorderLayout.EAST);
Component[][] components = {{null},
@ -95,7 +95,7 @@ public class StoreProcedureParameterPane extends BasicPane {
private JPanel addPane(String s, int i, UIComboBox combo){
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);
pane.add(combo, BorderLayout.CENTER);
pane.add(new UILabel(" "), BorderLayout.EAST);
@ -105,7 +105,7 @@ public class StoreProcedureParameterPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("Parameter");
return com.fr.design.i18n.Toolkit.i18nText("Parameter");
}
public void populate(StoreProcedureParameter stpParameter) {
@ -124,24 +124,24 @@ public class StoreProcedureParameterPane extends BasicPane {
Object value = valueEditPane.update();
String type = "";
if(value instanceof CursorEditor)
type=Inter.getLocText("Cursor");
type=com.fr.design.i18n.Toolkit.i18nText("Cursor");
else if(value instanceof String ){
if(((String) value).length() > 0 && ((String) value).charAt(0) == '=')
type = Inter.getLocText("Formula");
type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else
type = Inter.getLocText("Parameter-String");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
}else if(value instanceof Integer)
type = Inter.getLocText("Integer");
type = com.fr.design.i18n.Toolkit.i18nText("Integer");
else if(value instanceof Double)
type = Inter.getLocText("Double");
type = com.fr.design.i18n.Toolkit.i18nText("Double");
else if(value instanceof Date)
type = Inter.getLocText("Date");
type = com.fr.design.i18n.Toolkit.i18nText("Date");
else if(value instanceof Boolean)
type = Inter.getLocText("Parameter-Boolean");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
else if(value instanceof BaseFormula)
type = Inter.getLocText("Formula");
type = com.fr.design.i18n.Toolkit.i18nText("Formula");
else
type = Inter.getLocText("Parameter-String");
type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
int typeVl = getInfo4Value(type);
p.setType(typeVl);
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.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.Inter;
public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedureParameter> {
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()) {
table.addMouseListener(new MouseAdapter() {
@ -36,7 +36,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
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());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -90,7 +90,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = new StoreProcedureParameter();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
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());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -112,7 +112,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = getSelectedValue();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
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());
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.layout.FRGUIPaneFactory;
import com.fr.file.TableDataConfig;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -62,7 +62,7 @@ public class TableDataManagerPane extends LoadingBasicPane {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Server_TableData");
return com.fr.design.i18n.Toolkit.i18nText("DS-Server_TableData");
}
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.data.impl.RecursionTableData;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import java.awt.*;
@ -39,7 +39,7 @@ public class TreeTableDataPane extends AbstractTableDataPane<RecursionTableData>
@Override
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.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.util.ArrayList;
@ -79,7 +79,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
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() {
getDialog().setVisible(false);
getWorker().cancel(true);
@ -101,7 +101,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return columnNameList;
}
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>();
}
columnNameList = Arrays.asList(procedureDataModel.getColumnName());
@ -176,7 +176,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return null;
}
}.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() {
connectionBar.close();
worker.cancel(true);
@ -194,7 +194,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
connectionBar.close();
// bug 61345 预览失败时,关闭窗口
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();
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.itextfield.UITextField;
import com.fr.general.Inter;
import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.design.utils.gui.GUICoreUtils;
@ -309,7 +309,7 @@ public abstract class BasicPane extends JPanel {
nameTextField = new UITextField(30);
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(showfield = new UILabel(" "), BorderLayout.EAST);
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.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils;
public class InformationWarnPane extends JPanel{
@ -80,7 +80,7 @@ public class InformationWarnPane extends JPanel{
});
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);
moreText = new UITextArea(moreInfo);
@ -149,7 +149,7 @@ public class InformationWarnPane extends JPanel{
private JPanel createControlButtonPane() {
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
public Dimension getPreferredSize() {
// 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.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
/**
* Wizard dialog.
@ -104,25 +104,25 @@ public class JWizardDialog extends BasicDialog {
workArea.setLayout(cardLayout);
// Buttons
buttonBack = new UIButton(Inter.getLocText("Previous"));
buttonBack = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Previous"));
buttonBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
back();
}
});
buttonNext = new UIButton(Inter.getLocText("Next"));
buttonNext = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Next"));
buttonNext.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
next();
}
});
buttonFinish = new UIButton(Inter.getLocText("Finish"));
buttonFinish = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Finish"));
buttonFinish.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
finish();
}
});
buttonCancel = new UIButton(Inter.getLocText("Cancel"));
buttonCancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
buttonCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
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.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -100,7 +100,7 @@ public abstract class UIDialog extends JDialog {
}
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.setMnemonic('C');
buttonsPane.add(cancelButton);
@ -113,7 +113,7 @@ public abstract class UIDialog extends JDialog {
}
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.setMnemonic('O');
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.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -67,7 +67,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
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);
jf.setSize(290, 400);
jf.setVisible(true);
@ -97,7 +97,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
@Override
public void stateChanged(ChangeEvent e) {
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();
setCurrentEditor(upButton.getSelectedIndex());
@ -116,7 +116,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Values-Editor");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
}
public Editor getCurrentEditor() {
@ -164,7 +164,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
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();
setCurrentEditor(j);
@ -222,7 +222,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
String name = currentEditor.getName();
Object columnIndex = currentEditor.getValue();
//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();
}
@ -238,7 +238,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue();
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());
}
@ -254,7 +254,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue();
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());
}
@ -283,7 +283,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
int i;
boolean containFormulaType = false;
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;
break;
}
@ -302,8 +302,8 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Edit_String_To_Formula")
+ "?", Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
+ "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) {
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.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -101,7 +101,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Values-Editor");
return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
}
public Editor getCurrentEditor() {
@ -153,7 +153,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
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();
setCurrentEditor(j);
@ -207,7 +207,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
//bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了?
//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();
}
@ -219,7 +219,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
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());
}
@ -235,7 +235,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
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());
}
@ -264,7 +264,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
int i;
boolean containFormulaType = false;
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;
break;
}
@ -283,8 +283,8 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Edit_String_To_Formula")
+ "?", Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
+ "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) {
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.itableeditorpane.ParameterTableModel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -83,7 +83,7 @@ public class ValueEditorPaneFactory {
* @return 返回公式编辑器面板
*/
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);
}
@ -227,12 +227,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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[]{
new TextEditor(),
new SpinnerIntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor
};
@ -244,15 +244,15 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
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 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
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 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
new ColumnRowGroupEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Cell_Group"))
};
}
@ -302,8 +302,8 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] cellGroupEditor() {
return new Editor[]{
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
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) {
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()
};
}
@ -330,9 +330,9 @@ public class ValueEditorPaneFactory {
*/
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("FR-Designer_None") : popupName),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None") : popupName),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))
};
}
@ -342,20 +342,20 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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);
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
new ColumnSelectedEditor(),
//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 IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
};
}
@ -380,12 +380,12 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
@ -398,7 +398,7 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
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[]{
new IntegerEditor(),
new DoubleEditor(),
@ -413,9 +413,9 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
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[]{
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
formulaEditor,
new ParameterEditor(),
};
@ -427,14 +427,14 @@ public class ValueEditorPaneFactory {
* @return 存储过程的编辑器
*/
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);
return new Editor[]{
new CursorEditor(),
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor
};
@ -451,10 +451,10 @@ public class ValueEditorPaneFactory {
list.add(new TextEditor());
list.add(new IntegerEditor());
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());
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);
list.add(formulaEditor);
@ -493,12 +493,12 @@ public class ValueEditorPaneFactory {
JPanel paneLeft = FRGUIPaneFactory.createBorderLayout_S_Pane();
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);
JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane();
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);

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.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -42,7 +42,7 @@ public class BooleanEditor extends Editor<Boolean> {
booleanCheckBox = new UICheckBox("true");
this.add(booleanCheckBox, BorderLayout.CENTER);
this.setValue(value);
this.setName(Inter.getLocText("Parameter-Boolean"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"));
booleanCheckBox.addItemListener(new ItemListener() {
@Override
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;
import com.fr.design.gui.icombobox.IntComboBox;
import com.fr.general.Inter;
import java.awt.*;
import java.awt.event.ActionListener;
@ -26,7 +26,7 @@ public class ColumnIndexEditor extends Editor<Object> {
* @param 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) {

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

@ -1,7 +1,7 @@
package com.fr.design.editor.editor;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -23,7 +23,7 @@ public class ColumnNameEditor extends ColumnIndexEditor {
}
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) {

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.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.general.data.TableDataColumn;
import com.fr.stable.StringUtils;
@ -28,7 +28,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
protected String[] columnNames;
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());
tableDataComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource());
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.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
//TODO:august what's this?
public class CursorEditor extends Editor<CursorEditor> {
private UILabel label;
public CursorEditor(){
this.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
label = new UILabel(Inter.getLocText("Cursor"));
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
this.add(label);
this.setPreferredSize(new Dimension(10,20));
this.setName(Inter.getLocText("Cursor"));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
this.setEnabled(false);
}
@ -36,7 +36,7 @@ public class CursorEditor extends Editor<CursorEditor> {
@Override
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;
import com.fr.base.Utils;
import com.fr.general.Inter;
/**
* 双精度编辑器
@ -16,7 +16,7 @@ public class DoubleEditor extends NumberEditor<Double> {
}
public DoubleEditor(Double value) {
super(value, Inter.getLocText("Parameter-Double"));
super(value, com.fr.design.i18n.Toolkit.i18nText("Parameter-Double"));
}
@Override

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

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

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

@ -1,7 +1,7 @@
package com.fr.design.editor.editor;
import com.fr.base.Utils;
import com.fr.general.Inter;
/**
* 整数编辑器
@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor<Integer> {
}
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

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.IntComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -51,8 +51,8 @@ public class OldColumnIndexEditor extends Editor {
}
protected void initComponents() {
indexCheckBox = new UIRadioButton(Inter.getLocText("Datasource-Column_Index"));
nameCheckBox = new UIRadioButton(Inter.getLocText("ColumnName"));
indexCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Column_Index"));
nameCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("ColumnName"));
indexCheckBox.addActionListener(actionListener);
nameCheckBox.addActionListener(actionListener);
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