本文整理了Java中javafx.scene.control.Hyperlink.setTooltip()
方法的一些代码示例,展示了Hyperlink.setTooltip()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hyperlink.setTooltip()
方法的具体详情如下:
包路径:javafx.scene.control.Hyperlink
类名称:Hyperlink
方法名:setTooltip
暂无
代码示例来源:origin: stackoverflow.com
Hyperlink hl = new Hyperlink(sometext);
hl.setTooltip(new Tooltip(theurlhere);
hl.setOnAction((ActionEvent event) -> {
Hyperlink h = (Hyperlink) event.getTarget();
String s = h.getTooltip().getText();
getHostServices.showDocument(s);
event.consume();
});
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
public void buildFrom(VLViewComponentXML tabCfg, AbstractViewController controller) {
this.controller = controller;
iconAction.setFocusTraversable(false);
iconAction.getStyleClass().add("vertical-tab-icon");
final Tooltip tooltip = new Tooltip("All attributes");
iconAction.setTooltip(tooltip);
getChildren().add(iconAction);
iconAction.setOnAction(e -> {
tabPane.setTabContent(getTabContent());
});
setStyle("-fx-max-height: 52");
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public AdvancedPaginationBar() {
super();
previousButton.getStyleClass().add("advanced-pagination-button");
nextButton.getStyleClass().add("advanced-pagination-button");
firstButton.getStyleClass().add("advanced-pagination-button");
lastButton.getStyleClass().add("advanced-pagination-button");
nextButton.setTooltip(new Tooltip("Next"));
nextButton.disableProperty().bind(Bindings.not(hasNext));
lastButton.setTooltip(new Tooltip("Last"));
lastButton.disableProperty().bind(Bindings.not(hasNext));
previousButton.setTooltip(new Tooltip("Back"));
previousButton.disableProperty().bind(Bindings.not(hasPrevious));
firstButton.setTooltip(new Tooltip("First"));
firstButton.disableProperty().bind(Bindings.not(hasPrevious));
layout.getChildren().addAll(rowsPerPageLabel, rowsPerPageCombo, itemsCount, firstButton, previousButton, nextButton, lastButton);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public STVBottomToolbar() {
super();
setStyle("-fx-background-color: white;" + "-fx-border-width: 0 0 0;" + "-fx-padding: 0 16 0 16;" + "-fx-min-height: 88;" + "-fx-alignment: CENTER_RIGHT;" + "-fx-spacing: 16;");
next.setTooltip(new Tooltip("Next"));
next.disableProperty().bind(Bindings.not(hasNext));
back.setTooltip(new Tooltip("Back"));
back.disableProperty().bind(Bindings.not(hasPrevious));
elementCount.setStyle("-fx-font-family: 'Roboto Regular';" + "-fx-font-size: 1.3em;" + "-fx-opacity: 0.87;" + "-fx-padding: 0 32 0 0;");
// add all
getChildren().addAll(elementCount, NodeHelper.horizontalSpacer(), back, next);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML tabConfiguration) {
IconUtils.setIcon(iconNode, tabConfiguration);
setTabIcon(iconNode);
String title = NodeHelper.getTitle(tabConfiguration, (AbstractViewController) controller);
setTabTile(title);
iconNode.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
iconNode.setTooltip(new Tooltip(title));
iconNode.setOnAction(e -> listviewPaneContent.select(this));
getChildren().add(iconNode);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public LoadMorePaginationBar() {
super();
previousButton.getStyleClass().add("simple-pagination-button");
previousButton.setText("Less".toUpperCase());
previousButton.setTooltip(new Tooltip("Less"));
previousButton.disableProperty().bind(Bindings.not(hasPrevious));
IconUtils.setFontIcon("fa-angle-up:18", previousButton);
nextButton.setText("More".toUpperCase());
nextButton.setTooltip(new Tooltip("Load more data"));
nextButton.disableProperty().bind(Bindings.not(hasNext));
IconUtils.setFontIcon("fa-angle-down:18", nextButton);
if(AbstractApplicationRunner.isDesktop()) {
layout.getChildren().addAll(NodeHelper.horizontalSpacer(),rowsPerPageLabel, itemsCount, rowsPerPageCombo, nextButton, NodeHelper.horizontalSpacer());
}
else {
layout.getChildren().addAll(NodeHelper.horizontalSpacer(), rowsPerPageLabel, nextButton);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
tabDefinition = configuration;
this.controller = (AbstractViewController) controller;
getStyleClass().add("terniary-menu-tab");
final Optional<String> label = tabDefinition.propertyValueOf(XMLConstants.TITLE);
final String tootlip = tabDefinition.getPropertyValue(XMLConstants.TOOLTIP);
title.getStyleClass().add("terniary-menu-tab-label");
title.textProperty().bind(titleProperty);
icon.textProperty().bind(titleProperty);
titleProperty.set(controller.getLocalised(label.get()));
icon.setTooltip(new Tooltip(controller.getLocalised(tootlip)));
icon.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
icon.setOnAction(e -> iconOnAction());
IconUtils.setIcon(icon, configuration);
getChildren().add(icon);
//buildContent();
buildActions();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @param tabPaneCfg
* @param controller
*/
public void buildFrom(VLViewComponentXML tabCfg, AbstractViewController controller) {
this.tabCfg = tabCfg;
this.controller = controller;
iconAction.setFocusTraversable(false);
final String iconName = tabCfg.getPropertyValue(XMLConstants.ICON);
if (StringUtils.isNotBlank(iconName)) {
iconAction.getStyleClass().add("vertical-tab-icon");
}
final String title = tabCfg.getPropertyValue(XMLConstants.TITLE);
if (StringUtils.isNotBlank(title)) {
final Tooltip tooltip = new Tooltip(controller.getLocalised(title));
iconAction.setTooltip(tooltip);
}
getChildren().add(iconAction);
iconAction.setOnAction(e -> {
tabPane.setTabContent(getTabContent());
});
setStyle("-fx-max-height: 52");
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
protected void buildRowItem() {
IconUtils.setIcon(label, menuItemConfig);
// the tooltip
final String tooltipKey = menuItemConfig.getToolTip();
if (StringUtils.isNotEmpty(tooltipKey)) {
final String tooltip = controller.getLocalised(tooltipKey);
label.setTooltip(new Tooltip(tooltip));
}
// the title of the row menu
boolean uppercase = menuItemConfig.getBooleanProperty("upperCase", false);
final String title = uppercase ? controller.getLocalised(menuItemConfig.getLabel()).toUpperCase() : controller.getLocalised(menuItemConfig.getLabel());
label.setText(title);
label.setWrapText(true);
buildMenuAction();
getChildren().addAll(label);
}
内容来源于网络,如有侵权,请联系作者删除!