Browse Source

Merge pull request #1255 in BA/design from ~MANGO/m_design:release/9.0 to release/9.0

* commit '6a0367454452b8104186f0b022a79a98165426f6':
  去掉lastTypeIndex,整理相关代码
  修改9.0bug
master
superman 7 years ago
parent
commit
4db3854043
  1. 4
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  2. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java
  3. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  4. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java
  5. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java
  6. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java
  7. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java
  8. 26
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java
  9. 15
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java
  10. 21
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java
  11. 15
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java
  12. 7
      designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java
  13. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java
  14. 3
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java
  15. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  16. 8
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java
  17. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  18. 24
      designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java
  19. 16
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java
  20. 1
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  21. 25
      designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java
  22. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java
  23. 17
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java
  24. 17
      designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java
  25. 19
      designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java

4
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -341,7 +341,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex());
attrPane.refreshChartDataPane(collection);
if (attrPane.isShowing()) {
attrPane.refreshChartDataPane(collection);
}
}
});
}

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 instanceof Bar3DPlot){
typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_PERCENT_STACK_COLOMN_CHART;
} else {
typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = PERCENT_STACK_COLOMN_CHART;
}
} else {
if(barPlot instanceof Bar3DPlot){
typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_STACK_COLOMN_CHART;
} else {
typeDemo.get(STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = STACK_COLOMN_CHART;
}
}
} else {
if(barPlot instanceof Bar3DPlot) {
if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) {
typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_HORIZON_DRAW_CHART;
} else {
typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_CHART;
}
} else {
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[] getTypeLayoutTipName();
protected int lastStyleIndex = -1;
protected int lastTypeIndex = -1;
protected boolean typeChanged = false;//图表类型是否发生变化
protected String[] getNormalLayoutTipName() {
@ -148,12 +147,11 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
return null;
}
protected void checkTypeChange(){
protected void checkTypeChange(Plot oldPlot){
if(styleList != null && !styleList.isEmpty()){
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;
lastTypeIndex = i;
break;
}
typeChanged = false;
@ -250,8 +248,9 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
* 保存风格,对选中的风格做设置
*/
public void updateBean(Chart chart) {
checkTypeChange();//判断图表的类型是否发生变化
Plot newPlot = this.setSelectedClonedPlotWithCondition(chart.getPlot());
Plot oldPlot = chart.getPlot();
Plot newPlot = this.setSelectedClonedPlotWithCondition(oldPlot);
checkTypeChange(oldPlot);//判断图表的类型是否发生变化
if(styleList != null && !styleList.isEmpty()){
if(styleList.get(STYLE_SHADE).isPressing && 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.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_AREA_LINE_CHART;
} else {
typeDemo.get(STACK_AREA_CHART).isPressing = true;
lastTypeIndex = STACK_AREA_CHART;
}
}
} else if(plot instanceof Area3DPlot) {
@ -85,10 +83,8 @@ public class AreaPlotPane extends AbstractChartTypePane{
if(threeDPlot.isStacked()) {
if(threeDPlot.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_3D_AREA_LINE_CHART;
} else {
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();
if(plot instanceof Donut3DPlot) {
typeDemo.get(THREE_D_DONUT_CHART).isPressing = true;
lastTypeIndex = THREE_D_DONUT_CHART;
} else {
typeDemo.get(DONUT_CHART).isPressing = true;
lastTypeIndex = DONUT_CHART;
}
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) {
imagePane.isPressing = false;
}
typeDemo.get(mapPlot.getMapType().ordinal()).isPressing = true;
lastTypeIndex = mapPlot.getMapType().ordinal();//todo 这个属性是不是可以删了,eason
typeDemo.get(mapPlot.getDetailType()).isPressing = true;
}
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();
if(plot instanceof Pie3DPlot) {
typeDemo.get(THREE_D_PIE_CHART).isPressing = true;
lastTypeIndex = THREE_D_PIE_CHART;
} else {
typeDemo.get(PIE_CHART).isPressing = true;
lastTypeIndex = PIE_CHART;
}
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -39,26 +38,13 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
/**
* 返回界面标题
*
* @return 界面标题
*/
public String title4PopupWindow() {
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;
}
protected Plot getSelectedClonedPlot(){
protected Plot getSelectedClonedPlot() {
VanChartAreaPlot newPlot = null;
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes;
for(int i = 0, len = areaChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartAreaPlot)areaChart[i].getPlot();
for (int i = 0, len = areaChart.length; i < len; i++) {
if (typeDemo.get(i).isPressing) {
newPlot = (VanChartAreaPlot) areaChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
cloned = (Plot) newPlot.clone();
} catch (CloneNotSupportedException e) {
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.column.VanChartColumnPlot;
@ -46,20 +45,6 @@ public class VanChartBarPlotPane extends AbstractVanChartTypePane {
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

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.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools;
@ -50,26 +49,6 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
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) {
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -46,20 +45,6 @@ public class VanChartColumnPlotPane extends AbstractVanChartTypePane {
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

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

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java

@ -27,12 +27,11 @@ public class VanChartFillStylePane extends ChartFillStylePane {
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
@Override
public Dimension getPreferredSize() {
if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) {
return new Dimension(styleSelectBox.getPreferredSize().width, 30);
return new Dimension(styleSelectBox.getPreferredSize().width, 26);
}
return super.getPreferredSize();
}

3
designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java

@ -236,8 +236,6 @@ public class HyperlinkMapFactory {
startTime.setEnabled(false);
ConstantsEditor endTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Time"), new Formula("END_TIME"));
endTime.setEnabled(false);
ConstantsEditor duration = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Duration_Time"), new Formula("DURATION"));
duration.setEnabled(false);
ConstantsEditor progress = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Process"), new Formula("PROGRESS"));
progress.setEnabled(false);
@ -246,7 +244,6 @@ public class HyperlinkMapFactory {
lists.add(series);
lists.add(startTime);
lists.add(endTime);
lists.add(duration);
lists.add(progress);
return lists;

2
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -57,7 +57,7 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
protected void initLayout() {
this.setLayout(new BorderLayout(0,6));
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,10,10));
northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);

8
designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java

@ -16,7 +16,11 @@ import com.fr.plugin.chart.designer.style.axis.VanChartAxisPane;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
@ -53,7 +57,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
this.add(eastPane, BorderLayout.EAST);
buttonPane = new JPanel();
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 0));
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 0));
this.add(buttonPane, BorderLayout.CENTER);
addButton.addActionListener(addListener);

3
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -29,6 +29,7 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartFillStylePane;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
@ -98,7 +99,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
*/
protected ChartFillStylePane getFillStylePane() {
//如果是自定義組合圖,則不創建填充界面
return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane();
return parentPane instanceof VanChartCustomStylePane ? null : new VanChartFillStylePane();
}
//风格

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

@ -10,13 +10,14 @@ import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel;
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.FRLogger;
import com.fr.general.Inter;
import com.fr.js.NameJavaScriptGroup;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*;
@ -53,9 +54,15 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
};
}
//适用一种图表只有一种类型的
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
typeDemo.get(0).isPressing = true;
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
typeDemo.get(plot.getDetailType()).isPressing = true;
checkDemosBackground();
}
@ -63,9 +70,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
* 保存界面属性
*/
public void updateBean(Chart chart) {
checkTypeChange();
VanChartPlot oldPlot = (VanChartPlot)chart.getPlot();
VanChartPlot newPlot = (VanChartPlot)getSelectedClonedPlot();
VanChartPlot oldPlot = chart.getPlot();
VanChartPlot newPlot = getSelectedClonedPlot();
checkTypeChange(oldPlot);
samePlot = accept(chart);
if(typeChanged && samePlot){
//同一中图表切换不同类型
@ -115,11 +122,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
return new VanChartTools();
}
protected void checkTypeChange(){
protected void checkTypeChange(Plot oldPlot){
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;
lastTypeIndex = i;
break;
}
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -43,21 +42,6 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane {
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(){
VanChartGaugePlot newPlot = null;
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) {
typeDemo.get(0).isPressing = true;
lastTypeIndex = 0;
VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot();
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.type.VanChartPlotType;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/**
@ -39,29 +37,6 @@ public class VanChartLinePlotPane extends AbstractVanChartTypePane {
public String title4PopupWindow() {
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

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();
lastTypeIndex = plot.getMapTypeIndex();
typeDemo.get(lastTypeIndex).isPressing = true;
typeDemo.get(plot.getDetailType()).isPressing = true;
populateSourcePane(plot);
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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.PiePlot4VanChart;
@ -42,22 +41,6 @@ public class VanChartPiePlotPane extends AbstractVanChartTypePane {
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
*

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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -38,22 +37,6 @@ public class VanChartRadarPlotPane extends AbstractVanChartTypePane {
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
*

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.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools;
@ -47,23 +46,7 @@ public class VanChartStructureTypePane extends AbstractVanChartTypePane{
public String title4PopupWindow() {
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(){
VanChartStructurePlot newPlot = null;
Chart[] charts = StructureIndependentVanChart.StructureVanCharts;

Loading…
Cancel
Save