{"id":1556,"date":"2014-09-19T23:41:01","date_gmt":"2014-09-19T21:41:01","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=1556"},"modified":"2014-09-19T23:41:01","modified_gmt":"2014-09-19T21:41:01","slug":"fontawesomefx-8-0-10-released","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=1556","title":{"rendered":"FontAwesomeFX 8.0.10 released"},"content":{"rendered":"<p><strong>FontAwesomeFX 8.0.10 introduces Stacked Icons and FXML support<\/strong><\/p>\n<p>Binaries: <a href=\"https:\/\/bitbucket.org\/Jerady\/fontawesomefx\/downloads\" title=\"https:\/\/bitbucket.org\/Jerady\/fontawesomefx\/downloads\" target=\"_blank\">Download <\/a><br \/>\nSources: <a href=\"https:\/\/bitbucket.org\/Jerady\/fontawesomefx\" title=\"FontAwesomeFX\" target=\"_blank\">Bitbucket<\/a><br \/>\nMaven:<br \/>\n[xml]<br \/>\n<dependency><br \/>\n  <groupId>de.jensd<\/groupId><br \/>\n  <artifactId>fontawesomefx<\/artifactId><br \/>\n  <version>8.0.10<\/version><br \/>\n<\/dependency><br \/>\n[\/xml]<\/p>\n<p><strong>Stacked Icons<\/strong><\/p>\n<p><a href=\"http:\/\/fontawesome.io\" title=\"http:\/\/fontawesome.io\" target=\"_blank\">FontAwesome<\/a> is featuring <a href=\"http:\/\/fortawesome.github.io\/Font-Awesome\/examples\/\" title=\"Stacked Icons\" target=\"_blank\">Stacked Icons<\/a> which is clearly also for JavaFX Applications this is a useful feature.<\/p>\n<p>To support Stackend Icons FontAwesomeFX 8.0.10 comes with <strong>two new classes:<\/strong> <code><strong>AwesomeIconsStack<\/strong><\/code> and <code><strong>Icon<\/strong><\/code>.<\/p>\n<p><code><strong>AwesomeIconsStack<\/strong><\/code><br \/>\nis basically a StackPane providing convent methods to add and remove <code><strong>Icons<\/strong><\/code>.<\/p>\n<p><code><strong>Icon<\/strong><\/code><br \/>\nis a Node which is able to display a styleable FontAwesome icon. <code><strong>Icons<\/strong><\/code> can be styled in two ways:<\/p>\n<p><strong>by setting a style class:<\/strong><br \/>\n[java]<br \/>\nRegion stackedIcon2 = AwesomeIconsStack.create()<br \/>\n                .add(Icon.create()<br \/>\n                        .icon(AwesomeIcon.SQUARE)<br \/>\n                        .size(&#8220;3em&#8221;)<br \/>\n                        .styleClass(&#8220;stack-base&#8221;))<br \/>\n                .add(Icon.create()<br \/>\n                        .icon(AwesomeIcon.STAR)<br \/>\n                        .size(&#8220;2em&#8221;)<br \/>\n                        .styleClass(&#8220;stack-top&#8221;)<br \/>\n                );<br \/>\n[\/java]<\/p>\n<p><strong>or by setting the style:<\/strong><\/p>\n<p>[java]<br \/>\nRegion stackedIcon3 = AwesomeIconsStack.create()<br \/>\n                .add(Icon.create()<br \/>\n                        .icon(AwesomeIcon.SQUARE)<br \/>\n                        .style(&#8220;-fx-font-size: 4em; -fx-text-fill: yellowgreen;&#8221;))<br \/>\n                .add(Icon.create()<br \/>\n                        .icon(AwesomeIcon.APPLE)<br \/>\n                        .style(&#8220;-fx-font-size: 3em; -fx-text-fill: white;&#8221;)<br \/>\n                );<br \/>\n[\/java]<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1566\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1566\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1.png\" data-orig-size=\"497,368\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"fontawesomefx_8010_1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1-300x222.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1.png\" alt=\"fontawesomefx_8010_1\" width=\"497\" height=\"368\" class=\"aligncenter size-full wp-image-1566\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1.png 497w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_1-300x222.png 300w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p><strong>Thats the code to create Icons like above:<\/strong><\/p>\n<p>[java]<br \/>\nRegion stackedIcon1 = AwesomeIconsStack.create().add(Icon.create());<\/p>\n<p>Region stackedIcon2 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.SQUARE)<br \/>\n                .size(&#8220;3em&#8221;)<br \/>\n                .styleClass(&#8220;stack-base&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.STAR)<br \/>\n                .size(&#8220;2em&#8221;)<br \/>\n                .styleClass(&#8220;stack-top&#8221;)<br \/>\n        );<\/p>\n<p>Region stackedIcon3 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.SQUARE)<br \/>\n                .style(&#8220;-fx-font-size: 4em; -fx-text-fill: yellowgreen;&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.APPLE)<br \/>\n                .style(&#8220;-fx-font-size: 3em; -fx-text-fill: white;&#8221;)<br \/>\n        );<\/p>\n<p>Region stackedIcon4 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.SQUARE)<br \/>\n                .style(&#8220;-fx-font-size: 4em; -fx-text-fill: yellowgreen;&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.APPLE)<br \/>\n                .style(&#8220;-fx-font-size: 3em; -fx-text-fill: black;&#8221;)<br \/>\n        );<\/p>\n<p>Region stackedIcon5 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.BUG)<br \/>\n                .style(&#8220;-fx-font-size: 2em; -fx-text-fill: black;&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.BAN)<br \/>\n                .style(&#8220;-fx-font-size: 4em; -fx-text-fill: red; -fx-opacity: 0.5;&#8221;)<br \/>\n        );<\/p>\n<p>Region stackedIcon6 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.CIRCLE)<br \/>\n                .style(&#8220;-fx-font-size: 8em; -fx-text-fill: linear-gradient(#70b4e5 0%, #247cbc 70%, #2c85c1 85%);&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.TWITTER)<br \/>\n                .style(&#8220;-fx-font-size: 4em; -fx-text-fill: white;&#8221;)<br \/>\n        );<\/p>\n<p>Region stackedIcon7 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.CIRCLE)<br \/>\n                .style(&#8220;-fx-font-size: 12em; -fx-text-fill: linear-gradient(#70b4e5 0%, #247cbc 70%, #2c85c1 85%);&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.BITBUCKET)<br \/>\n                .style(&#8220;-fx-font-size: 6em; &#8221;<br \/>\n                        + &#8220;-fx-text-fill: linear-gradient(#ffffff, #d2d2d2); &#8221;<br \/>\n                        + &#8220;-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 4 , 0.0 , 1 , 1 );&#8221;)<br \/>\n        );<\/p>\n<p>HBox stackIconBox = new HBox();<br \/>\nstackIconBox.setSpacing(5.0);<br \/>\nstackIconBox.getChildren().addAll(stackedIcon1, stackedIcon2, stackedIcon3, stackedIcon4, stackedIcon5, stackedIcon6, stackedIcon7);<\/p>\n<p>Region iconStack1 = AwesomeIconsStack.create()<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.CIRCLE)<br \/>\n                .style(&#8220;-fx-font-size: 12em; -fx-text-fill: linear-gradient(#70b4e5 0%, #247cbc 70%, #2c85c1 85%);&#8221;))<br \/>\n        .add(Icon.create()<br \/>\n                .icon(AwesomeIcon.BITBUCKET)<br \/>\n                .style(&#8220;-fx-font-size: 6em; &#8221;<br \/>\n                        + &#8220;-fx-text-fill: linear-gradient(#ffffff 0%, #d2d2d2); &#8221;<br \/>\n                        + &#8220;-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 4 , 0.0 , 1 , 1 );&#8221;))<br \/>\n        .add(new Icon(AwesomeIcon.BAN, null, &#8220;-fx-font-size: 12em; -fx-text-fill: red; -fx-opacity: 0.5;&#8221;, null));<\/p>\n<p>HBox stackIconBox2 = new HBox();<br \/>\nstackIconBox2.setSpacing(5.0);<br \/>\nstackIconBox2.getChildren().addAll(iconStack1);<\/p>\n<p>[\/java]<\/p>\n<p>Have a look at &#8220;<code><strong>iconStack1<\/strong><\/code>&#8221; in the code above:<br \/>\nthe number of stacked <code><strong>Icons<\/strong><\/code> is not limited to only two.<\/p>\n<p><strong>Support for FXML<\/strong><\/p>\n<p>In respect to the issue opened by <strong>Manuel Mauky<\/strong>s (@manuel_mauky) I played with the new <code><strong>@NamedArg<\/strong><\/code> annotation. It&#8217;s also possible to use the <code><strong>Icon<\/strong><\/code> in FXML (even stacked):<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1570\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1570\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2.png\" data-orig-size=\"433,487\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"fontawesomefx_8010_2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2-266x300.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2-266x300.png\" alt=\"fontawesomefx_8010_2\" width=\"266\" height=\"300\" class=\"aligncenter size-medium wp-image-1570\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2-266x300.png 266w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_2.png 433w\" sizes=\"(max-width: 266px) 100vw, 266px\" \/><\/a><\/p>\n<p>[xml]<br \/>\n<VBox alignment=\"CENTER\" spacing=\"10.0\"><br \/>\n  <children><br \/>\n    <Icon awesomeIcon=\"STAR\" size=\"4em\" style=\"-fx-font-size: 6em; -fx-text-fill: linear-gradient(#ffffff, #d2d2d2); -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.5) , 8 , 0.0 , 0 , 0 );\" styleClass=\"\" \/><br \/>\n    <StackPane><br \/>\n      <children><br \/>\n        <Icon awesomeIcon=\"CIRCLE\" style=\"-fx-font-size: 24em; -fx-text-fill: linear-gradient(#70b4e5 0%, #247cbc 70%, #2c85c1 85%);\" styleClass=\"\" size=\"\"\/><br \/>\n        <Icon awesomeIcon=\"BITBUCKET\" style=\"-fx-font-size: 12em; -fx-text-fill: linear-gradient(#ffffff, #d2d2d2); -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 4 , 0.0 , 1 , 1 );\" styleClass=\"\" size=\"\"\/><br \/>\n      <\/children><br \/>\n    <\/StackPane><br \/>\n  <\/children><br \/>\n<\/VBox><br \/>\n[\/xml]<\/p>\n<p>I am not a Ninja master yet, but somehow I imported a custom component to get it also supported in SceneBuilder 2.0:<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1572\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1572\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3.png\" data-orig-size=\"1255,678\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"fontawesomefx_8010_3\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3-300x162.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3-1024x553.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3-1024x553.png\" alt=\"fontawesomefx_8010_3\" width=\"688\" height=\"371\" class=\"aligncenter size-large wp-image-1572\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3-1024x553.png 1024w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3-300x162.png 300w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/09\/fontawesomefx_8010_3.png 1255w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FontAwesomeFX 8.0.10 introduces Stacked Icons and FXML support Binaries: Download Sources: Bitbucket Maven: [xml] de.jensd fontawesomefx 8.0.10 [\/xml] Stacked Icons FontAwesome is featuring Stacked Icons which is clearly also for JavaFX Applications this is a useful feature. To support Stackend Icons FontAwesomeFX 8.0.10 comes with two new classes: AwesomeIconsStack and Icon. AwesomeIconsStack is basically a&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=1556\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">FontAwesomeFX 8.0.10 released<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"FontAwesomeFX 8.0.10 released http:\/\/wp.me\/p38FCL-p6","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[52,32,20,2,25,94,15,59,14,4,8],"tags":[108,93,95,83,90,31,84,60,82,76,39],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-p6","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1556"}],"collection":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1556"}],"version-history":[{"count":29,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1556\/revisions"}],"predecessor-version":[{"id":1588,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1556\/revisions\/1588"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}