MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getStringWidth

Method getStringWidth

CodenameOne/src/com/codename1/ui/Label.java:1428–1437  ·  view source on GitHub ↗
(Font fnt)

Source from the content-addressed store, hash-verified

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 ///

Callers 11

paintImplMethod · 0.95
animateMethod · 0.95
calculateLabelSpanMethod · 0.45
drawComponentMethod · 0.45
drawLabelStringMethod · 0.45
drawLabelTextMethod · 0.45
invoke6Method · 0.45
invoke0Method · 0.45
invoke1Method · 0.45

Calls 1

stringWidthMethod · 0.45

Tested by

no test coverage detected