Browse Source

REPORT-10923【10.0冒烟】单元格元素汇总下各选项的国际化问题

REPORT-10924【10.0冒烟】单元格元素》高级》结果集筛选选项中的国际化问题
REPORT-10920【10.0冒烟】表单中添加Tab块,右侧面板的国际化问题
final/10.0
Harrison 6 years ago
parent
commit
7afb74076d
  1. 11
      designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java
  2. 43
      designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java
  3. 2
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

11
designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java

@ -3,13 +3,13 @@
*/
package com.fr.design.gui.icombobox;
import java.awt.Component;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.util.function.DataFunction;
import com.fr.design.utils.gui.FunctionClassMappingUtils;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JList;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.util.function.DataFunction;
import java.awt.Component;
/**
* DataFunction combobox.
@ -60,7 +60,8 @@ public class FunctionComboBox extends UIComboBox {
if (value instanceof DataFunction) {
DataFunction function = (DataFunction) value;
this.setText(" " + DataCoreUtils.getFunctionDisplayName(function));
String functionBriefName = DataCoreUtils.getFunctionBriefName(function);
this.setText(com.fr.design.i18n.Toolkit.i18nText(FunctionClassMappingUtils.getLocaleKey(functionBriefName)));
}
return this;

43
designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java

@ -0,0 +1,43 @@
package com.fr.design.utils.gui;
import com.fr.stable.StringUtils;
/**
* @author Harrison
* @date 2018/08/28
* @description: Function 类的名字做匹配, 从而方便国际化的类
**/
public enum FunctionClassMappingUtils {
DataFunction_Sum("Sum", "Fine-Design_DataFunction_Sum"),
DataFunction_Average("Average","Fine-Design_DataFunction_Average"),
DataFunction_Max("Max","Fine-Design_DataFunction_Max"),
DataFunction_Min("Min","Fine-Design_DataFunction_Min"),
DataFunction_Count("Count","Fine-Design_DataFunction_Count"),
DataFunction_None("None","Fine-Design_DataFunction_None");
private final String functionClassName;
private final String localeKey;
FunctionClassMappingUtils(String functionClassName, String localeKey) {
this.functionClassName = functionClassName;
this.localeKey = localeKey;
}
public String getFunctionClassName() {
return functionClassName;
}
public String getLocaleKey() {
return localeKey;
}
public static String getLocaleKey(String functionClassName) {
for (FunctionClassMappingUtils value : FunctionClassMappingUtils.values()) {
if (StringUtils.equals(value.getFunctionClassName(), functionClassName)) {
return value.getLocaleKey();
}
}
return functionClassName;
}
}

2
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -856,7 +856,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Odd"),
com.fr.design.i18n.Toolkit.i18nText("Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Specify")
});
rsComboBox.addActionListener(actionListener);

Loading…
Cancel
Save