Browse Source

Merge pull request #1328 in BA/design from ~YAOH.WU/a_design_0811:release/9.0 to release/9.0

* commit '22b5160845451e30ac1ca5145914df7745128cff':
  REPORT-4944 图表属性设置接口适配导致的面板大小问题
master
superman 7 years ago
parent
commit
70be5ae125
  1. 7
      designer/src/com/fr/quickeditor/CellQuickEditor.java

7
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -66,10 +66,10 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, f};
JComponent centerBody = createCenterBody();
JPanel topContent = initTopContent();
if (isScrollAll()) {
double[] scrollAllRowSize = {p, p};
prepareScrollBar();
topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 0, this.getBackground()));
centerBody.setBorder(BorderFactory.createMatteBorder(0, 10, 0, 0, this.getBackground()));
@ -77,7 +77,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
new Component[]{topContent, null},
new Component[]{centerBody, null}
};
leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, scrollAllRowSize, columnSize, HGAP, VGAP);
this.setLayout(new CellElementBarLayout(leftContentPane) {
@Override
public void layoutContainer(Container parent) {
@ -104,6 +104,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
this.add(scrollBar);
this.add(leftContentPane);
} else {
double[] scrollContentRowSize = {p, f};
topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 10, this.getBackground()));
centerBody.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground()));
Component[][] components = new Component[][]{
@ -111,7 +112,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
new Component[]{centerBody, null}
};
this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER);
this.add(TableLayoutHelper.createGapTableLayoutPane(components, scrollContentRowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER);
}
}

Loading…
Cancel
Save