Browse Source

CORE-116 继续改国际化,改一点是一点

master
richie 6 years ago
parent
commit
88767eace6
  1. 63
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java
  2. 24
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java

63
designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java

@ -1,63 +0,0 @@
package com.fr.design.chart.axis;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import com.fr.chart.chartattr.ChartAlertValue;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import java.util.ArrayList;
import java.util.List;
public class ChartAlertLinePane extends JListControlPane {
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("ChartF-Alert-Line"),
ChartAlertValue.class, ChartAlertValuePane.class)
};
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"Edit", "ChartF-Alert-Line"});
}
public void populate(ChartAlertValue[] alertList) {
if (alertList == null) {
alertList = new ChartAlertValue[0];
}
List<NameObject> nameObjectList = new ArrayList<NameObject>();
for (int i = 0; i < alertList.length; i++) {
ChartAlertValue value = alertList[i];
nameObjectList.add(new NameObject(value.getAlertPaneSelectName(), value));
}
if (!nameObjectList.isEmpty()) {
populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
}
public ChartAlertValue[] updateAlertValues() {
Nameable[] res = update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
if (res_array.length < 1) {
return new ChartAlertValue[0];
}
List alertValueList = new ArrayList();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
ChartAlertValue chartAlertValue = (ChartAlertValue) nameObject.getObject();
chartAlertValue.setAlertPaneSelectName(nameObject.getName());
alertValueList.add(chartAlertValue);
}
return (ChartAlertValue[]) alertValueList.toArray(new ChartAlertValue[alertValueList.size()]);
}
}

24
designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java

@ -61,12 +61,12 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel alertLinePane =FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel alertLinePane =FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
pane.add(alertLinePane); pane.add(alertLinePane);
alertLinePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF-Alert-Line", "Set"}))); alertLinePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line_Setting")));
JPanel valuePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel valuePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(valuePane); alertLinePane.add(valuePane);
valuePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF_Alert", "Value"}) + ":")); valuePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Value") + ":"));
textField = new UITextField(); textField = new UITextField();
textField.setColumns(4); textField.setColumns(4);
@ -88,14 +88,14 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel lineStylePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel lineStylePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(lineStylePane); alertLinePane.add(lineStylePane);
lineStylePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Line-Style") + ":")); lineStylePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Line_Style") + ":"));
lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
lineStylePane.add(lineCombo); lineStylePane.add(lineCombo);
JPanel lineColorPane =FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel lineColorPane =FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
alertLinePane.add(lineColorPane); alertLinePane.add(lineColorPane);
lineColorPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"ChartF-Alert-Line", "Color"}) + ":")); lineColorPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line_Color") + ":"));
colorBox = new ColorSelectBox(80); colorBox = new ColorSelectBox(80);
lineColorPane.add(colorBox); lineColorPane.add(colorBox);
@ -105,7 +105,7 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
JPanel tipPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel tipPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
pane.add(tipPane); pane.add(tipPane);
tipPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Tip") + ":", null)); tipPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Tip") + ":", null));
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
tipPane.add(centerPane); tipPane.add(centerPane);
@ -130,10 +130,10 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
double[] rowSize = {t, t, t, t, t}; double[] rowSize = {t, t, t, t, t};
double[] columnSize = {0.1, 0.2, 0.5, 0.2}; double[] columnSize = {0.1, 0.2, 0.5, 0.2};
Component[][] components= { Component[][] components= {
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Content") + ":"), contentField = new UITextField(3)}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Content") + ":"), contentField = new UITextField(3)},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FRFont") + ":"), fontNameBox}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font") + ":"), fontNameBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FRFont-Size") + ":"), fontSizeBox}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font_Size") + ":"), fontSizeBox},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Layout") + ": "), leftButton = new UIRadioButton(getLeftName())}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Layout") + ": "), leftButton = new UIRadioButton(getLeftName())},
{null, null, rightButton = new UIRadioButton(getRightName())}, {null, null, rightButton = new UIRadioButton(getRightName())},
}; };
@ -148,16 +148,16 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
} }
protected String getLeftName() {// 居左 居右 protected String getLeftName() {// 居左 居右
return com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Left"); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_At_The_Left");
} }
protected String getRightName() { protected String getRightName() {
return com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Right"); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_At_The_Right");
} }
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("ChartF-Alert-Line"); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line");
} }
private void showFormulaPane() { private void showFormulaPane() {

Loading…
Cancel
Save