Browse Source

Pull request #1864: REPORT-35692 国际化-页面设置-单位改为INCH,显示不全

Merge in DESIGN/design from ~HENRY.WANG/design:release/10.0 to release/10.0

* commit '8eda3e745d6421b3101164517b30ba2309ebd914':
  REPORT-35692 国际化-页面设置-单位改为INCH,显示不全 方法替换
  REPORT-35692 国际化-页面设置-单位改为INCH,显示不全 撤销一些代码
  REPORT-35692 国际化-页面设置-单位改为INCH,显示不全 调整格式
  REPORT-35692 国际化-页面设置-单位改为INCH,显示不全
  REPORT-35699 国际化修改对报表下拉框产生影响 添加import
  REPORT-35699 国际化修改对报表下拉框产生影响
feature/big-screen
Henry.Wang 4 years ago
parent
commit
66eabbbf84
  1. 7
      designer-realize/src/main/java/com/fr/design/report/UnitFieldPane.java

7
designer-realize/src/main/java/com/fr/design/report/UnitFieldPane.java

@ -8,6 +8,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.unit.CM; import com.fr.stable.unit.CM;
import com.fr.stable.unit.INCH; import com.fr.stable.unit.INCH;
@ -52,9 +53,9 @@ public class UnitFieldPane extends JPanel {
this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unit_MM")); this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unit_MM"));
} }
//ajust the heigt of unitLabel. //自适应label宽度
Dimension unitDimension = new Dimension(this.getPreferredSize().width, int width = GraphDrawHelper.getWidth(this.getText(), this.getFont());
preferredHeight); Dimension unitDimension = new Dimension(width, preferredHeight);
this.setMinimumSize(unitDimension); this.setMinimumSize(unitDimension);
this.setMinimumSize(unitDimension); this.setMinimumSize(unitDimension);
this.setSize(unitDimension); this.setSize(unitDimension);

Loading…
Cancel
Save