Browse Source

Merge pull request #1337 in DESIGN/design from ~BJORN/design:feature/10.0 to feature/10.0

* commit '35eadb071d744c51dd6222a81381404e8a5da93c':
  CHART-11446 没有选择值的时候,灰化汇总方式
persist/11.0
Bjorn 5 years ago
parent
commit
62ccc0a8f4
  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.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/** /**
* Created by shine on 2018/9/12. * Created by shine on 2018/9/12.
@ -148,9 +150,18 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
private void initComponents() { private void initComponents() {
series = new UIComboBox(); series = new UIComboBox();
value = valueComboBoxHasNone() ? new UIComboBoxWithNone() : 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 = new CalculateComboBox();
function.setEnabled(false);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), SwingConstants.LEFT), series}, 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.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; 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; 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; 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(); levelComboBoxPane = new MultiComboBoxPaneWithUISpinner();
value = new UIComboBox(); value = new UIComboBox();
function = new CalculateComboBox(); function = new CalculateComboBox();
initValueAndCalComboBox(value, function);
super.initComponents(); 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(); nodeValue = new UIComboBox();
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
initValueAndCalComboBox(nodeValue, calculateCombox);
super.initComponents(); 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(); wordValue = new UIComboBox();
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
initValueAndCalComboBox(wordValue, calculateCombox);
super.initComponents(); super.initComponents();
} }

Loading…
Cancel
Save