{"id":1332,"date":"2014-07-15T21:36:05","date_gmt":"2014-07-15T19:36:05","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=1332"},"modified":"2015-02-06T20:52:46","modified_gmt":"2015-02-06T19:52:46","slug":"tabpanedetacher-make-your-tabs-detachable","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=1332","title":{"rendered":"TabPaneDetacher: Make your tabs detachable"},"content":{"rendered":"<p>I though it would be cool to detach e.g. the pane to publish messages in MQTT.fx if needed by just dragging the tab and dropping it at the wanted position to open its content as a dedicated new window. <\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1340\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1340\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab.jpg\" data-orig-size=\"623,539\" 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;}\" data-image-title=\"drag tab\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab-300x259.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab.jpg\" alt=\"drag tab\" width=\"623\" height=\"539\" class=\"aligncenter size-full wp-image-1340\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab.jpg 623w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/07\/drag-tab-300x259.jpg 300w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/><\/a><\/p>\n<p>The <code><strong>TabPaneDetacher<\/strong><\/code> provides an easy to use way to enable the detach capability of with any JavaFX TabPane instance just by calling:<\/p>\n<p>[java]<br \/>\npublic class TabPaneDetacherDemoController {<\/p>\n<p>    @FXML<br \/>\n    private TabPane demoTabPane;<\/p>\n<p>    @FXML<br \/>\n    public void initialize() {<br \/>\n        TabPaneDetacher.create().makeTabsDetachable(demoTabPane);<br \/>\n    }    <\/p>\n<p>}<br \/>\n[\/java]  <\/p>\n<p>The tab is removed from the tab pane and a new window is created containing the content of the tab, the window title is set to the tab name value. On closing that window the tab is restored at the original position:  <\/p>\n<p><iframe loading=\"lazy\" title=\"JavaFX: Introducing Detachable Tabs\" width=\"900\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/ow54mmBgL7w?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"Working on detachable tabs\" width=\"900\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/g3QVwwGoZzQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>Code can be found <a href=\"https:\/\/bitbucket.org\/Jerady\/shichimifx\" title=\"https:\/\/bitbucket.org\/Jerady\/shichimifx\" target=\"_blank\">here in my Bitbucket repo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I though it would be cool to detach e.g. the pane to publish messages in MQTT.fx if needed by just dragging the tab and dropping it at the wanted position to open its content as a dedicated new window. The TabPaneDetacher provides an easy to use way to enable the detach capability of with any&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=1332\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">TabPaneDetacher: Make your tabs detachable<\/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":"TabPaneDetacher: Make your tabs detachable http:\/\/wp.me\/p38FCL-lu","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,20,4,46,49],"tags":[108,95,53,76,105],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-lu","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1332"}],"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=1332"}],"version-history":[{"count":10,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1332\/revisions"}],"predecessor-version":[{"id":1904,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1332\/revisions\/1904"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}