Browse Source

Merge branch 'feature/10.0' of ssh://cloud.finedevelop.com:7999/~zheng/C-design into feature/10.0

research/11.0
shine 5 years ago
parent
commit
dfaca0a21c
  1. 13
      designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java
  2. 8
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java
  3. 8
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPaneWithUISpinner.java
  4. 1
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiComboBoxPane.java
  5. 6
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  6. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java
  7. 8
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  8. 5
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

13
designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java

@ -43,6 +43,9 @@ import java.util.Map;
*/
public class CustomChartDataPane extends ChartDataPane {
private static final int HGAP = 0;
private static final int VGAP = 6;
public CustomChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@ -101,9 +104,11 @@ public class CustomChartDataPane extends ChartDataPane {
case POINTER_360:
return new SingleDataPane(new SeriesValueDataSetFieldsPane(), new SeriesValueCellDataFieldsPane());
default:
return StringUtils.equals(CustomStyle.CUSTOM.toString(), plot.getCustomType()) ?
new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane()) :
new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
if (StringUtils.equals(CustomStyle.CUSTOM.toString(), plot.getCustomType())){
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
} else {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
}
}
@ -155,7 +160,7 @@ public class CustomChartDataPane extends ChartDataPane {
JPanel tabPanel = new JPanel(new BorderLayout());
tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, getBackground()));
tabPanel.add(tabPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 6));
this.setLayout(new BorderLayout(HGAP, VGAP));
this.add(tabPanel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}

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