Browse Source

删除静态变量

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
651b1dbb3e
  1. 60
      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. 3
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java
  6. 3
      designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterMarkerConditionPane.java

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

@ -41,12 +41,8 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
MarkerType.MARKER_DIAMOND_HOLLOW,
MarkerType.MARKER_TRIANGLE_HOLLOW
};
private static Marker[] normalMarkers = null;
private static Marker[] normalMarkersWithNull = null;
private static Marker[] normalMarkersWithAuto = null;
private static Marker[] normalMarkersWithAutoAndNull = null;
private static Marker[] getNormalMarkersWithCustom(MarkerType[] types) {
protected Marker[] getNormalMarkersWithCustom(MarkerType[] types) {
MarkerType[] customTypes = types == null ? new MarkerType[0] : types;
Marker[] result = new Marker[customTypes.length + NORMAL_TYPES.length];
@ -63,58 +59,6 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
return result;
}
protected static Marker[] getNormalMarkers() {
if (normalMarkers == null) {
normalMarkers = getNormalMarkersWithCustom(new MarkerType[0]);
}
return normalMarkers;
}
protected static Marker[] getNormalMarkersWithNull() {
if (normalMarkersWithNull == null) {
normalMarkersWithNull = getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_NULL});
}
return normalMarkersWithNull;
}
protected static Marker[] getNormalMarkersWithAuto() {
if (normalMarkersWithAuto == null) {
normalMarkersWithAuto = getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO});
}
return normalMarkersWithAuto;
}
protected static Marker[] getNormalMarkersWithAutoAndNull() {
if (normalMarkersWithAutoAndNull == null) {
normalMarkersWithAutoAndNull = getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO, MarkerType.MARKER_NULL});
}
return normalMarkersWithAutoAndNull;
}
//甘特图的菱形是实心的,之前写的空心。
//兼容:模板属性不做兼容。只是之前空心做界面兼容。前台展现实心空心一样的效果,所以不用做什么
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;
}
public MarkerComboBox getMarkerTypeComboBox() {
return markerTypeComboBox;
}
@ -195,7 +139,7 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
}
protected Marker[] getMarkers() {
return getNormalMarkersWithNull();
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 getNormalMarkersWithAutoAndNull();
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 getNormalMarkers();
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_NULL});
}
@Override

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

@ -7,6 +7,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.custom.component.VanChartCustomAxisConditionPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
@ -92,7 +93,7 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane {
return new VanChartCommonMarkerPane() {
protected Marker[] getMarkers() {
return getNormalMarkersWithAuto();
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO});
}
};
}

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

@ -2,6 +2,7 @@ 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;
@ -18,7 +19,7 @@ public class VanChartScatterMarkerConditionPane extends VanChartMarkerConditionP
return new VanChartCommonMarkerPane() {
protected Marker[] getMarkers() {
return getNormalMarkersWithAuto();
return getNormalMarkersWithCustom(new MarkerType[]{MarkerType.MARKER_AUTO});
}
};
}

Loading…
Cancel
Save