(Graphics g)
| 876 | } |
| 877 | |
| 878 | void paintImpl(Graphics g) { |
| 879 | initAutoResize(); |
| 880 | Object icn = null; |
| 881 | Image i = getIconFromState(); |
| 882 | if (i != null) { |
| 883 | icn = i.getImage(); |
| 884 | } else { |
| 885 | // optimize away a common usage pattern for drawing the background only |
| 886 | if (text == null || "".equals(text) || " ".equals(text)) { |
| 887 | return; |
| 888 | } |
| 889 | } |
| 890 | //getUIManager().getLookAndFeel().drawLabel(g, this); |
| 891 | int cmpX = getX() + g.getTranslateX(); |
| 892 | int cmpY = getY() + g.getTranslateY(); |
| 893 | int cmpHeight = getHeight(); |
| 894 | int cmpWidth = getWidth(); |
| 895 | Style s = getStyle(); |
| 896 | Font f = s.getFont(); |
| 897 | String t = text; |
| 898 | if (text == null) { |
| 899 | t = ""; |
| 900 | } |
| 901 | Display.impl.drawLabelComponent(g.getGraphics(), cmpX, cmpY, cmpHeight, cmpWidth, s, t, |
| 902 | icn, null, 0, gap, isRTL(), false, textPosition, getStringWidth(f), tickerRunning, shiftText, |
| 903 | endsWith3Points, valign); |
| 904 | } |
| 905 | |
| 906 | /// Allows us to limit the maximum size for the autosize mode |
| 907 | /// |
no test coverage detected