本文整理了Java中javafx.scene.control.Tooltip.<init>()
方法的一些代码示例,展示了Tooltip.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tooltip.<init>()
方法的具体详情如下:
包路径:javafx.scene.control.Tooltip
类名称:Tooltip
方法名:<init>
暂无
代码示例来源:origin: speedment/speedment
@Override
public Node createLabel() {
final Label l = new Label(label);
l.setTooltip( new Tooltip(tooltip) );
return l;
}
代码示例来源:origin: jfoenixadmin/JFoenix
public ValidatorBase() {
parentProperty().addListener((o, oldVal, newVal) -> parentChanged());
errorTooltip = new Tooltip();
errorTooltip.getStyleClass().add("error-tooltip");
}
代码示例来源:origin: pmd/pmd
private void updateRecentFilesMenu() {
List<MenuItem> items = new ArrayList<>();
List<File> filesToClear = new ArrayList<>();
for (final File f : recentFiles) {
if (f.exists() && f.isFile()) {
CustomMenuItem item = new CustomMenuItem(new Label(f.getName()));
item.setOnAction(e -> loadSourceFromFile(f));
item.setMnemonicParsing(false);
Tooltip.install(item.getContent(), new Tooltip(f.getAbsolutePath()));
items.add(item);
} else {
filesToClear.add(f);
}
}
recentFiles.removeAll(filesToClear);
if (items.isEmpty()) {
openRecentMenu.setDisable(true);
return;
}
Collections.reverse(items);
items.add(new SeparatorMenuItem());
MenuItem clearItem = new MenuItem();
clearItem.setText("Clear menu");
clearItem.setOnAction(e -> {
recentFiles.clear();
openRecentMenu.setDisable(true);
});
items.add(clearItem);
openRecentMenu.getItems().setAll(items);
}
代码示例来源:origin: pmd/pmd
private ContextMenu buildContextMenu(Node item) {
ContextMenu contextMenu = new ContextMenuWithNoArrows();
CustomMenuItem menuItem = new CustomMenuItem(new Label("Copy subtree test to clipboard..."));
Tooltip tooltip = new Tooltip("Creates a node spec using the Kotlin AST matcher DSL, and dumps it to the clipboard");
Tooltip.install(menuItem.getContent(), tooltip);
menuItem.setOnAction(e -> {
Clipboard clipboard = Clipboard.getSystemClipboard();
ClipboardContent content = new ClipboardContent();
content.putString(dumpToSubtreeTest(item)); // item is captured in the closure
clipboard.setContent(content);
});
contextMenu.getItems().add(menuItem);
return contextMenu;
}
代码示例来源:origin: jfoenixadmin/JFoenix
Tooltip.install(this, new Tooltip((tooltipStr == null) ? "" : tooltipStr.toUpperCase()));
代码示例来源: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: jfoenixadmin/JFoenix
viewGlyphDetail(glyph);
});
Tooltip.install(button, new Tooltip(glyph.getName()));
return button;
代码示例来源:origin: jfoenixadmin/JFoenix
if (primaryStage.isMaximized()) {
btnMax.setGraphic(resizeMin);
btnMax.setTooltip(new Tooltip("Restore Down"));
} else {
btnMax.setGraphic(resizeMax);
btnMax.setTooltip(new Tooltip("Maximize"));
primaryStage.setHeight(maximizedBox.getHeight());
btnMax.setGraphic(resizeMin);
btnMax.setTooltip(new Tooltip("Restore Down"));
} else {
originalBox = null;
btnMax.setGraphic(resizeMax);
btnMax.setTooltip(new Tooltip("Maximize"));
代码示例来源:origin: speedment/speedment
final ContextMenu menu = new ContextMenu();
final MenuItem item = new MenuItem("Enable editing");
final Tooltip tooltip = new Tooltip(tooltipText);
代码示例来源:origin: jfoenixadmin/JFoenix
ssbutton2.setTooltip(new Tooltip("Button R2"));
ssbutton2.setButtonType(ButtonType.RAISED);
ssbutton2.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON2);
sbutton2.setTooltip(new Tooltip("Button B2"));
sbutton2.setButtonType(ButtonType.RAISED);
sbutton2.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON);
button2.setTooltip(new Tooltip("Button G2"));
button2.setButtonType(ButtonType.RAISED);
button2.getStyleClass().add(ANIMATED_OPTION_BUTTON);
代码示例来源:origin: speedment/speedment
@Override
protected Node createUndecoratedEditor() {
final CheckBox cbNull = new CheckBox();
final Node wrappedCb = ItemUtil.lockDecorator(cbNull, document, ItemUtil.DATABASE_RELATION_TOOLTIP);
final Label label = new Label(IMPLEMENTATION_TITLE);
final ChoiceBox<ImplementAs> cbImpl = new ChoiceBox<>(
observableArrayList(ImplementAs.values())
);
cbImpl.setTooltip(new Tooltip(IMPLEMENTATION_TOOLTIP));
final HBox right = new HBox(label, cbImpl);
final HBox left = new HBox(wrappedCb, right);
left.setSpacing(16);
right.setSpacing(8);
right.setAlignment(Pos.CENTER);
cbNull.selectedProperty().bindBidirectional(nullable);
cbImpl.valueProperty().bindBidirectional(implementation);
right.visibleProperty().bind(nullable);
right.disableProperty().bind(nullable.not());
return left;
}
代码示例来源:origin: torakiki/pdfsam
@Inject
DashboardButton(@Named("defaultDashboardItemId") String defaultDasboardItem) {
super(MaterialDesignIcon.HOME);
setOnAction(e -> eventStudio().broadcast(new SetActiveDashboardItemRequest(defaultDasboardItem)));
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Dashboard")));
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
setTooltip(new Tooltip(((Label) item).getText()));
} else if (getText() != null) {
setTooltip(new Tooltip(getText()));
代码示例来源:origin: torakiki/pdfsam
public MoveDownButton(String ownerModule) {
super(ownerModule, MoveType.DOWN);
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Moves down selected documents")));
setText(DefaultI18nContext.getInstance().i18n("Move _Down"));
}
}
代码示例来源:origin: torakiki/pdfsam
public MoveUpButton(String ownerModule) {
super(ownerModule, MoveType.UP);
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Moves up selected documents")));
setText(DefaultI18nContext.getInstance().i18n("Move _Up"));
}
}
代码示例来源:origin: torakiki/pdfsam
public AddButton(String ownerModule) {
super(ownerModule);
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Add documents to the table")));
setText(DefaultI18nContext.getInstance().i18n("_Add"));
setOnAction(this::loadDocuments);
}
代码示例来源:origin: torakiki/pdfsam
public ClearButton(String ownerModule) {
this.ownerModule = defaultString(ownerModule);
getStyleClass().addAll(Style.BUTTON.css());
getStyleClass().add("pdfsam-split-button");
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Removes every document")));
setText(DefaultI18nContext.getInstance().i18n("_Clear"));
setOnAction(this::clear);
MenuItem clearAllSettings = new MenuItem();
clearAllSettings.setText(DefaultI18nContext.getInstance().i18n("C_lear all settings"));
clearAllSettings.setOnAction(this::clearAll);
getItems().add(clearAllSettings);
}
代码示例来源:origin: torakiki/pdfsam
LogButton() {
super(MaterialDesignIcon.COMMENT_ALERT_OUTLINE);
setOnAction(e -> eventStudio().broadcast(action, "LogStage"));
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Application messages")));
anim = Animations.shake(this);
eventStudio().addAnnotatedListeners(this);
}
代码示例来源:origin: torakiki/pdfsam
public RemoveButton(String ownerModule) {
super(ownerModule);
setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Removes selected documents")));
setText(DefaultI18nContext.getInstance().i18n("_Remove"));
setOnAction(this::removeSelected);
setDisable(true);
eventStudio().addAnnotatedListeners(this);
}
代码示例来源:origin: torakiki/pdfsam
ModuleButton(Module module) {
requireNotNull(module, "Module cannot be null");
this.module = module;
setGraphic(this.module.graphic());
setText(this.module.descriptor().getName());
setOnAction(e -> eventStudio().broadcast(activeteModule(ModuleButton.this.module.id())));
setTooltip(new Tooltip(this.module.descriptor().getDescription()));
}
内容来源于网络,如有侵权,请联系作者删除!