Browse Source

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

* commit 'cc158cbc19605df04d29f5ac47705477507ca67d':
  REPORT-6979 代码规范
  REPORT-6979 设计器— 表单—报表块— 手机显示限制高度的最大高度可以输入超过0.8以上的值
superman 7 years ago
parent
commit
9a860e317c
  1. 14
      designer_form/src/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

14
designer_form/src/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

@ -28,6 +28,7 @@ import java.awt.*;
* Created by fanglei on 2017/8/8. * Created by fanglei on 2017/8/8.
*/ */
public class ElementCaseDefinePane extends MobileWidgetDefinePane{ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
private static final double MAX_HEIGHT_LIMIT = 0.8;
private static final Item[] ITEMS = { private static final Item[] ITEMS = {
new Item(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL), new Item(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL),
new Item(MobileFitAttrState.VERTICAL.description(), MobileFitAttrState.VERTICAL), new Item(MobileFitAttrState.VERTICAL.description(), MobileFitAttrState.VERTICAL),
@ -56,7 +57,18 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
this.vComboBox = new UIComboBox(ITEMS); this.vComboBox = new UIComboBox(ITEMS);
this.heightRestrictCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Mobile-Height-Limit")); this.heightRestrictCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Mobile-Height-Limit"));
this.maxHeightLabel = new UILabel(Inter.getLocText("FR-Designer_Mobile-Height-Percent"), SwingConstants.LEFT); this.maxHeightLabel = new UILabel(Inter.getLocText("FR-Designer_Mobile-Height-Percent"), SwingConstants.LEFT);
this.maxHeightSpinner = new UISpinner(0, 1, 0.01, 0.75); this.maxHeightSpinner = new UISpinner(0, MAX_HEIGHT_LIMIT, 0.01, 0.75) {
public void setValue(double value) {
if (value > MAX_HEIGHT_LIMIT) {
//弹窗提示
JOptionPane.showMessageDialog(null,
Inter.getLocText("FR-Designer_Mobile-Warning"),
Inter.getLocText("FR-Designer_Tooltips"),
JOptionPane.PLAIN_MESSAGE);
}
super.setValue(value);
}
};
maxHeightSpinner.setVisible(false); maxHeightSpinner.setVisible(false);
maxHeightLabel.setVisible(false); maxHeightLabel.setVisible(false);

Loading…
Cancel
Save