Browse Source

Merge pull request #925 in BA/design from ~PLOUGH/design:dev to dev

* commit 'd70e9db8be9647ffe3fec3266d6ae11191017963':
  REPORT-2561 大屏-数字时钟插件,属性表左移,调整
master
superman 8 years ago
parent
commit
5deeddb813
  1. 7
      designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

7
designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

@ -27,6 +27,7 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
private FormDesigner designer; private FormDesigner designer;
private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度 private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度
private static final int RIGHT_COLUMN_WIDTH = 138; // "属性值"列的宽度
public WidgetPropertyTable(FormDesigner designer) { public WidgetPropertyTable(FormDesigner designer) {
super(); super();
@ -85,11 +86,13 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
} }
TableModel model = new BeanTableModel(); TableModel model = new BeanTableModel();
setModel(model); setModel(model);
this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
TableColumn tc = this.getColumn(this.getColumnName(0)); TableColumn tc = this.getColumn(this.getColumnName(0));
tc.setPreferredWidth(LEFT_COLUMN_WIDTH);
tc.setMinWidth(LEFT_COLUMN_WIDTH); tc.setMinWidth(LEFT_COLUMN_WIDTH);
tc.setMaxWidth(LEFT_COLUMN_WIDTH); tc.setMaxWidth(LEFT_COLUMN_WIDTH);
TableColumn tcRight = this.getColumn(this.getColumnName(1));
tcRight.setMinWidth(RIGHT_COLUMN_WIDTH);
tcRight.setMaxWidth(RIGHT_COLUMN_WIDTH);
this.repaint(); this.repaint();
} }

Loading…
Cancel
Save