本文整理了Java中javafx.scene.control.Button.setTooltip()
方法的一些代码示例,展示了Button.setTooltip()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setTooltip()
方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:setTooltip
暂无
代码示例来源:origin: speedment/speedment
@Override
public Button createNode() {
final Button btn = new Button(text, icon.view());
btn.setTextAlignment(TextAlignment.CENTER);
btn.setAlignment(Pos.CENTER);
btn.setMnemonicParsing(false);
btn.setLayoutX(10);
btn.setLayoutY(10);
btn.setPadding(new Insets(8, 12, 8, 12));
btn.setOnAction(handler);
btn.setTooltip(new Tooltip(tooltip));
return btn;
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
public NaviSelect() {
getStyleClass().add("navi-select");
editButton.getStyleClass().add("edit-button");
editButton.valueProperty().bind(visualBinding);
HBox.setHgrow(editButton, Priority.ALWAYS);
editButton.setTooltip(new Tooltip("Edit"));
Pane gotoButtonGraphic = new Pane();
gotoButtonGraphic.getStyleClass().add("icon");
gotoButton.setGraphic(gotoButtonGraphic);
gotoButton.setTooltip(new Tooltip("Goto"));
gotoButton.getStyleClass().add("goto-button");
getChildren().addAll(editButton, gotoButton);
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public List<? extends Node> getContributedButtons(MessageProvider messageProvider) {
List<Button> contributedButtons = new ArrayList<Button>();
final Button expandButton = new Button("", new ImageView(new Image(getClass().getResourceAsStream("/org/copperengine/gui/icon/expandall.png"))));
expandButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_expandall)));
expandButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
expandAll(workflowView.getRoot());
}
});
contributedButtons.add(expandButton);
final Button collapseButton = new Button("", new ImageView(new Image(getClass().getResourceAsStream("/org/copperengine/gui/icon/collapseall.png"))));
collapseButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_collapseall)));
collapseButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
for (TreeItem<DisplayWorkflowClassesModel> child : workflowView.getRoot().getChildren()) {
collapseAll(child);
}
}
});
contributedButtons.add(collapseButton);
return contributedButtons;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public SimplePaginationBar() {
super();
previousButton.getStyleClass().addAll("simple-pagination-button");
previousButton.setTooltip(new Tooltip("Back"));
previousButton.disableProperty().bind(Bindings.not(hasPrevious));
IconUtils.setFontIcon("mdi-chevron-left:24", previousButton);
nextButton.getStyleClass().addAll("simple-pagination-button");
nextButton.setTooltip(new Tooltip("Next"));
nextButton.disableProperty().bind(Bindings.not(hasNext));
IconUtils.setFontIcon("mdi-chevron-right:24", nextButton);
firstButton.getStyleClass().addAll("simple-pagination-button");
IconUtils.setFontIcon("mdi-chevron-double-left:24", firstButton);
lastButton.getStyleClass().addAll("simple-pagination-button");
IconUtils.setFontIcon("mdi-chevron-double-right:24", lastButton);
lastButton.setTooltip(new Tooltip("Last"));
lastButton.disableProperty().bind(Bindings.not(hasNext));
firstButton.setTooltip(new Tooltip("First"));
firstButton.disableProperty().bind(Bindings.not(hasPrevious));
// @formatter:off
layout.setSpacing(10);
layout.getChildren().addAll(rowsPerPageLabel, itemsCount, NodeHelper.horizontalSpacer(), rowsPerPageCombo, previousButton, nextButton);
// @formatter:on
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
refreshButton.setId(REFRESH_BUTTON_ID);
HBox.setMargin(refreshButton, new Insets(4, 0, 4, 0));
refreshButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_refresh)));
refreshButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
clearButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_clear)));
clearButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx
Node icon = xyTabPane.getIcon(FontAwesome.Glyph.POWER_OFF.name(),
xyTabPane.getIconSize());
powerButton.setTooltip(new Tooltip(I18n.get(JavaFxI18n.POWER_OFF)));
powerButton.setGraphic(icon);
powerButton.setDisable(false);
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
hBox.getChildren().add(deleteButton);
showButton.setTooltip(new Tooltip(uniformDesign.getText(editText)));
selectButton.setTooltip(new Tooltip(uniformDesign.getText(selectText)));
newButton.setTooltip(new Tooltip(uniformDesign.getText(addText)));
deleteButton.setTooltip(new Tooltip(uniformDesign.getText(deleteText)));
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
buttons.getChildren().add(sortButton);
showButton.setTooltip(new Tooltip(uniformDesign.getText(editText)));
selectButton.setTooltip(new Tooltip(uniformDesign.getText(selectText)));
adderButton.setTooltip(new Tooltip(uniformDesign.getText(addText)));
deleteButton.setTooltip(new Tooltip(uniformDesign.getText(deleteText)));
copyButton.setTooltip(new Tooltip(uniformDesign.getText(copyText)));
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
close.setTooltip(new Tooltip("Close"));
close.setOnAction(t -> switchClose());
FontIcon closeicon = new FontIcon("mdi-close:18");
maximize.setTooltip(new Tooltip("Maximize"));
maximize.setOnAction(t -> switchMaximize());
FontIcon maximizeicon = new FontIcon("mdi-window-maximize:16");
restore.setTooltip(new Tooltip("Restore"));
restore.setOnAction(t -> switchRestore());
FontIcon maximizeicon = new FontIcon("mdi-window-restore:16");
fullscreen.setTooltip(new Tooltip("FullScreen"));
fullscreen.setOnAction(t -> switchFullscreen());
FontIcon fullscreenicon = new FontIcon("mdi-fullscreen:16");
iconify.setTooltip(new Tooltip("Minimize"));
iconify.setOnAction(t -> iconify());
FontIcon minimizeicon = new FontIcon("mdi-window-minimize:16");
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
fullscreen.setTooltip(new Tooltip("Restore"));
fullscreen.setTooltip(new Tooltip("FullScreen"));
代码示例来源:origin: com.aquafx-project/aquafx
b1.setText("Default (push to enable Tab 'Progress')");
b1.setDefaultButton(true);
b1.setTooltip(new Tooltip("This is a ToolTip"));
b1.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
Button pb1 = new Button();
pb1.setText("Button 1");
pb1.setTooltip(new Tooltip("This is a ToolTip"));
AquaFx.createButtonStyler().setType(ButtonType.LEFT_PILL).style(pb1);
pillButtonBox.getChildren().add(pb1);
内容来源于网络,如有侵权,请联系作者删除!