Browse Source

消除魔术数

master
fanglei 8 years ago
parent
commit
b8155e3ca3
  1. 3
      designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java

3
designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java

@ -26,7 +26,8 @@ public class FormMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
jPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); jPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
this.mobileToolBarPane = new MobileToolBarPane(); this.mobileToolBarPane = new MobileToolBarPane();
//设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中
jPanel.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + 10)); final int paddingHeight = 10;
jPanel.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + paddingHeight));
jPanel.add("North", mobileToolBarPane); jPanel.add("North", mobileToolBarPane);
this.add(jPanel); this.add(jPanel);
} }

Loading…
Cancel
Save