MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / paint

Method paint

src/main/java/javax/microedition/lcdui/TextField.java:257–277  ·  view source on GitHub ↗
(Graphics g)

Source from the content-addressed store, hash-verified

255 }
256
257 int paint(Graphics g) {
258 super.paintContent(g);
259
260 g.translate(0, super.getHeight());
261 int savedColor = g.getColor();
262 if (!hasFocus()) {
263 g.setGrayScale(127);
264 }
265 g.drawRect(
266 1, 1,
267 owner.getWidth() - 3, stringComponent.getHeight() + 4);
268 if (!hasFocus()) {
269 g.setColor(savedColor);
270 }
271 g.translate(3, 3);
272 paintContent(g);
273 g.translate(-3, -3);
274 g.translate(0, -super.getHeight());
275
276 return getHeight();
277 }
278
279 @Override
280 void paintContent(Graphics g) {

Callers

nothing calls this directly

Calls 10

paintContentMethod · 0.95
getHeightMethod · 0.95
hasFocusMethod · 0.80
setGrayScaleMethod · 0.80
getHeightMethod · 0.65
getColorMethod · 0.65
getWidthMethod · 0.65
translateMethod · 0.45
drawRectMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected