Browse Source

Merge pull request #1119 in DESIGN/design from ~ZHENG/c-design:feature/10.0 to feature/10.0

* commit '9a994bf5525225c1fbde586cd5c4db5b44e58973':
  CHART-10358 箱型图 晶圆图 check
  CHART-10358 兼容位图地图
research/11.0
zheng 5 years ago
parent
commit
234af894ce
  1. 6
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 5
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  3. 15
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

6
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -374,11 +374,15 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
} }
result[i] = Reflect.on(chart).call("demoImagePath").get(); result[i] = Reflect.on(chart).call("demoImagePath").get();
} }
if (ArrayUtils.isNotEmpty(result)) {
return result;
}
} catch (Exception e) { } catch (Exception e) {
//do nothing //do nothing
} }
return new String[0]; return new String[]{getIconPath(chartID)};
} }
public String[] getSubName(String chartID) { public String[] getSubName(String chartID) {

5
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListCellRenderer;
@ -98,8 +99,8 @@ public class ChartTypePane extends ChartCommonWizardPane {
String[] subName = ChartTypeInterfaceManager.getInstance().getSubName(id); String[] subName = ChartTypeInterfaceManager.getInstance().getSubName(id);
ChartTypePane.this.iconListModel.clear(); ChartTypePane.this.iconListModel.clear();
for (int i = 0, len = demoImagePath.length; i < len; i++) { for (int i = 0, len = subName.length; i < len; i++) {
String ImagePath = demoImagePath[i]; String ImagePath = demoImagePath.length > i ? demoImagePath[i] : StringUtils.EMPTY;
String chartName = subName[i]; String chartName = subName[i];
ChartTypePane.this.iconListModel.addElement(new ChartIcon(ImagePath, chartName)); ChartTypePane.this.iconListModel.addElement(new ChartIcon(ImagePath, chartName));
} }

15
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart; package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
@ -130,6 +131,10 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
} }
}; };
@Deprecated
public void reLayout(Chart currentChart) {
}
/** /**
* 重新构造面板 * 重新构造面板
* @param currentChart 图表 * @param currentChart 图表
@ -225,8 +230,14 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
return; return;
} }
if (checkNeedsReLayout(collection.getSelectedChartProvider())) { ChartProvider chartProvider = collection.getSelectedChartProvider();
reLayout(collection.getSelectedChartProvider()); if (checkNeedsReLayout(chartProvider)) {
String chartID = chartProvider.getID();
if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) {
reLayout((Chart)chartProvider);
} else {
reLayout(chartProvider);
}
} }
this.collection = collection; this.collection = collection;

Loading…
Cancel
Save