public ActionCallback removeTabAt( final int componentIndex, int indexToSelect, boolean transferFocus) { TabInfo toSelect = indexToSelect >= 0 && indexToSelect < myTabs.getTabCount() ? myTabs.getTabAt(indexToSelect) : null; final TabInfo info = myTabs.getTabAt(componentIndex); // removing hidden tab happens on end of drag-out, we've already selected the correct tab for // this case in dragOutStarted if (info.isHidden()) { toSelect = null; } final ActionCallback callback = myTabs.removeTab(info, toSelect, transferFocus); return myProject.isOpen() ? callback : new ActionCallback.Done(); }
public Component getComponentAt(final int i) { final TabInfo tab = myTabs.getTabAt(i); return tab.getComponent(); }
public void setBackgroundColorAt(final int index, final Color color) { myTabs.getTabAt(index).setTabColor(color); }
public void setToolTipTextAt(final int index, final String text) { myTabs.getTabAt(index).setTooltipText(text); }
public void setTitleAt(final int index, final String text) { myTabs.getTabAt(index).setText(text); }
public void setIconAt(final int index, final Icon icon) { myTabs.getTabAt(index).setIcon(icon); }
public void setWaveColor(final int index, @Nullable final Color color) { final TabInfo tab = myTabs.getTabAt(index); tab.setDefaultStyle( color == null ? SimpleTextAttributes.STYLE_PLAIN : SimpleTextAttributes.STYLE_WAVED); tab.setDefaultWaveColor(color); }
public void setForegroundAt(final int index, final Color color) { myTabs.getTabAt(index).setDefaultForeground(color); }
public ActionCallback setSelectedIndex(final int indexToSelect, boolean focusEditor) { return myTabs.select(myTabs.getTabAt(indexToSelect), focusEditor); }