Browse Source

Pull request #1650: CHART-13833 散点图标记点删除无,增加自动,调整标记点界面交互

Merge in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit 'ee953baced5538c00de1ddec79d8e8273bdf209a':
  修改地图散点标记点
  删除静态变量
  散点图标记点条件属性界面调整
  CHART-13833 散点图标记点删除无,增加自动,调整标记点界面交互
feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
8117bce57f
  1. 78
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java
  2. 18
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java
  3. 3
      designer-chart/src/main/java/com/fr/van/chart/line/VanChartLineSeriesPane.java
  4. 3
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java
  5. 4
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterConditionPane.java
  6. 22
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java
  7. 28
      designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterMarkerConditionPane.java

78
designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java

@ -32,7 +32,6 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
private JPanel markerConfigPane;
private static final MarkerType[] NORMAL_TYPES = {
MarkerType.MARKER_NULL,
MarkerType.MARKER_CIRCLE,
MarkerType.MARKER_SQUARE,
MarkerType.MARKER_DIAMOND,
@ -42,77 +41,22 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
MarkerType.MARKER_DIAMOND_HOLLOW,
MarkerType.MARKER_TRIANGLE_HOLLOW
};
private static Marker[] normalMarkers = null;
protected static Marker[] getNormalMarkers() {
if (normalMarkers == null) {
normalMarkers = new Marker[NORMAL_TYPES.length];
int i = 0;
for (MarkerType markerType : NORMAL_TYPES) {
normalMarkers[i++] = Marker.createMarker(markerType);
}
}
return normalMarkers;
}
private static Marker[] normalMarkersWithAuto = null;
protected Marker[] getNormalMarkersWithCustom(MarkerType[] types) {
MarkerType[] customTypes = types == null ? new MarkerType[0] : types;
Marker[] result = new Marker[customTypes.length + NORMAL_TYPES.length];
protected static Marker[] getNormalMarkersWithAuto() {
if (normalMarkersWithAuto == null) {
normalMarkersWithAuto = new Marker[NORMAL_TYPES.length + 1];
normalMarkersWithAuto[0] = Marker.createMarker(MarkerType.MARKER_AUTO);
int i = 0;
int i = 1;
for (MarkerType markerType : NORMAL_TYPES) {
normalMarkersWithAuto[i++] = Marker.createMarker(markerType);
}
for (MarkerType markerType : customTypes) {
result[i++] = Marker.createMarker(markerType);
}
return normalMarkersWithAuto;
}
//没有无这个选项
private static final MarkerType[] MAP_TYPES = {
MarkerType.MARKER_CIRCLE,
MarkerType.MARKER_SQUARE,
MarkerType.MARKER_DIAMOND,
MarkerType.MARKER_TRIANGLE,
MarkerType.MARKER_CIRCLE_HOLLOW,
MarkerType.MARKER_SQUARE_HOLLOW,
MarkerType.MARKER_DIAMOND_HOLLOW,
MarkerType.MARKER_TRIANGLE_HOLLOW
};
private static Marker[] mapMarkers = null;
protected static Marker[] getMapScatterMarkers() {
if (mapMarkers == null) {
mapMarkers = new Marker[MAP_TYPES.length];
int i = 0;
for (MarkerType markerType : MAP_TYPES) {
mapMarkers[i++] = Marker.createMarker(markerType);
}
for (MarkerType markerType : NORMAL_TYPES) {
result[i++] = Marker.createMarker(markerType);
}
return mapMarkers;
}
//甘特图的菱形是实心的,之前写的空心。
//兼容:模板属性不做兼容。只是之前空心做界面兼容。前台展现实心空心一样的效果,所以不用做什么
private static final MarkerType[] GANTT_TYPES = {
MarkerType.MARKER_TRIANGLE,
MarkerType.MARKER_DIAMOND,
MarkerType.MARKER_STAR
};
private static Marker[] ganttMarkers = null;
protected static Marker[] getGanttMarkers() {
if (ganttMarkers == null) {
ganttMarkers = new Marker[GANTT_TYPES.length];
int i = 0;
for (MarkerType markerType : GANTT_TYPES) {
ganttMarkers[i++] = Marker.createMarker(markerType);
}
}
return ganttMarkers;
return result;
}
public MarkerComboBox getMarkerTypeComboBox() {
@ -184,7 +128,7 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
if (markerConfigPane != null && markerTypeComboBox != null) {
MarkerType type = MarkerType.parse(markerTypeComboBox.getSelectedMarkder().getMarkerType());
markerConfigPane.setVisible(!(type == MarkerType.MARKER_AUTO || type == MarkerType.MARKER_NULL));
markerConfigPane.setVisible(type != MarkerType.MARKER_NULL);
}
}
@ -195,7 +139,7 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
}
protected Marker[] getMarkers() {
return getNormalMarkers();
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_NULL});
}
/**

18
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java

@ -18,11 +18,27 @@ import java.awt.Component;
public class VanChartGanttCommonMarkerPane extends VanChartCommonMarkerPane {
private static final int PREFERRED_WIDTH = 100;
//甘特图的菱形是实心的,之前写的空心。
//兼容:模板属性不做兼容。只是之前空心做界面兼容。前台展现实心空心一样的效果,所以不用做什么
private static final MarkerType[] GANTT_TYPES = {
MarkerType.MARKER_TRIANGLE,
MarkerType.MARKER_DIAMOND,
MarkerType.MARKER_STAR
};
private ColorSelectBoxWithOutTransparent colorSelect;
@Override
protected Marker[] getMarkers() {
return getGanttMarkers();
Marker[] result = new Marker[GANTT_TYPES.length];
int i = 0;
for (MarkerType markerType : GANTT_TYPES) {
result[i++] = Marker.createMarker(markerType);
}
return result;
}
protected Component[][] getMarkerTypeComponent() {

3
designer-chart/src/main/java/com/fr/van/chart/line/VanChartLineSeriesPane.java

@ -6,6 +6,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
@ -55,7 +56,7 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane {
return new VanChartCommonMarkerPane() {
protected Marker[] getMarkers() {
return getNormalMarkersWithAuto();
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO, MarkerType.MARKER_NULL});
}
};
}

3
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java

@ -3,6 +3,7 @@ package com.fr.van.chart.map.designer.style.series;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
@ -23,7 +24,7 @@ public class VanChartMapScatterMarkerPane extends VanChartCommonMarkerPane {
@Override
protected Marker[] getMarkers() {
return getMapScatterMarkers();
return getNormalMarkersWithCustom(new MarkerType[0]);
}
@Override

4
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterConditionPane.java

@ -17,10 +17,10 @@ import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltip;
import com.fr.van.chart.bubble.VanChartBubbleConditionSelectionPane;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartTrendLineConditionPane;
import com.fr.van.chart.scatter.component.VanChartScatterLineTypeConditionPane;
import com.fr.van.chart.scatter.component.VanChartScatterMarkerConditionPane;
import com.fr.van.chart.scatter.component.label.VanChartScatterLabelConditionPane;
import com.fr.van.chart.scatter.component.tooltip.VanChartScatterTooltipConditionPane;
import com.fr.van.chart.scatter.large.VanChartLargeModelMarkerConditionPane;
@ -56,7 +56,7 @@ public class VanChartScatterConditionPane extends DataSeriesConditionPane {
classPaneMap.put(VanChartAttrMarker.class, new VanChartLargeModelMarkerConditionPane(this));
} else {
classPaneMap.put(VanChartAttrLine.class, new VanChartScatterLineTypeConditionPane(this));
classPaneMap.put(VanChartAttrMarker.class, new VanChartMarkerConditionPane(this));
classPaneMap.put(VanChartAttrMarker.class, new VanChartScatterMarkerConditionPane(this));
classPaneMap.put(ScatterAttrLabel.class, new VanChartScatterLabelConditionPane(this, plot));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getScatterPlotDefaultEffect()));
}

22
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java

@ -1,13 +1,18 @@
package com.fr.van.chart.scatter;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.custom.component.VanChartCustomAxisConditionPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.van.chart.designer.style.series.VanChartStackedAndAxisListControlPane;
import com.fr.van.chart.scatter.component.VanChartScatterLineTypePane;
@ -63,7 +68,7 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane {
@Override
public String getPaneTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
return Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
}
};
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
@ -81,4 +86,19 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane {
checkLinePane();
}
protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane() {
protected VanChartCommonMarkerPane createCommonMarkerPane() {
return new VanChartCommonMarkerPane() {
protected Marker[] getMarkers() {
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO});
}
};
}
};
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
}
}

28
designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterMarkerConditionPane.java

@ -0,0 +1,28 @@
package com.fr.van.chart.scatter.component;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane;
public class VanChartScatterMarkerConditionPane extends VanChartMarkerConditionPane {
public VanChartScatterMarkerConditionPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
}
protected void initMarkerPane() {
markerPane = new VanChartMarkerPane() {
protected VanChartCommonMarkerPane createCommonMarkerPane() {
return new VanChartCommonMarkerPane() {
protected Marker[] getMarkers() {
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO});
}
};
}
};
}
}
Loading…
Cancel
Save