List of usage examples for com.google.gwt.user.client.ui StackPanel getWidgetCount
public int getWidgetCount()
From source file:com.qualogy.qafe.gwt.client.component.QStack.java
License:Apache License
private int getIndexToInsertStack(StackPanel stackPanel) { int indexToInsert = getStackIndex(); if (stackPanel.getWidgetCount() <= 0) { indexToInsert = 0;//from w w w . j a v a 2s . com } else if (stackPanel.getWidgetCount() < indexToInsert) { indexToInsert = stackPanel.getWidgetCount(); } else { for (int i = 0; i < stackPanel.getWidgetCount(); i++) { if (stackPanel.getWidget(i) instanceof QStack) { QStack stack = (QStack) stackPanel.getWidget(i); if (stack.getStackIndex() > indexToInsert) { indexToInsert = i; break; } } } } return indexToInsert; }