|
|
@ -39,7 +39,6 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane |
|
|
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
|
|
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
|
|
|
import com.fr.form.ui.ChartEditor; |
|
|
|
import com.fr.form.ui.ChartEditor; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.plugin.chart.PiePlot4VanChart; |
|
|
|
import com.fr.plugin.chart.PiePlot4VanChart; |
|
|
|
import com.fr.plugin.chart.area.VanChartAreaPlot; |
|
|
|
import com.fr.plugin.chart.area.VanChartAreaPlot; |
|
|
|
import com.fr.plugin.chart.bubble.VanChartBubblePlot; |
|
|
|
import com.fr.plugin.chart.bubble.VanChartBubblePlot; |
|
|
@ -84,7 +83,7 @@ import com.fr.van.chart.structure.desinger.StructureIndependentVanChartInterface |
|
|
|
import com.fr.van.chart.treemap.TreeMapIndependentVanChartInterface; |
|
|
|
import com.fr.van.chart.treemap.TreeMapIndependentVanChartInterface; |
|
|
|
import com.fr.van.chart.wordcloud.designer.WordCloudIndependentVanChartInterface; |
|
|
|
import com.fr.van.chart.wordcloud.designer.WordCloudIndependentVanChartInterface; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.Icon; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
@ -92,7 +91,8 @@ import java.util.LinkedHashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.*; |
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.CHART_PRIORITY; |
|
|
|
|
|
|
|
import static com.fr.chart.charttypes.ChartTypeManager.VAN_CHART_PRIORITY; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by eason on 14/12/29. |
|
|
|
* Created by eason on 14/12/29. |
|
|
@ -170,9 +170,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
private static void readVanChart() { |
|
|
|
private static void readVanChart() { |
|
|
|
|
|
|
|
|
|
|
|
if (chartTypeInterfaces.containsKey(VAN_CHART_PRIORITY)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface()); |
|
|
@ -196,10 +193,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void readDefault() { |
|
|
|
private static void readDefault() { |
|
|
|
|
|
|
|
|
|
|
|
if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addChartTypeInterface(CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); |
|
|
|
addChartTypeInterface(CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); |
|
|
|
addChartTypeInterface(CHART_PRIORITY, ChartConstants.LINE_CHART, new LineIndependentChartInterface()); |
|
|
|
addChartTypeInterface(CHART_PRIORITY, ChartConstants.LINE_CHART, new LineIndependentChartInterface()); |
|
|
@ -254,17 +247,17 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
* |
|
|
|
* |
|
|
|
* @param paneList pane容器 |
|
|
|
* @param paneList pane容器 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends Chart>> paneList) { |
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends Chart>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends Chart>>> allChartTypePane) { |
|
|
|
|
|
|
|
|
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
String priority = String.valueOf(aPriorityList); |
|
|
|
String priority = String.valueOf(aPriorityList); |
|
|
|
addPlotTypePaneList(priority, paneList); |
|
|
|
addPlotTypePaneList(priority, paneList, allChartTypePane); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void addPlotTypePaneList(String priority, List<FurtherBasicBeanPane<? extends Chart>> paneList) { |
|
|
|
public void addPlotTypePaneList(String priority, List<FurtherBasicBeanPane<? extends Chart>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends Chart>>> allChartTypePane) { |
|
|
|
|
|
|
|
|
|
|
|
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { |
|
|
|
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { |
|
|
|
|
|
|
|
|
|
|
@ -275,26 +268,18 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
Map.Entry<String, IndependentChartUIProvider> entry = iterator.next(); |
|
|
|
Map.Entry<String, IndependentChartUIProvider> entry = iterator.next(); |
|
|
|
String plotID = entry.getKey(); |
|
|
|
String plotID = entry.getKey(); |
|
|
|
|
|
|
|
|
|
|
|
if (enabledChart(plotID)) { |
|
|
|
AbstractChartTypePane pane = entry.getValue().getPlotTypePane(); |
|
|
|
AbstractChartTypePane pane = entry.getValue().getPlotTypePane(); |
|
|
|
pane.setPlotID(plotID); |
|
|
|
pane.setPlotID(plotID); |
|
|
|
paneList.add(pane); |
|
|
|
paneList.add(pane); |
|
|
|
|
|
|
|
|
|
|
|
if (allChartTypePane.get(priority) == null) { |
|
|
|
|
|
|
|
allChartTypePane.put(priority, new LinkedHashMap<String, FurtherBasicBeanPane<? extends Chart>>()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
allChartTypePane.get(priority).put(plotID, pane); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends Chart>> paneList, |
|
|
|
|
|
|
|
String priority, String plotID) { |
|
|
|
|
|
|
|
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { |
|
|
|
|
|
|
|
IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); |
|
|
|
|
|
|
|
AbstractChartTypePane pane = provider.getPlotTypePane(); |
|
|
|
|
|
|
|
pane.setPlotID(plotID); |
|
|
|
|
|
|
|
paneList.add(pane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static String getChartName(String plotID, IndependentChartUIProvider provider) { |
|
|
|
private static String getChartName(String plotID, IndependentChartUIProvider provider) { |
|
|
|
String name = provider.getPlotTypeTitle4PopupWindow(); |
|
|
|
String name = provider.getPlotTypeTitle4PopupWindow(); |
|
|
|
if (StringUtils.isEmpty(name)) { |
|
|
|
if (StringUtils.isEmpty(name)) { |
|
|
|