|
|
@ -33,11 +33,11 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi |
|
|
|
|
|
|
|
|
|
|
|
private LiteConditionPane liteConditionPane; |
|
|
|
private LiteConditionPane liteConditionPane; |
|
|
|
|
|
|
|
|
|
|
|
public VanChartCustomStackAndAxisConditionPane(){ |
|
|
|
public VanChartCustomStackAndAxisConditionPane() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void doLayoutPane(){ |
|
|
|
private void doLayoutPane() { |
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
this.removeAll(); |
|
|
|
this.removeAll(); |
|
|
|
|
|
|
|
|
|
|
@ -57,23 +57,22 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi |
|
|
|
liteConditionPane.setPreferredSize(new Dimension(300, 300)); |
|
|
|
liteConditionPane.setPreferredSize(new Dimension(300, 300)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createDeployPane() |
|
|
|
private JPanel createDeployPane() { |
|
|
|
{ |
|
|
|
|
|
|
|
isStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); |
|
|
|
isStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); |
|
|
|
isPercentStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); |
|
|
|
isPercentStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")}); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] columnSize = {p,p}; |
|
|
|
double[] columnSize = {p, p}; |
|
|
|
double[] rowSize = {p,p,p,p}; |
|
|
|
double[] rowSize = {p, p, p, p}; |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize); |
|
|
|
return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Component[][] getDeployComponents() { |
|
|
|
protected Component[][] getDeployComponents() { |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")),XAxis}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")), XAxis}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")),YAxis}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")), YAxis}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")),isStacked}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")), isStacked}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")),isPercentStacked}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")), isPercentStacked}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
isStacked.addActionListener(new ActionListener() { |
|
|
|
isStacked.addActionListener(new ActionListener() { |
|
|
@ -94,8 +93,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi |
|
|
|
isPercentStacked.setEnabled(isStacked.getSelectedIndex() == 0); |
|
|
|
isPercentStacked.setEnabled(isStacked.getSelectedIndex() == 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(ConditionAttr conditionAttr){ |
|
|
|
public void populateBean(ConditionAttr conditionAttr) { |
|
|
|
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
|
|
|
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
|
|
|
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray()); |
|
|
|
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray()); |
|
|
|
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray()); |
|
|
|
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray()); |
|
|
|
|
|
|
|
|
|
|
@ -114,31 +113,26 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi |
|
|
|
checkBox(); |
|
|
|
checkBox(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void updateBean(ConditionAttr conditionAttr){ |
|
|
|
|
|
|
|
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex()); |
|
|
|
|
|
|
|
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateStackAndPercent(seriesStackAndAxis); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean(); |
|
|
|
|
|
|
|
conditionAttr.setCondition(con); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void updateStackAndPercent(AttrSeriesStackAndAxis seriesStackAndAxis) { |
|
|
|
protected void updateStackAndPercent(AttrSeriesStackAndAxis seriesStackAndAxis) { |
|
|
|
seriesStackAndAxis.setStacked(isStacked.getSelectedIndex() == 0); |
|
|
|
seriesStackAndAxis.setStacked(isStacked.getSelectedIndex() == 0); |
|
|
|
if(seriesStackAndAxis.isStacked()){ |
|
|
|
if (seriesStackAndAxis.isStacked()) { |
|
|
|
seriesStackAndAxis.setPercentStacked(isPercentStacked.getSelectedIndex() == 0); |
|
|
|
seriesStackAndAxis.setPercentStacked(isPercentStacked.getSelectedIndex() == 0); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
seriesStackAndAxis.setPercentStacked(false); |
|
|
|
seriesStackAndAxis.setPercentStacked(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ConditionAttr updateBean(){ |
|
|
|
public ConditionAttr updateBean() { |
|
|
|
ConditionAttr conditionAttr = new ConditionAttr(); |
|
|
|
ConditionAttr conditionAttr = new ConditionAttr(); |
|
|
|
conditionAttr.addDataSeriesCondition(new AttrSeriesStackAndAxis()); |
|
|
|
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); |
|
|
|
updateBean(conditionAttr); |
|
|
|
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex()); |
|
|
|
|
|
|
|
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateStackAndPercent(seriesStackAndAxis); |
|
|
|
|
|
|
|
conditionAttr.addDataSeriesCondition(seriesStackAndAxis); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean(); |
|
|
|
|
|
|
|
conditionAttr.setCondition(con); |
|
|
|
return conditionAttr; |
|
|
|
return conditionAttr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|