()
| 322 | } |
| 323 | |
| 324 | public double calcMinWidth() { |
| 325 | // + 70px / 40px for some additional space to compensate padding, insets, borders etc. |
| 326 | double retWidth = TextUtil.computeTextWidth(getTopFont(), getTopTextField().getText(), 0.0D) + 70; |
| 327 | for (TextField centerTextField : getCenterTextFields()) { |
| 328 | double newWidth = TextUtil.computeTextWidth(centerTextField.getFont(), centerTextField.getText(), 0.0D) + 40; |
| 329 | if (newWidth > retWidth) { |
| 330 | retWidth = newWidth; |
| 331 | } |
| 332 | } |
| 333 | return restrictedWidth(retWidth); |
| 334 | } |
| 335 | |
| 336 | public double calcMinHeight() { |
| 337 | double newMinHeight = minHeightPer(getCenterLabels().size()); |
no test coverage detected