Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel.insert()

The following are Jave code examples for showing how to use insert() of the com.google.gwt.user.client.ui.VerticalPanel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: appinventor-extensions   File: OrderedPaletteHelper.java   View Source Code Vote up 5 votes
@Override
public final void addPaletteItem(VerticalPanel panel, SimplePaletteItem component) {
  int index = Collections.binarySearch(componentsAddedSoFar, component, componentsComparator);
  int insertionPos = - index - 1;
  componentsAddedSoFar.add(insertionPos, component);
  panel.insert(component, insertionPos);
}