Browse Source

Merge pull request #473 in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit '2804a4584d86190a20a442f2621859b25bc9357c':
  修改数据面板
final/10.0
Qinghui.Liu 6 years ago
parent
commit
cf2516a609
  1. 15
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java
  2. 10
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java

15
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java

@ -7,13 +7,12 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import java.awt.Component;
import java.awt.FlowLayout;
import java.util.Arrays;
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;
/** /**
* Created by shine on 2018/3/7. * Created by shine on 2018/3/7.
@ -44,9 +43,13 @@ public abstract class AbstractExtendedChartReportDataPane<T extends AbstractData
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6);
panel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 15)); panel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 15));
this.setLayout(new FlowLayout());
this.add(panel);
this.add(addOtherPane());
}
this.setLayout(new BorderLayout()); protected JPanel addOtherPane() {
this.add(panel, BorderLayout.CENTER); return new JPanel();
} }
protected Component[] fieldComponents() { protected Component[] fieldComponents() {

10
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java

@ -10,14 +10,14 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
/** /**
* Created by shine on 2018/3/2. * Created by shine on 2018/3/2.
@ -51,11 +51,13 @@ public abstract class AbstractExtendedChartTableDataPane<T extends AbstractDataC
} }
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p, p}; double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = new double[len + (hasFunction() ? 1 : 0)]; double[] rowSize = new double[len + (hasFunction() ? 1 : 0)];
Arrays.fill(rowSize, p); Arrays.fill(rowSize, p);
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
panel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);

Loading…
Cancel
Save