From d16badad3b09ef058abd6efbdde067ec7a7bd55c Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 30 Dec 2016 11:52:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=83=BD=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=A8=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/ChartTypePane.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 a3a028ef89..172d040f3f 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 @@ -206,6 +206,8 @@ public class ChartTypePane extends AbstractChartAttrPane{ } //第一步就是重构cardNames cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID); + //下拉框重构开始。为了防止重构是触发update + ((FlexibleComboBox)jcb).setItemEvenType(ItemEventType.REACTOR); //重构下拉框选项 reactorComboBox(); //重新选择选中的下拉项 @@ -213,6 +215,8 @@ public class ChartTypePane extends AbstractChartAttrPane{ String plotID = chart.getPlot().getPlotID(); Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); jcb.setSelectedItem(item); + //下拉框重构结束 + ((FlexibleComboBox)jcb).setItemEvenType(ItemEventType.DEFAULT); //重新选中 checkPlotPane(); } @@ -223,13 +227,10 @@ public class ChartTypePane extends AbstractChartAttrPane{ } private void reactorComboBox() { - FlexibleComboBox fcb = (FlexibleComboBox)jcb; - fcb.setItemEvenType(ItemEventType.REACTOR); - fcb.removeAllItems(); + jcb.removeAllItems(); for (int i = 0; i < this.cardNames.length; i++) { - fcb.addItem(cardNames[i]); + jcb.addItem(cardNames[i]); } - fcb.setItemEvenType(ItemEventType.DEFAULT); } @Override From 6c2bb1b4b521d660a2ea49adf4a2fcea47446475 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 3 Jan 2017 14:50:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=B6=EF=BC=8C=E4=B9=9F=E8=A6=81=E8=80=83?= =?UTF-8?q?=E8=99=91=E9=87=8D=E6=96=B0=E6=9B=B4=E6=96=B0=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/ElementCasePane.java | 2 +- .../src/com/fr/design/style/color/ColorSelectDialog.java | 2 +- .../fr/design/mainframe/chart/gui/ChartTypeButtonPane.java | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index dcc68ab81a..edeb8fb76f 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -851,7 +851,7 @@ public abstract class ElementCasePane extends Tar */ protected void initInputActionMap() { InputMap inputMapAncestor = this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); - ActionMap actionMap = this.getActionMap(); + ActionMap actionMap = this.getActionMap() ; // clearReportPage old values. inputMapAncestor.clear(); actionMap.clear(); diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java b/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java index a26bc10c26..11a243b6cd 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java @@ -137,7 +137,7 @@ public class ColorSelectDialog extends MiddleChartDialog{ public static void showDialog(Frame owner,ColorSelectDetailPane pane,Color initialColor,ColorSelectable selectePane){ ColorTracker okListener = new ColorTracker(pane); ColorSelectDialog dialog = new ColorSelectDialog(owner,pane,initialColor,okListener,selectePane); -// dialog.setModal(true); + dialog.setModal(true); dialog.show(); } 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 91b6bba3c1..4a18611fa4 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 @@ -425,6 +425,8 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void deleteAButton() { //先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除 + //记录改变前的plotID + String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart().getPlot().getPlotID(); if (editingCollection != null) { int count = editingCollection.getChartCount(); for (int i = 0; i < count; i++) { @@ -447,6 +449,11 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen checkoutChange(); relayoutPane(); + + //重构面板 + if (parent != null ){ + parent.reLayoutEditPane(lastPlotID, editingCollection); + } } private void relayoutPane() { From f8a6f64b3912a1e5c17fefbe86e2b8ec5e052708 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 3 Jan 2017 14:53:04 +0800 Subject: [PATCH 3/3] update --- designer/src/com/fr/design/mainframe/ElementCasePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index edeb8fb76f..dcc68ab81a 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -851,7 +851,7 @@ public abstract class ElementCasePane extends Tar */ protected void initInputActionMap() { InputMap inputMapAncestor = this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); - ActionMap actionMap = this.getActionMap() ; + ActionMap actionMap = this.getActionMap(); // clearReportPage old values. inputMapAncestor.clear(); actionMap.clear();