List of usage examples for com.google.gwt.user.client.ui DeckPanel getWidget
public Widget getWidget(int index)
From source file:rocket.widget.client.tabpanel.TabPanel.java
License:Apache License
public void remove(final int index) { // removing the currently selectedTab and pick another. if (index == this.getSelectedIndex()) { final int widgetCount = this.getCount(); if (widgetCount > 1) { int newSelected = index + 1; if (newSelected == widgetCount) { newSelected = index - 1; }//w w w .j a v a 2s. c o m this.select(newSelected); } } final TabBarPanel tabPanel = this.getTabBarPanel(); tabPanel.remove(tabPanel.getWidget(index + 1)); final DeckPanel contentPanel = this.getContentPanel(); contentPanel.remove(contentPanel.getWidget(index)); final TabItem item = (TabItem) this.getItems().remove(index); item.clearTabPanel(); }