From 46edd37529b49a9ee8172d402d41f0f9aff2d222 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 21 Nov 2016 16:57:42 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/chart/gui/ChartTypePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6c747c9cc..758c14367 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 @@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ // TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构 private boolean needReactor(ChartCollection collection) { /*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/ - return true; + return !ComparatorUtils.equals(collection.getState(), SwitchState.DEFAULT); } /** From 494111df5afd9b2f5a49d281054ebc9ae7c00aa2 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 21 Nov 2016 17:05:55 +0800 Subject: [PATCH 2/5] update --- designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java | 1 - .../src/com/fr/design/mainframe/chart/gui/ChartTypePane.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 0b76dd2d7..42b515fea 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -273,7 +273,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ public String getTitle4PopupWindow(String priority, String plotID){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){ - HashMap chartUIList = chartTypeInterfaces.get(priority); IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return provider.getPlotTypePane().title4PopupWindow(); 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 758c14367..6c747c9cc 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 @@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ // TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构 private boolean needReactor(ChartCollection collection) { /*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/ - return !ComparatorUtils.equals(collection.getState(), SwitchState.DEFAULT); + return true; } /** From d070ef81e3297475c5353a2ec9265e058f02d568 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 21 Nov 2016 17:43:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E8=80=81=E7=9A=84?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 42b515fea..f37302f87 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -274,8 +274,18 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh public String getTitle4PopupWindow(String priority, String plotID){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){ IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); - return provider.getPlotTypePane().title4PopupWindow(); + return provider.getPlotTypePane().title4PopupWindow(); + } + //兼容老的插件 + if (chartTypeInterfaces != null) { + Iterator iterator = chartTypeInterfaces.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + String defaultPriority = (String) entry.getKey(); + if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) + return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypePane().title4PopupWindow(); + } } return new String(); } From 699df74e2c4922f37e59bf4b4b34f45bfd9c136a Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 21 Nov 2016 17:49:04 +0800 Subject: [PATCH 4/5] update --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index f37302f87..ea2ee37ca 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -283,8 +283,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String defaultPriority = (String) entry.getKey(); - if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) - return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypePane().title4PopupWindow(); + if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) { + return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypePane().title4PopupWindow(); + } } } return new String(); From 2dbf4f8268c519c88fb81e356bd9353d7c8a16c8 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 21 Nov 2016 17:51:39 +0800 Subject: [PATCH 5/5] update --- designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index ea2ee37ca..90cc40e68 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -163,7 +163,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); String imagePath = getIconPath(priority, plotID); - if (!StringUtils.isEmpty(imagePath)) { + if (StringUtils.isNotEmpty(imagePath)) { return imagePath; } }