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

Method drawItem

src/main/java/io/file/transfer/TransferTask.java:159–175  ·  view source on GitHub ↗
(Graphics g, int ofs, boolean sel)

Source from the content-addressed store, hash-verified

157 }
158
159 public void drawItem(Graphics g, int ofs, boolean sel) {
160 int xpgs = (g.getClipWidth() / 3) * 2;
161 int pgsz = g.getClipWidth() - xpgs - 4;
162 int filled = (fileSize == 0) ? 0 : (pgsz * filePos) / fileSize;
163
164 int oldColor = g.getColor();
165 g.setColor(0xffffff);
166
167 g.fillRect(xpgs, 3, pgsz, getVHeight() - 6);
168 g.setColor(0x668866);
169 g.drawRect(xpgs, 3, pgsz, getVHeight() - 6);
170 g.fillRect(xpgs, 3, filled, getVHeight() - 6);
171 g.setColor(oldColor);
172
173 super.drawItem(g, ofs, sel);
174 showEvent = false;
175 }
176
177 public String toString() {
178 return fileName;

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected