{"id":886,"date":"2020-03-04T22:40:57","date_gmt":"2020-03-04T13:40:57","guid":{"rendered":"https:\/\/namekata.in.net\/wp\/javafx\/?p=886"},"modified":"2020-03-05T22:05:40","modified_gmt":"2020-03-05T13:05:40","slug":"%e3%81%84%e3%82%8f%e3%82%86%e3%82%8b%e3%83%80%e3%82%a4%e3%82%a2%e3%83%ad%e3%82%b0%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e3%81%a8%e3%81%97%e3%81%a6%e3%81%aealert%e3%80%81dialog%e3%80%81stage","status":"publish","type":"post","link":"https:\/\/namekata.in.net\/wp\/javafx\/2020\/03\/04\/%e3%81%84%e3%82%8f%e3%82%86%e3%82%8b%e3%83%80%e3%82%a4%e3%82%a2%e3%83%ad%e3%82%b0%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e3%81%a8%e3%81%97%e3%81%a6%e3%81%aealert%e3%80%81dialog%e3%80%81stage\/","title":{"rendered":"\u3044\u308f\u3086\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3068\u3057\u3066\u306eAlert\u3001Dialog\u3001Stage"},"content":{"rendered":"<p>\u30e6\u30fc\u30b6\u30fc\u306b\u60c5\u5831\u3092\u63d0\u793a\u3057\u305f\u308a\u3001\u78ba\u8a8d\u3092\u3059\u308b\u6642\u306b\u4f7f\u7528\u3059\u308b\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u3001JavaFX \u306e Alert\u3001Dialog\u3001Stage \u306b\u3064\u3044\u3066\u5177\u4f53\u4f8b\u3092\u901a\u3058\u3066\u8aac\u660e\u3059\u308b\u3002\u3053\u3053\u3067\u3044\u3046\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3068\u306f\u3001\u305d\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u305d\u308c\u3092\u9589\u3058\u306a\u3051\u308c\u3070\u5143\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u623b\u308c\u306a\u3044\u3001\r\n\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u3053\u3068\u3067\u3042\u308b\u3002\u4f5c\u6210\u3057\u305f\u5177\u4f53\u4f8b\u306f AlertDialogAndStage \u3067\u3042\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nAlert, Dialog and Stage<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage-300x161.png\" alt=\"\u30a2\u30e9\u30fc\u30c8 \u30c0\u30a4\u30a2\u30ed\u30b0 \u30b9\u30c6\u30fc\u30b8\" width=\"300\" height=\"161\" class=\"aligncenter size-medium wp-image-891\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage-300x161.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage.png 377w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p>Alert \u306b\u306fINFORMATION\u3001CONFIRMATION\u3001WARNING\u3001ERROR\u306e4\u7a2e\u985e\u304c\u3042\u308a\u3001\u305d\u308c\u304c\u3069\u3046\u3044\u3046\u3082\u306e\u3067\u3042\u308b\u304b\uff1f\u304c\u300cAlert\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u305b\u3070\u8868\u793a\u3055\u308c\u308b\u3002\u307e\u305f\u3001\u65e2\u5b9a\u306e\u30dc\u30bf\u30f3\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3082\u8aac\u660e\u3059\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nAlert INFORMATION \u300c\u4e86\u89e3\u300d\u30dc\u30bf\u30f3\u306b\u5909\u66f4<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageAlertInformation.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageAlertInformation-300x149.png\" alt=\"\u30a2\u30e9\u30fc\u30c8 \u60c5\u5831\" width=\"300\" height=\"149\" class=\"aligncenter size-medium wp-image-892\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageAlertInformation-300x149.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageAlertInformation.png 452w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p>Alert \u3067\u306f\u3001\u8907\u6570\u306e\u30dc\u30bf\u30f3\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u3069\u306e\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u304b\u3092\u77e5\u308b\u3053\u3068\u306f\u3067\u304d\u308b\u304c\u3001\u305d\u308c\u4ee5\u4e0a\u306e\u3053\u3068\u3092\u77e5\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002\u305d\u3053\u3067\u3001\u597d\u304d\u306a\u8272\u3092\u805e\u304f Dialog \u3092\u4f5c\u6210\u3057\u305f\u3002\u300cDialog\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u3067\u597d\u304d\u306a\u8272\u3092\u7b54\u3048\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nDialog \u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u3067\u597d\u304d\u306a\u8272\u3092\u9078\u3076<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialog.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialog.png\" alt=\"\u30c0\u30a4\u30a2\u30ed\u30b0\" width=\"256\" height=\"219\" class=\"aligncenter size-full wp-image-893\" \/><\/a>\r\n<\/div>\r\n<p>Stage \u3092\u5229\u7528\u3057\u3066\u3082\u3001Dialog \u3068\u540c\u3058\u3088\u3046\u306b\u632f\u308b\u821e\u3048\u308b\u3088\u3046\u306b\u3001\u8a2d\u5b9a\u3067\u304d\u308b\u3002\u3053\u3053\u3067\u306f\u3001\u4f8b\u3068\u3057\u3066\u3001\u300cAlert, Dialog and Stage\u300d\u306e\u60c5\u5831\u3092\u8868\u793a\u3055\u305b\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nStage &#8230;\u306b\u3064\u3044\u3066<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStage.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStage.png\" alt=\"\u30b9\u30c6\u30fc\u30b8\" width=\"203\" height=\"255\" class=\"aligncenter size-full wp-image-894\" \/><\/a>\r\n<\/div>\r\n<p>Scene Builder \u3067\u4f5c\u6210\u3057\u305f AlertDialogAndStage \u306e\u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e3b\u8981\u90e8\u5206\uff08VBox\uff09\u306f\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u306f AlertDialogAndStageMainVBox.fxml \u3067\u3042\u308b\u3002\uff08Eclipse \u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 src \u306e zip \u30d5\u30a1\u30a4\u30eb\u306f<a href=\"https:\/\/namekata.in.net\/zip\/AlertDialogStage_src.zip\">\u3053\u3061\u3089<\/a>\u3002\uff09<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nScene Builder \u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e3b\u8981\u90e8\u5206\uff08VBox\uff09 \u5909\u6570\u540d<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1-300x225.png\" alt=\"SceneBuilder1\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-895\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1-300x225.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1-1024x768.png 1024w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1-768x576.png 768w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder1.png 1061w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p><a href=\"https:\/\/namekata.in.net\/wp\/javafx\/2020\/02\/28\/scene-builder-%e3%81%a7%e4%bd%9c%e6%88%90%e3%81%97%e3%81%9f%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%82%92%e3%81%9d%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%81%ae%e6%b4%be%e7%94%9f%e3%82%af\/\">\u524d\u56de<\/a>\u3068\u540c\u69d8\u306b\u4f5c\u6210\u3057\u305f VBox \u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092 VBox \u306e\u6d3e\u751f\u30af\u30e9\u30b9\u3068\u3059\u308b\u306e\u3067\u3001Controller class \u306b\u4f55\u3082\u8a18\u5165\u305b\u305a\u306b\u3001Use fx:root construct \u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f AlertDialogStageMainVBox.java \u3067\u3042\u308b\u3002\u4ee5\u964d\u306b\u3001\u66f4\u306b2\u56de Scene Builder \u3067\u4f5c\u696d\u3092\u884c\u3046\u304c\u3001\u3053\u306e\u30c1\u30a7\u30c3\u30af\u3059\u308b\u56f3\u306f\u7701\u7565\u3059\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nScene Builder \u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e3b\u8981\u90e8\u5206\uff08VBox\uff09 Use fx:root construct \u3092\u30c1\u30a7\u30c3\u30af<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2-300x225.png\" alt=\"SceneBuilder2\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-896\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2-300x225.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2-1024x768.png 1024w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2-768x576.png 768w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageSceneBuilder2.png 1061w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p>Scene Builder \u3067\u4f5c\u6210\u3057\u305f\u3001\u300cDialog\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308b Dialog \u306e\u4e3b\u8981\u90e8\u5206\uff08VBox\uff09\u3068\u300cStage\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308b Stage \u306f\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u3002\u5404\u3005\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306f DialogFavoriteColorVBox.fxml \u3068 StageAbout.fxml \u3067\u3042\u308b\u3002\u307e\u305f\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f DialogFavoriteColorVBox.java \u3068 StageAbout.java \u3067\u3042\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nScene Builder Dialog\u306e\u4e3b\u8981\u90e8\u5206\uff08VBox\uff09 \u5909\u6570\u540d<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogSceneBuilder.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogSceneBuilder-300x213.png\" alt=\"\u30c0\u30a4\u30a2\u30ed\u30b0 SceneBuilder\" width=\"300\" height=\"213\" class=\"aligncenter size-medium wp-image-897\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogSceneBuilder-300x213.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogSceneBuilder-768x546.png 768w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogSceneBuilder.png 970w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<div class=\"m-0-auto-1rem center\">\r\nScene Builder &#8230;\u306b\u3064\u3044\u3066 Stage \u5909\u6570\u540d<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStageSceneBuilder.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStageSceneBuilder-300x242.png\" alt=\"\u30b9\u30c6\u30fc\u30b8 SceneBuilder\" width=\"300\" height=\"242\" class=\"aligncenter size-medium wp-image-898\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStageSceneBuilder-300x242.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStageSceneBuilder-768x619.png 768w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStageSceneBuilder.png 979w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p>AlertDialogAndStage \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e Main \u30af\u30e9\u30b9\u306b\u95a2\u3057\u3066\u306f\u3001\u307b\u307c\u3001<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/2020\/02\/28\/scene-builder-%e3%81%a7%e4%bd%9c%e6%88%90%e3%81%97%e3%81%9f%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%82%92%e3%81%9d%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%81%ae%e6%b4%be%e7%94%9f%e3%82%af\/\">\u524d\u56de<\/a>\u3068\u540c\u69d8\u306a\u306e\u3067\u3001\u8aac\u660e\u3092\u7701\u7565\u3059\u308b\u3002\u30e1\u30a4\u30f3\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e3b\u8981\u90e8\u5206\u3067\u3042\u308b VBox \u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3042\u308b AlertDialogAndStageMainVBox \u306e\u8aac\u660e\u3092\u884c\u3046\u3002\uff08\u3053\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u3082\u307b\u307c\u3001<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/2020\/02\/28\/scene-builder-%e3%81%a7%e4%bd%9c%e6%88%90%e3%81%97%e3%81%9f%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%82%92%e3%81%9d%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%81%ae%e6%b4%be%e7%94%9f%e3%82%af\/\">\u524d\u56de<\/a>\u3068\u540c\u69d8\u306a\u306e\u3067\u3001\u8aac\u660e\u3092\u7701\u7565\u3059\u308b\u3002\uff09\u91cd\u8981\u306a\u90e8\u5206\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u306e fxmlLoader.load() \u8fba\u308a\u3067\u547c\u3070\u308c\u308b\u3001@FXML \u306e\u6b21\u884c\u306b\u3042\u308b private void initialize() \u95a2\u6570\u3067\u3042\u308b\u3002\u3053\u306e\u95a2\u6570\u5185\u3067\u3001comboBoxAlertType \u306e\u521d\u671f\u5316\u3068\u30dc\u30bf\u30f3\u62bc\u4e0b\u6642\u306e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nAlert, Dialog and Stage(\u518d\u63b2)<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage-300x161.png\" alt=\"\u30a2\u30e9\u30fc\u30c8 \u30c0\u30a4\u30a2\u30ed\u30b0 \u30b9\u30c6\u30fc\u30b8\" width=\"300\" height=\"161\" class=\"aligncenter size-medium wp-image-891\" srcset=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage-300x161.png 300w, https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStage.png 377w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/div>\r\n<p>\u4e0a\u56f3\u306b\u304a\u3044\u3066\u3001\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3092\u8a18\u8ff0\u3059\u308b\u30dc\u30bf\u30f3\u306f\u3001\u4e0a\u304b\u3089\u9806\u306b\u3001\r\n<ol>\r\n\u3000<li>\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9 comboBoxAlertType \u304b\u3089\u30a2\u30e9\u30fc\u30c8\u306e\u30bf\u30a4\u30d7\u3092\u9078\u3073\u3001\u300c\u65e2\u5b9a\u306e\u30dc\u30bf\u30f3\u300d\u306b\u3059\u308b\u304b\u5426\u304b\uff08checkBoxDefault\uff09\u3092\u9078\u3073\u3001\u305d\u308c\u3089\u306b\u3088\u308a\u6c7a\u307e\u3063\u305f\u30a2\u30e9\u30fc\u30c8\u3092\u8868\u793a\u3057\u3001CONFIRMATION \u306e\u5834\u5408\u306f\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u3092\u8868\u793a\u3059\u308b\u300cAlert\u300d\u30dc\u30bf\u30f3\uff08buttonAlert\uff09<\/li>\r\n\u3000<li>\u300c\u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0\u300d\u3092\u8868\u793a\u3057\u3001\u9078\u3070\u308c\u305f\u8272\u3092\u8868\u793a\u3059\u308b\u300cDialog\u300d\u30dc\u30bf\u30f3\uff08buttonDialog\uff09<\/li>\r\n\u3000<li>\u300c&#8230;\u306b\u3064\u3044\u3066\u30a6\u30a3\u30f3\u30c9\u30a6\u300d\u3092\u8868\u793a\u3059\u308b\u300cStage\u300d\u30dc\u30bf\u30f3\uff08buttonStage\uff09<\/li>\r\n<\/ol>\r\n\u3067\u3042\u308b\u3002\u56f3\u3067\u306f\u898b\u306a\u3044\u304c\u3001\u4e0b\u65b9\u306b\u9078\u3070\u308c\u305f\u8272\u3067\u5857\u3089\u308c\u308b\u56db\u89d2\uff08rectangle\uff09\u3068 CONFIRMATION alert \u8868\u793a\u6642\u306b2\u500b\u3042\u308b\u30dc\u30bf\u30f3\u306e\u3069\u3061\u3089\u304c\u62bc\u4e0b\u3055\u308c\u305f\u304b\u3092\u8868\u793a\u3059\u308b labelResult \u304c\u3042\u308b\u3002<\/p>\r\n<h4>(1)<\/h4>\r\n<p>\u307e\u305a\u3001Alert \u306e\u57fa\u672c\u7684\u306a\u3053\u3068\u306b\u3064\u3044\u3066\u8ff0\u3079\u308b\u3002\u30bf\u30a4\u30d7\u3068\u3057\u3066\u3001\u4e3b\u306b\u3001AlertType.INFORMATION\u3001AlertType.CONFIRMATION\u3001AlertType.WARNING\u3001AlertType.ERROR \u306e4\u3064\u304c\u3042\u308a\u3001\u8868\u793a\u7528\u306e title\u3001header\u3001content \u306e\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u3002\u307e\u305f\u3001\u65e2\u5b9a\u306e\u30dc\u30bf\u30f3\u304c\u3042\u308b\u3002CONFIRMATION \u306b\u306f\u300cOK\u300d\u3068\u300c\u53d6\u6d88\u300d\u306e2\u500b\u306e\u30dc\u30bf\u30f3\u304c\u3042\u308b\u304c\u3001\u305d\u306e\u4ed6\u306f\u300cOK\u300d\u30dc\u30bf\u30f31\u500b\u3067\u3042\u308b\u3002\u4ee5\u4e0a\u304c\u3001\u57fa\u672c\u7684\u306a\u3053\u3068\u3067\u3042\u308b\u3002<\/p>\r\n<p>\u3053\u3053\u3067\u306f\u3001titles \u3092\u30bf\u30a4\u30d7\u306e\u548c\u8a33\u3001headers \u3068 contents \u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nprivate String[] titles = {\"\u60c5\u5831\", \"\u78ba\u8a8d\", \"\u8b66\u544a\", \"\u30a8\u30e9\u30fc\"};\r\nprivate String[] headers = {\"\u4eca\u5e74\u306e\u897f\u66a6\", \"\u4e0b\u8a18\u306e\u78ba\u8a8d\", \"\u5229\u7528\u6642\u9593\u306b\u95a2\u3059\u308b\u8b66\u544a\", \"\u30a8\u30e9\u30fc\u3067\u3059\"};\r\nprivate String[] contents = {\"\u4eca\u5e74\u306f2020\u5e74\u3067\u3059\u3002\", \"\u5165\u529b\u3055\u308c\u305f\u304a\u540d\u524d\u306f \u3007\u3007 \u69d8\u3067\u3059\u3002\\n\u6b63\u3057\u3051\u308c\u3070\u300cOK\u300d\u3092\u9593\u9055\u3063\u3066\u3044\u308c\u3070\u300c\u53d6\u6d88\u300d\u3092\u62bc\u3057\u3066\u4e0b\u3055\u3044\u3002\", \"\u9577\u6642\u9593\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e00\u5ea6\u7d42\u4e86\u3057\u3001\u4f11\u606f\u3092\u304a\u53d6\u308a\u304f\u3060\u3055\u3044\u3002\", \"0\u3067\u306f\u5272\u308c\u307e\u305b\u3093\u3002\"};\r\n<\/pre>\r\n<p>\u4e0a\u8a18\u306e\u914d\u5217\u3092\u6709\u52b9\u306b\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001comboBoxAlertType \u8a2d\u5b9a\u7528\u306e stringAlertTypes \u3068\u305d\u308c\u306b\u5fdc\u3058\u305f alertTypes \u3092\u6b21\u306e\u3088\u3046\u3059\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nprivate String[] stringAlertTypes = {\"INFORMATION\", \"CONFIRMATION\", \"WARNING\", \"ERROR\"};\r\nprivate AlertType[] alertTypes = {AlertType.INFORMATION, AlertType.CONFIRMATION, AlertType.WARNING, AlertType.ERROR};\r\n<\/pre>\r\n<p>\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u306f\u3001<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\n@FXML\r\nprivate void initialize() {\r\n\tcomboBoxAlertType.getItems().setAll(stringAlertTypes);\r\n\tcomboBoxAlertType.setValue(\"INFORMATION\");\r\n\t\r\n\tsetHandlers();\r\n}\r\n\r\nprivate void resetResult() {\r\n\trectangle.setVisible(false);\r\n\tlabelResult.setTextFill(Color.BLACK);\r\n\tlabelResult.setText(\"\");\r\n}\r\n<\/pre>\r\n<p>\u3067\u3042\u308b\u3002\u95a2\u6570 initialize() \u3067\u306f\u3001\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3092\u521d\u671f\u5316\u3057\u3001\u95a2\u6570 setHandlers() \u5185\u3067 buttonAlert\u3001buttonDialog\u3001buttonSage \u30dc\u30bf\u30f3\u62bc\u4e0b\u6642\u306e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3092\u8a18\u8ff0\u3059\u308b\u3002\u95a2\u6570 resetResult() \u3067\u306f\u3001\u300cAlert\u300d\u30dc\u30bf\u30f3\u3068\u300cDialog\u300d\u30dc\u30bf\u30f3\u306e\u7d50\u679c\u3092\u8868\u793a\u3059\u308b\u56db\u89d2\uff08rectangle\uff09\u3092\u975e\u8868\u793a\u306b\u3057\u3001\u30e9\u30d9\u30eb\uff08labelResult\uff09\u306e\u6587\u5b57\u306e\u8272\u3092\u9ed2\u306b\u623b\u3057\u3001\u7a7a\u6587\u5b57\u5217\u306b\u623b\u3059\u3002<\/p>\r\n<p>setHandlers() \u306e\u4e0b\u8a18\u306e\u30b3\uff0d\u30c9\u3067\u30b3\u30e1\u30f3\u30c8\r\n<ul>\r\n <li>\/\/ <a href=\"#AlertDescription\">\u9069\u5207\u306a\u30a2\u30e9\u30fc\u30c8\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a><\/li>\r\n <li>\/\/ <a href=\"#DialogDescription\">\u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a><\/li>\r\n <li>\/\/ <a href=\"#StageDescription\">&#8230;\u306b\u3064\u3044\u3066\u30b9\u30c6\u30fc\u30b8\u306e\u8868\u793a<\/a><\/li>\r\n<\/ul>\r\n\u306e\u90e8\u5206\u304c\u5404\u30dc\u30bf\u30f3\u62bc\u4e0b\u6642\u306e\u51e6\u7406\u306e\u91cd\u8981\u306a\u90e8\u5206\u3067\u3042\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nprivate void setHandlers() {\r\n\t\r\n\tbuttonAlert.setOnAction(new EventHandler&lt;ActionEvent&gt;() {\r\n\r\n\t@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tresetResult();\r\n\r\n\t\t\/\/ \u9069\u5207\u306a\u30a2\u30e9\u30fc\u30c8\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a>\r\n\t}\r\n\t\t\r\n\t});\r\n\t\r\n\tbuttonDialog.setOnAction(new EventHandler&lt;ActionEvent&gt;() {\r\n\r\n\t@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tresetResult();\r\n\r\n\t\t\/\/ \u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a>\r\n\t}\r\n\t\t\r\n\t});\r\n\t\r\n\tbuttonStage.setOnAction(new EventHandler&lt;ActionEvent&gt;() {\r\n\r\n\t@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tresetResult();\r\n\t\t\r\n\t\t\/\/ ...\u306b\u3064\u3044\u3066\u30b9\u30c6\u30fc\u30b8\u306e\u8868\u793a<\/a>\r\n\t}\r\n\t\t\r\n\t});\r\n}\r\n<\/pre>\r\n<h5><a name=\"AlertDescription\">\u9069\u5207\u306a\u30a2\u30e9\u30fc\u30c8\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a><\/h5>\r\n<p>\u307e\u305a\u3001\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3067\u9078\u3070\u308c\u3066\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8abf\u3079\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u30bf\u30a4\u30d7\u306e\u30a2\u30e9\u30fc\u30c8\u3092 alert \u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3001\u5bfe\u5fdc\u3059\u308b titles\u3001headers\u3001contents \u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nint i = comboBoxAlertType.getSelectionModel().getSelectedIndex();\r\nAlert alert = new Alert(alertTypes[i]);\r\nalert.setTitle(titles[i]);\r\nalert.setHeaderText(headers[i]);\r\nalert.setContentText(contents[i]);\r\n<\/pre>\r\n<p>\u6b21\u306b\u3001\u300c\u65e2\u5b9a\u306e\u30dc\u30bf\u30f3\u300d\uff08checkBoxDefault\uff09\u304c\u30c1\u30a7\u30c3\u30af\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u3001CONFIRMATION \u306e\u30dc\u30bf\u30f3\u3092\u300c\u306f\u3044\u300d\u3068\u300c\u3044\u3044\u3048\u300d\u306b\u3001\u305d\u306e\u4ed6\u306e\u30dc\u30bf\u30f3\u3092\u300c\u4e86\u89e3\u300d\u306b\u5909\u66f4\u3059\u308b\uff08\u305d\u308c\u306b\u5fdc\u3058\u3066 contents \u306e\u5185\u5bb9\u3082\u300c\u306f\u3044\u300d\u3068\u300c\u3044\u3044\u3048\u300d\u306b\u5909\u66f4\u3059\u308b\uff09\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nif (!checkBoxDefault.isSelected()) {\r\n\tif (i == 1) { \/\/ AlertType.CONFIRMATION\r\n\t\tButtonType buttonTypeYes = new ButtonType(\"\u306f\u3044\", ButtonData.YES);\r\n\t\tButtonType buttonTypeNo = new ButtonType(\"\u3044\u3044\u3048\", ButtonData.NO);\r\n\t\talert.getButtonTypes().setAll(buttonTypeYes, buttonTypeNo);\r\n\t\talert.setContentText(\"\u5165\u529b\u3055\u308c\u305f\u304a\u540d\u524d\u306f \u3007\u3007 \u69d8\u3067\u3059\u3002\\n\u6b63\u3057\u3051\u308c\u3070\u300c\u306f\u3044\u300d\u3092\u9593\u9055\u3063\u3066\u3044\u308c\u3070\u300c\u3044\u3044\u3048\u300d\u3092\u62bc\u3057\u3066\u4e0b\u3055\u3044\u3002\");\r\n\t} else { \/\/ other than AlertType.CONFIRMATION\r\n\t\tButtonType buttonType = new ButtonType(\"\u4e86\u89e3\");\r\n\t\talert.getButtonTypes().setAll(buttonType);\r\n\t}\r\n}\r\n<\/pre>\r\n<p>\u30dc\u30bf\u30f3\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u3001\u65b0\u3057\u3044\u30dc\u30bf\u30f3\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092<br\/> alert.getButtonTypes().setAll(\/*\u65b0\u3057\u3044\u30dc\u30bf\u30f3*\/); <br\/>\r\n\u3068\u3059\u308c\u3070\u826f\u3044\u3002\u5f8c\u3067\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u3092\u8abf\u3079\u308b\u6642\u306e\u305f\u3081\u306b\u3001\u65b0\u3057\u3044\u30dc\u30bf\u30f3\u4f5c\u6210\u6642\u306e\u7b2c2\u5f15\u6570\u3067\u3042\u308b ButtonData \u3092\u899a\u3048\u3066\u304a\u304f\u3002<\/p>\r\n<p>\u4ee5\u4e0a\u3067\u3001\u8868\u793a\u3059\u3079\u304d alert \u306e\u8a2d\u5b9a\u3092\u7d42\u3048\u305f\u306e\u3067\u3001\u8868\u793a\u3057\u3066\u5fdc\u7b54\u3092\uff08\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u308b\u304b\u53f3\u4e0a\u306e\u9589\u3058\u308b\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u308b\u307e\u3067\uff09\u5f85\u3064\u3002CONFIRMATION \u4ee5\u5916\u306f\u5f8c\u51e6\u7406\u3092\u3057\u306a\u304f\u3066\u826f\u3044\u3002CONFIRMATION \u306e\u5834\u5408\u306f\u3001\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u3092\u8868\u793a\u3059\u308b\u3002\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u3092\u8abf\u3079\u308b\u305f\u3081\u306b\u3001\u5fdc\u7b54\u304c\u3042\u308c\u3070\uff08result.isPresent() \u304c\u771f\u306e\u5834\u5408\uff09\u3001\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u306e\u30bf\u30a4\u30d7\uff08result.get()\uff09\u3092\u3001\u307e\u305a\u3001\u65e2\u5b9a\u306e\u30dc\u30bf\u30f3\u306e\u30bf\u30a4\u30d7\u3067\u3042\u308b ButtonType.OK \u304b ButtonType.CANCEL \u306e\u3069\u3061\u3089\u3067\u3042\u308b\u304b\u8abf\u3079\u308b\u3002\u3082\u3057\u3001\u3069\u3061\u3089\u3067\u3082\u306a\u3051\u308c\u3070\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3057\u305f\u30dc\u30bf\u30f3\u30bf\u30a4\u30d7\u3067\u3042\u308b\u3002\u3053\u306e\u5834\u5408\u306f\u3001\u66f4\u306b\u3001\u30dc\u30bf\u30f3\u30c7\u30fc\u30bf\uff08result.get().getButtonData()\uff09\u307e\u3067\u8abf\u3079\u308b\u3002\u3059\u306a\u308f\u3061\u3001\u4e0a\u8a18\u3067\u4f5c\u6210\u3057\u305f ButtonData.YES \u304b ButtonData.NO \u306e\u3069\u3061\u3089\u3067\u3042\u308b\u304b\u3092\u8abf\u3079\u308b\u3002\u62bc\u4e0b\u3055\u308c\u305f\u30dc\u30bf\u30f3\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u8868\u793a\u7528\u306e\u30e9\u30d9\u30eb\u306b\u8a2d\u5b9a\u3059\u308b\u3002\u4f8b\u3048\u3070\u3001<br\/>\r\nlabelResult.setText(&#8220;\u300c\u306f\u3044\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u307e\u3057\u305f\u3002&#8221;);<br\/>\r\n\u3067\u3042\u308b\u3002\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nOptional&lt;ButtonType&gt; result = alert.showAndWait();\r\nif (i == 1) { \/\/ AlertType.CONFIRMATION\r\n\tif (result.isPresent()) {\r\n\t\tif (result.get() == ButtonType.OK) {\r\n\t\t\tlabelResult.setText(\"\u300cOK\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u307e\u3057\u305f\u3002\");\r\n\t\t} else if (result.get() == ButtonType.CANCEL) {\r\n\t\t\tlabelResult.setText(\"\u300c\u53d6\u6d88\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u307e\u3057\u305f\u3002\");\r\n\t\t} else if (result.get().getButtonData() == ButtonData.YES) {\r\n\t\t\tlabelResult.setText(\"\u300c\u306f\u3044\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u307e\u3057\u305f\u3002\");\r\n\t\t} else if (result.get().getButtonData() == ButtonData.NO) {\r\n\t\t\tlabelResult.setText(\"\u300c\u3044\u3044\u3048\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u307e\u3057\u305f\u3002\");\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\r\n<p>\u3068\u306a\u308b\u3002<\/p>\r\n\r\n<h4>(2)<\/h4>\r\n<h5><a name=\"DialogDescription\">\u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u3068\u5f8c\u51e6\u7406<\/a><\/h5>\r\n<p>\u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0 DialogFavoriteColor \u306e\u5185\u5bb9\u306f\u5f8c\u3067\u8ff0\u3079\u308b\u304c\u3001Color \u3092\u623b\u308a\u5024\u3068\u3057\u3066\u8fd4\u3059 Dialog \u3067\u3042\u308b\u3002\u307e\u305a\u3001DialogFavoriteColor \u306e\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u308a\u8868\u793a\u3057\u3001\u5fdc\u7b54\u3092\u5f85\u3064\u3002\u5fdc\u7b54\u306e\u5185\u5bb9\u3092\u8abf\u3079\u308b\u305f\u3081\u306b\u3001\u5fdc\u7b54\u304c\u3042\u308c\u3070\uff08result.isPresent() \u304c\u771f\u306e\u5834\u5408)\u3001\u623b\u308a\u5024\u306e Color\uff08result.get()\uff09\u3092\u8abf\u3079\u3001color \u306b\u4ee3\u5165\u3059\u308b\u3002\u3053\u306e\u8272\u3092\u8868\u793a\u3059\u308b rectangle \u3092\u53ef\u8996\u72b6\u614b\u306b\u3057\u3001\u8272\u3092 color \u306b\u8a2d\u5b9a\u3057\u3001labelResult \u306b\u300c\u8272\u306e\u5024\u300d\u3092\u3053\u306e\u8272\u3067\u8868\u793a\u3059\u308b\u3002color.toString() \u3067 0x \u3067\u59cb\u307e\u308b16\u9032\u6570\u3067\u8272\u306e\u5024\u304c\u5f97\u3089\u308c\u308b\u304c\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u5185\u306e ColorPicker \u306e\u8868\u793a\u3068\u5408\u308f\u305b\u308b\u305f\u3081\u306b\u3001\u300c0x\u300d\u3092\u300c#\u300d\u306b\u5909\u66f4\u3057\u3001\u6700\u5f8c\u306e2\u6841\u3092\u6368\u3066\u308b\u3002\u3059\u306a\u308f\u3061\u3001index \u304c2\uff08\u3092\u542b\u307f\uff09\u304b\u30898\uff08\u3092\u542b\u307e\u306a\u3044\uff09\u307e\u3067\u3092\u5229\u7528\u3059\u308b\u3002\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nDialogFavoriteColor dialogFavoriteColor = new DialogFavoriteColor();\r\nOptional&lt;Color&gt; result = dialogFavoriteColor.showAndWait();\r\nif (result.isPresent()) {\r\n\tColor color = result.get();\r\n\trectangle.setVisible(true);\r\n\trectangle.setFill(color);\r\n\trectangle.setStroke(color);\r\n\tlabelResult.setTextFill(color);\r\n\tlabelResult.setText(\"\u597d\u304d\u306a\u8272\u3068\u3057\u3066 #\" + color.toString().substring(2, 8) + \" \u304c\u9078\u3070\u308c\u307e\u3057\u305f\u3002\");\r\n}\r\n<\/pre>\r\n<p>\u8272\u306e\u9078\u629e\u30c0\u30a4\u30a2\u30ed\u30b0 DialogFavoriteColor \u306b\u95a2\u3057\u3066\u8ff0\u3079\u308b\u3002\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u4e0b\u56f3\u306e\u901a\u308a\u3067\u3001\u8d64\u3067\u56f2\u3093\u3060\u90e8\u5206\u304c DialogFavoriteColorVBox \u3067\u3042\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nDialog \u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u3067\u597d\u304d\u306a\u8272\u3092\u9078\u3076\uff08\u8d64\u3067\u56f2\u3093\u3060\u90e8\u5206\u304c VBox\uff09<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogRev.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageDialogRev.png\" alt=\"\u30c0\u30a4\u30a2\u30ed\u30b0 VBox\" width=\"256\" height=\"219\" class=\"aligncenter size-full wp-image-899\" \/><\/a>\r\n<\/div>\r\n<p>\u3053\u306e DialogFavoriteColorVBox \u306e Scene Builder \u3067\u306e\u4f5c\u696d\u56f3\u306b\u3064\u3044\u3066\u306f\u4e0a\u8ff0\u3057\u305f\u3002\u3053\u306e VBox \u306e\u6d3e\u751f\u30af\u30e9\u30b9\u3067\u3042\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc DialogFavoriteColorVBox.java \u306b\u95a2\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b colorPicker \u306e\u8272\u3092\u8fd4\u3059 getter \u3092\u8a18\u8ff0\u3057\u3066\u304a\u304f\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\npublic Color getColor() {\r\n\treturn colorPicker.getValue();\r\n}\r\n<\/pre>\r\n<p>\u3055\u3066\u3001Dialog \u3092\u5229\u7528\u3059\u308b\u72b6\u6cc1\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u4f55\u304b\u306e\u60c5\u5831\u3092\u5f97\u308b\u3001\u3053\u3068\u3067\u3042\u308b\u3002\u3053\u3053\u3067\u306f\u30e6\u30fc\u30b6\u30fc\u304c\u9078\u3093\u3060\u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u306e\u8272\u3067\u3042\u308b\u3002\u305d\u306e\u5834\u5408 DialogFavoriteColor \u30af\u30e9\u30b9\u306f Dialog \u306e\u6d3e\u751f\u30af\u30e9\u30b9\u3067\u623b\u308a\u5024\u304c <Color> \u3067\u3042\u308b\u3053\u3068\u3092\u6b21\u306e\u3088\u3046\u8a18\u8ff0\u3059\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\npublic class DialogFavoriteColor extends Dialog&lt;Color&gt; {\r\n\t\r\n    private DialogPane dialogPane = getDialogPane();\r\n    \r\n\t\tpublic DialogFavoriteColor() {\r\n\t\t\t\r\n\t\t\t\/\/ \u5fc5\u8981\u306a\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\r\n\t\t\t\r\n\t\t}\r\n}\r\n<\/pre>\r\n<p>\u305f\u3060\u3057\u3001\u5f8c\u3067\u5fc5\u8981\u306b\u306a\u308b\u3053\u306e Dialog \u306e\u8868\u793a\u90e8\u5206 DialogPane \u3092 dialogPane \u306b\u4ee3\u5165\u3057\u3066\u304a\u3044\u305f\u3002\u5f8c\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u3067\u5fc5\u8981\u306a\u51e6\u7406\u3092\u3059\u308c\u3070\u826f\u3044\u3002\u307e\u305a\u3001\u4e0a\u8ff0\u306e DialogFavoriteColorVBox \u306e\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u308a\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u90e8\u306b\u5165\u308c\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nDialogFavoriteColorVBox dialogFavoriteColorVBox = new DialogFavoriteColorVBox();\r\n\r\ndialogPane.setContent(dialogFavoriteColorVBox);\r\n<\/pre>\r\n<p>\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u8a2d\u5b9a\u3057\u3001\u300c\u6c7a\u5b9a\u300d\u3068\u300c\u53d6\u6d88\u300d\u3068\u8868\u793a\u3055\u308c\u3001ButtonData \u304c\u3001\u5404\u3005\u3001OK_DONE \u3068 CANCEL_CLOSE \u3067\u3042\u308b ButtonType \u3092\u4f5c\u308a\u3001\u3053\u308c\u3089\u3092 dialogPane \u306b\uff08\u65e2\u306b\u4f55\u304b\u3042\u308c\u3070\u30af\u30ea\u30a2\u3057\uff09\u52a0\u3048\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nthis.setTitle(\"\u8272\u306e\u9078\u629e\");\r\nButtonType yesButtonType = new ButtonType(\"\u6c7a\u5b9a\", ButtonData.OK_DONE);\r\nButtonType cancelButtonType = new ButtonType(\"\u53d6\u6d88\", ButtonData.CANCEL_CLOSE);\r\ndialogPane.getButtonTypes().setAll(yesButtonType, cancelButtonType);\r\n<\/pre>\r\n<p>\u6700\u5f8c\u306b\u3001\u6b21\u306e setResultConverter \u304c\u91cd\u8981\u3067\u3042\u308b\u3002Dialog \u304c\u77e5\u3063\u3066\u3044\u308b\u306e\u306f\u62bc\u3055\u308c\u305f buttonType \u306a\u306e\u3067\u3001\u305d\u306e\u5f8c\u3001\u308f\u308c\u308f\u308c\u304c\u5fc5\u8981\u3068\u3059\u308b Color \u3092\u6c42\u3081\u305d\u308c\u3092\u8fd4\u3059\u90e8\u5206\u304c\u3001call() \u95a2\u6570\u306e\u4e2d\u8eab\u3067\u3042\u308b\u3002buttonType \u304c null \u3067\u306a\u3051\u308c\u3070\u3001buttonType.getButtonData() \u3067 ButtonData \u3092\u6c42\u3081\u3001\u305d\u308c\u304c OK_DONE \u3067\u3042\u308c\u3070\u3001dialogFavoriteColorVBox.getColor() \u3067\u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u306e\u8272\u3092\u8fd4\u3059\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nsetResultConverter(new Callback&lt;ButtonType, Color&gt;() {\r\n\r\n\t@Override\r\n\tpublic Color call(ButtonType buttonType) {\r\n          ButtonData data = (buttonType == null ? null : buttonType.getButtonData());\r\n          return (data == ButtonData.OK_DONE) ? dialogFavoriteColorVBox.getColor() : null;\r\n\t}\r\n\t\r\n});\r\n<\/pre>\r\n\r\n<h4>(3)<\/h4>\r\n<h5><a name=\"StageAboutDescription\">&#8230;\u306b\u3064\u3044\u3066\u30b9\u30c6\u30fc\u30b8\u306e\u8868\u793a<\/a><\/h5>\r\n<p>&#8230;\u306b\u3064\u3044\u3066\u30b9\u30c6\u30fc\u30b8 StageAbout \u306e\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u308a\u3001\u3053\u3053\u3067\u306f\u3001AppName \u3060\u3051\u3092\u8a2d\u5b9a\u3057\u3001\u8868\u793a\u3057\u3001\u5fdc\u7b54\u3092\u5f85\u3064\u3002\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nStageAbout stageAbout = new StageAbout();\r\nstageAbout.setAppName(\"Alert, Dialog and Stage\");\r\nstageAbout.showAndWait();\r\n<\/pre>\r\n<p>\u6b21\u306b\u3001StageAbout \u306b\u3064\u3044\u3066\u8ff0\u3079\u308b\u3002StageAbout \u306f\u4e0b\u56f3\u306e\u3088\u3046\u306a Stage \u306e\u6d3e\u751f\u30af\u30e9\u30b9\u3067\u304b\u3064\u305d\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3042\u308b\u3002\u3053\u308c\u306e Scene Builder \u306b\u304a\u3051\u308b\u4f5c\u696d\u56f3\u306f\u4e0a\u8ff0\u3057\u305f\u3002Stage\uff08\u30a6\u30a3\u30f3\u30c9\u30a6\uff09\u306f\u901a\u5e38\u3001\u30b7\u30b9\u30c6\u30e0\u30e1\u30cb\u30e5\u30fc\u3001\u6700\u5c0f\u5316\u30dc\u30bf\u30f3\u3001\u6700\u5927\u5316\u30dc\u30bf\u30f3\u3001\u9589\u3058\u308b\u30dc\u30bf\u30f3\u304c\u30bf\u30a4\u30c8\u30eb\u30d0\u30fc\u306b\u8868\u793a\u3055\u308c\u3001\u305d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4ed6\u306e Stage\uff08\u30a6\u30a3\u30f3\u30c9\u30a6\uff09\u3092\u958b\u3044\u3066\u3044\u308b\u5834\u5408\u3001\u305d\u308c\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3067\u304d\u308b\u3002\u3057\u304b\u3057\u3001\u3044\u308f\u3086\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u306f\u3001\u3053\u308c\u3089\u306e\u3046\u3061\u3001\u9589\u3058\u308b\u30dc\u30bf\u30f3\u304c\u3042\u308b\u3060\u3051\u3067\u3042\u308b\u3002\u5f93\u3063\u3066\u3001\u91cd\u8981\u306a\u90e8\u5206\u306f\u3001\u3053\u306e\u5909\u66f4\u3092\u884c\u3046\u3053\u3068\u3067\u3042\u308b\u3002<\/p>\r\n<div class=\"m-0-auto-1rem center\">\r\nStage &#8230;\u306b\u3064\u3044\u3066\uff08\u518d\u63b2\uff09<br\/>\r\n<a href=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStage.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/namekata.in.net\/wp\/javafx\/wp-content\/uploads\/sites\/28\/2020\/03\/AlertDialogAndStageStage.png\" alt=\"\u30b9\u30c6\u30fc\u30b8\" width=\"203\" height=\"255\" class=\"aligncenter size-full wp-image-894\" \/><\/a>\r\n<\/div>\r\n<p>\u307e\u305a\u3001appName \u7b49\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e setter \u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\npublic void setAppName(String appName) {\r\n\tthis.setTitle(appName);\r\n\tlabelAppName.setText(appName);\r\n}\r\n\r\npublic void setVerNo(String verNo) {\r\n\tlabelVerNo.setText(verNo);\r\n}\r\n\r\npublic void setYear(String year) {\r\n\tlabelYear.setText(year);\r\n}\r\n\r\npublic void setAuthor(String author) {\r\n\tlabelAuthor.setText(author);\r\n}\r\n<\/pre>\r\n<p>\u6b21\u306b\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u3067\u3001\u6b21\u306e\u3053\u3068\u3092\u884c\u3046\u3001\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5185\u306b\u4ed6\u306e Stage\uff08\u30a6\u30a3\u30f3\u30c9\u30a6\uff09\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u308c\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3001\u9589\u3058\u308b\u30dc\u30bf\u30f3\u306e\u307f\u3092\u30bf\u30a4\u30c8\u30eb\u30d0\u30fc\u306b\u8868\u793a\u3059\u308b\u3002\u307e\u305f\u3001\u5f8c\u3067\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570 stage \u306b\u81ea\u5206\u81ea\u8eab\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nthis.initModality(Modality.APPLICATION_MODAL);\r\nthis.initStyle(StageStyle.UTILITY);\r\n\r\nthis.stage = this;\r\n<\/pre>\r\n<p>\u6700\u5f8c\u306b\u3001\u95a2\u6570 initialize() \u5185\u3067\u300cOK\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u6642\u306e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3067\u3001\u81ea\u5206\u81ea\u8eab\u3092\u9589\u3058\u308b\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\n@FXML\r\nprivate void initialize() {\r\n\t\r\n\tbuttonOK.setOnAction(new EventHandler&lt;ActionEvent&gt;() {\r\n\r\n\t@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tfireEvent(new WindowEvent(stage, WindowEvent.WINDOW_CLOSE_REQUEST));\r\n\t}\r\n\t\t\r\n\t});\r\n}\r\n<\/pre>\r\n<p>\u3053\u306e AlertDialogStage \u306e Eclipse \u30d7\u30ed\u30b8\u30a7\u30af\u30c8 src \u306e zip \u30d5\u30a1\u30a4\u30eb\u306f<a href=\"https:\/\/namekata.in.net\/zip\/AlertDialogStage_src.zip\">\u3053\u3061\u3089<\/a>\u3001\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306f<a href=\"https:\/\/namekata.in.net\/zip\/AlertDialogStage_EXE.zip\">\u3053\u3061\u3089<\/a>\u3002<\/p>","protected":false},"excerpt":{"rendered":"\u30e6\u30fc\u30b6\u30fc\u306b\u60c5\u5831\u3092\u63d0\u793a\u3057\u305f\u308a\u3001\u78ba\u8a8d\u3092\u3059\u308b\u6642\u306b\u4f7f\u7528\u3059\u308b\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u3001JavaFX \u306e Alert\u3001Dialog\u3001Stage \u306b\u3064\u3044\u3066\u5177\u4f53\u4f8b\u3092\u901a\u3058\u3066\u8aac\u660e\u3059\u308b\u3002\u3053\u3053\u3067\u3044\u3046\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u3068\u306f\u3001\u305d\u306e\u30c0\u30a4\u30a2 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[3,5],"tags":[27,28,24],"class_list":["post-886","post","type-post","status-publish","format-standard","hentry","category-javafx-morethanorequal11","category-scene-builder","tag-alert","tag-dialog","tag-stage","no-wpautop"],"_links":{"self":[{"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/posts\/886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/comments?post=886"}],"version-history":[{"count":6,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/posts\/886\/revisions"}],"predecessor-version":[{"id":911,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/posts\/886\/revisions\/911"}],"wp:attachment":[{"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/media?parent=886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/categories?post=886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/namekata.in.net\/wp\/javafx\/wp-json\/wp\/v2\/tags?post=886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}