Browse Source

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

* commit '18f0756d586e39d3e32907f14b3f2cd3b6226010':
  CHART-11446 未选择数据集灰化了combox
  CHART-11446 未选择数据集灰化了combox
persist/11.0
Bjorn 5 years ago
parent
commit
5ced907f12
  1. 8
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java
  2. 8
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPaneWithUISpinner.java
  3. 1
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPane.java
  4. 6
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  5. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java
  6. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  7. 5
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

8
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java

@ -10,13 +10,13 @@ import com.fr.general.IOUtils;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
@ -168,4 +168,8 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
updateField(comboBox, temp);
}
}
public void checkEnable(boolean hasUse){
addButton.setEnabled(hasUse);
}
}

8
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPaneWithUISpinner.java

@ -11,10 +11,10 @@ import com.fr.stable.AssistUtils;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by shine on 2019/6/18.
@ -148,4 +148,8 @@ public abstract class AbstractMultiComponentPaneWithUISpinner<T extends JCompone
updateField(comboBox, temp);
}
}
public void checkEnable(boolean hasUse){
levelNumSpinner.setEnabled(hasUse);
}
}

1
designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPane.java

@ -14,6 +14,7 @@ import java.util.List;
public class MultiComboBoxPane extends AbstractMultiComponentPane<UIComboBox> {
private List currentBoxItems = new ArrayList();
public void setCurrentBoxItems(List currentBoxItems) {
this.currentBoxItems = currentBoxItems;
}

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

@ -17,10 +17,10 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -95,7 +95,7 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
protected abstract UIComboBox[] filedComboBoxes();
public void checkBoxUse(boolean hasUse) {
for (Component component : fieldComponents()) {
for (Component component : filedComboBoxes()) {
component.setEnabled(hasUse);
}
}

8
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java

@ -9,8 +9,8 @@ import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.util.List;
import java.awt.BorderLayout;
/**
@ -49,6 +49,12 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
return list.toArray(new UIComboBox[list.size()]);
}
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
multiCategoryPane.checkEnable(hasUse);
}
@Override
public void refreshBoxListWithSelectTableData(List columnNameList) {
super.refreshBoxListWithSelectTableData(columnNameList);

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

@ -16,9 +16,9 @@ import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
/**
* Created by shine on 2019/6/18.
@ -90,6 +90,12 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
return result;
}
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
levelComboBoxPane.checkEnable(hasUse);
}
@Override
public void refreshBoxListWithSelectTableData(List columnNameList) {
super.refreshBoxListWithSelectTableData(columnNameList);

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

@ -13,11 +13,11 @@ import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Dimension;
/**
* Created by shine on 2019/5/21.
@ -53,6 +53,7 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
this.setLayout(new BorderLayout());
this.add(tableDataPane, BorderLayout.NORTH);
this.add(dataSetFieldsPane, BorderLayout.CENTER);
checkBoxUse();
}
/**

Loading…
Cancel
Save