From 22b5160845451e30ac1ca5145914df7745128cff Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 10 Oct 2017 10:22:46 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4944=20=E5=9B=BE=E8=A1=A8=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E9=9D=A2=E6=9D=BF=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/quickeditor/CellQuickEditor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 43b291c97..c218d9397 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -66,10 +66,10 @@ public abstract class CellQuickEditor extends QuickEditor { 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 { 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 { 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 { 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); } }