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

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

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

Tab.textProperty介绍

暂无

代码示例

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

  1. listener.registerChangeListener(tab.textProperty(), "TEXT");
  2. listener.registerChangeListener(tab.graphicProperty(), "GRAPHIC");
  3. listener.registerChangeListener(tab.tooltipProperty(), "TOOLTIP");

代码示例来源:origin: org.copper-engine/copper-monitoring-client

  1. @Override
  2. public void handle(Event event) {
  3. // workaround for javafx memeoryleaks RT-25652, RT-32087
  4. formTabFinal.setContent(null);
  5. formTabFinal.textProperty().unbind();
  6. formTabFinal.setOnClosed(null);
  7. form.close();
  8. }
  9. });

代码示例来源:origin: brunoborges/webfx

  1. public void openPage(String location) {
  2. final URL url;
  3. try {
  4. url = URLVerifier.verifyURL(location);
  5. } catch (MalformedURLException ex) {
  6. Logger.getLogger(BrowserFXController.class.getName()).log(Level.SEVERE, null, ex);
  7. return;
  8. }
  9. URLHandler urlHandler = URLHandlersRegistry.getHandler(url);
  10. if (urlHandler == null) {
  11. return;
  12. }
  13. Platform.runLater(() -> {
  14. URLHandler.Result handleResult = urlHandler.handle(url);
  15. if (handleResult.contentDescriptor != ContentDescriptor.NoContent.instance()) {
  16. BrowserTab browserTab = TabFactory.newTab(this, locale, handleResult.contentDescriptor);
  17. browserTab.getNavigationContext().goTo(url);
  18. selectionTab.getSelectedItem().contentProperty().bind(browserTab.contentProperty());
  19. browserMap.put(selectionTab.getSelectedIndex(), browserTab);
  20. // if(!urlField.isFocused()){
  21. urlField.textProperty().bind(browserTab.locationProperty());
  22. // }
  23. stopButton.disableProperty().set(!browserTab.isStoppable());
  24. selectionTab.getSelectedItem().textProperty().bind(browserTab.titleProperty());
  25. }
  26. });
  27. }

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

  1. private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
  2. final Tab tab = new Tab();
  3. final FXDockableData dockableData = dockable.getAdapted().getDockableData();
  4. tab.textProperty().bind(dockableData.titleProperty());
  5. tab.graphicProperty().bind(dockableData.graphicProperty());
  6. tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
  7. tab.setContent(dockable.getAdapted().getDockable());
  8. tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
  9. }
  10. }

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

  1. public <T extends Node> Tab startInTab(FlowContainer<T> container) throws FlowException {
  2. Tab tab = new Tab();
  3. getCurrentViewMetadata().addListener((e) -> {
  4. tab.textProperty().unbind();
  5. tab.graphicProperty().unbind();
  6. tab.textProperty().bind(getCurrentViewMetadata().get().titleProperty());
  7. tab.graphicProperty().bind(getCurrentViewMetadata().get().graphicsProperty());
  8. });
  9. tab.setOnClosed(e -> {
  10. try {
  11. destroy();
  12. } catch (Exception exception) {
  13. exceptionHandler.setException(exception);
  14. }
  15. });
  16. tab.setContent(start(container));
  17. return tab;
  18. }

代码示例来源:origin: org.copper-engine/copper-monitoring-client

  1. formTab.textProperty().bind(form.displayedTitleProperty());
  2. formTab.setContent(form.getCachedContent());
  3. component.getTabs().add(formTab);

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

  1. private void addTab(PositionableAdapter<FXDockableEntry> dockable) {
  2. final Tab tab = new Tab();
  3. final FXDockableData dockableData = dockable.getAdapted().getDockableData();
  4. tab.textProperty().bind(dockableData.titleProperty());
  5. tab.graphicProperty().bind(dockableData.graphicProperty());
  6. tab.tooltipProperty().bind(dockableData.tooltipProperty());
  7. tab.contextMenuProperty().bind(dockableData.contextMenuProperty());
  8. tab.setContent(dockable.getAdapted().getDockable());
  9. tab.setOnCloseRequest(tabManager.createOnCloseRequestHandler(tab, dockable.getAdapted(), control));
  10. observeDockableData(dockableData, tab);
  11. tabPane.getTabs().add(control.getDockables().indexOf(dockable), tab);
  12. }

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

  1. /**
  2. * This methods creates a tab that contains the given view.
  3. * By doing so the metadata of the view will be bound to the tab properties.
  4. * So the text and icon of the tab can be changed by the view.
  5. *
  6. * @param context the context of the view. This includes the view and its controller instance
  7. * so that all needed informations are part of the context
  8. * @param exceptionHandler the exception handle for the view. This handler will handle all exceptions that will be thrown in the DataFX container context
  9. */
  10. public <T> Tab createTab(ViewContext<T> context, ExceptionHandler exceptionHandler) {
  11. Tab tab = new Tab();
  12. tab.textProperty().bind(context.getMetadata().titleProperty());
  13. tab.graphicProperty().bind(context.getMetadata().graphicsProperty());
  14. tab.setOnClosed(e -> {
  15. try {
  16. context.destroy();
  17. } catch (Exception exception) {
  18. exceptionHandler.setException(exception);
  19. }
  20. });
  21. tab.setContent(context.getRootNode());
  22. return tab;
  23. }

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

  1. updateInnerUI();
  2. });
  3. listener.registerChangeListener(tab.textProperty(), obs-> tabLabel.setText(tab.getText()));
  4. listener.registerChangeListener(tab.graphicProperty(), obs-> tabLabel.setGraphic(tab.getGraphic()));
  5. listener.registerChangeListener(widthProperty(), obs-> header.updateSelectionLine(true));

相关文章