javafx.scene.control.Tab.getId()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(151)

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

Tab.getId介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

setId(tab.getId());
setStyle(tab.getStyle());

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

/**
 * select the tab with the given tab id
 * 
 * @param tabId
 * @return - the tab;
 */
public Tab selectTab(String tabId) {
 Tab tab = getTab(tabId);
 TabPane tabPane = this.tabPaneByTabIdMap.get(tabId);
 if (tabPane == null) {
  LOGGER.log(Level.WARNING,"no tabPane for tabId "+tabId+"active");
 } else {
  Tab vtab = this.vTapMapByTabPane.get(tabPane);
  // first select the Vertical tab
  if (debug)
   LOGGER.log(Level.INFO, "selecting tabpane " + tabPane.getId());
  vTabPane.getSelectionModel().select(vtab);
  // then the horizontal one
  if (debug)
   LOGGER.log(Level.INFO, "selecting tab " + tab.getId());
  tabPane.getSelectionModel().select(tab);
 }
 return tab;
}

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

/**
 * set the color of the graphic of the given tab
 *
 * @param tab
 *          - the tab to change
 * @param oldColor
 *          - the old color
 * @param newColor
 *          - the new color
 */
protected void setColor(Tab tab, Color oldColor, Color newColor) {
 if (debug)
  LOGGER.log(Level.INFO, "changing  tab color for " + tab.getId() + " from "
    + oldColor + " to " + newColor);
 Node graphic = tab.getGraphic();
 if (graphic instanceof Glyph) {
  Glyph glyph = (Glyph) graphic;
  glyph.setColor(newColor);
 } else if (graphic instanceof ImageView) {
  // https://docs.oracle.com/javafx/2/image_ops/jfxpub-image_ops.htm
  ImageView imageView = (ImageView) graphic;
  imageView.setImage(reColor(imageView.getImage(), oldColor, newColor));
 }
}

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

.getSelectedItem();
 if (selectedTab != null)
  currentTab.setTabId(selectedTab.getId());
} else {
 currentTab.setTabId(tabId);

代码示例来源:origin: com.jfoenix/jfoenix

setId(tab.getId());
setStyle(tab.getStyle());

相关文章