Browse Source

REPORT-82933 fix:多层饼图、矩形树图、扩展图表等更换数据集后字段值未清空 && REPORT-82921 fix:所有图表更换数据集后字段名未清空

release/11.0
Carlson 2 years ago
parent
commit
d719ce7014
  1. 7
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  2. 5
      designer-chart/src/main/java/com/fr/design/chartx/component/correlation/AbstractCorrelationPane.java
  3. 5
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  4. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  5. 11
      designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

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() {

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

@ -127,4 +127,9 @@ public abstract class AbstractCorrelationPane<T> extends BasicBeanPane<T> {
return StringUtils.EMPTY;
}
public void clearAllBoxList() {
this.correlationPane.getTable().clear();
this.correlationPane.getTable().updateUI();
}
}

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