MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / drawItem

Method drawItem

src/main/java/ui/controls/form/LinkString.java:49–62  ·  view source on GitHub ↗
(Graphics g, int ofs, boolean sel)

Source from the content-addressed store, hash-verified

47 }
48
49 public void drawItem(Graphics g, int ofs, boolean sel) {
50 int fontHeight = getFont().getHeight();
51
52 int oldColor = g.getColor();
53
54 int stringWidth = getFont().stringWidth(toString());
55
56 g.setColor(getColor());
57 g.drawLine(4, fontYOfs + fontHeight + 1, stringWidth + 4, fontYOfs + fontHeight + 1);
58
59 g.setColor(oldColor);
60
61 super.drawItem(g, ofs, sel);
62 }
63
64 public int getVHeight() {
65 return Math.max(super.getVHeight(), getFont().getHeight() + 3);

Callers

nothing calls this directly

Calls 9

getColorMethod · 0.95
getHeightMethod · 0.65
getFontMethod · 0.65
getColorMethod · 0.65
stringWidthMethod · 0.65
drawItemMethod · 0.65
toStringMethod · 0.45
setColorMethod · 0.45
drawLineMethod · 0.45

Tested by

no test coverage detected