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

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

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

Tab.graphicProperty介绍

暂无

代码示例

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

listener.registerChangeListener(tab.graphicProperty(), "GRAPHIC");
listener.registerChangeListener(tab.tooltipProperty(), "TOOLTIP");
listener.registerChangeListener(tab.disableProperty(), "DISABLE");

代码示例来源:origin: org.drombler.commons/drombler-commons-fx-docking

private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
    final Tab tab = new Tab();
    final FXDockableData dockableData = dockable.getAdapted().getDockableData();
    tab.textProperty().bind(dockableData.titleProperty());
    tab.graphicProperty().bind(dockableData.graphicProperty());
    tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
    tab.setContent(dockable.getAdapted().getDockable());
    tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
  }
}

代码示例来源:origin: io.datafx/flow

public <T extends Node> Tab startInTab(FlowContainer<T> container) throws FlowException {
  Tab tab = new Tab();
  getCurrentViewMetadata().addListener((e) -> {
    tab.textProperty().unbind();
    tab.graphicProperty().unbind();
    tab.textProperty().bind(getCurrentViewMetadata().get().titleProperty());
    tab.graphicProperty().bind(getCurrentViewMetadata().get().graphicsProperty());
  });
  tab.setOnClosed(e -> {
    try {
      destroy();
    } catch (Exception exception) {
      exceptionHandler.setException(exception);
    }
  });
  tab.setContent(start(container));
  return tab;
}

代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx

private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
  final Tab tab = new Tab();
  final FXDockableData dockableData = dockable.getAdapted().getDockableData();
  tab.textProperty().bind(dockableData.titleProperty());
  tab.graphicProperty().bind(dockableData.graphicProperty());
  tab.tooltipProperty().bind(dockableData.tooltipProperty());
  tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
  tab.setContent(dockable.getAdapted().getDockable());
  tab.setOnCloseRequest(tabManager.createOnCloseRequestHandler(tab, dockable.getAdapted(), control));
  observeDockableData(dockableData, tab);
  tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
}

代码示例来源:origin: io.datafx/flow

/**
 * This methods creates a tab that contains the given view. 
 * By doing so the metadata of the view will be bound to the tab properties. 
 * So the text and icon of the tab can be changed by the view.
 * 
 * @param  context the context of the view. This includes the view and its controller instance 
 * so that all needed informations are part of the context
 * @param  exceptionHandler the exception handle for the view. This handler will handle all exceptions that will be thrown in the DataFX container context
 */
public <T> Tab createTab(ViewContext<T> context, ExceptionHandler exceptionHandler) {
  Tab tab = new Tab();
  tab.textProperty().bind(context.getMetadata().titleProperty());
  tab.graphicProperty().bind(context.getMetadata().graphicsProperty());
  tab.setOnClosed(e -> {
    try {
      context.destroy();
    } catch (Exception exception) {
      exceptionHandler.setException(exception);
    }
  });
  tab.setContent(context.getRootNode());
  return tab;
}

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

});
listener.registerChangeListener(tab.textProperty(), obs-> tabLabel.setText(tab.getText()));
listener.registerChangeListener(tab.graphicProperty(), obs-> tabLabel.setGraphic(tab.getGraphic()));
listener.registerChangeListener(widthProperty(), obs-> header.updateSelectionLine(true));
listener.registerChangeListener(tab.tooltipProperty(), obs->{

相关文章