Browse Source

CHART-11446 没有选择值的时候,灰化汇总方式

research/11.0
白岳 5 years ago
parent
commit
35eadb071d
  1. 11
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  2. 11
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  3. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  4. 1
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureDataSetFieldsPane.java
  5. 1
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudDataSetFieldsPane.java

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

@ -27,6 +27,8 @@ import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/**
* Created by shine on 2018/9/12.
@ -148,9 +150,18 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
private void initComponents() {
series = new UIComboBox();
value = valueComboBoxHasNone() ? new UIComboBoxWithNone() : new UIComboBox();
value.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
function.setEnabled(value.getSelectedItem() != null);
}
});
function = new CalculateComboBox();
function.setEnabled(false);
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), SwingConstants.LEFT), series},

11
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java

@ -21,6 +21,8 @@ import java.util.Arrays;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -145,4 +147,13 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
return StringUtils.EMPTY;
}
public void initValueAndCalComboBox(final UIComboBox value, final CalculateComboBox function) {
value.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
function.setEnabled(value.getSelectedItem() != null);
}
});
function.setEnabled(false);
}
}

2
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java

@ -38,6 +38,8 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
levelComboBoxPane = new MultiComboBoxPaneWithUISpinner();
value = new UIComboBox();
function = new CalculateComboBox();
initValueAndCalComboBox(value, function);
super.initComponents();
}

1
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureDataSetFieldsPane.java

@ -32,6 +32,7 @@ public class StructureDataSetFieldsPane extends AbstractDataSetFieldsPane<Struct
nodeValue = new UIComboBox();
calculateCombox = new CalculateComboBox();
initValueAndCalComboBox(nodeValue, calculateCombox);
super.initComponents();
}

1
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudDataSetFieldsPane.java

@ -25,6 +25,7 @@ public class WordCloudDataSetFieldsPane extends AbstractDataSetFieldsPane<WordCl
wordValue = new UIComboBox();
calculateCombox = new CalculateComboBox();
initValueAndCalComboBox(wordValue, calculateCombox);
super.initComponents();
}

Loading…
Cancel
Save