Browse Source

REPORT-28922 正如zack所说,列数较少的情况没有测试过

bugfix/10.0
Bryant 5 years ago
parent
commit
cd3447b80e
  1. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
  2. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

4
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"));

3
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<EmbeddedTableData> {
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<EmbeddedTableDa
// 行号显示,每次dateJTable的表结构发生变化时都要调用
TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0);
tableColumn.setCellRenderer(new CellRenderer());
tableColumn.setMaxWidth(dataJTable.getColumnCount());
tableColumn.setMaxWidth(Math.max(dataJTable.getColumnCount(), MIN_CELL_WIDTH));
}
private class DoubleRenderer extends DefaultTableCellRenderer {

Loading…
Cancel
Save