diff --git a/designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java b/designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java index 9d16d6787..025c669bc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java +++ b/designer-base/src/main/java/com/fr/design/gui/chart/MiddleChartComponent.java @@ -1,12 +1,11 @@ package com.fr.design.gui.chart; -import javax.swing.JComponent; - -import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; -import com.fr.stable.core.PropertyChangeAdapter; +import com.fr.chartx.attr.XChart; import com.fr.stable.core.PropertyChangeListener; +import javax.swing.JComponent; + /** * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2013-7-10 上午09:19:36 @@ -18,8 +17,8 @@ public abstract class MiddleChartComponent extends JComponent { public abstract BaseChartCollection update(); public abstract void reset(); - - public abstract BaseChart getEditingChart(); - - public abstract void addStopEditingListener(PropertyChangeListener list); + + public abstract XChart getEditingChart(); + + public abstract void addStopEditingListener(PropertyChangeListener list); } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java index 1255d87d5..a188737c0 100644 --- a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java @@ -5,6 +5,7 @@ import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.chartx.attr.XChart; import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.chart.fun.IndependentChartUIProvider; @@ -161,7 +162,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr int index = 0; for (ChartInternationalNameContentBean bean : typeName) { String plotID = bean.getPlotID(); - Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); + XChart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(plotID)) { continue; } diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index d914a81e8..ed1e2656e 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -11,6 +11,7 @@ import com.fr.chart.chartattr.ChartIcon; import com.fr.chart.chartattr.MapPlot; import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.chartx.attr.XChart; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -36,12 +37,13 @@ public class ChartTypePane extends ChartCommonWizardPane { private static final long serialVersionUID = -1175602484968520546L; private ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstanceWithCheck().getAllChartBaseNames(); + //todo@shinerefactor 这个页面所有强转Chart的地方都要处理一下 private Chart[][] charts4Icon = null; { charts4Icon = new Chart[this.typeName.length][]; for (int i = 0; i < this.typeName.length; i++) { - Chart[] rowCharts = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.typeName[i].getPlotID()); + XChart[] rowCharts = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.typeName[i].getPlotID()); int rowChartsCount = rowCharts.length; charts4Icon[i] = new Chart[rowChartsCount]; for (int j = 0; j < rowChartsCount; j++) { @@ -145,9 +147,9 @@ public class ChartTypePane extends ChartCommonWizardPane { int subIndex = 0; for (int i = 0; i < typeName.length; i++) { - Chart[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(typeName[i].getPlotID()); + XChart[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(typeName[i].getPlotID()); for (int j = 0; j < charts.length; j++) { - if (charts[j].getPlot().match4GUI(plot)) { + if (((Chart) charts[j]).getPlot().match4GUI(plot)) { mainIndex = i; subIndex = j; // 一旦匹配 立马中断 @@ -162,7 +164,7 @@ public class ChartTypePane extends ChartCommonWizardPane { public void update(Chart oldChart) { String plotID = typeName[mainTypeList.getSelectedIndex()].getPlotID(); - Chart chart = ChartTypeManager.getInstanceWithCheck().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; + Chart chart = (Chart) ChartTypeManager.getInstanceWithCheck().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; if(chart.getPlot() != null){ if(chart.getPlot() instanceof MapPlot && !supportMap()){ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Not_Supported")); @@ -191,7 +193,7 @@ public class ChartTypePane extends ChartCommonWizardPane { Chart chart4Update = cc.getSelectedChart(); if (chart4Update == null) { String plotID = typeName[mainTypeList.getSelectedIndex()].getPlotID(); - Chart chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; + Chart chart = (Chart) ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; try{ chart4Update = (Chart)chart.clone(); cc.addChart(chart4Update); diff --git a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java index 769218c7f..85fcaaeff 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java +++ b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java @@ -1,7 +1,6 @@ package com.fr.design.chart.gui; import com.fr.base.ScreenResolution; -import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartGlyph; import com.fr.base.chart.chartdata.CallbackEvent; @@ -10,6 +9,7 @@ import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartglyph.AxisGlyph; +import com.fr.chartx.attr.XChart; import com.fr.design.chart.gui.active.ActiveGlyph; import com.fr.design.chart.gui.active.ChartActiveGlyph; import com.fr.design.file.HistoryTemplateListPane; @@ -162,7 +162,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene return (this.chartCollection4Design == null) ? 0 : this.chartCollection4Design.getChartCount(); } - public BaseChart getEditingChart() { + public XChart getEditingChart() { return editingChart; } diff --git a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java index f621c545f..d52dcbfde 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java +++ b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java @@ -1,7 +1,7 @@ package com.fr.design.chart.gui; -import com.fr.chart.chartattr.Chart; import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.chartx.attr.XChart; import com.fr.design.gui.core.WidgetOption; import com.fr.form.ui.ChartEditor; import com.fr.form.ui.Widget; @@ -38,8 +38,8 @@ public class ChartWidgetOption extends WidgetOption { Class clz = widgetClass(); try { ChartEditor widget = clz.newInstance(); - Chart chart = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.chartID)[0]; - widget.addChart((Chart) chart.clone()); + XChart chart = ChartTypeManager.getInstanceWithCheck().getChartTypes(this.chartID)[0]; + widget.addChart((XChart) chart.clone()); return widget; } catch (InstantiationException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); diff --git a/designer-chart/src/main/java/com/fr/design/chart/gui/active/action/ChartComponentAction.java b/designer-chart/src/main/java/com/fr/design/chart/gui/active/action/ChartComponentAction.java index a27d2387a..9bedc637d 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/gui/active/action/ChartComponentAction.java +++ b/designer-chart/src/main/java/com/fr/design/chart/gui/active/action/ChartComponentAction.java @@ -1,11 +1,10 @@ package com.fr.design.chart.gui.active.action; -import com.fr.base.chart.BaseChart; import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartglyph.AxisGlyph; -import com.fr.design.chart.gui.ChartComponent; import com.fr.design.actions.UpdateAction; +import com.fr.design.chart.gui.ChartComponent; /** * Created by IntelliJ IDEA. @@ -29,10 +28,6 @@ public abstract class ChartComponentAction extends UpdateAction { chartComponent.repaint(); } - public BaseChart getEditingChart() { - return chartComponent.getEditingChart(); - } - public ChartCollection getChartCollection() { return chartComponent.getChartCollection(); } diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index c3db9b7ef..01c5a156e 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -6,6 +6,7 @@ import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.web.ChartHyperPoplink; +import com.fr.chartx.attr.XChart; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.hyperlink.AbstractHyperLinkPane; @@ -66,10 +67,10 @@ public class ChartHyperPoplinkPane extends AbstractHyperLinkPane implemen if (editingCollection != null) { //点击添加按钮,则会触发切换状态 - Chart chart = editingCollection.getChangeStateNewChart(); + XChart chart = editingCollection.getChangeStateNewChart(); try { - Chart newChart = (Chart) chart.clone(); + XChart newChart = (XChart) chart.clone(); editingCollection.addNamedChart(name, newChart); } catch (CloneNotSupportedException e1) { FineLoggerFactory.getLogger().error("Error in Clone"); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 33c9a41dc..56547842c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -41,30 +41,6 @@ public class ChartTypePane extends AbstractChartAttrPane{ private ChartTypeButtonPane buttonPane; private ChartEditPane editPane; private ChartCollection editingCollection; - private PaneState paneState = new PaneState(); - - private class PaneState{ - //记录面板所处状态 - private SwitchState paneState = SwitchState.DEFAULT; - //记录当前面板是谁在使用切换状态 - private String chartID = StringUtils.EMPTY; - - public SwitchState getPaneState() { - return paneState; - } - - public void setPaneState(SwitchState paneState) { - this.paneState = paneState; - } - - public String getChartID() { - return chartID; - } - - public void setChartID(String chartID) { - this.chartID = chartID; - } - } @Override protected JPanel createContentPane() { @@ -337,22 +313,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void relayoutChartTypePane(ChartCollection collection){ - if (needRelayout(collection)) { - chartTypeComBox.relayout(collection); - //设置面板切换状态 - updatePaneState(collection); - } - } - - private void updatePaneState(ChartCollection collection) { - paneState.setChartID(collection.getRepresentChartID()); - paneState.setPaneState(collection.getState()); - } - - // TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构 - private boolean needRelayout(ChartCollection collection) { - /*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/ - return true; + chartTypeComBox.relayout(collection); } /** diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java index 27f426682..46447495d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java @@ -17,6 +17,7 @@ import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Title; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.charttypes.BarIndependentChart; +import com.fr.chartx.attr.XChart; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.chart.series.PlotStyle.ChartSelectDemoPane; import com.fr.design.gui.ilable.BoldFontTextLabel; @@ -616,7 +617,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ return typePane; } - public Chart getDefaultChart() { + public XChart getDefaultChart() { return BarIndependentChart.barChartTypes[0]; } } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java b/designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java index 2b8f6ea32..5bd4c3897 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java @@ -5,7 +5,6 @@ import com.fr.chart.base.ChartUtils; import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.event.UIObserver; @@ -13,7 +12,6 @@ import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.layout.FRGUIPaneFactory; - import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; @@ -30,7 +28,8 @@ public class ChartPreStylePane extends BasicBeanPane { private ChartPreFillStylePane fillStylePane; private ChartComponent chartComponent; - + private Bar2DPlot demoPlot; + public ChartPreStylePane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -50,8 +49,9 @@ public class ChartPreStylePane extends BasicBeanPane { this.add(boxPane, BorderLayout.CENTER); ChartCollection cc = new ChartCollection(); - cc.addChart(new Chart(new Bar2DPlot())); - + demoPlot = new Bar2DPlot(); + cc.addChart(new Chart(demoPlot)); + chartComponent = new ChartComponent(); chartComponent.populate(cc); chartComponent.setPreferredSize(new Dimension(400, 300)); @@ -82,8 +82,7 @@ public class ChartPreStylePane extends BasicBeanPane { private void refreshWhenStyleChange(ChartColorMatching preStyle) { if(chartComponent != null) { - Plot plot = (Plot) chartComponent.getEditingChart().getBasePlot(); - plot.setPlotFillStyle(ChartUtils.chartColorMatching2AttrFillStyle(preStyle)); + demoPlot.setPlotFillStyle(ChartUtils.chartColorMatching2AttrFillStyle(preStyle)); chartComponent.reset(); } } diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java index 9e5ddd7b4..331e51164 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java @@ -2,6 +2,7 @@ package com.fr.extended.chart; import com.fr.chart.chartattr.Chart; import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.chartx.attr.XChart; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane; @@ -65,7 +66,7 @@ public class ExtendedTypePane extends AbstractChartType } @Override - public Chart getDefaultChart() { + public XChart getDefaultChart() { return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0]; } diff --git a/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java b/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java index 564a3ae6a..097528c68 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java @@ -1,7 +1,7 @@ package com.fr.poly; import com.fr.base.BaseUtils; -import com.fr.base.chart.BaseChart; +import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartGetter; import com.fr.base.chart.BaseChartNameID; import com.fr.base.vcs.DesignerMode; @@ -64,9 +64,10 @@ public class PolyComponentsBar extends JToolBar { ); this.add(serIcons[0]); for (int i = 0; i < typeLen; i++) { - BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); - String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(typeName[i].getPlotID()); - serIcons[i + 1] = new SerIcon(rowChart[0], InterProviderFactory.getProvider().getLocText(typeName[i].getName()), iconPath); + String chartID = typeName[i].getPlotID(); + String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(chartID); + BaseChartCollection chartCollection = BaseChartGetter.getStaticChartCollection(chartID); + serIcons[i + 1] = new SerIcon(chartCollection, InterProviderFactory.getProvider().getLocText(typeName[i].getName()), iconPath); this.add(serIcons[i + 1]); } diff --git a/designer-realize/src/main/java/com/fr/poly/PolyUtils.java b/designer-realize/src/main/java/com/fr/poly/PolyUtils.java index 330949fb3..e297a69ad 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyUtils.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyUtils.java @@ -4,9 +4,7 @@ package com.fr.poly; import com.fr.base.ScreenResolution; -import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; -import com.fr.base.chart.BasePlot; import com.fr.log.FineLoggerFactory; import com.fr.poly.creator.BlockCreator; import com.fr.poly.creator.ChartBlockCreator; @@ -15,7 +13,6 @@ import com.fr.poly.model.AddedData; import com.fr.report.poly.PolyChartBlock; import com.fr.report.poly.PolyECBlock; import com.fr.report.poly.TemplateBlock; -import com.fr.stable.bridge.StableFactory; import java.awt.Point; import java.lang.reflect.Constructor; @@ -53,10 +50,8 @@ public class PolyUtils { public static BlockCreator createCreator(Class clazz) { return createCreator(blockGenerate(clazz)); } - - public static BlockCreator createCreator(BaseChart chart) { - BaseChartCollection cc = (BaseChartCollection)StableFactory.createXmlObject(BaseChartCollection.XML_TAG); - cc.addChart(chart); + + public static BlockCreator createCreator(BaseChartCollection cc) { TemplateBlock block = new PolyChartBlock(cc); return createCreator(block); } @@ -66,20 +61,7 @@ public class PolyUtils { try { block = (TemplateBlock) clazz.newInstance(); } catch (Exception e) { - try { - BasePlot plot = (BasePlot)clazz.newInstance(); - BaseChartCollection cc = (BaseChartCollection)StableFactory.createXmlObject(BaseChartCollection.XML_TAG); - - BaseChart chart = (BaseChart)StableFactory.createXmlObject(BaseChart.XML_TAG); - chart.initChart(plot); - cc.addChart(chart); - - block = new PolyChartBlock(cc); - } catch (InstantiationException e1) { - FineLoggerFactory.getLogger().error(e1.getMessage(), e1); - } catch (IllegalAccessException e1) { - FineLoggerFactory.getLogger().error(e1.getMessage(), e1); - } + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return block; } diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java b/designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java index 006c7e48d..bf72884bc 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java @@ -3,25 +3,15 @@ */ package com.fr.poly.creator; -import com.fr.base.BaseUtils; -import com.fr.base.ScreenResolution; -import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; -import com.fr.base.chart.BaseChartGetter; -import com.fr.base.chart.BaseChartNameID; import com.fr.base.vcs.DesignerMode; -import com.fr.design.border.UIRoundedBorder; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.mainframe.EastRegionContainerPane; -import com.fr.design.mainframe.JSliderPane; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.NoSupportAuthorityEdit; import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.module.DesignModuleFactory; -import com.fr.design.utils.gui.LayoutUtils; -import com.fr.general.ComparatorUtils; -import com.fr.log.FineLoggerFactory; import com.fr.poly.PolyConstants; import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner.SelectionType; @@ -31,13 +21,8 @@ import com.fr.report.poly.PolyChartBlock; import com.fr.stable.core.PropertyChangeAdapter; import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.JPanel; -import javax.swing.JToggleButton; -import javax.swing.border.Border; import java.awt.Color; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.Rectangle; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -48,31 +33,10 @@ import java.awt.event.MouseEvent; */ // 图片的命名必须符合下面的代码规范(chart类别+序号的方式) 不然读取不到指定图片 public class ChartBlockEditor extends BlockEditor { - private static final int BOUND_OFF = 21; - private static Border buttonBorder; - private static String[][] chartsNames; - private static BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames(); - private int resolution = (int) (ScreenResolution.getScreenResolution()* JSliderPane.getInstance().resolutionTimes); - - static { - buttonBorder = new UIRoundedBorder(new Color(149, 149, 149), 1, 5); - chartsNames = new String[typeName.length][]; - for (int i = 0; i < typeName.length; i++) { - BaseChart[] rowCharts = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); - chartsNames[i] = new String[rowCharts.length]; - for (int j = 0; j < rowCharts.length; j++) { - chartsNames[i][j] = rowCharts[j].getChartName(); - } - } - } - - private ChartButton[] chartButtons = null; public ChartBlockEditor(PolyDesigner designer, ChartBlockCreator creator) { super(designer, creator); this.resolution = creator.resolution; - //shine:和产品商量后决定把最上面一排切换按钮去掉 -// this.initNorthBarComponent(); } @@ -80,33 +44,6 @@ public class ChartBlockEditor extends BlockEditor