Browse Source

Merge pull request #1237 in DESIGN/design from ~WIM.ZHAI/xdesign:release/10.0 to release/10.0

* commit '903a6bc110590bc27a4e22a46df37574665afe11':
  代码质量 方法命名更有针对性些
  CHART-10921 兼容扩展图表
feature/big-screen
Wim.Zhai 5 years ago
parent
commit
3137c0b037
  1. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java
  2. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  3. 4
      designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java
  4. 4
      designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java
  5. 4
      designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractOtherPane.java
  6. 2
      designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java
  7. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  8. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  9. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

2
designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java

@ -12,7 +12,7 @@ public abstract class ChartCommonWizardPane extends ChartWizardPane {
return;
}
populate(cc.getSelectedChart(ChartProvider.class));
populate(cc.getSelectedChartProvider(ChartProvider.class));
}
public abstract void populate(ChartProvider chart);

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

@ -123,7 +123,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
return;
}
ChartProvider chart4Update = cc.getSelectedChart(ChartProvider.class);
ChartProvider chart4Update = cc.getSelectedChartProvider(ChartProvider.class);
if (chart4Update == null) {
String plotID = this.chartIDs[mainTypeList.getSelectedIndex()];
ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()];

4
designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java

@ -26,7 +26,7 @@ public abstract class AbstractChartDataPane<T extends ChartDataDefinitionProvide
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChart(VanChart.class);
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
@ -48,7 +48,7 @@ public abstract class AbstractChartDataPane<T extends ChartDataDefinitionProvide
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChart(VanChart.class);
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}

4
designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java

@ -35,7 +35,7 @@ public abstract class AbstractDataPane extends ChartDataPane {
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class);
if (chart == null) {
return;
}
@ -57,7 +57,7 @@ public abstract class AbstractDataPane extends ChartDataPane {
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class);
if (chart == null) {
return;
}

4
designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractOtherPane.java

@ -18,7 +18,7 @@ public abstract class AbstractOtherPane<T extends AbstractChartWithData> extends
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class);
if (chart == null) {
return;
}
@ -32,7 +32,7 @@ public abstract class AbstractOtherPane<T extends AbstractChartWithData> extends
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class);
if (chart == null) {
return;
}

2
designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -93,7 +93,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
* @param ePane 面板
*/
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
addChartEditPane(collection.getSelectedChart(ChartProvider.class).getID());
addChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID());
setSupportCellData(true);
this.container.setEPane(ePane);
chartEditPane.populate(collection);

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

@ -111,7 +111,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
if (!ComparatorUtils.equals(collection, lastCollection)) {
VanChart vanChart = collection.getSelectedChart(VanChart.class);
VanChart vanChart = collection.getSelectedChartProvider(VanChart.class);
if (vanChart != null) {
//此处画图
vanChart.demoImgEvent(true);
@ -230,7 +230,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
return;
}
ChartProvider chartProvider = collection.getSelectedChart(ChartProvider.class);
ChartProvider chartProvider = collection.getSelectedChartProvider(ChartProvider.class);
if (checkNeedsReLayout(chartProvider)) {
String chartID = chartProvider.getID();
if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) {

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -176,7 +176,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
* @return
*/
public ChartProvider getChangeStateNewChart() {
ChartProvider chart = editingCollection.getSelectedChart(ChartProvider.class);
ChartProvider chart = editingCollection.getSelectedChartProvider(ChartProvider.class);
String chartID = chart.getID();
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID);
return ChartTypeManager.getInstanceWithCheck().getFirstChart(priority);
@ -199,7 +199,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
}
private boolean supportChange() {
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChart(ChartProvider.class).getClass());
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChartProvider(ChartProvider.class).getClass());
}
ActionListener configListener = new ActionListener() {
@ -354,9 +354,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
}
private void checkConfigButtonVisible() {
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChart(ChartProvider.class).getID()));
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider(ChartProvider.class).getID()));
//新建一个collection
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChart(ChartProvider.class) != null) {
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider(ChartProvider.class) != null) {
//Chart 不支持图表切换
configButton.setVisible(supportChange());
}
@ -484,7 +484,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void deleteAButton() {
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
//记录改变前的plotID
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID();
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(ChartProvider.class).getID();
if (editingCollection != null) {
int count = editingCollection.getChartCount();
for (int i = 0; i < count; i++) {
@ -564,7 +564,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
if (isEnabled()) {
noSelected();
//记录改变前的plotID
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID();
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(ChartProvider.class).getID();
changeCollectionSelected(getButtonName());
setSelectedWithFireListener(true);
fireSelectedChanged();

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -208,7 +208,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
//处理办法:这边除了重构 下拉项选项和cardNames 还需要把cards重构下(不需要init pane,只需要我需要的拿出来就好了)
private void relayout(ChartCollection collection){
//重构需要重构下拉框选项和cardNames
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
String chartID = chart.getID();
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID);
boolean enabledChart = ChartTypeManager.enabledChart(chartID);
@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
* @param collection
*/
public void reLayoutEditPane(String lastPlotID, ChartCollection collection){
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
String plotID = chart.getID();
boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID);
if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){
@ -315,7 +315,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void populate(ChartCollection collection) {
editingCollection = collection;
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
this.remove(leftContentPane);
initContentPane();
@ -333,7 +333,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void update(ChartCollection collection) {
editingCollection = collection;
buttonPane.update(collection);// 内部操作时 已经做过处理.
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
chartTypeComBox.updateBean(chart);
}

Loading…
Cancel
Save