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

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

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

Tab.getId介绍

暂无

代码示例

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

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

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

  1. /**
  2. * select the tab with the given tab id
  3. *
  4. * @param tabId
  5. * @return - the tab;
  6. */
  7. public Tab selectTab(String tabId) {
  8. Tab tab = getTab(tabId);
  9. TabPane tabPane = this.tabPaneByTabIdMap.get(tabId);
  10. if (tabPane == null) {
  11. LOGGER.log(Level.WARNING,"no tabPane for tabId "+tabId+"active");
  12. } else {
  13. Tab vtab = this.vTapMapByTabPane.get(tabPane);
  14. // first select the Vertical tab
  15. if (debug)
  16. LOGGER.log(Level.INFO, "selecting tabpane " + tabPane.getId());
  17. vTabPane.getSelectionModel().select(vtab);
  18. // then the horizontal one
  19. if (debug)
  20. LOGGER.log(Level.INFO, "selecting tab " + tab.getId());
  21. tabPane.getSelectionModel().select(tab);
  22. }
  23. return tab;
  24. }

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

  1. /**
  2. * set the color of the graphic of the given tab
  3. *
  4. * @param tab
  5. * - the tab to change
  6. * @param oldColor
  7. * - the old color
  8. * @param newColor
  9. * - the new color
  10. */
  11. protected void setColor(Tab tab, Color oldColor, Color newColor) {
  12. if (debug)
  13. LOGGER.log(Level.INFO, "changing tab color for " + tab.getId() + " from "
  14. + oldColor + " to " + newColor);
  15. Node graphic = tab.getGraphic();
  16. if (graphic instanceof Glyph) {
  17. Glyph glyph = (Glyph) graphic;
  18. glyph.setColor(newColor);
  19. } else if (graphic instanceof ImageView) {
  20. // https://docs.oracle.com/javafx/2/image_ops/jfxpub-image_ops.htm
  21. ImageView imageView = (ImageView) graphic;
  22. imageView.setImage(reColor(imageView.getImage(), oldColor, newColor));
  23. }
  24. }

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

  1. .getSelectedItem();
  2. if (selectedTab != null)
  3. currentTab.setTabId(selectedTab.getId());
  4. } else {
  5. currentTab.setTabId(tabId);

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

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

相关文章