Browse Source

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

* commit 'fd55cb09234cc65fe1575e2efdb4fa39f91c75f6':
  CHART-10233 部分接口实现改动
persist/11.0
Bjorn 5 years ago
parent
commit
3f1a4963e0
  1. 25
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java
  2. 7
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  3. 17
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java
  4. 19
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractDataSetFieldsWithSeriesValuePane.java
  5. 3
      designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java
  6. 2
      designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java

25
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java

@ -13,9 +13,9 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.util.Arrays;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.util.Arrays;
/** /**
* Created by shine on 2019/5/16. * Created by shine on 2019/5/16.
@ -31,9 +31,21 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
this.add(createNorthPane(), BorderLayout.NORTH); JPanel north = createNorthPane(),
this.add(createCenterPane(), BorderLayout.CENTER); center = createCenterPane(),
this.add(createSouthPane(), BorderLayout.SOUTH); south = createSouthPane();
if (north != null) {
this.add(north, BorderLayout.NORTH);
}
if (center != null) {
this.add(center, BorderLayout.CENTER);
}
if (south != null) {
this.add(south, BorderLayout.SOUTH);
}
this.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 8)); this.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 8));
} }
@ -53,7 +65,6 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), formulaPanes[i]}; components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), formulaPanes[i]};
} }
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 124}; double[] columnSize = {ChartDataPane.LABEL_WIDTH, 124};
double[] rowSize = new double[len]; double[] rowSize = new double[len];
@ -64,11 +75,11 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
protected JPanel createNorthPane() { protected JPanel createNorthPane() {
return new JPanel(); return null;
} }
protected JPanel createSouthPane() { protected JPanel createSouthPane() {
return new JPanel(); return null;
} }
protected Component[] fieldComponents() { protected Component[] fieldComponents() {

7
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.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems; import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -36,7 +36,7 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
protected void initComponents() { protected void initComponents() {
this.setLayout(new BorderLayout(0, 4)); this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(2, 24, 0, 15)); this.setBorder(BorderFactory.createEmptyBorder(2, 24, 0, 15));
JPanel north = createNorthPane(), JPanel north = createNorthPane(),
@ -74,7 +74,6 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]}; components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
} }
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122}; double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len]; double[] rowSize = new double[len];

17
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java

@ -21,15 +21,26 @@ public abstract class AbstractCellDataFieldsWithSeriesValuePane<T extends Abstra
seriesValueFieldsPane = new CellDataSeriesValueCorrelationPane(); seriesValueFieldsPane = new CellDataSeriesValueCorrelationPane();
if (normalCenter != null) { if (normalCenter != null) {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout(0,6));
panel.add(normalCenter, BorderLayout.CENTER); panel.add(normalCenter, BorderLayout.NORTH);
panel.add(seriesValueFieldsPane, BorderLayout.SOUTH); panel.add(seriesValueFieldsPane, BorderLayout.CENTER);
return panel; return panel;
} else { } else {
return seriesValueFieldsPane; return seriesValueFieldsPane;
} }
} }
public CellDataSeriesValueCorrelationPane getSeriesValueFieldsPane() {
if (seriesValueFieldsPane == null) {
seriesValueFieldsPane = new CellDataSeriesValueCorrelationPane();
}
return seriesValueFieldsPane;
}
public void setSeriesValueFieldsPane(CellDataSeriesValueCorrelationPane seriesValueFieldsPane) {
this.seriesValueFieldsPane = seriesValueFieldsPane;
}
protected void populateSeriesValuePane(AbstractColumnFieldCollectionWithSeriesValue fieldCollectionWithSeriesValue) { protected void populateSeriesValuePane(AbstractColumnFieldCollectionWithSeriesValue fieldCollectionWithSeriesValue) {
seriesValueFieldsPane.populateBean(fieldCollectionWithSeriesValue.getSeriesValueCorrelationDefinition()); seriesValueFieldsPane.populateBean(fieldCollectionWithSeriesValue.getSeriesValueCorrelationDefinition());
} }

19
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractDataSetFieldsWithSeriesValuePane.java

@ -5,8 +5,8 @@ import com.fr.design.chartx.component.SeriesValueFieldComboBoxPane;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane; import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
/** /**
* Created by shine on 2019/5/16. * Created by shine on 2019/5/16.
@ -23,15 +23,26 @@ public abstract class AbstractDataSetFieldsWithSeriesValuePane<T extends Abstrac
seriesValueFieldComboBoxPane = new SeriesValueFieldComboBoxPane(); seriesValueFieldComboBoxPane = new SeriesValueFieldComboBoxPane();
if (normalCenter != null) { if (normalCenter != null) {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout(0,6));
panel.add(normalCenter, BorderLayout.CENTER); panel.add(normalCenter, BorderLayout.NORTH);
panel.add(seriesValueFieldComboBoxPane, BorderLayout.SOUTH); panel.add(seriesValueFieldComboBoxPane, BorderLayout.CENTER);
return panel; return panel;
} else { } else {
return seriesValueFieldComboBoxPane; return seriesValueFieldComboBoxPane;
} }
} }
public SeriesValueFieldComboBoxPane getSeriesValueFieldComboBoxPane() {
if (seriesValueFieldComboBoxPane == null) {
seriesValueFieldComboBoxPane = new SeriesValueFieldComboBoxPane();
}
return seriesValueFieldComboBoxPane;
}
public void setSeriesValueFieldComboBoxPane(SeriesValueFieldComboBoxPane seriesValueFieldComboBoxPane) {
this.seriesValueFieldComboBoxPane = seriesValueFieldComboBoxPane;
}
@Override @Override
public void checkBoxUse(boolean hasUse) { public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse); super.checkBoxUse(hasUse);

3
designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java

@ -7,7 +7,6 @@ import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.design.chartx.single.SingleDataPane; import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -58,7 +57,7 @@ public abstract class AbstractDataPane extends ChartDataPane {
if (collection == null) { if (collection == null) {
return; return;
} }
VanChart chart = collection.getSelectedChart(VanChart.class); AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
if (chart == null) { if (chart == null) {
return; return;
} }

2
designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -91,7 +91,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
* @param ePane 面板 * @param ePane 面板
*/ */
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) { public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
addChartEditPane(collection.getSelectedChart().getPlot().getPlotID()); addChartEditPane(collection.getSelectedChartProvider().getID());
setSupportCellData(true); setSupportCellData(true);
this.container.setEPane(ePane); this.container.setEPane(ePane);
chartEditPane.populate(collection); chartEditPane.populate(collection);

Loading…
Cancel
Save