|
|
|
@ -100,6 +100,7 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.CHART_PRIORITY; |
|
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.VAN_CHART_PRIORITY; |
|
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.enabledChart; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Created by eason on 14/12/29. |
|
|
|
@ -298,23 +299,41 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
|
|
|
|
|
return name; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String[] getTitle4PopupWindow(String priority) { |
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(priority)) { |
|
|
|
|
return getTitle4PopupWindow(); |
|
|
|
|
} |
|
|
|
|
String[] names = new String[getChartSize(priority)]; |
|
|
|
|
private void addTitles(String priority, List<String> list) { |
|
|
|
|
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { |
|
|
|
|
|
|
|
|
|
Map<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(priority); |
|
|
|
|
|
|
|
|
|
Iterator<Map.Entry<String, IndependentChartUIProvider>> iterator = chartUIList.entrySet().iterator(); |
|
|
|
|
int i = 0; |
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
|
Map.Entry<String, IndependentChartUIProvider> entry = iterator.next(); |
|
|
|
|
names[i++] = getChartName(entry.getKey(), entry.getValue()); |
|
|
|
|
String plotID = entry.getKey(); |
|
|
|
|
|
|
|
|
|
if (enabledChart(plotID)) { |
|
|
|
|
list.add(getChartName(plotID, entry.getValue())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return names; |
|
|
|
|
} |
|
|
|
|
return new String[0]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String[] getTitle4PopupWindow() { |
|
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
|
|
|
|
|
|
List<String> result = new ArrayList<String>(); |
|
|
|
|
|
|
|
|
|
for (Integer priority : priorityList) { |
|
|
|
|
addTitles(String.valueOf(priority), result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result.toArray(new String[result.size()]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String[] getTitle4PopupWindow(String priority) { |
|
|
|
|
List<String> list = new ArrayList<String>(); |
|
|
|
|
|
|
|
|
|
addTitles(priority, list); |
|
|
|
|
|
|
|
|
|
return list.toArray(new String[list.size()]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -341,35 +360,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
|
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String[] getTitle4PopupWindow() { |
|
|
|
|
|
|
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
|
|
|
|
|
|
if (priorityList.size() == 0) { |
|
|
|
|
return new String[0]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int size = 0; |
|
|
|
|
//获取总得图表格式
|
|
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
|
size += getChartSize(String.valueOf(aPriorityList)); |
|
|
|
|
} |
|
|
|
|
String[] names = new String[size]; |
|
|
|
|
|
|
|
|
|
int index = 0; |
|
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
|
String priority = String.valueOf(aPriorityList); |
|
|
|
|
Iterator<Map.Entry<String, IndependentChartUIProvider>> chartUI = chartTypeInterfaces.get(priority).entrySet().iterator(); |
|
|
|
|
while (chartUI.hasNext()) { |
|
|
|
|
Map.Entry<String, IndependentChartUIProvider> chartUIEntry = chartUI.next(); |
|
|
|
|
|
|
|
|
|
names[index++] = getChartName(chartUIEntry.getKey(), chartUIEntry.getValue()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return names; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<Integer> getPriorityInOrder() { |
|
|
|
|
|
|
|
|
|
List<Integer> priorityList = new ArrayList<Integer>(); |
|
|
|
|