(Font fnt)
| 1426 | /// |
| 1427 | /// the string width |
| 1428 | public int getStringWidth(Font fnt) { |
| 1429 | if (isUnselectedStyle) { |
| 1430 | // very optimized way to get the string width of a label for the common unselected case in larger lists |
| 1431 | if (stringWidthUnselected < 0) { |
| 1432 | stringWidthUnselected = fnt.stringWidth(text); |
| 1433 | } |
| 1434 | return stringWidthUnselected; |
| 1435 | } |
| 1436 | return fnt.stringWidth(text); |
| 1437 | } |
| 1438 | |
| 1439 | /// Fallback to the old default look and feel renderer for cases where compatibility is essential |
| 1440 | /// |
no test coverage detected