|
|
@ -52,9 +52,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 = this.getFontMetrics(this.getFont()).stringWidth(this.getText()); |
|
|
|
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); |
|
|
@ -62,7 +62,8 @@ public class UnitFieldPane extends JPanel { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UnitFieldPane(int unitType) { |
|
|
|
public |
|
|
|
|
|
|
|
UnitFieldPane(int unitType) { |
|
|
|
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); |
|
|
|
|
|
|
|
|
|
|
|
this.unitType = unitType; |
|
|
|
this.unitType = unitType; |
|
|
|