Browse Source

CHART-2105 910

master
zheng 7 years ago
parent
commit
e0f14ee618
  1. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java
  2. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java
  3. 6
      designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

10
designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java

@ -51,7 +51,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())}; ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())};
@ -63,7 +63,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -72,7 +72,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -93,7 +93,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }
@ -104,7 +104,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }

10
designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java

@ -53,7 +53,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())}; BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())};
@ -66,7 +66,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
@ -75,7 +75,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
} }
@ -102,7 +102,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }
@ -115,7 +115,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }

6
designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -49,10 +49,8 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
public void populate(VanChartRectanglePlot plot) { public void populate(VanChartRectanglePlot plot) {
this.plot = plot; this.plot = plot;
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList(); String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList(); String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>(); java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();

Loading…
Cancel
Save