Browse Source

Merge pull request #394 in BA/design from ~XIAOHU/design:dev to dev

* commit '5eb8b4337ea4603017809e704f229f76a33c92a5':
  update
  update
  update
master
superman 8 years ago
parent
commit
7f5ef23384
  1. 15
      designer_chart/src/com/fr/design/chart/gui/ChartComponent.java
  2. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

15
designer_chart/src/com/fr/design/chart/gui/ChartComponent.java

@ -32,7 +32,7 @@ import java.util.List;
* 类说明: 事件说明: 工具栏编辑--> 是刷新ChartComponent 然后响应整个设计块的改变事件 * 类说明: 事件说明: 工具栏编辑--> 是刷新ChartComponent 然后响应整个设计块的改变事件
右键编辑 ---> 刷新ChartCompment 刷新对应的工具栏(加入事件) 然后响应整个设计块的改变事件 右键编辑 ---> 刷新ChartCompment 刷新对应的工具栏(加入事件) 然后响应整个设计块的改变事件
*/ */
public class ChartComponent extends MiddleChartComponent implements MouseListener, MouseMotionListener, ChartDataEvent { public class ChartComponent extends MiddleChartComponent implements MouseListener, MouseMotionListener {
private static final long serialVersionUID = 744164838619052097L; private static final long serialVersionUID = 744164838619052097L;
private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(); private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
private ChartCollection chartCollection4Design; private ChartCollection chartCollection4Design;
@ -313,21 +313,8 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
//不直接画chartGlyph而画image的原因是表单的柱形图会溢出表单 //不直接画chartGlyph而画image的原因是表单的柱形图会溢出表单
//其他图都ok,其实感觉应该是柱形图画的不对,应该也可以改那边 //其他图都ok,其实感觉应该是柱形图画的不对,应该也可以改那边
//注册获取图片后续事件
registerChartDataEvent(chartGlyph);
Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,ScreenResolution.getScreenResolution()); Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,ScreenResolution.getScreenResolution());
g2d.drawImage(chartImage, 0, 0, null); g2d.drawImage(chartImage, 0, 0, null);
} }
} }
@Override
public void registerChartDataEvent(BaseChartGlyph glyph) {
glyph.addChartDataEvent(this);
}
@Override
public void fire() {
this.repaint();
}
} }

4
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -127,7 +127,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
} }
//获取图表收集器的状态 //获取图表收集器的状态
SwitchState state = editingCollection.calculateMultiChartMode(); SwitchState state = editingCollection.calculateMultiChartMode();
if (SwitchState.isDynamicState(state) && parent != null){ if (state.isDynamicState() && parent != null){
parent.reactorChartTypePane(editingCollection); parent.reactorChartTypePane(editingCollection);
} }
@ -397,7 +397,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
//获取图表收集器的状态 //获取图表收集器的状态
SwitchState state = editingCollection.calculateMultiChartMode(); SwitchState state = editingCollection.calculateMultiChartMode();
if (SwitchState.isDynamicState(state) && parent != null){ if (state.isDynamicState() && parent != null){
parent.reactorChartTypePane(editingCollection); parent.reactorChartTypePane(editingCollection);
} }

Loading…
Cancel
Save