{"id":733,"date":"2013-07-31T23:37:06","date_gmt":"2013-07-31T21:37:06","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=733"},"modified":"2014-08-29T15:32:28","modified_gmt":"2014-08-29T13:32:28","slug":"font-awesome-icons-with-javafx-minor-updates","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=733","title":{"rendered":"\u2018Font Awesome\u2019 Icons with JavaFX: minor updates"},"content":{"rendered":"<p><strong>Refer for latest updates <a href=\"https:\/\/bitbucket.org\/Jerady\/fontawesomefx\" title=\"\u2018Font Awesome\u2019 Icons\">here<\/a>.<\/strong><\/p>\n<p>Hi,<\/p>\n<p>some minor <strong>FontAwesomeFX<\/strong> updates:<\/p>\n<p>The <code><strong>AwesomeDude<\/strong><\/code> now provides convenience methods to add an AwesomeFont-Icon to existing <code><strong>Labeled<\/strong><\/code>-controls and <code><strong>MenuItems<\/strong><\/code> by setting the graphic node:<\/p>\n<p><code><strong>labeled.setGraphic(createIconLabel(icon,iconSize));<\/strong><\/code><\/p>\n<p>Recall that direct subclasses of <code><strong>Labeled<\/strong><\/code> are <code><strong>ButtonBase<\/strong><\/code>, <code><strong>Cell<\/strong><\/code>, <code><strong>Label<\/strong><\/code>, <code><strong>TitledPane<\/strong><\/code> and their friends (by now I have not tested all combination).<\/p>\n<p>[java]<br \/>\nsetIcon(Labeled labeled, AwesomeIcon icon)<br \/>\nsetIcon(Labeled labeled, AwesomeIcon icon, ContentDisplay contentDisplay)<br \/>\nsetIcon(Labeled labeled, AwesomeIcon icon, String iconSize)<br \/>\nsetIcon(Labeled labeled, AwesomeIcon icon, String iconSize, ContentDisplay contentDisplay)<br \/>\nsetIcon(MenuItem menuItem, AwesomeIcon icon)<br \/>\nsetIcon(MenuItem menuItem, AwesomeIcon icon, String iconSize)<br \/>\nsetIcon(MenuItem menuItem, AwesomeIcon icon, String fontSize, String iconSize)[\/java]<\/p>\n<p><strong>Usage<\/strong><\/p>\n<p>For example, I use the new methods for the UI of my RaspberryPi Home project:<\/p>\n<p>[java]<br \/>\nAwesomeDude.setIcon(onButton, AwesomeIcon.LIGHTBULB, &#8220;72px&#8221;);<br \/>\nAwesomeDude.setIcon(offButton, AwesomeIcon.LIGHTBULB, &#8220;72px&#8221;);<br \/>\nAwesomeDude.setIcon(exitButton, AwesomeIcon.POWER_OFF, &#8220;48px&#8221;);<br \/>\n[\/java]<\/p>\n<p>Looks like this:<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"756\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=756\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13.png\" data-orig-size=\"700,393\" data-comments-opened=\"0\" 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;}\" data-image-title=\"sweethomefx_1_0_1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13-300x168.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13.png\" alt=\"sweethomefx_1_0_1\" width=\"700\" height=\"393\" class=\"aligncenter size-full wp-image-756\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13.png 700w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2013\/07\/sweethomefx_1_0_13-300x168.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p><strong>Source<\/strong><br \/>\n<a href=\"https:\/\/bitbucket.org\/Jerady\/fontawesomefx\" title=\"FontAwesomeFX\" target=\"_blank\">@ Bitbucket<\/a><\/p>\n<p><strong>Maven<\/strong><\/p>\n<p>[xml]<br \/>\n<dependency><br \/>\n  <groupId>de.jensd<\/groupId><br \/>\n  <artifactId>fontawesomefx<\/artifactId><br \/>\n  <version>8.0.1<\/version><br \/>\n<\/dependency><br \/>\n[\/xml]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Refer for latest updates here. Hi, some minor FontAwesomeFX updates: The AwesomeDude now provides convenience methods to add an AwesomeFont-Icon to existing Labeled-controls and MenuItems by setting the graphic node: labeled.setGraphic(createIconLabel(icon,iconSize)); Recall that direct subclasses of Labeled are ButtonBase, Cell, Label, TitledPane and their friends (by now I have not tested all combination). [java] setIcon(Labeled&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=733\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">\u2018Font Awesome\u2019 Icons with JavaFX: minor updates<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","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":"#FontAwesome Icons with #JavaFX: minor udates http:\/\/wp.me\/p38FCL-bP","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[25,15,4,18],"tags":[90,76],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-bP","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733"}],"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=733"}],"version-history":[{"count":25,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions"}],"predecessor-version":[{"id":1477,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions\/1477"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}