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

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

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

Tooltip.textProperty介绍

暂无

代码示例

代码示例来源:origin: org.controlsfx/controlsfx

@Override
  public void removeListener(InvalidationListener listener) {
    super.removeListener(listener);
    unbind(action.longTextProperty());
    tooltip.textProperty().unbind();
  }
});

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * Creates a region with the miniature of the list element
 *
 * @return A region with the miniature of the list element
 */
private Region createMiniature() {
  final Region miniature = new Region();
  miniature.getStyleClass().add("iconListMiniatureImage");
  miniature.styleProperty().bind(
      Bindings.createStringBinding(
          () -> String.format("-fx-background-image: url(\"%s\");",
              getControl().getMiniatureUri().toString()),
          getControl().miniatureUriProperty()));
  final Tooltip tooltip = new Tooltip();
  tooltip.textProperty().bind(getControl().titleProperty());
  Tooltip.install(miniature, tooltip);
  // set a gray filter for this element if it is not enabled
  getControl().enabledProperty().addListener((Observable invalidation) -> updateEnabled(miniature));
  // adopt the enable status during initialisation
  updateEnabled(miniature);
  return miniature;
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

voltageLevel1Text.textProperty().bind(Bindings.createStringBinding(() -> formatNameId(this.voltageLevel1).orElse(null), this.voltageLevel1));
Tooltip tooltipVoltageLevel1 = new Tooltip();
tooltipVoltageLevel1.textProperty().bind(this.voltageLevel1);
Tooltip.install(voltageLevel1Text, tooltipVoltageLevel1);
voltageLevel2Text.textProperty().bind(Bindings.createStringBinding(() -> formatNameId(this.voltageLevel2).orElse(null), this.voltageLevel2));
Tooltip tooltipVoltageLevel2 = new Tooltip();
tooltipVoltageLevel2.textProperty().bind(this.voltageLevel2);
Tooltip.install(voltageLevel2Text, tooltipVoltageLevel2);

代码示例来源:origin: org.controlsfx/controlsfx

tooltip.textProperty().bind(textBinding);

相关文章