609 |
* LineMetrics, not a FontMetrics argument. But fixing this that |
* LineMetrics, not a FontMetrics argument. But fixing this that |
610 |
* would change the public API. |
* would change the public API. |
611 |
*/ |
*/ |
612 |
SwingUtilities.layoutCompoundLabel( |
SwingUtilities.layoutCompoundLabel( |
613 |
b, // for the component orientation |
b, // for the component orientation |
614 |
b.getToolkit().getFontMetrics(b.getFont()), // see comment above |
b.getToolkit().getFontMetrics(b.getFont()), // see comment above |
615 |
b.getText(), |
b.getText(), |
630 |
*/ |
*/ |
631 |
|
|
632 |
contentRect = textRect.union(iconRect); |
contentRect = textRect.union(iconRect); |
633 |
|
|
634 |
return new Dimension(insets.left |
return new Dimension(insets.left |
635 |
+ contentRect.width |
+ contentRect.width |
636 |
+ insets.right, |
+ insets.right + b.getHorizontalAlignment(), |
637 |
insets.top |
insets.top |
638 |
+ contentRect.height |
+ contentRect.height |
639 |
+ insets.bottom); |
+ insets.bottom); |