Browse Source

REPORT-35692 国际化-页面设置-单位改为INCH,显示不全 方法替换

feature/big-screen
Henry.Wang 4 years ago
parent
commit
8eda3e745d
  1. 3
      designer-realize/src/main/java/com/fr/design/report/UnitFieldPane.java

3
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.layout.FRGUIPaneFactory;
import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.OperatingSystem;
import com.fr.stable.unit.CM;
import com.fr.stable.unit.INCH;
@ -53,7 +54,7 @@ public class UnitFieldPane extends JPanel {
}
//自适应label宽度
int width = this.getFontMetrics(this.getFont()).stringWidth(this.getText());
int width = GraphDrawHelper.getWidth(this.getText(), this.getFont());
Dimension unitDimension = new Dimension(width, preferredHeight);
this.setMinimumSize(unitDimension);
this.setMinimumSize(unitDimension);

Loading…
Cancel
Save