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

Method updateLayout

src/main/java/ui/VirtualList.java:314–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312
313
314 protected synchronized int updateLayout() {
315 int size = getItemCount();
316 if (size == 0) {
317 listHeight = 0;
318 return 0;
319 }
320 int layout[]=new int[size+1];
321 int y=0;
322 for (int index = 0; index < size; index++) {
323 VirtualElement item = getItemRef(index);
324 if (item != null) {
325 y += item.getVHeight();
326 layout[index + 1] = y;
327 }
328 }
329 listHeight=y;
330 itemLayoutY=layout;
331 return itemLayoutY.length;
332 }
333
334 protected int getElementIndexAt(int yPos) {
335 int end = getItemCount() - 1;

Callers 4

eventOkMethod · 0.95
paintMethod · 0.95
pageLeftMethod · 0.95
pageRightMethod · 0.95

Calls 3

getItemCountMethod · 0.95
getItemRefMethod · 0.95
getVHeightMethod · 0.95

Tested by

no test coverage detected