Browse Source

整理代码

master
mengao 7 years ago
parent
commit
27d89a607a
  1. 26
      designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java
  2. 10
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java
  3. 5
      designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java

26
designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -57,8 +57,7 @@ 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;
@ -114,18 +113,6 @@ 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()) {
@ -137,8 +124,15 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
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;
} }

10
designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java

@ -24,13 +24,9 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
private UISpinner width; private UISpinner width;
private UISpinner height; private UISpinner height;
protected ImageBackgroundQuickPane getImageBackgroundPane() {
return imageBackgroundPane;
}
public VanChartImageMarkerPane() { public VanChartImageMarkerPane() {
imageBackgroundPane = new ImageBackgroundQuickPane(false); imageBackgroundPane = new ImageBackgroundQuickPane(false);
setImageBackgroundPaneBorder(); imageBackgroundPane.setPreferredSize(getImageBackgroundPreferredSize(imageBackgroundPane.getPreferredSize()));
width = new UISpinner(0, 100, 0.5, 30); width = new UISpinner(0, 100, 0.5, 30);
height = new UISpinner(0, 100, 0.5, 30); height = new UISpinner(0, 100, 0.5, 30);
@ -52,8 +48,8 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
this.add(panel); this.add(panel);
} }
protected void setImageBackgroundPaneBorder() { protected Dimension getImageBackgroundPreferredSize(Dimension dimension) {
imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight())); return new Dimension((int) TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int) dimension.getHeight());
} }
protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) { protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) {

5
designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java

@ -49,6 +49,7 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{
return panel; return panel;
} }
protected void setContentPaneBorder() { protected void setContentPaneBorder() {
return; return;
} }
@ -64,8 +65,8 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{
private void initTypeContentPane() { private void initTypeContentPane() {
customContentPane = new VanChartImageMarkerPane() { customContentPane = new VanChartImageMarkerPane() {
protected void setImageBackgroundPaneBorder() { protected Dimension getImageBackgroundPreferredSize(Dimension dimension) {
getImageBackgroundPane().setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int)getImageBackgroundPane().getPreferredSize().getHeight())); return new Dimension((int) TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int) dimension.getHeight());
} }
}; };

Loading…
Cancel
Save