Browse Source
* commit 'fbb8ce52bc895594d978f684f7795a6504d61cdf': 继续改改改 继续改改改 继续改改改 CORE-116 继续改国际化,改一点是一点master
richie
6 years ago
17 changed files with 39 additions and 98 deletions
@ -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()]); |
||||
} |
||||
} |
Loading…
Reference in new issue