|
|
|
@ -39,18 +39,14 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
if (mapPlot == null) { |
|
|
|
|
return contentPane; |
|
|
|
|
} |
|
|
|
|
switch (mapPlot.getAllLayersMapType()){ |
|
|
|
|
switch (mapPlot.getAllLayersMapType()) { |
|
|
|
|
case POINT: |
|
|
|
|
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent); |
|
|
|
|
contentPane.add(pointLabelPane, BorderLayout.NORTH); |
|
|
|
|
break; |
|
|
|
|
case CUSTOM: |
|
|
|
|
areaLabelPane = createAreaMapPlotLabelPane(); |
|
|
|
|
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent); |
|
|
|
|
contentPane.add(new VanMapAreaAndPointGroupPane(areaLabelPane, pointLabelPane), BorderLayout.NORTH); |
|
|
|
|
break; |
|
|
|
|
case DRILL_CUSTOM: |
|
|
|
|
areaLabelPane = new VanChartPlotLabelPane(mapPlot, parent); |
|
|
|
|
areaLabelPane = createAreaMapPlotLabelPane(); |
|
|
|
|
pointLabelPane = new VanChartPlotLabelPane(mapPlot, parent); |
|
|
|
|
contentPane.add(new VanMapAreaAndPointGroupPane(areaLabelPane, pointLabelPane), BorderLayout.NORTH); |
|
|
|
|
break; |
|
|
|
@ -64,7 +60,7 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private VanChartPlotLabelPane createAreaMapPlotLabelPane() { |
|
|
|
|
return new VanChartPlotLabelPane(mapPlot, parent){ |
|
|
|
|
return new VanChartPlotLabelPane(mapPlot, parent) { |
|
|
|
|
@Override |
|
|
|
|
protected boolean checkEnabled4Large() { |
|
|
|
|
return false; |
|
|
|
@ -75,7 +71,7 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
@Override |
|
|
|
|
public void populateBean(Chart chart) { |
|
|
|
|
Plot plot = chart.getPlot(); |
|
|
|
|
if(plot instanceof VanChartMapPlot){ |
|
|
|
|
if (plot instanceof VanChartMapPlot) { |
|
|
|
|
mapPlot = (VanChartMapPlot) plot; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -85,11 +81,11 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
parent.initAllListeners(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AttrMapLabel attrMapLabel = (AttrMapLabel)plot.getConditionCollection().getDefaultAttr().getExisted(AttrMapLabel.class); |
|
|
|
|
if(attrMapLabel == null){ |
|
|
|
|
AttrMapLabel attrMapLabel = (AttrMapLabel) plot.getConditionCollection().getDefaultAttr().getExisted(AttrMapLabel.class); |
|
|
|
|
if (attrMapLabel == null) { |
|
|
|
|
attrMapLabel = new AttrMapLabel(); |
|
|
|
|
} |
|
|
|
|
if(pointLabelPane != null){ |
|
|
|
|
if (pointLabelPane != null) { |
|
|
|
|
pointLabelPane.populate(attrMapLabel.getPointLabel()); |
|
|
|
|
} |
|
|
|
|
if (areaLabelPane != null) { |
|
|
|
@ -103,17 +99,17 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
ConditionAttr defaultAttr = chart.getPlot().getConditionCollection().getDefaultAttr(); |
|
|
|
|
AttrMapLabel attrMapLabel = (AttrMapLabel)defaultAttr.getExisted(AttrMapLabel.class); |
|
|
|
|
AttrMapLabel attrMapLabel = (AttrMapLabel) defaultAttr.getExisted(AttrMapLabel.class); |
|
|
|
|
if (attrMapLabel != null) { |
|
|
|
|
defaultAttr.remove(attrMapLabel); |
|
|
|
|
} else { |
|
|
|
|
attrMapLabel = new AttrMapLabel(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(areaLabelPane != null){ |
|
|
|
|
if (areaLabelPane != null) { |
|
|
|
|
attrMapLabel.setAreaLabel(areaLabelPane.update()); |
|
|
|
|
} |
|
|
|
|
if(pointLabelPane != null){ |
|
|
|
|
if (pointLabelPane != null) { |
|
|
|
|
attrMapLabel.setPointLabel(pointLabelPane.update()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|