From c2c72ce0d70079b61a3963d55a07613f4670e7df Mon Sep 17 00:00:00 2001 From: eason-skx Date: Mon, 12 Jun 2017 14:12:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=A0import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/module/DesignModuleFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/module/DesignModuleFactory.java b/designer_base/src/com/fr/design/module/DesignModuleFactory.java index 1e5b4d1ed..2a4342a7d 100644 --- a/designer_base/src/com/fr/design/module/DesignModuleFactory.java +++ b/designer_base/src/com/fr/design/module/DesignModuleFactory.java @@ -2,7 +2,6 @@ package com.fr.design.module; import com.fr.base.FRContext; import com.fr.base.chart.BaseChartCollection; -import com.fr.chart.chartattr.ChartCollection; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartDialog; From 4e827e5f24ac6c1c9797aa7b753eb14cad441e66 Mon Sep 17 00:00:00 2001 From: eason-skx Date: Mon, 31 Jul 2017 18:29:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/ChartTypePane.java | 4 ++++ .../chart/gui/type/AbstractChartTypePane.java | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 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 0b5cfe6c9..d5f170ef8 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 @@ -17,6 +17,7 @@ import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.item.FlexibleComboBox; import com.fr.design.mainframe.chart.gui.item.ItemEventType; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.stable.StringUtils; @@ -238,6 +239,9 @@ public class ChartTypePane extends AbstractChartAttrPane{ for (int i = 0; i < this.cards.size(); i++) { FurtherBasicBeanPane pane = cards.get(i); if (pane.accept(ob)) { + + GUICoreUtils.setEnabled(this, ob.isValidPlot()); + pane.populateBean(ob); Object item = pane.title4PopupWindow(); for (int j = 0; j < cardNames.length; j++) { 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 299d878d0..fb96709be 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 @@ -43,6 +43,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ protected List styleList; protected JPanel stylePane; //样式布局的面板 + protected JPanel typePane; protected abstract String[] getTypeIconPath(); protected abstract String[] getTypeTipName(); protected abstract String[] getTypeLayoutPath(); @@ -70,10 +71,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ checkDemosBackground(); - JPanel typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); + this.typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); for(int i = 0; i < typeDemo.size(); i++) { ChartImagePane tmp = typeDemo.get(i); - typePane.add(tmp); + this.typePane.add(tmp); tmp.setDemoGroup(typeDemo.toArray(new ChartSelectDemoPane[typeDemo.size()])); } @@ -99,7 +100,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ stylePane.setVisible(false); } - JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(typePane),rowSize,columnSize); + JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(this.typePane),rowSize,columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); } @@ -586,6 +587,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ && chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE; } + protected JPanel getTypePane(){ + return this.typePane; + } + public Chart getDefaultChart() { return BarIndependentChart.barChartTypes[0]; } From c438614dbb59f90376f2e942b96c25ab96cb27e6 Mon Sep 17 00:00:00 2001 From: eason-skx Date: Mon, 31 Jul 2017 18:33:59 +0800 Subject: [PATCH 3/4] pmd --- .../design/mainframe/chart/gui/type/AbstractChartTypePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 fb96709be..1f9be209f 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 @@ -39,7 +39,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ protected static final int BAIDU = 0; protected static final int GOOGLE = 1; - protected List typeDemo; + private List typeDemo; protected List styleList; protected JPanel stylePane; //样式布局的面板 From 116b0e7c0ace5fbb1a4c0cb2122e1037404e5503 Mon Sep 17 00:00:00 2001 From: eason-skx Date: Mon, 31 Jul 2017 18:34:42 +0800 Subject: [PATCH 4/4] pmd --- .../mainframe/chart/gui/type/AbstractChartTypePane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 1f9be209f..1b3a68407 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 @@ -39,11 +39,11 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ protected static final int BAIDU = 0; protected static final int GOOGLE = 1; - private List typeDemo; + protected List typeDemo; protected List styleList; protected JPanel stylePane; //样式布局的面板 - protected JPanel typePane; + private JPanel typePane; protected abstract String[] getTypeIconPath(); protected abstract String[] getTypeTipName(); protected abstract String[] getTypeLayoutPath();