|
|
@ -1,9 +1,10 @@ |
|
|
|
package com.fr.van.chart.designer.style.axis; |
|
|
|
package com.fr.van.chart.designer.style.axis; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.base.ColorWithThemeStyle; |
|
|
|
import com.fr.chart.chartattr.Axis; |
|
|
|
import com.fr.chart.chartattr.Axis; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
import com.fr.design.beans.FurtherBasicBeanPane; |
|
|
|
import com.fr.design.beans.FurtherBasicBeanPane; |
|
|
|
import com.fr.design.gui.frpane.UIComboBoxPane; |
|
|
|
import com.fr.design.gui.frpane.UIComboBoxPane; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
@ -16,9 +17,9 @@ import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 带有坐标轴类型选择控件。可选类型:分类、时间、数值 |
|
|
|
* 带有坐标轴类型选择控件。可选类型:分类、时间、数值 |
|
|
@ -98,11 +99,13 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll |
|
|
|
|
|
|
|
|
|
|
|
public VanChartAxis update(VanChartAxis axis) { |
|
|
|
public VanChartAxis update(VanChartAxis axis) { |
|
|
|
int index = axisTypePane.getSelectedIndex(); |
|
|
|
int index = axisTypePane.getSelectedIndex(); |
|
|
|
|
|
|
|
ColorWithThemeStyle mainGridColorWithPreStyle = axis.getMainGridColorWithPreStyle(); |
|
|
|
if(ComparatorUtils.equals(index, AxisType.AXIS_CATEGORY.ordinal())){ |
|
|
|
if(ComparatorUtils.equals(index, AxisType.AXIS_CATEGORY.ordinal())){ |
|
|
|
if(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_CATEGORY)){ |
|
|
|
if(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_CATEGORY)){ |
|
|
|
textAxisPane.updateBean(axis); |
|
|
|
textAxisPane.updateBean(axis); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
axis = new VanChartAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
axis = new VanChartAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
|
|
|
|
axis.setMainGridColorWithPreStyle(mainGridColorWithPreStyle); |
|
|
|
textAxisPane.updateBean(axis); |
|
|
|
textAxisPane.updateBean(axis); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if(ComparatorUtils.equals(index, AxisType.AXIS_TIME.ordinal())){ |
|
|
|
} else if(ComparatorUtils.equals(index, AxisType.AXIS_TIME.ordinal())){ |
|
|
@ -110,6 +113,7 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll |
|
|
|
timeAxisPane.updateBean(axis); |
|
|
|
timeAxisPane.updateBean(axis); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
axis = new VanChartTimeAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
axis = new VanChartTimeAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
|
|
|
|
axis.setMainGridColorWithPreStyle(mainGridColorWithPreStyle); |
|
|
|
timeAxisPane.updateBean(axis); |
|
|
|
timeAxisPane.updateBean(axis); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if(ComparatorUtils.equals(index, AxisType.AXIS_VALUE.ordinal())){ |
|
|
|
} else if(ComparatorUtils.equals(index, AxisType.AXIS_VALUE.ordinal())){ |
|
|
@ -117,6 +121,7 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll |
|
|
|
valueAxisPane.updateBean(axis); |
|
|
|
valueAxisPane.updateBean(axis); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
axis = new VanChartValueAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
axis = new VanChartValueAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor()); |
|
|
|
|
|
|
|
axis.setMainGridColorWithPreStyle(mainGridColorWithPreStyle); |
|
|
|
valueAxisPane.updateBean(axis); |
|
|
|
valueAxisPane.updateBean(axis); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|