List of usage examples for com.google.gwt.user.client.ui DeckPanel remove
@Override public boolean remove(Widget w)
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; }/* www . j a v a 2 s .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(); }