JavaFX 8默认消息图标 [英] JavaFX 8 default message icons

查看:606
本文介绍了JavaFX 8默认消息图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用JavaFX的最后几个更新,我们有警报。我想获取消息的默认图标(错误,警告,...)。在Swing中,我可以通过一些 UIManager 的属性获取L& F消息图标。如何在JavaFX中获取消息的默认图标?它们是包含在属性中还是由CSS类定义?

with the last few updates of JavaFX we have alerts. I want to get the message's default icons (error, warning, ...). In Swing, I can get the L&F message icons through some UIManager's properties. How can I get the message's default icons in JavaFX? Are them contained in properties, or defined by CSS class?

提前致谢。

推荐答案

它们在中定义了modena.css as

.alert.confirmation.dialog-pane,
.text-input-dialog.dialog-pane,
.choice-dialog.dialog-pane {
    -fx-graphic: url("dialog-confirm.png");
}

.alert.information.dialog-pane {
    -fx-graphic: url("dialog-information.png");
}

.alert.error.dialog-pane {
    -fx-graphic: url("dialog-error.png");
}

.alert.warning.dialog-pane {
    -fx-graphic: url("dialog-warning.png");
}

您可以定期覆盖它们。

这篇关于JavaFX 8默认消息图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆