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

Method drawItem

src/main/java/Colors/ColorVisualItem.java:63–78  ·  view source on GitHub ↗
(Graphics g, int ofs, boolean sel)

Source from the content-addressed store, hash-verified

61 public String toString() { return (locale==null)?name:locale; }
62
63 public void drawItem(Graphics g, int ofs, boolean sel) {
64 int width=g.getClipWidth();
65 int height=super.getVHeight();
66
67 int oldColor=g.getColor();
68
69 g.setColor(color);
70 g.fillRect(1, 1, height-2, height-2);
71
72 g.setColor(oldColor);
73
74 g.translate(height,0);
75 super.drawItem(g, ofs, sel);
76 g.translate(-height,0);
77
78 }
79
80 //public void setLocale(String locale){ this.locale=locale; }
81

Callers

nothing calls this directly

Calls 7

getVHeightMethod · 0.65
getColorMethod · 0.65
drawItemMethod · 0.65
getClipWidthMethod · 0.45
setColorMethod · 0.45
fillRectMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected