From cd3447b80ee31e1c99e6e61621f53eb3f9d4d175 Mon Sep 17 00:00:00 2001 From: Bryant Date: Sun, 26 Apr 2020 15:44:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-28922=20=E6=AD=A3=E5=A6=82zack=E6=89=80?= =?UTF-8?q?=E8=AF=B4=EF=BC=8C=E5=88=97=E6=95=B0=E8=BE=83=E5=B0=91=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E6=B2=A1=E6=9C=89=E6=B5=8B=E8=AF=95=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java | 4 ++-- .../data/tabledata/tabledatapane/EmbeddedTableDataPane.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java index 6a3b707ab0..ba5d42bd88 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java @@ -25,7 +25,7 @@ import java.util.Date; public class EmbeddedTableDataDefinedPane extends BasicPane{ - + private static final int MIN_CELL_WIDTH = 30; private EmbeddedTableData tableData; private JTable dataJTable; private UIButton add; @@ -64,7 +64,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{ // 行号显示 TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0); tableColumn.setCellRenderer(new CellRenderer()); - tableColumn.setMaxWidth(dataJTable.getColumnCount()); + tableColumn.setMaxWidth(Math.max(dataJTable.getColumnCount(), MIN_CELL_WIDTH)); // 控制按钮 add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add")); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java index afefe7264a..8b47b222d6 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java @@ -34,6 +34,7 @@ import java.util.Date; public class EmbeddedTableDataPane extends AbstractTableDataPane { + private static final int MIN_CELL_WIDTH = 30; private JTable dataJTable ; private JScrollPane scrollPane; private UILabel coordinatelabel; @@ -220,7 +221,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane