tbody.insertAfter( child.tr, lastChildRow.tr ); tbody.insertAfter( child.tr, tr ); else tbody.insertFirst( child.tr );
tbody.insertAfter( child.tr, lastChildRow.tr ); tbody.insertAfter( child.tr, tr ); else tbody.insertFirst( child.tr );
tbody.insertAfter( child.tr, lastChildRow.tr );
tbody.insertAfter( child.tr, lastChildRow.tr );
private void insertRowAt(VScrollTableRow row, int index) { row.setIndex(index); if (row.isSelected()) { row.addStyleName("v-selected"); } if (index > 0) { VScrollTableRow sibling = getRowByRowIndex(index - 1); tBodyElement.insertAfter(row.getElement(), sibling.getElement()); } else { VScrollTableRow sibling = getRowByRowIndex(index); tBodyElement.insertBefore(row.getElement(), sibling.getElement()); } adopt(row); int actualIx = index - firstRendered; renderedRows.add(actualIx, row); }
/** Hides state and status element and displays error one. */ void setFailed(String errorMessage) { state.getStyle().setDisplay(Style.Display.NONE); status.getStyle().setDisplay(Style.Display.NONE); error.getStyle().clearDisplay(); error.setInnerText("Failed"); animatedElements.remove(status); if (errorSection != null) { errorSection.removeFromParent(); } errorSection = installerFailedTemplate.cloneNode(true).cast(); // Find machine cells for (int i = 0; i < errorSection.getChildNodes().getLength(); i++) { Node n = errorSection.getChildNodes().getItem(i); if (Node.ELEMENT_NODE != n.getNodeType()) { continue; } Element e = n.cast(); switch (e.getId()) { case "installer-error": e.setInnerText(errorMessage); break; } } // Insert error row tableBody.insertAfter(errorSection, section); }