From 065ba517f098c37611d14f486eff8bd4de423fcb Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 9 Dec 2016 15:52:02 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E7=95=8C=E9=9D=A2=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/report/ReportParameterAction.java | 9 ++++++++- designer/src/com/fr/design/mainframe/JWorkBook.java | 12 ++++++++---- designer_base/src/com/fr/design/dialog/UIDialog.java | 1 + .../src/com/fr/design/mainframe/JTemplate.java | 4 ++++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/actions/report/ReportParameterAction.java b/designer/src/com/fr/design/actions/report/ReportParameterAction.java index 61507ebfea..41ed08318a 100644 --- a/designer/src/com/fr/design/actions/report/ReportParameterAction.java +++ b/designer/src/com/fr/design/actions/report/ReportParameterAction.java @@ -10,6 +10,8 @@ import javax.swing.SwingUtilities; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.actions.JWorkBookAction; +import com.fr.design.event.UIObserverListener; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.KeySetUtils; import com.fr.design.parameter.ParameterArrayPane; @@ -21,7 +23,9 @@ import com.fr.main.parameter.ReportParameterAttr; /** * Report Parameter */ -public class ReportParameterAction extends JWorkBookAction { +public class ReportParameterAction extends JWorkBookAction{ + + private UIObserverListener uiObserverListener = null; public ReportParameterAction(JWorkBook jwb) { super(jwb); @@ -62,6 +66,9 @@ public class ReportParameterAction extends JWorkBookAction { jwb.fireTargetModified(); jwb.updateReportParameterAttr(); jwb.populateReportParameterAttr(); + + //点击确定会后,需要出发插件界面的更新 + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireElementCasePane(); } }); parameterArrayDialog.setVisible(true); diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index f3722c4ac2..909581092d 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -743,10 +743,7 @@ public class JWorkBook extends JTemplate { } EastRegionContainerPane.getInstance().replaceUpPane(QuickEditorRegion.getInstance()); } else { - ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; - if (casePane != null) { - casePane.fireSelectionChangeListener(); - } + fireElementCasePane(); } } if (BaseUtils.isAuthorityEditing()) { @@ -757,6 +754,13 @@ public class JWorkBook extends JTemplate { centerPane.needToShowCoverAndHidPane(); } + public void fireElementCasePane() { + ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; + if (casePane != null) { + casePane.fireSelectionChangeListener(); + } + } + @Override /** * diff --git a/designer_base/src/com/fr/design/dialog/UIDialog.java b/designer_base/src/com/fr/design/dialog/UIDialog.java index 7ba10164ba..b7c3bc2997 100644 --- a/designer_base/src/com/fr/design/dialog/UIDialog.java +++ b/designer_base/src/com/fr/design/dialog/UIDialog.java @@ -1,6 +1,7 @@ package com.fr.design.dialog; import com.fr.base.FRContext; +import com.fr.design.event.UIObserver; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 58060d91a9..78ec115b37 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -325,6 +325,10 @@ public abstract class JTemplate> ex fireSuperTargetModified(); } + public void fireElementCasePane(){ + return; + } + protected boolean accept(Object o){ return true; } From 04839878cb89dfda1e6fea8984f1a4b5b7dae9d3 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 9 Dec 2016 15:53:30 +0800 Subject: [PATCH 2/5] update --- .../com/fr/design/actions/report/ReportParameterAction.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer/src/com/fr/design/actions/report/ReportParameterAction.java b/designer/src/com/fr/design/actions/report/ReportParameterAction.java index 41ed08318a..d05fbd5ca1 100644 --- a/designer/src/com/fr/design/actions/report/ReportParameterAction.java +++ b/designer/src/com/fr/design/actions/report/ReportParameterAction.java @@ -10,7 +10,6 @@ import javax.swing.SwingUtilities; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.actions.JWorkBookAction; -import com.fr.design.event.UIObserverListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.KeySetUtils; @@ -25,8 +24,6 @@ import com.fr.main.parameter.ReportParameterAttr; */ public class ReportParameterAction extends JWorkBookAction{ - private UIObserverListener uiObserverListener = null; - public ReportParameterAction(JWorkBook jwb) { super(jwb); this.setMenuKeySet(KeySetUtils.REPORT_PARAMETER_ATTR); From d4e041f4f66913df18466ddff8c0d48e51ddced9 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 9 Dec 2016 15:54:04 +0800 Subject: [PATCH 3/5] update --- designer_base/src/com/fr/design/dialog/UIDialog.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/dialog/UIDialog.java b/designer_base/src/com/fr/design/dialog/UIDialog.java index b7c3bc2997..7ba10164ba 100644 --- a/designer_base/src/com/fr/design/dialog/UIDialog.java +++ b/designer_base/src/com/fr/design/dialog/UIDialog.java @@ -1,7 +1,6 @@ package com.fr.design.dialog; import com.fr.base.FRContext; -import com.fr.design.event.UIObserver; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; From cb55c20c56f00d41f086185adb9b12f2d9d00e85 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 15 Dec 2016 13:27:57 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=9C=A8=E6=9E=84=E5=BB=BA=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E6=97=B6=EF=BC=8C=E5=B0=B1=E8=80=83=E8=99=91?= =?UTF-8?q?=E5=88=B0=E6=98=AF=E5=90=A6=E5=A4=84=E4=BA=8E=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/ChartTypeButtonPane.java | 2 +- .../mainframe/chart/gui/ChartTypePane.java | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 6b6c9a4276..91b6bba3c1 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -138,7 +138,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void checkoutChange(){ editingCollection.calculateMultiChartMode(); if (parent != null){ - parent.reactorChartTypePane(editingCollection); + parent.relayoutChartTypePane(editingCollection); } //检查是否可以配置切换 configButton.setEnabled(editingCollection.changeEnable()); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 6c747c9cc1..a3a028ef89 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -68,8 +68,13 @@ public class ChartTypePane extends AbstractChartAttrPane{ buttonPane = new ChartTypeButtonPane(this); content.add(buttonPane, BorderLayout.NORTH); - - chartTypePane = new ComboBoxPane(); + + 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(); } From 2ec2f5617da1ce6695cad8bdaee7b6253706dae8 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 15 Dec 2016 13:30:36 +0800 Subject: [PATCH 5/5] update --- .../design/actions/report/ReportParameterAction.java | 3 --- designer/src/com/fr/design/mainframe/JWorkBook.java | 12 ++++-------- .../src/com/fr/design/mainframe/JTemplate.java | 4 ---- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/designer/src/com/fr/design/actions/report/ReportParameterAction.java b/designer/src/com/fr/design/actions/report/ReportParameterAction.java index d05fbd5ca1..ef8454a769 100644 --- a/designer/src/com/fr/design/actions/report/ReportParameterAction.java +++ b/designer/src/com/fr/design/actions/report/ReportParameterAction.java @@ -10,7 +10,6 @@ import javax.swing.SwingUtilities; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.actions.JWorkBookAction; -import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.KeySetUtils; import com.fr.design.parameter.ParameterArrayPane; @@ -64,8 +63,6 @@ public class ReportParameterAction extends JWorkBookAction{ jwb.updateReportParameterAttr(); jwb.populateReportParameterAttr(); - //点击确定会后,需要出发插件界面的更新 - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireElementCasePane(); } }); parameterArrayDialog.setVisible(true); diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 909581092d..f3722c4ac2 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -743,7 +743,10 @@ public class JWorkBook extends JTemplate { } EastRegionContainerPane.getInstance().replaceUpPane(QuickEditorRegion.getInstance()); } else { - fireElementCasePane(); + ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; + if (casePane != null) { + casePane.fireSelectionChangeListener(); + } } } if (BaseUtils.isAuthorityEditing()) { @@ -754,13 +757,6 @@ public class JWorkBook extends JTemplate { centerPane.needToShowCoverAndHidPane(); } - public void fireElementCasePane() { - ElementCasePane casePane = ((ReportComponent) delegate4ToolbarMenuAdapter()).elementCasePane; - if (casePane != null) { - casePane.fireSelectionChangeListener(); - } - } - @Override /** * diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 78ec115b37..58060d91a9 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -325,10 +325,6 @@ public abstract class JTemplate> ex fireSuperTargetModified(); } - public void fireElementCasePane(){ - return; - } - protected boolean accept(Object o){ return true; }