Browse Source

CHART-11446 未选择数据集灰化了combox

research/11.0
白岳 5 years ago
parent
commit
b16381acf9
  1. 10
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPane.java
  2. 10
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPaneWithUISpinner.java
  3. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java
  4. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  5. 5
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

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

@ -14,10 +14,16 @@ import java.util.List;
public class MultiComboBoxPane extends AbstractMultiComponentPane<UIComboBox> { public class MultiComboBoxPane extends AbstractMultiComponentPane<UIComboBox> {
private List currentBoxItems = new ArrayList(); private List currentBoxItems = new ArrayList();
private boolean hasUse = false;
public void setCurrentBoxItems(List currentBoxItems) { public void setCurrentBoxItems(List currentBoxItems) {
this.currentBoxItems = currentBoxItems; this.currentBoxItems = currentBoxItems;
} }
public void setHasUse(boolean hasUse) {
this.hasUse = hasUse;
}
@Override @Override
protected UIComboBox createFirstFieldComponent() { protected UIComboBox createFirstFieldComponent() {
return new UIComboBoxWithNone(); return new UIComboBoxWithNone();
@ -25,7 +31,9 @@ public class MultiComboBoxPane extends AbstractMultiComponentPane<UIComboBox> {
@Override @Override
protected UIComboBox createOtherFieldComponent() { protected UIComboBox createOtherFieldComponent() {
return new UIComboBox(currentBoxItems.toArray(new Object[currentBoxItems.size()])); UIComboBox uiComboBox = new UIComboBox(currentBoxItems.toArray(new Object[currentBoxItems.size()]));
uiComboBox.setEnabled(hasUse);
return uiComboBox;
} }
@Override @Override

10
designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPaneWithUISpinner.java

@ -13,6 +13,8 @@ import java.util.List;
public class MultiComboBoxPaneWithUISpinner extends AbstractMultiComponentPaneWithUISpinner<UIComboBox> { public class MultiComboBoxPaneWithUISpinner extends AbstractMultiComponentPaneWithUISpinner<UIComboBox> {
private List currentBoxList = new ArrayList(); private List currentBoxList = new ArrayList();
private boolean hasUse = false;
@Override @Override
protected void initComps() { protected void initComps() {
currentBoxList = new ArrayList(); currentBoxList = new ArrayList();
@ -23,9 +25,15 @@ public class MultiComboBoxPaneWithUISpinner extends AbstractMultiComponentPaneWi
this.currentBoxList = currentBoxList; this.currentBoxList = currentBoxList;
} }
public void setHasUse(boolean hasUse) {
this.hasUse = hasUse;
}
@Override @Override
protected UIComboBox createJComponent() { protected UIComboBox createJComponent() {
return new UIComboBox(currentBoxList.toArray(new Object[currentBoxList.size()])); UIComboBox uiComboBox = new UIComboBox(currentBoxList.toArray(new Object[currentBoxList.size()]));
uiComboBox.setEnabled(hasUse);
return uiComboBox;
} }
@Override @Override

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.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
/** /**
@ -49,6 +49,12 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
return list.toArray(new UIComboBox[list.size()]); return list.toArray(new UIComboBox[list.size()]);
} }
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
multiCategoryPane.setHasUse(hasUse);
}
@Override @Override
public void refreshBoxListWithSelectTableData(List columnNameList) { public void refreshBoxListWithSelectTableData(List columnNameList) {
super.refreshBoxListWithSelectTableData(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.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.util.List;
/** /**
* Created by shine on 2019/6/18. * Created by shine on 2019/6/18.
@ -90,6 +90,12 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
return result; return result;
} }
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
levelComboBoxPane.setHasUse(hasUse);
}
@Override @Override
public void refreshBoxListWithSelectTableData(List columnNameList) { public void refreshBoxListWithSelectTableData(List columnNameList) {
super.refreshBoxListWithSelectTableData(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.design.utils.gui.UIComponentUtils;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
import java.awt.Dimension;
/** /**
* Created by shine on 2019/5/21. * Created by shine on 2019/5/21.
@ -53,6 +53,7 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(tableDataPane, BorderLayout.NORTH); this.add(tableDataPane, BorderLayout.NORTH);
this.add(dataSetFieldsPane, BorderLayout.CENTER); this.add(dataSetFieldsPane, BorderLayout.CENTER);
checkBoxUse();
} }
/** /**

Loading…
Cancel
Save