From 88767eace63281a8f01c50277a53c1ffba15d0c0 Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 24 Jul 2018 22:31:14 +0800 Subject: [PATCH] =?UTF-8?q?CORE-116=20=E7=BB=A7=E7=BB=AD=E6=94=B9=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=EF=BC=8C=E6=94=B9=E4=B8=80=E7=82=B9=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/chart/axis/ChartAlertLinePane.java | 63 ------------------- .../chart/axis/ChartAlertValuePane.java | 24 +++---- 2 files changed, 12 insertions(+), 75 deletions(-) delete mode 100644 designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java diff --git a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java b/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java deleted file mode 100644 index e07379c693..0000000000 --- a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertLinePane.java +++ /dev/null @@ -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 nameObjectList = new ArrayList(); - - 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()]); - } -} \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java b/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java index d599c19e65..6608c55aaf 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java @@ -61,12 +61,12 @@ public class ChartAlertValuePane extends BasicBeanPane { JPanel alertLinePane =FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); 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(); 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.setColumns(4); @@ -88,14 +88,14 @@ public class ChartAlertValuePane extends BasicBeanPane { JPanel lineStylePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); 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); lineStylePane.add(lineCombo); JPanel lineColorPane =FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); 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); lineColorPane.add(colorBox); @@ -105,7 +105,7 @@ public class ChartAlertValuePane extends BasicBeanPane { JPanel tipPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); 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(); tipPane.add(centerPane); @@ -130,10 +130,10 @@ public class ChartAlertValuePane extends BasicBeanPane { double[] rowSize = {t, t, t, t, t}; double[] columnSize = {0.1, 0.2, 0.5, 0.2}; 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("FRFont") + ":"), fontNameBox}, - {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FRFont-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_Content") + ":"), contentField = new UITextField(3)}, + {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font") + ":"), fontNameBox}, + {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Font_Size") + ":"), fontSizeBox}, + {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Layout") + ": "), leftButton = new UIRadioButton(getLeftName())}, {null, null, rightButton = new UIRadioButton(getRightName())}, }; @@ -148,16 +148,16 @@ public class ChartAlertValuePane extends BasicBeanPane { } 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() { - return com.fr.design.i18n.Toolkit.i18nText("Chart_Alert_Right"); + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_At_The_Right"); } @Override 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() {