|
|
@ -2,30 +2,21 @@ package com.fr.plugin.chart.designer.style.background; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.imenutable.UIMenuNameableCreator; |
|
|
|
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.VanChartAttrHelper; |
|
|
|
import com.fr.plugin.chart.attr.DefaultAxisHelper; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
import com.fr.plugin.chart.base.VanChartCustomIntervalBackground; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 样式-背景-绘图区背景-坐标轴图表特有(间隔背景、网格线、警戒线) |
|
|
|
* 样式-背景-绘图区背景-坐标轴图表特有(间隔背景、网格线、警戒线) |
|
|
@ -36,14 +27,14 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
protected ColorSelectBox horizontalGridLine; |
|
|
|
protected ColorSelectBox horizontalGridLine; |
|
|
|
protected ColorSelectBox verticalGridLine; |
|
|
|
protected ColorSelectBox verticalGridLine; |
|
|
|
|
|
|
|
|
|
|
|
protected UICorrelationComboBoxPane alertLine; |
|
|
|
protected AlertLineListControlPane alertLine; |
|
|
|
|
|
|
|
|
|
|
|
private UIButtonGroup isDefaultIntervalBackground; |
|
|
|
private UIButtonGroup isDefaultIntervalBackground; |
|
|
|
private JPanel centerPane; |
|
|
|
private JPanel centerPane; |
|
|
|
private CardLayout cardLayout; |
|
|
|
private CardLayout cardLayout; |
|
|
|
protected ColorSelectBox horizontalColorBackground; |
|
|
|
protected ColorSelectBox horizontalColorBackground; |
|
|
|
private ColorSelectBox verticalColorBackground; |
|
|
|
private ColorSelectBox verticalColorBackground; |
|
|
|
protected UICorrelationComboBoxPane customIntervalBackground; |
|
|
|
protected BackgroundListControlPane customIntervalBackground; |
|
|
|
|
|
|
|
|
|
|
|
public VanChartAxisAreaPane(){ |
|
|
|
public VanChartAxisAreaPane(){ |
|
|
|
initComponents(); |
|
|
|
initComponents(); |
|
|
@ -82,8 +73,10 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createAlertLinePane(){ |
|
|
|
protected JPanel createAlertLinePane(){ |
|
|
|
alertLine = new UICorrelationComboBoxPane(); |
|
|
|
alertLine = new AlertLineListControlPane(); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine); |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"),alertLine); |
|
|
|
|
|
|
|
alertLine.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); |
|
|
|
|
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createIntervalPane(double[] row, double[] col){ |
|
|
|
protected JPanel createIntervalPane(double[] row, double[] col){ |
|
|
@ -92,7 +85,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
verticalColorBackground = new ColorSelectBox(100); |
|
|
|
verticalColorBackground = new ColorSelectBox(100); |
|
|
|
Component[][] components = getIntervalPaneComponents(); |
|
|
|
Component[][] components = getIntervalPaneComponents(); |
|
|
|
JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col); |
|
|
|
JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col); |
|
|
|
customIntervalBackground = new UICorrelationComboBoxPane(); |
|
|
|
customIntervalBackground = new BackgroundListControlPane(); |
|
|
|
|
|
|
|
|
|
|
|
cardLayout = new CardLayout(); |
|
|
|
cardLayout = new CardLayout(); |
|
|
|
centerPane = new JPanel(cardLayout); |
|
|
|
centerPane = new JPanel(cardLayout); |
|
|
@ -107,7 +100,9 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
JPanel intervalPane = new JPanel(new BorderLayout(0, 6)); |
|
|
|
JPanel intervalPane = new JPanel(new BorderLayout(0, 6)); |
|
|
|
intervalPane.add(isDefaultIntervalBackground, BorderLayout.NORTH); |
|
|
|
intervalPane.add(isDefaultIntervalBackground, BorderLayout.NORTH); |
|
|
|
intervalPane.add(centerPane, BorderLayout.CENTER); |
|
|
|
intervalPane.add(centerPane, BorderLayout.CENTER); |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane); |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_IntervalBackground"),intervalPane); |
|
|
|
|
|
|
|
intervalPane.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); |
|
|
|
|
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Component[][] getIntervalPaneComponents() { |
|
|
|
protected Component[][] getIntervalPaneComponents() { |
|
|
@ -132,18 +127,16 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(Plot plot){ |
|
|
|
public void populateBean(Plot plot){ |
|
|
|
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; |
|
|
|
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; |
|
|
|
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); |
|
|
|
|
|
|
|
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); |
|
|
|
|
|
|
|
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
populateGridLine(rectanglePlot); |
|
|
|
populateGridLine(rectanglePlot); |
|
|
|
|
|
|
|
|
|
|
|
populateAlert(xAxisList, yAxisList, axisNames); |
|
|
|
alertLine.populate(plot); |
|
|
|
|
|
|
|
|
|
|
|
isDefaultIntervalBackground.setSelectedIndex(rectanglePlot.isDefaultIntervalBackground() ? 0 : 1); |
|
|
|
isDefaultIntervalBackground.setSelectedIndex(rectanglePlot.isDefaultIntervalBackground() ? 0 : 1); |
|
|
|
horizontalColorBackground.setSelectObject(rectanglePlot.getDefaultYAxis().getDefaultIntervalBackgroundColor()); |
|
|
|
horizontalColorBackground.setSelectObject(rectanglePlot.getDefaultYAxis().getDefaultIntervalBackgroundColor()); |
|
|
|
verticalColorBackground.setSelectObject(rectanglePlot.getDefaultXAxis().getDefaultIntervalBackgroundColor()); |
|
|
|
verticalColorBackground.setSelectObject(rectanglePlot.getDefaultXAxis().getDefaultIntervalBackgroundColor()); |
|
|
|
populateCustomIntervalBackground(xAxisList, yAxisList, axisNames); |
|
|
|
customIntervalBackground.populate(plot); |
|
|
|
checkCardPane(); |
|
|
|
checkCardPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -152,97 +145,13 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
verticalGridLine.setSelectObject(rectanglePlot.getDefaultXAxis().getMainGridColor()); |
|
|
|
verticalGridLine.setSelectObject(rectanglePlot.getDefaultXAxis().getMainGridColor()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Class<? extends BasicBeanPane> getAlertPaneClass() { |
|
|
|
|
|
|
|
return VanChartAlertValuePane.class; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void setAlertDemoAxisName(VanChartAlertValue demo, String[] axisNames) { |
|
|
|
|
|
|
|
demo.setAxisName(axisNames[0]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void populateAlert(List<VanChartAxis> xAxisList, List<VanChartAxis> yAxisList, String[] axisNames){ |
|
|
|
|
|
|
|
List<UIMenuNameableCreator> menuList = new ArrayList<UIMenuNameableCreator>(); |
|
|
|
|
|
|
|
VanChartAlertValue demo = new VanChartAlertValue(); |
|
|
|
|
|
|
|
demo.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
setAlertDemoAxisName(demo, axisNames); |
|
|
|
|
|
|
|
menuList.add(new VanChartUIMenuNameableCreator(Inter.getLocText("Plugin-ChartF_AlertLine"), demo, getAlertPaneClass())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alertLine.refreshMenuAndAddMenuAction(menuList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis: xAxisList){ |
|
|
|
|
|
|
|
List<VanChartAlertValue> values = axis.getAlertValues(); |
|
|
|
|
|
|
|
for(VanChartAlertValue alertValue : values) { |
|
|
|
|
|
|
|
alertValue.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
alertValue.setAxisName(axis.getAxisName()); |
|
|
|
|
|
|
|
list.add(new VanChartUIMenuNameableCreator(alertValue.getAlertPaneSelectName(), alertValue, getAlertPaneClass())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis: yAxisList){ |
|
|
|
|
|
|
|
List<VanChartAlertValue> values = axis.getAlertValues(); |
|
|
|
|
|
|
|
for(VanChartAlertValue alertValue : values) { |
|
|
|
|
|
|
|
alertValue.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
alertValue.setAxisName(axis.getAxisName()); |
|
|
|
|
|
|
|
list.add(new VanChartUIMenuNameableCreator(alertValue.getAlertPaneSelectName(), alertValue, getAlertPaneClass())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alertLine.populateBean(list); |
|
|
|
|
|
|
|
alertLine.doLayout(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Class<? extends BasicBeanPane> getIntervalPaneClass() { |
|
|
|
|
|
|
|
return VanChartCustomIntervalBackgroundPane.class; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void setCustomIntervalBackgroundDemoAxisName(VanChartCustomIntervalBackground demo, String[] axisNames) { |
|
|
|
|
|
|
|
demo.setAxisName(axisNames[0]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void populateCustomIntervalBackground(List<VanChartAxis> xAxisList, List<VanChartAxis> yAxisList, String[] axisNames){ |
|
|
|
|
|
|
|
List<UIMenuNameableCreator> menuList = new ArrayList<UIMenuNameableCreator>(); |
|
|
|
|
|
|
|
VanChartCustomIntervalBackground demo = new VanChartCustomIntervalBackground(); |
|
|
|
|
|
|
|
demo.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
setCustomIntervalBackgroundDemoAxisName(demo, axisNames); |
|
|
|
|
|
|
|
menuList.add(new VanChartUIMenuNameableCreator(Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), demo, getIntervalPaneClass())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
customIntervalBackground.refreshMenuAndAddMenuAction(menuList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis: xAxisList){ |
|
|
|
|
|
|
|
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); |
|
|
|
|
|
|
|
for(VanChartCustomIntervalBackground background : customIntervalBackgrounds){ |
|
|
|
|
|
|
|
background.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
background.setAxisName(axis.getAxisName()); |
|
|
|
|
|
|
|
list.add(new VanChartUIMenuNameableCreator(background.getCustomIntervalBackgroundSelectName(), background, getIntervalPaneClass())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis: yAxisList){ |
|
|
|
|
|
|
|
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); |
|
|
|
|
|
|
|
for(VanChartCustomIntervalBackground background : customIntervalBackgrounds){ |
|
|
|
|
|
|
|
background.setAxisNamesArray(axisNames); |
|
|
|
|
|
|
|
background.setAxisName(axis.getAxisName()); |
|
|
|
|
|
|
|
list.add(new VanChartUIMenuNameableCreator(background.getCustomIntervalBackgroundSelectName(), background, getIntervalPaneClass())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
customIntervalBackground.populateBean(list); |
|
|
|
|
|
|
|
customIntervalBackground.doLayout(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void updateBean(Plot plot){ |
|
|
|
public void updateBean(Plot plot){ |
|
|
|
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; |
|
|
|
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot; |
|
|
|
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); |
|
|
|
|
|
|
|
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateGirdLine(rectanglePlot); |
|
|
|
updateGirdLine(rectanglePlot); |
|
|
|
|
|
|
|
|
|
|
|
updateAlert(xAxisList, yAxisList); |
|
|
|
alertLine.update(plot); |
|
|
|
|
|
|
|
|
|
|
|
rectanglePlot.setIsDefaultIntervalBackground(isDefaultIntervalBackground.getSelectedIndex() == 0); |
|
|
|
rectanglePlot.setIsDefaultIntervalBackground(isDefaultIntervalBackground.getSelectedIndex() == 0); |
|
|
|
if(rectanglePlot.isDefaultIntervalBackground()){ |
|
|
|
if(rectanglePlot.isDefaultIntervalBackground()){ |
|
|
@ -252,7 +161,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
rectanglePlot.getDefaultYAxis().setDefaultIntervalBackgroundColor(null); |
|
|
|
rectanglePlot.getDefaultYAxis().setDefaultIntervalBackgroundColor(null); |
|
|
|
rectanglePlot.getDefaultXAxis().setDefaultIntervalBackgroundColor(null); |
|
|
|
rectanglePlot.getDefaultXAxis().setDefaultIntervalBackgroundColor(null); |
|
|
|
} |
|
|
|
} |
|
|
|
updateCustomIntervalBackground(xAxisList, yAxisList); |
|
|
|
customIntervalBackground.update(plot,isDefaultIntervalBackground.getSelectedIndex() == 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void updateGirdLine(VanChartRectanglePlot rectanglePlot) { |
|
|
|
protected void updateGirdLine(VanChartRectanglePlot rectanglePlot) { |
|
|
@ -260,34 +169,6 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
rectanglePlot.getDefaultXAxis().setMainGridColor(verticalGridLine.getSelectObject()); |
|
|
|
rectanglePlot.getDefaultXAxis().setMainGridColor(verticalGridLine.getSelectObject()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void updateAlert(List<VanChartAxis> xAxisList, List<VanChartAxis> yAxisList){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<UIMenuNameableCreator> alertList = alertLine.updateBean(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis : xAxisList){ |
|
|
|
|
|
|
|
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); |
|
|
|
|
|
|
|
for(UIMenuNameableCreator creator : alertList) { |
|
|
|
|
|
|
|
VanChartAlertValue value = (VanChartAlertValue)creator.getObj(); |
|
|
|
|
|
|
|
if(ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())){ |
|
|
|
|
|
|
|
value.setAlertPaneSelectName(creator.getName()); |
|
|
|
|
|
|
|
axisAlerts.add(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
axis.setAlertValues(axisAlerts); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for(VanChartAxis axis : yAxisList){ |
|
|
|
|
|
|
|
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); |
|
|
|
|
|
|
|
for(UIMenuNameableCreator creator : alertList) { |
|
|
|
|
|
|
|
VanChartAlertValue value = (VanChartAlertValue)creator.getObj(); |
|
|
|
|
|
|
|
if(ComparatorUtils.equals(value.getAxisName(), axis.getAxisName()) || yAxisEquals(value.getAxisName(), axis.getAxisName())){ |
|
|
|
|
|
|
|
value.setAlertPaneSelectName(creator.getName()); |
|
|
|
|
|
|
|
axisAlerts.add(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
axis.setAlertValues(axisAlerts); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Y軸和雷達圖的極軸也是相等的 |
|
|
|
* Y軸和雷達圖的極軸也是相等的 |
|
|
|
* @param axisName |
|
|
|
* @param axisName |
|
|
@ -299,39 +180,6 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot>{ |
|
|
|
ComparatorUtils.equals(VanChartAttrHelper.RADAR_Y_AXIS_PREFIX, axisName); |
|
|
|
ComparatorUtils.equals(VanChartAttrHelper.RADAR_Y_AXIS_PREFIX, axisName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void updateCustomIntervalBackground(List<VanChartAxis> xAxisList, List<VanChartAxis> yAxisList){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<UIMenuNameableCreator> customList = customIntervalBackground.updateBean(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(VanChartAxis axis : xAxisList){ |
|
|
|
|
|
|
|
List<VanChartCustomIntervalBackground> axisCustomBackground = new ArrayList<VanChartCustomIntervalBackground>(); |
|
|
|
|
|
|
|
if(isDefaultIntervalBackground.getSelectedIndex() == 1){//tab选中间隔背景,则置所有自定义间隔背景为空数组
|
|
|
|
|
|
|
|
for(UIMenuNameableCreator creator : customList) { |
|
|
|
|
|
|
|
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground)creator.getObj(); |
|
|
|
|
|
|
|
if(ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())){ |
|
|
|
|
|
|
|
value.setCustomIntervalBackgroundSelectName(creator.getName()); |
|
|
|
|
|
|
|
axisCustomBackground.add(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
axis.setCustomIntervalBackgroundArray(axisCustomBackground); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for(VanChartAxis axis : yAxisList){ |
|
|
|
|
|
|
|
List<VanChartCustomIntervalBackground> axisCustomBackground = new ArrayList<VanChartCustomIntervalBackground>(); |
|
|
|
|
|
|
|
if(isDefaultIntervalBackground.getSelectedIndex() == 1){//tab选中间隔背景,则置所有自定义间隔背景为空数组
|
|
|
|
|
|
|
|
for(UIMenuNameableCreator creator : customList) { |
|
|
|
|
|
|
|
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground)creator.getObj(); |
|
|
|
|
|
|
|
if(ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())){ |
|
|
|
|
|
|
|
value.setCustomIntervalBackgroundSelectName(creator.getName()); |
|
|
|
|
|
|
|
axisCustomBackground.add(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
axis.setCustomIntervalBackgroundArray(axisCustomBackground); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Plot updateBean(){ |
|
|
|
public Plot updateBean(){ |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|