|
|
@ -24,7 +24,7 @@ import com.fr.plugin.chart.structure.VanChartStructurePlot; |
|
|
|
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; |
|
|
|
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; |
|
|
|
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; |
|
|
|
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; |
|
|
|
import com.fr.van.chart.bubble.force.VanChartBubbleRefreshTooltipPane; |
|
|
|
import com.fr.van.chart.bubble.force.VanChartBubbleRefreshTooltipPane; |
|
|
|
import com.fr.van.chart.column.VanChartColumnPlotLabelPane; |
|
|
|
import com.fr.van.chart.column.VanChartColumnPlotLabelDetailPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartLabelContentPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartLabelContentPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartTooltipContentPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartTooltipContentPane; |
|
|
@ -35,13 +35,14 @@ import com.fr.van.chart.designer.style.VanChartRangeLegendPane; |
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
import com.fr.van.chart.designer.style.VanLegendPaneWidthOutHighlight; |
|
|
|
import com.fr.van.chart.designer.style.VanLegendPaneWidthOutHighlight; |
|
|
|
import com.fr.van.chart.designer.style.label.VanChartGaugePlotLabelPane; |
|
|
|
import com.fr.van.chart.designer.style.label.VanChartGaugePlotLabelPane; |
|
|
|
|
|
|
|
import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; |
|
|
|
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; |
|
|
|
import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; |
|
|
|
import com.fr.van.chart.designer.style.tooltip.VanChartPlotRefreshTooltipPane; |
|
|
|
import com.fr.van.chart.designer.style.tooltip.VanChartPlotRefreshTooltipPane; |
|
|
|
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; |
|
|
|
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelLabelContentPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelLabelContentPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelTooltipContentPane; |
|
|
|
import com.fr.van.chart.funnel.designer.style.VanChartFunnelTooltipContentPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.label.VanChartGanttPlotLabelPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.label.VanChartGanttLabelContentPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.tooltip.VanChartGanttPlotTooltipPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.tooltip.VanChartGanttPlotTooltipPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.tooltip.VanChartGanttTooltipContentPane; |
|
|
|
import com.fr.van.chart.gantt.designer.style.tooltip.VanChartGanttTooltipContentPane; |
|
|
|
import com.fr.van.chart.gauge.VanChartGaugePlotRefreshTooltipPane; |
|
|
|
import com.fr.van.chart.gauge.VanChartGaugePlotRefreshTooltipPane; |
|
|
@ -53,10 +54,10 @@ import com.fr.van.chart.multilayer.style.VanChartMultiPieLabelContentPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMultiPiePlotTooltipPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMultiPiePlotTooltipPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMultiPieTooltipContentPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMultiPieTooltipContentPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMutiPieRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.multilayer.style.VanChartMutiPieRefreshTooltipContentPane; |
|
|
|
|
|
|
|
import com.fr.van.chart.scatter.VanChartScatterLabelContentPane; |
|
|
|
import com.fr.van.chart.scatter.VanChartScatterPlotTooltipPane; |
|
|
|
import com.fr.van.chart.scatter.VanChartScatterPlotTooltipPane; |
|
|
|
import com.fr.van.chart.scatter.VanChartScatterRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.scatter.VanChartScatterRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.scatter.component.label.VanChartScatterPlotLabelPane; |
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructureLabelContentPane; |
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructurePlotLabelPane; |
|
|
|
|
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructureRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructureRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructureTooltipContentPane; |
|
|
|
import com.fr.van.chart.structure.desinger.style.VanChartStructureTooltipContentPane; |
|
|
|
import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudRefreshTooltipContentPane; |
|
|
|
import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudRefreshTooltipContentPane; |
|
|
@ -105,20 +106,6 @@ public class PlotFactory { |
|
|
|
return borderAndBackgroundLabelPlots.contains(plot.getClass()); |
|
|
|
return borderAndBackgroundLabelPlots.contains(plot.getClass()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 标签Map |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static Map<Class<? extends Plot>, Class<? extends VanChartPlotLabelPane>> labelMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static { |
|
|
|
|
|
|
|
labelMap.put(VanChartColumnPlot.class, VanChartColumnPlotLabelPane.class); |
|
|
|
|
|
|
|
labelMap.put(VanChartGaugePlot.class, VanChartGaugePlotLabelPane.class); |
|
|
|
|
|
|
|
labelMap.put(VanChartScatterPlot.class, VanChartScatterPlotLabelPane.class); |
|
|
|
|
|
|
|
labelMap.put(VanChartBubblePlot.class, VanChartScatterPlotLabelPane.class); |
|
|
|
|
|
|
|
labelMap.put(VanChartGanttPlot.class, VanChartGanttPlotLabelPane.class); |
|
|
|
|
|
|
|
labelMap.put(VanChartStructurePlot.class, VanChartStructurePlotLabelPane.class); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 图例Map |
|
|
|
* 图例Map |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -158,6 +145,10 @@ public class PlotFactory { |
|
|
|
labelContentMap.put(VanChartTreeMapPlot.class, VanChartMultiPieLabelContentPane.class); |
|
|
|
labelContentMap.put(VanChartTreeMapPlot.class, VanChartMultiPieLabelContentPane.class); |
|
|
|
labelContentMap.put(VanChartFunnelPlot.class, VanChartFunnelLabelContentPane.class); |
|
|
|
labelContentMap.put(VanChartFunnelPlot.class, VanChartFunnelLabelContentPane.class); |
|
|
|
labelContentMap.put(VanChartHeatMapPlot.class, VanChartMapLabelContentPane.class); |
|
|
|
labelContentMap.put(VanChartHeatMapPlot.class, VanChartMapLabelContentPane.class); |
|
|
|
|
|
|
|
labelContentMap.put(VanChartBubblePlot.class, VanChartScatterLabelContentPane.class); |
|
|
|
|
|
|
|
labelContentMap.put(VanChartScatterPlot.class, VanChartScatterLabelContentPane.class); |
|
|
|
|
|
|
|
labelContentMap.put(VanChartStructurePlot.class, VanChartStructureLabelContentPane.class); |
|
|
|
|
|
|
|
labelContentMap.put(VanChartGanttPlot.class, VanChartGanttLabelContentPane.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static Map<Class<? extends Plot>, Class<? extends VanChartTooltipContentPane>> tooltipContentMap = new HashMap<Class<? extends Plot>, Class<? extends VanChartTooltipContentPane>>(); |
|
|
|
private static Map<Class<? extends Plot>, Class<? extends VanChartTooltipContentPane>> tooltipContentMap = new HashMap<Class<? extends Plot>, Class<? extends VanChartTooltipContentPane>>(); |
|
|
@ -212,19 +203,24 @@ public class PlotFactory { |
|
|
|
* @return 标签界面 |
|
|
|
* @return 标签界面 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane) { |
|
|
|
public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane) { |
|
|
|
Class<? extends Plot> key = plot.getClass(); |
|
|
|
return createPlotLabelPane(plot, stylePane, false); |
|
|
|
if (labelMap.containsKey(key)) { |
|
|
|
} |
|
|
|
try { |
|
|
|
|
|
|
|
Class<? extends VanChartPlotLabelPane> cl = labelMap.get(key); |
|
|
|
public static VanChartPlotLabelPane createPlotLabelPane(Plot plot, VanChartStylePane stylePane, boolean inCondition) { |
|
|
|
Constructor<? extends VanChartPlotLabelPane> constructor = cl.getConstructor(Plot.class, VanChartStylePane.class); |
|
|
|
if (plot instanceof VanChartGaugePlot) { |
|
|
|
return constructor.newInstance(plot, stylePane); |
|
|
|
return new VanChartGaugePlotLabelPane(plot, stylePane); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new VanChartPlotLabelPane(plot, stylePane, inCondition); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static VanChartPlotLabelDetailPane createPlotLabelDetailPane(Plot plot, VanChartStylePane stylePane, boolean inCondition) { |
|
|
|
|
|
|
|
if (plot instanceof VanChartColumnPlot) { |
|
|
|
|
|
|
|
return new VanChartColumnPlotLabelDetailPane(plot, stylePane, inCondition); |
|
|
|
} |
|
|
|
} |
|
|
|
return new VanChartPlotLabelPane(plot, stylePane); |
|
|
|
return new VanChartPlotLabelDetailPane(plot, stylePane, inCondition); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 根据图表类型创建图例界面 |
|
|
|
* 根据图表类型创建图例界面 |
|
|
|
* |
|
|
|
* |
|
|
@ -275,18 +271,22 @@ public class PlotFactory { |
|
|
|
* @param showOnPane formatpane用到 |
|
|
|
* @param showOnPane formatpane用到 |
|
|
|
* @return 标签的具体内容界面 |
|
|
|
* @return 标签的具体内容界面 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static VanChartTooltipContentPane createPlotLabelContentPane(Plot plot, VanChartStylePane parent, JPanel showOnPane) { |
|
|
|
public static VanChartTooltipContentPane createPlotLabelContentPane(Plot plot, VanChartStylePane parent, JPanel showOnPane, boolean inCondition) { |
|
|
|
Class<? extends Plot> key = plot.getClass(); |
|
|
|
Class<? extends Plot> key = plot.getClass(); |
|
|
|
|
|
|
|
//力学气泡图特殊
|
|
|
|
|
|
|
|
if (plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble()) { |
|
|
|
|
|
|
|
return new VanChartLabelContentPane(parent, showOnPane, inCondition); |
|
|
|
|
|
|
|
} |
|
|
|
if (labelContentMap.containsKey(key)) { |
|
|
|
if (labelContentMap.containsKey(key)) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Class<? extends VanChartTooltipContentPane> cl = labelContentMap.get(key); |
|
|
|
Class<? extends VanChartTooltipContentPane> cl = labelContentMap.get(key); |
|
|
|
Constructor<? extends VanChartTooltipContentPane> constructor = cl.getConstructor(VanChartStylePane.class, JPanel.class); |
|
|
|
Constructor<? extends VanChartTooltipContentPane> constructor = cl.getConstructor(VanChartStylePane.class, JPanel.class, boolean.class); |
|
|
|
return constructor.newInstance(parent, showOnPane); |
|
|
|
return constructor.newInstance(parent, showOnPane, inCondition); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new VanChartLabelContentPane(parent, showOnPane); |
|
|
|
return new VanChartLabelContentPane(parent, showOnPane, inCondition); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|