Browse Source

Merge pull request #10676 in DESIGN/design from release/11.0 to bugfix/11.0

* commit 'a43c9cab07a9c9ff03e5bb03b73e4f05d3082aca':
  无JIRA任务 给superman检测加个注释 && 加个考虑到有些用户需要通过版本控制找回模板,还原之前的改动
  REPORT-82933 fix:更新逻辑同populateBean
  REPORT-82933 fix:多层饼图、矩形树图、扩展图表等更换数据集后字段值未清空 && REPORT-82921 fix:所有图表更换数据集后字段名未清空
bugfix/11.0
superman 2 years ago
parent
commit
a050b272c7
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  2. 7
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  3. 10
      designer-chart/src/main/java/com/fr/design/chartx/component/correlation/AbstractCorrelationPane.java
  4. 5
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  5. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  6. 11
      designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

4
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.vcs.common;
import com.fr.base.extension.FileExtension;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.file.HistoryTemplateListCache;
@ -136,9 +135,6 @@ public class VcsHelper implements JTemplateActionListener {
public void run() {
String fileName = getEditingFilename();
if (FileExtension.VIS.matchExtension(fileName)) { // fvs文件先不做版本控制
return;
}
VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class);
VcsEntity entity = operator.getFileVersionByIndex(fileName, 0);
int latestFileVersion = 0;

7
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java

@ -23,13 +23,13 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by shine on 2018/9/12.
@ -93,12 +93,13 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends BasicBeanPane<T
public void clearAllBoxList() {
useFieldValuePane.clearAllBoxList();
customFieldNamePane.clearAllBoxList();
fieldList.clear();
}
public void refreshBoxListWithSelectTableData(List columnNameList) {
useFieldValuePane.refreshBoxListWithSelectTableData(columnNameList);
fieldList = columnNameList;
fieldList = new ArrayList<>(columnNameList);
}
private void checkCardPane() {

10
designer-chart/src/main/java/com/fr/design/chartx/component/correlation/AbstractCorrelationPane.java

@ -127,4 +127,14 @@ public abstract class AbstractCorrelationPane<T> extends BasicBeanPane<T> {
return StringUtils.EMPTY;
}
/**
* 清空 系列名使用字段名 表格
*/
public void clearAllBoxList() {
this.correlationPane.getTable().clear();
this.correlationPane.validate();
this.correlationPane.repaint();
this.correlationPane.revalidate();
}
}

5
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -8,6 +8,7 @@ import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -75,6 +76,10 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
List<String> columnNameList = dataWrap.calculateColumnNameList();
if (dataSetFieldsPane != null) {
// 如果属性编辑画板中选中的数据集发生改变,则清空之前的匹配项
if (!StringUtils.equals(dataSetFieldsPane.getTableName(), dataWrap.getTableDataName())) {
dataSetFieldsPane.clearAllBoxList();
}
dataSetFieldsPane.refreshBoxListWithSelectTableData(columnNameList);
dataSetFieldsPane.setTableName(dataWrap.getTableDataName());
}

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java

@ -24,8 +24,6 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.event.ChangeEvent;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
@ -33,6 +31,8 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
/**
* 属性表 数据集界面: 系列名 使用字段名.
@ -145,7 +145,7 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
* @param list 数据集
*/
public void refreshBoxListWithSelectTableData(List list) {
field.clear();
clearAllBoxList();
for (int i = 0, length = list.size(); i < length; i++) {
Object ob = list.get(i);
@ -160,6 +160,8 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
*/
public void clearAllBoxList(){
field.clear();
seriesDataPane.getTable().clear();
seriesDataPane.getTable().updateUI();
}
private void fireStop() {

11
designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -10,6 +10,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
@ -17,7 +18,6 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.multilayer.data.MultiPieValueDefinition;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils;
@ -235,7 +235,14 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
@Override
public void clearAllBoxList() {
levelNumEdit.setValue(3);
nameField.setText(StringUtils.EMPTY);
clearBoxItems(value);
for (UIComboBox uiComboBox : levelNameList) {
clearBoxItems(uiComboBox);
}
clearBoxItems(calculateCombox);
refreshCenterPane();
}
@Override

Loading…
Cancel
Save