{"id":1718,"date":"2014-11-20T09:37:35","date_gmt":"2014-11-20T08:37:35","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=1718"},"modified":"2014-11-20T09:37:35","modified_gmt":"2014-11-20T08:37:35","slug":"shichimifx-1-0-1-released","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=1718","title":{"rendered":"ShichimiFX 1.0.1 released"},"content":{"rendered":"<p>I have added extracted some more classes from my application projects (e.g. from <a href=\"http:\/\/mqttfx.org\/\" title=\"http:\/\/mqttfx.org\/\" target=\"_blank\">MQTT.fx<\/a>) and added them as new features to ShichimiFX (and released 1.0.1).<\/p>\n<p>Get the code from my <a title=\"Bitbucket Repo\" href=\"https:\/\/bitbucket.org\/Jerady\/shichimifx\" target=\"_blank\">ShichimiFX Bitbucket Repo<\/a><\/p>\n<p><strong>Maven<\/strong><br \/>\n[xml]<br \/>\n<dependency><br \/>\n  <groupId>de.jensd<\/groupId><br \/>\n  <artifactId>shichimifx<\/artifactId><br \/>\n  <version>1.0.1<\/version><br \/>\n<\/dependency><br \/>\n[\/xml]<\/p>\n<p><strong>AnimationDude<\/strong><br \/>\nProvides support for Fade-in\/Fade-out-Transition of controls:<br \/>\n<code><strong>AnimationDude.addInOutFadeTransition(Duration duration, Node node)<br \/>\nAnimationDude.addInOutFadeTransition(Duration duration, Node nodeToFade, Node trigger)<\/strong><\/code><\/p>\n<p><iframe loading=\"lazy\" title=\"ShichimiFX 1.0.1: AnimationDude\" width=\"900\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/VRWg7T29oEg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>Make a ListCell (this) a trigger to to fade in a button bar on mouse hover:<br \/>\n<code><strong>AnimationDude.addInOutFadeTransition(Duration.millis(200), buttonsBox, this);<\/strong><\/code><\/p>\n<p>[java]<br \/>\npublic class AnimationDude {<\/p>\n<p>    public final static void  addInOutFadeTransition(Duration duration, Node node) {<br \/>\n        addInOutFadeTransition(duration, node, node);<br \/>\n    }<\/p>\n<p>    public final static void  addInOutFadeTransition(Duration duration, Node nodeToFade, Node trigger) {<br \/>\n        nodeToFade.setOpacity(0.0);<br \/>\n        final FadeTransition fadeOutTransition = new FadeTransition(duration, nodeToFade);<br \/>\n        fadeOutTransition.setFromValue(1.0);<br \/>\n        fadeOutTransition.setToValue(0.0);<br \/>\n        final FadeTransition fadeInTransition = new FadeTransition(duration, nodeToFade);<br \/>\n        fadeInTransition.setFromValue(0.0);<br \/>\n        fadeInTransition.setToValue(1.0);<br \/>\n        trigger.setOnMouseEntered(e->{<br \/>\n                    fadeOutTransition.stop();<br \/>\n                    fadeInTransition.play();<br \/>\n        });<br \/>\n        trigger.setOnMouseExited(e->{<br \/>\n                    fadeInTransition.stop();<br \/>\n                    fadeOutTransition.play();<br \/>\n        });<br \/>\n    }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p><strong>ConsoleDude<\/strong><br \/>\nProvides support for switching System.out\/Sytem.err (<code><strong>ConsoleStream<\/strong><\/code>)or bypassing a logging output (<code><strong>ConsoleStreamHandler<\/strong><\/code>) a JavaFX text components.<\/p>\n<p><iframe loading=\"lazy\" title=\"ShichimiFX 1.0.1: ConsoleStream\" width=\"900\" height=\"506\" src=\"https:\/\/www.youtube.com\/embed\/zwVJ285ix5k?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p><em><strong>Usage<\/strong><\/em><\/p>\n<p>Use &#8220;stdOutMessageArea&#8221; for System.out and System.err output:<br \/>\nhook StdOut + StdErr: <code><strong>ConsoleDude.hookStdOutTo(stdOutMessageArea);<\/strong><\/code><br \/>\nrestore StdOut + StdErr: <code><strong>ConsoleDude.restoreStdOut();<\/strong><\/code><\/p>\n<p>Also you can observe the status, e. g.:<br \/>\n<code><strong>hookButton.disableProperty().bind(ConsoleDude.stdOutHookedProperty());<br \/>\nreleaseButton.disableProperty().bind(ConsoleDude.stdOutHookedProperty().not());<\/strong><\/code><\/p>\n<p>Use &#8220;logMessageArea&#8221; for logging output:<br \/>\n<code><strong>LOGGER.addHandler(ConsoleDude.createConsoleStreamHandler(logMessageArea));<\/strong><\/code><\/p>\n<p>[java]<br \/>\npublic class ConsoleStream extends OutputStream {<\/p>\n<p>    private final TextInputControl output;<\/p>\n<p>    public ConsoleStream(TextInputControl ta) {<br \/>\n        this.output = ta;<br \/>\n    }<\/p>\n<p>    @Override<br \/>\n    public void write(int i) throws IOException {<br \/>\n        Platform.runLater(() -> {<br \/>\n            output.appendText(String.valueOf((char) i));<br \/>\n        });<br \/>\n    }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>[java]<br \/>\npublic class ConsoleStreamHandler extends StreamHandler{<\/p>\n<p>    public ConsoleStreamHandler(OutputStream out, Formatter formatter) {<br \/>\n        super(out, formatter);<br \/>\n    }<\/p>\n<p>    @Override<br \/>\n    public synchronized void publish(LogRecord record) {<br \/>\n        super.publish(record);<br \/>\n        flush();<br \/>\n    }<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>[java]<br \/>\npublic class ConsoleDude {<\/p>\n<p>    public final static PrintStream STD_OUT = System.out;<br \/>\n    public final static PrintStream STD_ERR = System.err;<br \/>\n    private static BooleanProperty stdOutHooked = new SimpleBooleanProperty();<\/p>\n<p>    public static void hookStdOutTo(TextInputControl outputArea) {<br \/>\n        PrintStream ps = new PrintStream(new ConsoleStream(outputArea), true);<br \/>\n        System.setOut(ps);<br \/>\n        System.setErr(ps);<br \/>\n        stdOutHookedProperty().set(true);<br \/>\n    }<\/p>\n<p>    public static void restoreStdOut() {<br \/>\n        System.setOut(STD_OUT);<br \/>\n        System.setErr(STD_ERR);<br \/>\n        stdOutHookedProperty().set(false);<br \/>\n    }<\/p>\n<p>    public static BooleanProperty stdOutHookedProperty() {<br \/>\n        if (stdOutHooked == null) {<br \/>\n            stdOutHooked = new SimpleBooleanProperty();<br \/>\n        }<br \/>\n        return stdOutHooked;<br \/>\n    }<\/p>\n<p>    public boolean isHooked() {<br \/>\n        return stdOutHookedProperty().get();<br \/>\n    }<\/p>\n<p>    public static ConsoleStreamHandler createConsoleStreamHandler(TextInputControl outputArea) {<br \/>\n        return createConsoleStreamHandler(outputArea,new SimpleFormatter());<br \/>\n    }<\/p>\n<p>    public static ConsoleStreamHandler createConsoleStreamHandler(TextInputControl outputArea, Formatter formatter) {<br \/>\n        return new ConsoleStreamHandler(new ConsoleStream(outputArea), formatter);<br \/>\n    }<\/p>\n<p>}<br \/>\n[\/java]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have added extracted some more classes from my application projects (e.g. from MQTT.fx) and added them as new features to ShichimiFX (and released 1.0.1). Get the code from my ShichimiFX Bitbucket Repo Maven [xml] de.jensd shichimifx 1.0.1 [\/xml] AnimationDude Provides support for Fade-in\/Fade-out-Transition of controls: AnimationDude.addInOutFadeTransition(Duration duration, Node node) AnimationDude.addInOutFadeTransition(Duration duration, Node nodeToFade, Node&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=1718\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">ShichimiFX 1.0.1 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":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[12,52,9,4,49],"tags":[77,108,80,76,63,105],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-rI","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1718"}],"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=1718"}],"version-history":[{"count":23,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1718\/revisions"}],"predecessor-version":[{"id":1741,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1718\/revisions\/1741"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}