Browse Source

REPORT-2561 大屏-数字时钟插件,属性表左移

master
plough 8 years ago
parent
commit
5dda04e93b
  1. 17
      designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

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

@ -26,12 +26,13 @@ import com.fr.general.ComparatorUtils;
public class WidgetPropertyTable extends AbstractPropertyTable { public class WidgetPropertyTable extends AbstractPropertyTable {
private FormDesigner designer; private FormDesigner designer;
private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度
public WidgetPropertyTable(FormDesigner designer) { public WidgetPropertyTable(FormDesigner designer) {
super(); super();
setDesigner(designer); setDesigner(designer);
} }
public static ArrayList<PropertyGroup> getCreatorPropertyGroup(FormDesigner designer, XCreator source) { public static ArrayList<PropertyGroup> getCreatorPropertyGroup(FormDesigner designer, XCreator source) {
ArrayList<PropertyGroup> groups = new ArrayList<PropertyGroup>(); ArrayList<PropertyGroup> groups = new ArrayList<PropertyGroup>();
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, source); ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, source);
@ -86,10 +87,12 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
setModel(model); setModel(model);
this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
TableColumn tc = this.getColumn(this.getColumnName(0)); TableColumn tc = this.getColumn(this.getColumnName(0));
tc.setPreferredWidth(30); tc.setPreferredWidth(LEFT_COLUMN_WIDTH);
tc.setMinWidth(LEFT_COLUMN_WIDTH);
tc.setMaxWidth(LEFT_COLUMN_WIDTH);
this.repaint(); this.repaint();
} }
private void setDesigner(FormDesigner designer) { private void setDesigner(FormDesigner designer) {
this.designer = designer; this.designer = designer;
} }
@ -97,8 +100,8 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
/** /**
* 单元格tooltip * 单元格tooltip
* 属性名悬浮提示 * 属性名悬浮提示
* *
* @param 鼠标点击事件 * @param 鼠标点击事件
* @return 单元格tooltip * @return 单元格tooltip
*/ */
@ -110,11 +113,11 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
} }
return null; return null;
} }
/** /**
* 待说明 * 待说明
*/ */
public void firePropertyEdit() { public void firePropertyEdit() {
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
} }
} }

Loading…
Cancel
Save