コード例 #1
0
 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();
 }
コード例 #2
0
 public Component getComponentAt(final int i) {
   final TabInfo tab = myTabs.getTabAt(i);
   return tab.getComponent();
 }
コード例 #3
0
 public void setBackgroundColorAt(final int index, final Color color) {
   myTabs.getTabAt(index).setTabColor(color);
 }
コード例 #4
0
 public void setToolTipTextAt(final int index, final String text) {
   myTabs.getTabAt(index).setTooltipText(text);
 }
コード例 #5
0
 public void setTitleAt(final int index, final String text) {
   myTabs.getTabAt(index).setText(text);
 }
コード例 #6
0
 public void setIconAt(final int index, final Icon icon) {
   myTabs.getTabAt(index).setIcon(icon);
 }
コード例 #7
0
 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);
 }
コード例 #8
0
 public void setForegroundAt(final int index, final Color color) {
   myTabs.getTabAt(index).setDefaultForeground(color);
 }
コード例 #9
0
 public ActionCallback setSelectedIndex(final int indexToSelect, boolean focusEditor) {
   return myTabs.select(myTabs.getTabAt(indexToSelect), focusEditor);
 }