Browse Source

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

* commit '2ec2f5617da1ce6695cad8bdaee7b6253706dae8':
  update
  在构建下拉框时,就考虑到是否处于切换模式
  update
  update
  模板参数触发界面更新
master
superman 8 years ago
parent
commit
b6ff009675
  1. 3
      designer/src/com/fr/design/actions/report/ReportParameterAction.java
  2. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  3. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

3
designer/src/com/fr/design/actions/report/ReportParameterAction.java

@ -21,7 +21,7 @@ import com.fr.main.parameter.ReportParameterAttr;
/**
* Report Parameter
*/
public class ReportParameterAction extends JWorkBookAction {
public class ReportParameterAction extends JWorkBookAction{
public ReportParameterAction(JWorkBook jwb) {
super(jwb);
@ -62,6 +62,7 @@ public class ReportParameterAction extends JWorkBookAction {
jwb.fireTargetModified();
jwb.updateReportParameterAttr();
jwb.populateReportParameterAttr();
}
});
parameterArrayDialog.setVisible(true);

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

@ -138,7 +138,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void checkoutChange(){
editingCollection.calculateMultiChartMode();
if (parent != null){
parent.reactorChartTypePane(editingCollection);
parent.relayoutChartTypePane(editingCollection);
}
//检查是否可以配置切换
configButton.setEnabled(editingCollection.changeEnable());

19
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -69,7 +69,12 @@ public class ChartTypePane extends AbstractChartAttrPane{
buttonPane = new ChartTypeButtonPane(this);
content.add(buttonPane, BorderLayout.NORTH);
if (editingCollection != null) {
relayoutChartTypePane(editingCollection);
}else {
chartTypePane = new ComboBoxPane();
}
BasicScrollPane scrollPane = new BasicScrollPane() {
@Override
protected JPanel createContentPane() {
@ -192,7 +197,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
});
}
public void reactor(ChartCollection collection){
public void relayout(ChartCollection collection){
//重构需要重构下拉框选项和cardNames
Chart chart = collection.getSelectedChart();
String chartID = chart.getPriority();
@ -278,9 +283,9 @@ public class ChartTypePane extends AbstractChartAttrPane{
}
public void reactorChartTypePane(ChartCollection collection){
if (needReactor(collection)) {
chartTypePane.reactor(collection);
public void relayoutChartTypePane(ChartCollection collection){
if (needRelayout(collection)) {
chartTypePane.relayout(collection);
//设置面板切换状态
updatePaneState(collection);
}
@ -292,7 +297,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
}
// TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构
private boolean needReactor(ChartCollection collection) {
private boolean needRelayout(ChartCollection collection) {
/*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/
return true;
}
@ -301,14 +306,14 @@ public class ChartTypePane extends AbstractChartAttrPane{
* 更新界面属性 用于展示
*/
public void populate(ChartCollection collection) {
editingCollection = collection;
Chart chart = collection.getSelectedChart();
this.remove(leftContentPane);
initContentPane();
buttonPane.populateBean(collection);
chartTypePane.populateBean(chart);
//remove面板之后,就需要重构下拉框
reactorChartTypePane(collection);
this.initAllListeners();
}

Loading…
Cancel
Save