You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.6 KiB
78 lines
2.6 KiB
package com.fr.van.chart.map.designer.other; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
import com.fr.plugin.chart.map.VanChartMapPlot; |
|
import com.fr.plugin.chart.type.MapType; |
|
import com.fr.van.chart.designer.PlotFactory; |
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
import com.fr.van.chart.designer.other.AutoRefreshPane; |
|
import com.fr.van.chart.designer.other.AutoRefreshPaneWithoutTooltip; |
|
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom; |
|
|
|
import javax.swing.JPanel; |
|
|
|
/** |
|
* Created by hufan on 2016/12/20. |
|
*/ |
|
public class VanChartMapInteractivePane extends VanChartInteractivePaneWithMapZoom { |
|
private static final int HYPERLINK_LEFT_GAP = 36; |
|
private VanChartMapHyperLinkPane hyperlinkPane; |
|
|
|
@Override |
|
protected JPanel createHyperlinkPane() { |
|
hyperlinkPane = new VanChartMapHyperLinkPane(); |
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), hyperlinkPane); |
|
} |
|
|
|
@Override |
|
protected void populateHyperlink(Plot plot) { |
|
if (hyperlinkPane == null) { |
|
return; |
|
} |
|
hyperlinkPane.populateBean(plot); |
|
} |
|
|
|
@Override |
|
protected void updateHyperlink(Plot plot) { |
|
if (hyperlinkPane == null) { |
|
return; |
|
} |
|
hyperlinkPane.updateBean(plot); |
|
} |
|
|
|
//大数据模式 恢复用注释。删除下面方法。 |
|
@Override |
|
protected boolean largeModel(Plot plot) { |
|
if (plot instanceof VanChartMapPlot) { |
|
VanChartMapPlot mapPlot = (VanChartMapPlot) plot; |
|
switch (mapPlot.getMapType()) { |
|
case LINE: |
|
return PlotFactory.lineMapLargeModel(mapPlot); |
|
default: |
|
return PlotFactory.largeDataModel(mapPlot); |
|
} |
|
} |
|
return false; |
|
} |
|
|
|
@Override |
|
protected boolean isCurrentChartSupportLargeDataMode() { |
|
if (this.chart == null || this.chart.getPlot() == null) { |
|
return false; |
|
} |
|
VanChartMapPlot mapPlot = this.chart.getPlot(); |
|
|
|
return mapPlot.getMapType() == MapType.POINT || mapPlot.getMapType() == MapType.LINE; |
|
} |
|
|
|
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) { |
|
boolean isLargeModel = largeModel(plot); |
|
VanChartMapPlot mapPlot = (VanChartMapPlot) plot; |
|
if (mapPlot.getMapType().equals(MapType.LINE)) { |
|
return new AutoRefreshPaneWithoutTooltip(chart, isLargeModel); |
|
} |
|
return new AutoRefreshPane(chart, isLargeModel); |
|
} |
|
|
|
} |