Browse Source

Merge pull request #1656 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit 'e3364947d7b96beee2f5c3614f2e61f7eeb6ec0b':
  REPORT-6563 自适应表单,控件最小高度后 导致frm无法修改body的样式=>代码规范
  REPORT-6563 自适应表单,控件最小高度后导致frm无法修改body的样式
superman 7 years ago
parent
commit
5247c74af0
  1. 9
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

9
designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

@ -28,6 +28,9 @@ import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import javax.swing.JOptionPane;
/**
* @author jim
* @date 2014-6-23
@ -958,11 +961,13 @@ public class XWFitLayout extends XLayoutContainer {
public boolean canAddInterval(int interval) {
int val = interval/2;
for (int i=0, len=this.getComponentCount(); i<len; i++) {
Component comp = this.getComponent(i);
Rectangle rec = comp.getBounds();
XCreator comp = (XCreator) this.getComponent(i);
Rectangle rec = comp.getBounds();
Dimension d = new Dimension(this.getWidth(), this.getHeight());
Rectangle bound = dealBound(rec, d, val, 0);
if (bound.width < minWidth || bound.height< minHeight) {
String widgetName = comp.toData().getWidgetName();
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Engine_Invalid_Setting_Cause_Reach_Min_Widget_Size", widgetName));
return false;
}
}

Loading…
Cancel
Save