Browse Source

Pull request #2342: CHART-15263 系列添加无

Merge in DESIGN/design from ~ZHENG/c-design:release/10.0 to release/10.0

* commit '1008ab74f86f333f2288073c44c41c310d7ec2cc':
  CHART-15263 轮播gis和三维组合地图 系列 无选项
  CHART-15263 系列添加无
feature/big-screen
zheng 4 years ago
parent
commit
25eac9ea7c
  1. 7
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  2. 4
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java
  3. 4
      designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java

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

@ -82,6 +82,10 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends BasicBeanPane<T
return false; return false;
} }
protected boolean seriesComboBoxHasNone() {
return false;
}
public void checkBoxUse(boolean hasUse) { public void checkBoxUse(boolean hasUse) {
nameOrValue.setEnabled(hasUse); nameOrValue.setEnabled(hasUse);
useFieldValuePane.checkBoxUse(hasUse); useFieldValuePane.checkBoxUse(hasUse);
@ -147,8 +151,7 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends BasicBeanPane<T
private void initComponents() { private void initComponents() {
series = new UIComboBox(); series = seriesComboBoxHasNone() ? new UIComboBoxWithNone() : new UIComboBox();
value = valueComboBoxHasNone() ? new UIComboBoxWithNone() : new UIComboBox(); value = valueComboBoxHasNone() ? new UIComboBoxWithNone() : new UIComboBox();
value.addItemListener(new ItemListener() { value.addItemListener(new ItemListener() {
@Override @Override

4
designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java

@ -22,6 +22,10 @@ public class ExtendedCustomFieldComboBoxPane extends AbstractCustomFieldComboBox
return new ExtendedCustomFieldNamePane(); return new ExtendedCustomFieldNamePane();
} }
@Override
protected boolean seriesComboBoxHasNone() {
return true;
}
@Override @Override
public void populateBean(AbstractDataConfig ob) { public void populateBean(AbstractDataConfig ob) {

4
designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java

@ -41,7 +41,9 @@ public class UIComboBoxWithNone extends UIComboBox {
public void setSelectedItem(Object anObject) { public void setSelectedItem(Object anObject) {
super.setSelectedItem(anObject); super.setSelectedItem(anObject);
if (getSelectedIndex() == -1) {//找不到的都选中无。中文的无 英文下是none。 //找不到的都选中无。中文的无 英文下是none。
//改正:找不到的且anObject不是null的 全部选中无。
if (getSelectedIndex() == -1 && anObject != null) {
super.setSelectedItem(getDefaultLocaleString()); super.setSelectedItem(getDefaultLocaleString());
} }
} }

Loading…
Cancel
Save