From e708fc16a2a7d8fa00e9a480c80ad18ff43b9212 Mon Sep 17 00:00:00 2001 From: zheng Date: Wed, 4 Jul 2018 11:10:01 +0800 Subject: [PATCH] =?UTF-8?q?CHART-2407=20=E5=9B=BE=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/ChartFillStylePane.java | 8 +++----- .../chart/gui/type/AbstractChartTypePane.java | 7 +++---- .../com/fr/design/module/ChartPreStyleAction.java | 10 ++++------ .../fr/design/module/ChartPreStyleManagerPane.java | 3 +++ .../com/fr/design/module/ChartPreStylePane.java | 14 ++++++++------ 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/designer-chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java b/designer-chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java index 943cc5738..f3a9b8a86 100644 --- a/designer-chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java +++ b/designer-chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java @@ -1,8 +1,6 @@ package com.fr.design.mainframe.chart.gui.style; import com.fr.base.ChartPreStyleConfig; -import com.fr.base.ChartPreStyleManagerProvider; -import com.fr.base.ChartPreStyleServerManager; import com.fr.base.Utils; import com.fr.chart.base.AttrFillStyle; import com.fr.chart.base.ChartConstants; @@ -199,9 +197,9 @@ public class ChartFillStylePane extends BasicBeanPane{ if(styleSelectBox.getSelectedIndex() == 0) { condition.setColorStyle(ChartConstants.COLOR_DEFAULT); } else if(styleSelectBox.getSelectedIndex() < styleSelectBox.getItemCount() - 1){ - ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); - Object preStyle = manager.getPreStyle(styleSelectBox.getSelectedItem()); - if(preStyle instanceof ChartPreStyle) { + ChartPreStyleConfig manager = ChartPreStyleConfig.getInstance(); + Object preStyle = manager.getPreStyle(styleSelectBox.getSelectedItem()); + if(preStyle instanceof ChartPreStyle) { AttrFillStyle def = ((ChartPreStyle) preStyle).getAttrFillStyle(); def.setFillStyleName(Utils.objectToString(styleSelectBox.getSelectedItem())); return def; diff --git a/designer-chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java b/designer-chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java index 5aa9ea49a..590190762 100644 --- a/designer-chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java +++ b/designer-chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe.chart.gui.type; -import com.fr.base.ChartPreStyleManagerProvider; -import com.fr.base.ChartPreStyleServerManager; +import com.fr.base.ChartPreStyleConfig; import com.fr.base.FRContext; import com.fr.base.background.ColorBackground; import com.fr.chart.base.AttrContents; @@ -26,9 +25,9 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; -import com.fr.log.FineLoggerFactory; import com.fr.general.Inter; import com.fr.js.NameJavaScriptGroup; +import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; import javax.swing.JPanel; @@ -224,7 +223,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ } private void setPlotFillStyle(Chart chart){ - ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); + ChartPreStyleConfig manager = ChartPreStyleConfig.getInstance(); Plot plot = chart.getPlot(); Object preStyle = null; String name = ""; diff --git a/designer-chart/src/com/fr/design/module/ChartPreStyleAction.java b/designer-chart/src/com/fr/design/module/ChartPreStyleAction.java index c56e257f8..70571338f 100644 --- a/designer-chart/src/com/fr/design/module/ChartPreStyleAction.java +++ b/designer-chart/src/com/fr/design/module/ChartPreStyleAction.java @@ -1,7 +1,5 @@ package com.fr.design.module; -import com.fr.base.ChartPreStyleManagerProvider; -import com.fr.base.ChartPreStyleServerManager; import com.fr.design.actions.UpdateAction; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; @@ -41,14 +39,14 @@ public class ChartPreStyleAction extends UpdateAction { @Override public void doOk() { pane.updateBean(); - ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); - manager.setStyleEditing(null); +// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); +// manager.setStyleEditing(null); } @Override public void doCancel() { - ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); - manager.setStyleEditing(null); +// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); +// manager.setStyleEditing(null); } }); diff --git a/designer-chart/src/com/fr/design/module/ChartPreStyleManagerPane.java b/designer-chart/src/com/fr/design/module/ChartPreStyleManagerPane.java index 64e68fff8..c25782c4e 100644 --- a/designer-chart/src/com/fr/design/module/ChartPreStyleManagerPane.java +++ b/designer-chart/src/com/fr/design/module/ChartPreStyleManagerPane.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrame; import com.fr.general.Inter; import com.fr.general.NameObject; +import com.fr.stable.ListMap; import com.fr.stable.Nameable; import java.util.ArrayList; @@ -64,6 +65,8 @@ public class ChartPreStyleManagerPane extends JListControlPane { public void updateBean() { ChartPreStyleConfig config = ChartPreStyleConfig.getInstance(); + config.setPreStyleMap(new ListMap()); + Nameable[] values = this.update(); config.setCurrentStyle(getSelectedName()); diff --git a/designer-chart/src/com/fr/design/module/ChartPreStylePane.java b/designer-chart/src/com/fr/design/module/ChartPreStylePane.java index 70c68679f..d0f4d3136 100644 --- a/designer-chart/src/com/fr/design/module/ChartPreStylePane.java +++ b/designer-chart/src/com/fr/design/module/ChartPreStylePane.java @@ -1,7 +1,5 @@ package com.fr.design.module; -import com.fr.base.ChartPreStyleManagerProvider; -import com.fr.base.ChartPreStyleServerManager; import com.fr.chart.base.ChartPreStyle; import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; @@ -15,8 +13,12 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.chart.gui.style.ChartPreFillStylePane; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FlowLayout; /** * 图表预定义风格界面, 服务器--图表风格. @@ -78,8 +80,8 @@ public class ChartPreStylePane extends BasicBeanPane{ } private void refreshWhenStyleChange(ChartPreStyle preStyle) { - ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); - manager.setStyleEditing(preStyle); +// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); +// manager.setStyleEditing(preStyle); if(chartComponent != null) { chartComponent.reset(); }