List of usage examples for com.google.gwt.user.client.ui InsertPanel insert
void insert(Widget w, int beforeIndex);
From source file:org.jbpm.form.builder.ng.model.client.form.LayoutFormItem.java
License:Apache License
public FBFormItem insert(int index, FBFormItem newItem) { FBFormItem item = null;//from w ww . ja va2 s . c om if (index == items.size()) { item = newItem; add(item); } else { if (items.get(index) == null || isWhiteSpace(items.get(index))) { item = items.set(index, newItem); } else { item = newItem; for (; index < items.size(); index++) { item = items.set(index, item); } items.add(item); } HasWidgets panel = getPanel(); if (panel instanceof InsertPanel) { InsertPanel iPanel = (InsertPanel) panel; iPanel.insert(newItem, index); } } return item; }