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

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

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

JTabbedPane.getTabComponentAt介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

public void showDownloadControls(boolean needToShow) {
  // 2 modes:
  //  - only message;
  //  - message + download controls and buttons        
  this.panelGlobal.setVisible(true);
  this.buttonStop.setVisible(!needToShow); // stop button only for loading mode
  this.tabsList.setVisible(needToShow);
  this.panelCommands.setVisible(needToShow);
  // auto-size form
  if (needToShow) {
    this.setWindowSize(this.sizeModeMessageAndControls.width, this.sizeModeMessageAndControls.height);
  } else {
    this.setWindowSize(this.sizeModeMessageOnly.width, this.sizeModeMessageOnly.height);
  }
  this.makeWindowCentered();
  //this.setLocationRelativeTo(null); // center screen //FIX
  // icons on tabs left side
  setTabTitle(0, "Standard download", "/buttons/card_panel.png");
  setTabTitle(1, "Custom download", "/buttons/list_panel.png");
  // TODO: add manual mode as tab
  this.tabsList.getTabComponentAt(1).setEnabled(false);
  this.tabsList.setEnabledAt(1, false);
}

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

public Component getTabComponentAt(int index) {
  return pane.getTabComponentAt(index);
}

代码示例来源:origin: ron190/jsql-injection

JTabbedPane tabs = MediatorGui.tabConsoles();
if (tabs.getSelectedIndex() > -1) {
  Component currentTabHeader = tabs.getTabComponentAt(tabs.getSelectedIndex());
  if (currentTabHeader != null) {
    currentTabHeader.setFont(currentTabHeader.getFont().deriveFont(Font.PLAIN));

代码示例来源:origin: nccgroup/AutoRepeater

public static AutoRepeater getSelectedAutoRepeater() {
 AutoRepeaterTabHandle autoRepeaterTabHandle = (AutoRepeaterTabHandle) mainTabbedPane.getTabComponentAt(mainTabbedPane.getSelectedIndex());
 return autoRepeaterTabHandle.autoRepeater;
}

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

public Font getDefaultFontAt(int index) {
  Component com = pane.getTabComponentAt(index);
  if (com instanceof TabPanel) {
    TabPanel panel = (TabPanel) com;
    return panel.getDefaultFont();
  }
  return null;
}

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

public void setTitleAt(int index, String title) {
  if (index > 0) {
    Component com = pane.getTabComponentAt(index);
    if (com instanceof TabPanel) {
      TabPanel panel = (TabPanel) com;
      panel.setTitle(title);
    }
  }
}

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

public void setTitleColorAt(int index, Color color) {
  Component com = pane.getTabComponentAt(index);
  if (com instanceof TabPanel) {
    TabPanel panel = (TabPanel) com;
    panel.setTitleColor(color);
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

private Component getTabComponentAt(int index) {
  if (JTattooUtilities.getJavaVersion() >= 1.6) {
    return tabPane.getTabComponentAt(index);
  }
  return null;
}

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

private int getTabIndex() {
 for (int i = 0; i < _tabbedPane.getTabCount(); i++) {
  if (this.equals(_tabbedPane.getTabComponentAt(i))) {
   return i;
  }
 }
 return -1;
}

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

public void setIconAt(int index, Icon icon) {
  Component com = pane.getTabComponentAt(index);
  if (com instanceof TabPanel) {
    TabPanel panel = (TabPanel) com;
    panel.setIcon(icon);
  }
}

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

public void setTitleBoldAt(int index, boolean bold) {
  Component com = pane.getTabComponentAt(index);
  if (com instanceof TabPanel) {
    TabPanel panel = (TabPanel) com;
    panel.setTitleBold(bold);
  }
}

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

public void setTitleFontAt(int index, Font font) {
  Component com = pane.getTabComponentAt(index);
  if (com instanceof TabPanel) {
    TabPanel panel = (TabPanel) com;
    panel.setTitleFont(font);
  }
}

代码示例来源:origin: realXuJiang/bigtable-sql

private int getTabIndex() {
 for (int i = 0; i < _tabbedPane.getTabCount(); i++) {
  if (this.equals(_tabbedPane.getTabComponentAt(i))) {
   return i;
  }
 }
 return -1;
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

public synchronized void setEditedStatus(int index, boolean status) {
 if (index < getNumTabs() && index >= 0) {
  Boolean newStatus = new Boolean(status);
  m_editedList.set(index, newStatus);
  ((CloseableTabTitle) m_flowTabs.getTabComponentAt(index))
   .setBold(status);
 }
}

代码示例来源: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: nccgroup/AutoRepeater

public static String exportSave() {
 JsonArray BurpExtenderJson = new JsonArray();
 // Don't count the "..." tab
 for (int i = 0; i < mainTabbedPane.getTabCount() - 1; i++) {
  AutoRepeaterTabHandle autoRepeaterTabHandle
    = (AutoRepeaterTabHandle) mainTabbedPane.getTabComponentAt(i);
  AutoRepeater ar = autoRepeaterTabHandle.autoRepeater;
  JsonObject AutoRepeaterJson = ar.toJson();
  AutoRepeaterJson.addProperty("tabName", autoRepeaterTabHandle.tabName.getText());
  BurpExtenderJson.add(AutoRepeaterJson);
 }
 return BurpExtenderJson.toString();
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Set the edited status for the current (visible) tab
 * 
 * @param edited true if the flow in the tab has been edited (but not saved)
 */
public void setCurrentTabTitleEditedStatus(boolean edited) {
 CloseableTabTitle current =
  (CloseableTabTitle) m_flowTabs.getTabComponentAt(getCurrentTabIndex());
 current.setBold(edited);
}

代码示例来源:origin: Waikato/weka-trunk

/**
 * Set the edited status for the current (visible) tab
 * 
 * @param edited true if the flow in the tab has been edited (but not saved)
 */
public void setCurrentTabTitleEditedStatus(boolean edited) {
 CloseableTabTitle current =
  (CloseableTabTitle) m_flowTabs.getTabComponentAt(getCurrentTabIndex());
 current.setBold(edited);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

public synchronized void setTabTitle(int index, String title) {
 if (index < getNumTabs() && index >= 0) {
  m_flowTabs.setTitleAt(index, title);
  ((CloseableTabTitle) m_flowTabs.getTabComponentAt(index)).revalidate();
 }
}

代码示例来源:origin: Waikato/weka-trunk

public synchronized void setTabTitle(int index, String title) {
 if (index < getNumTabs() && index >= 0) {
  m_flowTabs.setTitleAt(index, title);
  ((CloseableTabTitle) m_flowTabs.getTabComponentAt(index)).revalidate();
 }
}

相关文章

JTabbedPane类方法