javax.swing.JTabbedPane.removeTabAt()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中javax.swing.JTabbedPane.removeTabAt()方法的一些代码示例,展示了JTabbedPane.removeTabAt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.removeTabAt()方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:removeTabAt

JTabbedPane.removeTabAt介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

public void remove() {
    if (hasNext()) self.removeTabAt(index--);
  }
};

代码示例来源:origin: stackoverflow.com

Component comp = getComponentAt(draggedTabIndex);
String title = getTitleAt(draggedTabIndex);
removeTabAt(draggedTabIndex);
insertTab(title, null, comp, null, tabNumber);

代码示例来源:origin: antlr/antlrworks

private void closeTab(int index) {
  if(index < CLOSING_INDEX_LIMIT)
    return;
  tabs.remove(index-CLOSING_INDEX_LIMIT);
  bottomTab.removeTabAt(index);
}

代码示例来源:origin: monster860/FastDMM

public void closeTab(DMM map) {
  synchronized(this) {
    int idx = loadedMaps.indexOf(map);
    loadedMaps.remove(idx);
    dmm = null;
    editorTabs.removeTabAt(idx);
  }
}

代码示例来源:origin: com.gitlab.cdc-java.ui/cdc-ui-swing

@Override
public void actionPerformed(ActionEvent e) {
  final int index = wOwner.indexOfTabComponent(TabCloseButton.this);
  if (index == -1) {
    assert false;
  } else {
    wOwner.removeTabAt(index);
  }
}

代码示例来源:origin: xyz.cofe/gui.swing

@Override
public void actionPerformed(ActionEvent e) {
  if( tabOwner==null || tabbedPane==null )return;
  int idx = tabbedPane.indexOfComponent(tabOwner);
  if( idx<0 )return;
  tabbedPane.removeTabAt(idx);
}

代码示例来源:origin: cmu-phil/tetrad

private void removeStatsTabs() {
  for (int i = tabbedPane.getTabCount() - 1; i >= 0; i--) {
    String name = tabbedPane.getTitleAt(i);
    if (name.equals("Model Statistics")) {
      tabbedPane.removeTabAt(i);
    } else if (name.equals("DAG in pattern")) {
      tabbedPane.removeTabAt(i);
    }
  }
}

代码示例来源:origin: sing-group/GC4S

@Override
  public void removeTabAt(int index) {
    super.removeTabAt(index);
    updateLayout();
  }
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-swing-action

public void closeTab(JTabbedPane container, String tabName) {
  TabContentConfig config = getConfig(tabName);
  final JComponent comp = cache.get(tabName);
  int index = getTabIndex(container, comp);
  if (index != -1) {
    container.removeTabAt(index);
    if (log.isDebugEnabled()) {
      log.debug(config + " index " + index);
    }
  }
}

代码示例来源:origin: icza/scelight

@Override
public void hideTab( final int idx ) {
  // Adding a component to a container first removes it from its current parent.
  // To avoid complications, first store references, remove, then add to the new parent.
  
  final Component titleComp = wrappedTabbedPane.getTabComponentAt( idx );
  final Component contentComp = wrappedTabbedPane.getComponentAt( idx );
  
  wrappedTabbedPane.removeTabAt( idx );
  
  titlesPark.add( titleComp );
  contentsPark.add( contentComp );
}

代码示例来源:origin: Jamling/SmartIM

@Override
public void removeTabAt(int index) {
  IMChatConsole console = null;
  Component comp = tabbedChat.getComponentAt(index);
  if (comp instanceof IMChatConsole) {
    console = (IMChatConsole) comp;
    consoles.remove(console.getUin());
  }
  tabbedChat.removeTabAt(index);
}

代码示例来源:origin: com.jidesoft/jide-oss

public void intervalRemoved(ListDataEvent e) {
  for (int i = e.getIndex1(); i >= e.getIndex0(); i--) {
    _tabbedPane.removeTabAt(i);
  }
}

代码示例来源:origin: com.jidesoft/jide-oss

public void intervalRemoved(ListDataEvent e) {
  for (int i = e.getIndex1(); i >= e.getIndex0(); i--) {
    _tabbedPane.removeTabAt(i);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/hibernate

private void onCloseTab(JPanel panel)
  {
   for (int i = 0; i < _objectResultTabbedPane.getTabCount(); i++)
   {
     if(_objectResultTabbedPane.getComponentAt(i) == panel)
     {
      _objectResultTabbedPane.removeTabAt(i);
      break;
     }
   }
  }
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-application-swing

@Override
  public boolean removeTab(int i) {
    TabHandler tabHandler = getTabHandler(i);
    boolean remove = tabHandler.onRemoveTab();
    if (remove) {
      getTabPanel().removeTabAt(i);
    }
    return remove;
  }
}

代码示例来源:origin: net.sf.meka/meka

/**
 * closes all open files
 */
public void closeAllFiles() {
  while (m_TabbedPane.getTabCount() > 0) {
    if (!saveChanges(true)) {
      return;
    }
    m_TabbedPane.removeTabAt(getCurrentIndex());
    updateFrameTitle();
    System.gc();
  }
}

代码示例来源:origin: igniterealtime/Spark

public void close(SparkTab sparktab) {
  int closeTabNumber = pane.indexOfComponent(sparktab);
  pane.removeTabAt(closeTabNumber);
  fireTabRemoved(sparktab, sparktab.getComponent(), closeTabNumber);
  if (pane.getTabCount() == 0) {
    allTabsClosed();
  }
}

代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing

public void run()
  {
    resetMessage();
    setSentMessages(new Map[0]);
    setReceivedMessages(new Map[0]);
    while(tabs.getTabCount()>1)
      tabs.removeTabAt(tabs.getTabCount()-1);
  }
});

代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing

public void run()
  {
    resetMessage();
    setSentMessages(new Map[0]);
    setReceivedMessages(new Map[0]);
    while(tabs.getTabCount()>1)
      tabs.removeTabAt(tabs.getTabCount()-1);
  }
});

代码示例来源:origin: xyz.cofe/gui.swing

@Override
public void removeTabAt(int index) {
  Component tabC = getTabComponentAt(index);
  Component tab = getComponentAt(index);
  
  if( !exchangeTab ){
    releaseTab(tab, tabC);
  }
  super.removeTabAt(index);
  fireTabPaneEvent(new TabDeletedEvent(this, tab, index));
}
// </editor-fold>

相关文章

JTabbedPane类方法