Browse Source

Pull request #14867: REPORT-134295 fix: 【FBP】扩展图表数据面板布局适配

Merge in DESIGN/design from ~ZHANYING/design:fbp/release to fbp/release

* commit 'f36cf8c00faa4c312b9960bac6e9a36b15d7d897':
  REPORT-134295 fix: 【FBP】扩展图表数据面板布局适配
fbp/merge
Zhanying-占盈 3 months ago
parent
commit
6d76550b89
  1. 12
      designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java
  2. 2
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  3. 1
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  4. 1
      designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java

12
designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java

@ -1,15 +1,13 @@
package com.fr.design.chartx.data;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.util.Arrays;
/**
* @author shine
@ -46,13 +44,7 @@ public class DataLayoutHelper {
}
public static JPanel createDataLayoutPane(Component[][] components) {
int len = components.length;
double p = TableLayout.PREFERRED;
double[] columnSize = {DataLayoutHelper.LABEL_WIDTH, DataLayoutHelper.WIDTH};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[] {1.2, 3});
}
public static JPanel createDataLayoutPane(String label, Component component) {

2
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -2,7 +2,6 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
@ -24,7 +23,6 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
this.setLayout(new BorderLayout());
this.add(cellDataFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
}
@Override

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

@ -48,7 +48,6 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
this.add(dataSetFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
checkBoxUse();
}

1
designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java

@ -46,7 +46,6 @@ public class SingleDataPane extends BasicBeanPane<AbstractDataDefinition> {
protected void initLayout() {
this.setLayout(new BorderLayout(0, 6));
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb);
DataLayoutHelper.addNormalBorder(northPane);
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);

Loading…
Cancel
Save