Browse Source

Merge pull request #3191 in DESIGN/design from release/10.0 to bugfix/10.0

* commit 'fd00de1aeddd252bf97b725d0cf13f5975d8d575':
  CHART-17573 && CHART-17567 && CHART-17434 bugfix
  修改定位点文案
bugfix/10.0
superman 4 years ago
parent
commit
712e6f7be6
  1. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartSwingUtils.java
  2. 20
      designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java
  3. 24
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java
  4. 2
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapAnchorMarkerPane.java

2
designer-chart/src/main/java/com/fr/design/chart/ChartSwingUtils.java

@ -31,7 +31,7 @@ public class ChartSwingUtils {
}); });
textField.addKeyListener(new KeyAdapter() { textField.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
if(box.isSelected()) { if(box.isSelected() && !e.isControlDown()) {
e.consume(); e.consume();
showFormulaPane(textField, null); showFormulaPane(textField, null);
} }

20
designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java

@ -17,6 +17,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.AttrBorderWithAlpha; import com.fr.plugin.chart.base.AttrBorderWithAlpha;
import com.fr.plugin.chart.base.AttrEffect; import com.fr.plugin.chart.base.AttrEffect;
@ -30,6 +31,7 @@ import com.fr.plugin.chart.map.line.condition.AttrCurve;
import com.fr.plugin.chart.map.line.condition.AttrLineEffect; import com.fr.plugin.chart.map.line.condition.AttrLineEffect;
import com.fr.plugin.chart.type.MapMarkerType; import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.MapType;
import com.fr.stable.StringUtils;
import com.fr.van.chart.bubble.component.VanChartBubblePane; import com.fr.van.chart.bubble.component.VanChartBubblePane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.border.VanChartBorderWithAlphaPane; import com.fr.van.chart.designer.component.border.VanChartBorderWithAlphaPane;
@ -173,18 +175,29 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
} }
private void checkPointCompsEnabledWithLarge(Plot plot) { private void checkPointCompsEnabledWithLarge(Plot plot) {
boolean largeModel = largeModel(plot); checkPointEffectPane(plot);
if (pointEffectPane != null) {
GUICoreUtils.setEnabled(pointEffectPane, !largeModel); if (markerTypeCom == null) {
return;
} }
VanChartMapPlot mapPlot = (VanChartMapPlot) plot; VanChartMapPlot mapPlot = (VanChartMapPlot) plot;
boolean largeModel = largeModel(plot);
refreshMarkerComboboxModel(mapPlot); refreshMarkerComboboxModel(mapPlot);
if (largeModel) { if (largeModel) {
checkLargeModelPlotSelectedItem(mapPlot); checkLargeModelPlotSelectedItem(mapPlot);
} }
} }
private void checkPointEffectPane(Plot plot) {
if (pointEffectPane != null) {
boolean largeModel = largeModel(plot);
boolean imageMark = markerTypeCom == null ? false :
StringUtils.equals(MapMarkerType.IMAGE.toLocalString(), GeneralUtils.objectToString(markerTypeCom.getSelectedItem()));
GUICoreUtils.setEnabled(pointEffectPane, !largeModel && !imageMark);
}
}
private void checkLineCompsEnabledWithLarge(Plot plot) { private void checkLineCompsEnabledWithLarge(Plot plot) {
if (lineMapEffectPane != null) { if (lineMapEffectPane != null) {
//大数据模式 恢复用注释。下面1行删除。 //大数据模式 恢复用注释。下面1行删除。
@ -479,6 +492,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem()); markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem());
checkPointEffectPane(plot);
} }
}); });

24
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java

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

2
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapAnchorMarkerPane.java

@ -22,7 +22,7 @@ public class VanChartMapAnchorMarkerPane extends BasicBeanPane<VanChartAttrMarke
anchorSize = new UISpinner(0, Double.MAX_VALUE, 0.5, 28); anchorSize = new UISpinner(0, Double.MAX_VALUE, 0.5, 28);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Size")), anchorSize} new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height")), anchorSize}
}; };
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

Loading…
Cancel
Save