Browse Source

去掉lastTypeIndex,整理相关代码

master
mengao 7 years ago
parent
commit
6a03674544
  1. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java
  2. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  3. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java
  4. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java
  5. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java
  6. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java
  7. 26
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java
  8. 15
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java
  9. 21
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java
  10. 15
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java
  11. 7
      designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java
  12. 23
      designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java
  13. 16
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java
  14. 1
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  15. 25
      designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java
  16. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java
  17. 17
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java
  18. 17
      designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java
  19. 19
      designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java

7
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java

@ -27,32 +27,25 @@ public abstract class AbstractBarPane extends AbstractChartTypePane {
if(barPlot.getyAxis().isPercentage()) { if(barPlot.getyAxis().isPercentage()) {
if(barPlot instanceof Bar3DPlot){ if(barPlot instanceof Bar3DPlot){
typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_PERCENT_STACK_COLOMN_CHART;
} else { } else {
typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = PERCENT_STACK_COLOMN_CHART;
} }
} else { } else {
if(barPlot instanceof Bar3DPlot){ if(barPlot instanceof Bar3DPlot){
typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_STACK_COLOMN_CHART;
} else { } else {
typeDemo.get(STACK_COLOMN_CHART).isPressing = true; typeDemo.get(STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = STACK_COLOMN_CHART;
} }
} }
} else { } else {
if(barPlot instanceof Bar3DPlot) { if(barPlot instanceof Bar3DPlot) {
if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) { if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) {
typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true; typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_HORIZON_DRAW_CHART;
} else { } else {
typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_CHART;
} }
} else { } else {
typeDemo.get(COLOMN_CHART).isPressing = true; typeDemo.get(COLOMN_CHART).isPressing = true;
lastTypeIndex = COLOMN_CHART;
} }
} }

11
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -59,7 +59,6 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected abstract String[] getTypeLayoutPath(); protected abstract String[] getTypeLayoutPath();
protected abstract String[] getTypeLayoutTipName(); protected abstract String[] getTypeLayoutTipName();
protected int lastStyleIndex = -1; protected int lastStyleIndex = -1;
protected int lastTypeIndex = -1;
protected boolean typeChanged = false;//图表类型是否发生变化 protected boolean typeChanged = false;//图表类型是否发生变化
protected String[] getNormalLayoutTipName() { protected String[] getNormalLayoutTipName() {
@ -148,12 +147,11 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
return null; return null;
} }
protected void checkTypeChange(){ protected void checkTypeChange(Plot oldPlot){
if(styleList != null && !styleList.isEmpty()){ if(styleList != null && !styleList.isEmpty()){
for(int i = 0; i < typeDemo.size(); i++){ for(int i = 0; i < typeDemo.size(); i++){
if(typeDemo.get(i).isPressing && i != lastTypeIndex){ if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){
typeChanged = true; typeChanged = true;
lastTypeIndex = i;
break; break;
} }
typeChanged = false; typeChanged = false;
@ -250,8 +248,9 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
* 保存风格,对选中的风格做设置 * 保存风格,对选中的风格做设置
*/ */
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
checkTypeChange();//判断图表的类型是否发生变化 Plot oldPlot = chart.getPlot();
Plot newPlot = this.setSelectedClonedPlotWithCondition(chart.getPlot()); Plot newPlot = this.setSelectedClonedPlotWithCondition(oldPlot);
checkTypeChange(oldPlot);//判断图表的类型是否发生变化
if(styleList != null && !styleList.isEmpty()){ if(styleList != null && !styleList.isEmpty()){
if(styleList.get(STYLE_SHADE).isPressing && lastStyleIndex != STYLE_SHADE){ if(styleList.get(STYLE_SHADE).isPressing && lastStyleIndex != STYLE_SHADE){
lastStyleIndex = STYLE_SHADE; lastStyleIndex = STYLE_SHADE;

4
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java

@ -74,10 +74,8 @@ public class AreaPlotPane extends AbstractChartTypePane{
if(area.isStacked()) { if(area.isStacked()) {
if(area.getyAxis().isPercentage()) { if(area.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true; typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_AREA_LINE_CHART;
} else { } else {
typeDemo.get(STACK_AREA_CHART).isPressing = true; typeDemo.get(STACK_AREA_CHART).isPressing = true;
lastTypeIndex = STACK_AREA_CHART;
} }
} }
} else if(plot instanceof Area3DPlot) { } else if(plot instanceof Area3DPlot) {
@ -85,10 +83,8 @@ public class AreaPlotPane extends AbstractChartTypePane{
if(threeDPlot.isStacked()) { if(threeDPlot.isStacked()) {
if(threeDPlot.getyAxis().isPercentage()) { if(threeDPlot.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true; typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_3D_AREA_LINE_CHART;
} else { } else {
typeDemo.get(STACK_3D_AREA_CHART).isPressing = true; typeDemo.get(STACK_3D_AREA_CHART).isPressing = true;
lastTypeIndex = STACK_3D_AREA_CHART;
} }
} }
} }

2
designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java

@ -67,10 +67,8 @@ public class DonutPlotPane extends AbstractChartTypePane{
Plot plot = chart.getPlot(); Plot plot = chart.getPlot();
if(plot instanceof Donut3DPlot) { if(plot instanceof Donut3DPlot) {
typeDemo.get(THREE_D_DONUT_CHART).isPressing = true; typeDemo.get(THREE_D_DONUT_CHART).isPressing = true;
lastTypeIndex = THREE_D_DONUT_CHART;
} else { } else {
typeDemo.get(DONUT_CHART).isPressing = true; typeDemo.get(DONUT_CHART).isPressing = true;
lastTypeIndex = DONUT_CHART;
} }
checkDemosBackground(); checkDemosBackground();

3
designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java

@ -137,8 +137,7 @@ public class MapPlotPane extends AbstractChartTypePane {
for(ChartImagePane imagePane : typeDemo) { for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false; imagePane.isPressing = false;
} }
typeDemo.get(mapPlot.getMapType().ordinal()).isPressing = true; typeDemo.get(mapPlot.getDetailType()).isPressing = true;
lastTypeIndex = mapPlot.getMapType().ordinal();//todo 这个属性是不是可以删了,eason
} }
checkDemosBackground(); checkDemosBackground();

2
designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java

@ -93,10 +93,8 @@ public class PiePlotPane extends AbstractChartTypePane{
Plot plot = chart.getPlot(); Plot plot = chart.getPlot();
if(plot instanceof Pie3DPlot) { if(plot instanceof Pie3DPlot) {
typeDemo.get(THREE_D_PIE_CHART).isPressing = true; typeDemo.get(THREE_D_PIE_CHART).isPressing = true;
lastTypeIndex = THREE_D_PIE_CHART;
} else { } else {
typeDemo.get(PIE_CHART).isPressing = true; typeDemo.get(PIE_CHART).isPressing = true;
lastTypeIndex = PIE_CHART;
} }
checkDemosBackground(); checkDemosBackground();

26
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -39,26 +38,13 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
/** /**
* 返回界面标题 * 返回界面标题
*
* @return 界面标题 * @return 界面标题
*/ */
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewArea"); return Inter.getLocText("Plugin-ChartF_NewArea");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartAreaPlot) {
lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
@ -71,17 +57,17 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID; return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID;
} }
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot() {
VanChartAreaPlot newPlot = null; VanChartAreaPlot newPlot = null;
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes; Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes;
for(int i = 0, len = areaChart.length; i < len; i++){ for (int i = 0, len = areaChart.length; i < len; i++) {
if(typeDemo.get(i).isPressing){ if (typeDemo.get(i).isPressing) {
newPlot = (VanChartAreaPlot)areaChart[i].getPlot(); newPlot = (VanChartAreaPlot) areaChart[i].getPlot();
} }
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); cloned = (Plot) newPlot.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In AreaChart"); FRLogger.getLogger().error("Error In AreaChart");
} }

15
designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
@ -46,20 +45,6 @@ public class VanChartBarPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewBar"); return Inter.getLocText("Plugin-ChartF_NewBar");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

21
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java

@ -6,7 +6,6 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
@ -50,26 +49,6 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewBubble"); return Inter.getLocText("Plugin-ChartF_NewBubble");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot)plot).isForceBubble()){
lastTypeIndex = BubblePlotType.FORCE.ordinal();
} else {
lastTypeIndex = BubblePlotType.NORMAL.ordinal();
}
typeDemo.get(lastTypeIndex).isPressing = true;
checkDemosBackground();
}
private void removeDefaultAttr(ConditionAttr conditionAttr, Class <? extends DataSeriesCondition> targetClass) { private void removeDefaultAttr(ConditionAttr conditionAttr, Class <? extends DataSeriesCondition> targetClass) {
DataSeriesCondition attr = conditionAttr.getExisted(targetClass); DataSeriesCondition attr = conditionAttr.getExisted(targetClass);

15
designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.column;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -46,20 +45,6 @@ public class VanChartColumnPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewColumn"); return Inter.getLocText("Plugin-ChartF_NewColumn");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

7
designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java

@ -131,12 +131,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
//保存上次选中的值,其会在super中更新 //保存上次选中的值,其会在super中更新
int lastState = lastTypeIndex; int lastState = chart.getPlot().getDetailType();
super.updateBean(chart); super.updateBean(chart);
//如果上次的状态和这次的装填不在同一个页面,说明同一个图表內切换了,需要情況数据配置 //如果上次的状态和这次的装填不在同一个页面,说明同一个图表內切换了,需要情況数据配置
if (lastState != lastTypeIndex) { if (lastState != chart.getPlot().getDetailType()) {
chart.setFilterDefinition(null); chart.setFilterDefinition(null);
} }
@ -219,8 +219,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
//获取上次选中的图标 //获取上次选中的图标
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot(); VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
lastTypeIndex = customPlot.getCustomStyle().ordinal(); typeDemo.get(customPlot.getDetailType()).isPressing = true;
typeDemo.get(lastTypeIndex).isPressing = true;
isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM; isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM;

23
designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java

@ -10,6 +10,7 @@ import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.gui.ilable.MultilineLabel;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -53,10 +54,15 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
}; };
} }
//适用一种图表只有一种类型的 /**
* 更新界面内容
*/
public void populateBean(Chart chart) { public void populateBean(Chart chart) {
typeDemo.get(0).isPressing = true; for(ChartImagePane imagePane : typeDemo) {
lastTypeIndex = 0; imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
typeDemo.get(plot.getDetailType()).isPressing = true;
checkDemosBackground(); checkDemosBackground();
} }
@ -64,9 +70,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
* 保存界面属性 * 保存界面属性
*/ */
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
checkTypeChange(); VanChartPlot oldPlot = chart.getPlot();
VanChartPlot oldPlot = (VanChartPlot)chart.getPlot(); VanChartPlot newPlot = getSelectedClonedPlot();
VanChartPlot newPlot = (VanChartPlot)getSelectedClonedPlot(); checkTypeChange(oldPlot);
samePlot = accept(chart); samePlot = accept(chart);
if(typeChanged && samePlot){ if(typeChanged && samePlot){
//同一中图表切换不同类型 //同一中图表切换不同类型
@ -116,11 +122,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
return new VanChartTools(); return new VanChartTools();
} }
protected void checkTypeChange(){ protected void checkTypeChange(Plot oldPlot){
for(int i = 0; i < typeDemo.size(); i++){ for(int i = 0; i < typeDemo.size(); i++){
if(typeDemo.get(i).isPressing && i != lastTypeIndex){ if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){
typeChanged = true; typeChanged = true;
lastTypeIndex = i;
break; break;
} }
typeChanged = false; typeChanged = false;

16
designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.gauge;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -43,21 +42,6 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewGauge"); return Inter.getLocText("Plugin-ChartF_NewGauge");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartGaugePlot) {
lastTypeIndex = ((VanChartGaugePlot)plot).getGaugeStyle().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot(){
VanChartGaugePlot newPlot = null; VanChartGaugePlot newPlot = null;
Chart[] GaugeChart = GaugeIndependentVanChart.GaugeVanChartTypes; Chart[] GaugeChart = GaugeIndependentVanChart.GaugeVanChartTypes;

1
designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java

@ -59,7 +59,6 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane {
//适用一种图表只有一种类型的 //适用一种图表只有一种类型的
public void populateBean(Chart chart) { public void populateBean(Chart chart) {
typeDemo.get(0).isPressing = true; typeDemo.get(0).isPressing = true;
lastTypeIndex = 0;
VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot(); VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot();
populateSourcePane(plot); populateSourcePane(plot);

25
designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java

@ -2,10 +2,8 @@ package com.fr.plugin.chart.line;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.VanChartPlotType;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/** /**
@ -39,29 +37,6 @@ public class VanChartLinePlotPane extends AbstractVanChartTypePane {
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewLine"); return Inter.getLocText("Plugin-ChartF_NewLine");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartLinePlot) {
VanChartPlotType plotType = ((VanChartLinePlot)plot).getVanChartPlotType();
switch (plotType){
case CUSTOM:
lastTypeIndex = 2;
break;
default:
lastTypeIndex = plotType.ordinal();
break;
}
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

3
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java

@ -88,8 +88,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
} }
VanChartMapPlot plot = (VanChartMapPlot)chart.getPlot(); VanChartMapPlot plot = (VanChartMapPlot)chart.getPlot();
lastTypeIndex = plot.getMapTypeIndex(); typeDemo.get(plot.getDetailType()).isPressing = true;
typeDemo.get(lastTypeIndex).isPressing = true;
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());

17
designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java

@ -3,7 +3,6 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.PiePlot4VanChart;
@ -42,22 +41,6 @@ public class VanChartPiePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewPie"); return Inter.getLocText("Plugin-ChartF_NewPie");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof PiePlot4VanChart) {
lastTypeIndex = ((PiePlot4VanChart)plot).getRoseType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID
* *

17
designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.radar;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -38,22 +37,6 @@ public class VanChartRadarPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewRadar"); return Inter.getLocText("Plugin-ChartF_NewRadar");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartRadarPlot) {
lastTypeIndex = ((VanChartRadarPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID
* *

19
designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.structure.desinger.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
@ -47,23 +46,7 @@ public class VanChartStructureTypePane extends AbstractVanChartTypePane{
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewStructure"); return Inter.getLocText("Plugin-ChartF_NewStructure");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartStructurePlot) {
lastTypeIndex = ((VanChartStructurePlot)plot).getStructureType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot(){
VanChartStructurePlot newPlot = null; VanChartStructurePlot newPlot = null;
Chart[] charts = StructureIndependentVanChart.StructureVanCharts; Chart[] charts = StructureIndependentVanChart.StructureVanCharts;

Loading…
Cancel
Save