<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inspiration and Expression</title>
	<atom:link href="http://blogs.kiyut.com/tonny/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.kiyut.com/tonny</link>
	<description>KIYUT Developer Blog</description>
	<lastBuildDate>Tue, 30 Jul 2013 12:36:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.3</generator>
	<item>
		<title>JavaFX WebView addHyperlinkListener</title>
		<link>http://blogs.kiyut.com/tonny/2013/07/30/javafx-webview-addhyperlinklistener/</link>
		<comments>http://blogs.kiyut.com/tonny/2013/07/30/javafx-webview-addhyperlinklistener/#comments</comments>
		<pubDate>Tue, 30 Jul 2013 12:29:50 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[WebView]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=179</guid>
		<description><![CDATA[If you had use JTextPane HTML rendering mode, you can easily addHyperLinkListener to catch link click event and provide the handler. But there is no Hyperlink listener in JavaFX WebView. So here how to do it in JavaFX WebView * tested on Java 7u25 public class WebViewRenderer extends JFXPanel public static final String EVENT_TYPE_CLICK = [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you had use JTextPane HTML rendering mode, you can easily addHyperLinkListener to catch link click event and provide the handler. But there is no Hyperlink listener in JavaFX WebView.</p>
<p>So here how to do it in JavaFX WebView<br />
* tested on Java 7u25</p>
<p><span id="more-179"></span></p>
<pre lang="java">
public class WebViewRenderer extends JFXPanel
    public static final String EVENT_TYPE_CLICK = "click";
    public static final String EVENT_TYPE_MOUSEOVER = "mouseover";
    public static final String EVENT_TYPE_MOUSEOUT = "mouseclick";

    protected WebView webView;
    
    public WebViewRenderer() {
        ...
        Platform.runLater(new Runnable() {
            @Override
            public void run() {
                initFX();
            }
        });
    }
    
    private void initFX() {
        createScene();
        
        webView.getEngine().getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {
            @Override
            public void changed(ObservableValue ov, State oldState, State newState) {
                if (newState == Worker.State.SUCCEEDED) {
                    EventListener listener = new EventListener() {
                        @Override
                        public void handleEvent(Event ev) {
                            String domEventType = ev.getType();
                            //System.err.println("EventType: " + domEventType);
                            if (domEventType.equals(EVENT_TYPE_CLICK)) {
                                String href = ((Element)ev.getTarget()).getAttribute("href");
                                ////////////////////// 
                                // here do what you want with that clicked event 
                                // and the content of href 
                                //////////////////////                               
                            } 
                        }
                    };

                    Document doc = webView.getEngine().getDocument();
                    NodeList nodeList = doc.getElementsByTagName("a");
                    for (int i = 0; i < nodeList.getLength(); i++) {
                        ((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_CLICK, listener, false);
                        //((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false);
                        //((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false);
                    }
                }
            }
        });
    }
}
</pre>
<p>Thats it done. Now you can handle the hyperlink click event.</p>
<p>But if you really want to replicate addHyperlinkListener as in JTextPane just add the following</p>
<pre lang="java">
    @Override
    public void addHyperlinkListener(HyperlinkListener listener) {
        listenerList.add(HyperlinkListener.class, listener);
    }
    
    @Override
    public void removeHyperlinkListener(HyperlinkListener listener) {
        listenerList.remove(HyperlinkListener.class, listener);
    }
    
    protected void fireHyperlinkUpdate(EventType eventType, String desc) {
        HyperlinkEvent event = new HyperlinkEvent(this, eventType, null, desc);
        
        // Guaranteed to return a non-null array
        Object[] listeners = listenerList.getListenerList();
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == HyperlinkListener.class) {
                ((HyperlinkListener) listeners[i + 1]).hyperlinkUpdate(event);
            }
        }
    }
</pre>
<p>And replace the above initFX with</p>
<pre lang="java">
    protected void initFX() {
        createScene();
        
        webView.getEngine().getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {
            @Override
            public void changed(ObservableValue ov, State oldState, State newState) {
                if (newState == Worker.State.SUCCEEDED) {
                    EventListener listener = new EventListener() {
                        @Override
                        public void handleEvent(Event ev) {
                            String domEventType = ev.getType();
                            //System.err.println("EventType: " + domEventType);
                            final EventType eventType;
                            if (domEventType.equals(EVENT_TYPE_CLICK)) {
                                eventType = HyperlinkEvent.EventType.ACTIVATED;
                            } else if (domEventType.equals(EVENT_TYPE_MOUSEOVER)) {
                                eventType = HyperlinkEvent.EventType.ENTERED;
                            } else if (domEventType.equals(EVENT_TYPE_MOUSEOUT)) {
                                eventType = HyperlinkEvent.EventType.EXITED;
                            } else {
                                return;
                            }
                            
                            final String href = ((Element)ev.getTarget()).getAttribute("href");
                            if (href == null) { return; }
                            SwingUtilities.invokeLater(new Runnable() {
                                @Override
                                public void run() {
                                    fireHyperlinkUpdate(eventType, href);
                                }
                            });
                        }
                    };

                    Document doc = webView.getEngine().getDocument();
                    NodeList nodeList = doc.getElementsByTagName("a");
                    for (int i = 0; i < nodeList.getLength(); i++) {
                        ((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_CLICK, listener, false);
                        ((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false);
                        ((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false);
                    }
                }
            }
        });
    }
</pre>
<p>So now you can easily use something like</p>
<pre lang="java">
WebViewRenderer renderer = new WebViewRenderer();
renderer.addHyperlinkListener(new HyperlinkListener() {
    @Override
    public void hyperlinkUpdate(HyperlinkEvent evt) {
        EventType eventType = evt.getEventType();
        String href = evt.getDescription();
        if (eventType.equals(HyperlinkEvent.EventType.ACTIVATED)) {
            // do something
        } else if (eventType.equals(HyperlinkEvent.EventType.ENTERED)) {
            // do something    
        } else if (eventType.equals(HyperlinkEvent.EventType.EXITED)) {
            // do something
        }
    }
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2013/07/30/javafx-webview-addhyperlinklistener/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Workaround BooleanStateAction in Mac OSX Global Menu</title>
		<link>http://blogs.kiyut.com/tonny/2012/06/18/workaround-booleanstateaction-in-mac-osx-global-menu/</link>
		<comments>http://blogs.kiyut.com/tonny/2012/06/18/workaround-booleanstateaction-in-mac-osx-global-menu/#respond</comments>
		<pubDate>Mon, 18 Jun 2012 09:06:24 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Netbeans Platform]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=171</guid>
		<description><![CDATA[If you are using BooleanStateAction and bitten by this bug #207477. And interestingly this bug is start to creep into Ubuntu Unity Global Menu as well (using Java Ayatana plugins). Below is the workaround. The idea is to maintain the JMenuItem reference ourselves and set the appropriate (checked/enabled) state. So you can inherit from WorkaroundBooleanStateAction [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you are using BooleanStateAction and bitten by this bug #<a href="http://netbeans.org/bugzilla/show_bug.cgi?id=207477&#038;x=0&#038;y=0">207477</a>.<br />
And interestingly this bug is start to creep into Ubuntu Unity Global Menu as well (using Java Ayatana plugins).</p>
<p>Below is the workaround. The idea is to maintain the JMenuItem reference ourselves and set the appropriate (checked/enabled) state.<br />
So you can inherit from WorkaroundBooleanStateAction instead of original BooleanStateAction</p>
<p><span id="more-171"></span></p>
<pre lang="java">
public abstract class WorkaroundBooleanStateAction extends BooleanStateAction {
    // if needed do you own stuff
    
    /* XXX Netbeans Platform bug 207477
     * Workaround for Mac OSX Bug with BooleanStateAction enabled and selected
     * so keep track JMenuItem ourselves
     */
    private WeakHashMap<JMenuItem, WeakReference<JMenuItem>> menuItemsMap 
            = new WeakHashMap<JMenuItem, WeakReference<JMenuItem>>();
    
    @Override
    public JMenuItem getMenuPresenter() {
        if (Utilities.isWindows()) {
            return super.getMenuPresenter();
        }
        JMenuItem menuItem = super.getMenuPresenter();
        menuItemsMap.put(menuItem,new WeakReference<JMenuItem>(menuItem));
        return menuItem;
    }
    
    @Override
    public void setBooleanState(boolean value) {
        super.setBooleanState(value);
        if (!Utilities.isWindows()) {
            for (JMenuItem menuItem : menuItemsMap.keySet()) {
                menuItem.setSelected(value);
            }
        }
    }
    
    @Override
    public void setEnabled(boolean value) {
        super.setEnabled(value);
        if (!Utilities.isWindows()) {
            for (JMenuItem menuItem : menuItemsMap.keySet()) {
                menuItem.setEnabled(value);
            }
        }
    }
    
    // if needed do you own stuff
}
</pre>
<p><strong>note:</strong> above is a hack (workaround) without modifying any platform code. It is not proper solution</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2012/06/18/workaround-booleanstateaction-in-mac-osx-global-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans and Ubuntu Unity</title>
		<link>http://blogs.kiyut.com/tonny/2012/06/11/netbeans-and-ubuntu-unity/</link>
		<comments>http://blogs.kiyut.com/tonny/2012/06/11/netbeans-and-ubuntu-unity/#comments</comments>
		<pubDate>Mon, 11 Jun 2012 10:44:23 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Unity]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=159</guid>
		<description><![CDATA[If you are developing application with Netbeans in Ubuntu Unity environment, most likely the Netbeans menu is black (hard to spot) and in bold text (ugly). And this things effecting all java program. It is due to the ambience theme employed by Ubuntu which result in menu black and bold. And not only that, because [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you are developing application with Netbeans in Ubuntu Unity environment, most likely the Netbeans menu is black (hard to spot) and in bold text (ugly). And this things effecting all java program. It is due to the ambience theme employed by Ubuntu which result in menu black and bold. And not only that, because the new Unity is using Unity Launcher and Global menu, all java application will looks weird on that environment eg: no global menu, wrong launcher icon, not integrated into Unity HUD, etc</p>
<p>So how to fix that. The menu black things can be solved by changing the ambience theme into another theme or you can edit the ambience theme resources definition file. But the global menu and HUD integration is harder to workaround.</p>
<p>Luckily if you are using Netbeans you can just use <a href="http://plugins.netbeans.org/plugin/41822/java-ayatana">Java Ayatana plugin</a> which solve all the problem above. Java Ayatana will integrate Netbeans nicely with Ubuntu Unity eg: Ubuntu global menu, Ubuntu HUD integration, Unity launcher fix, etc.</p>
<p><span id="more-159"></span></p>
<p>How to install Java Ayatana Plugins<br />
&#8211; In Netbeans, goto menu &#8211; Tools &#8211; Plugins<br />
&#8211; On the settings tab, add the Update Center, and use<br />
   * Name: Java Ayatana<br />
   * URL: http://java-swing-ayatana.googlecode.com/files/netbeans-catalog.xml<br />
&#8211; On the Available Plugins tab, choose reload, then find and install Java Ayatana<br />
&#8211; Restart Netbeans and done. Netbeans is integrated with Ubuntu Unity</p>
<p>For detailed instructions please visit <a href="http://plugins.netbeans.org/plugin/41822/java-ayatana">Java Ayatana plugins</a></p>
<p>And if by any case you are developing Netbeans Platform application, you also can use Java Ayatana plugins as extra cluster.</p>
<p><a href="http://blogs.kiyut.com/tonny/wp-content/uploads/2012/06/netbeans-unity.png"><img src="http://blogs.kiyut.com/tonny/wp-content/uploads/2012/06/netbeans-unity-400.png" alt="Netbeans in Ubuntu Unity Global Menu" border="0" /></a><br />
*see Ubuntu Unity global menu works</p>
<p><a href="http://blogs.kiyut.com/tonny/wp-content/uploads/2012/06/netbeans-unity-dash.png"><img src="http://blogs.kiyut.com/tonny/wp-content/uploads/2012/06/netbeans-unity-dash-400.png" alt="Netbeans in Ubuntu Unity HUD Integration" border="0" /></a><br />
*see Ubuntu Unity HUD integration</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2012/06/11/netbeans-and-ubuntu-unity/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>How to build and sign Android APK using JDK 7 with Netbeans</title>
		<link>http://blogs.kiyut.com/tonny/2012/06/07/how-to-build-and-sign-android-apk-using-jdk-7-with-netbeans/</link>
		<comments>http://blogs.kiyut.com/tonny/2012/06/07/how-to-build-and-sign-android-apk-using-jdk-7-with-netbeans/#comments</comments>
		<pubDate>Thu, 07 Jun 2012 08:31:55 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=143</guid>
		<description><![CDATA[If you build and sign android application using jdk 7, the result apk could not be installed on physical device, see http://code.google.com/p/android/issues/detail?id=19567 It is because the default digest algorithm for Java 7 is SHA-256, see http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html So one of the easiest way to sign android apk using jdk 7 is by adding the following to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you build and sign android application using jdk 7, the result apk could not be installed on physical device,<br />
see <a href="http://code.google.com/p/android/issues/detail?id=19567">http://code.google.com/p/android/issues/detail?id=19567</a></p>
<p>It is because the default digest algorithm for Java 7 is SHA-256,<br />
see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html">http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html</a></p>
<p>So one of the easiest way to sign android apk using jdk 7 is by adding the following to the build.xml</p>
<pre lang="xml">
<presetdef name="signjar">
    <signjar sigalg="MD5withRSA" digestalg="SHA1" />
</presetdef>
</pre>
<p>note: the above example is using Netbeans 7.1.2 with NbAndroid plugins.<br />
Other IDE should adjust accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2012/06/07/how-to-build-and-sign-android-apk-using-jdk-7-with-netbeans/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Netbeans and Android Development with NbAndroid</title>
		<link>http://blogs.kiyut.com/tonny/2011/08/12/netbeans-and-android-development-with-nbandroid/</link>
		<comments>http://blogs.kiyut.com/tonny/2011/08/12/netbeans-and-android-development-with-nbandroid/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 03:49:06 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=131</guid>
		<description><![CDATA[If you haven&#8217;t aware that Netbeans support android development, please check out NbAndroid, it is a plugins for Netbeans IDE that provide support for the whole development cycle of Android applications. You just need to download the latest NbAndroid plugins from NbAndroid The Goto Menu &#8211; Tools &#8211; Options, on Miscellaneus &#8211; Android, and set [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you haven&#8217;t aware that Netbeans support android development, please check out <a href="http://kenai.com/projects/nbandroid/">NbAndroid</a>, it is a plugins for Netbeans IDE that provide support for the whole development cycle of Android applications.</p>
<ol>
<li> You just need to download the latest NbAndroid plugins from <a href="http://kenai.com/projects/nbandroid/">NbAndroid</a></li>
<li>The Goto Menu &#8211; Tools &#8211; Options,<br />
on Miscellaneus &#8211; Android,<br />
and set your android sdk there.</li>
<li>You are done.</li>
</ol>
<p><span id="more-131"></span></p>
<p>Now you are ready to develop Android App from Netbeans IDE</p>
<p><a href="http://blogs.kiyut.com/tonny/wp-content/uploads/2011/08/nbandroid.png"><img src="http://blogs.kiyut.com/tonny/wp-content/uploads/2011/08/nbandroid-thumb.jpg" alt="NbAndroid" border="0" /></a></p>
<p><a href="http://blogs.kiyut.com/tonny/wp-content/uploads/2011/08/nbandroid-wizard.png"><img src="http://blogs.kiyut.com/tonny/wp-content/uploads/2011/08/nbandroid-wizard-thumb.jpg" alt="NbAndroid Wizard" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2011/08/12/netbeans-and-android-development-with-nbandroid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle Java Roadmap for Client Side</title>
		<link>http://blogs.kiyut.com/tonny/2010/10/28/oracle-java-roadmap-for-client-side/</link>
		<comments>http://blogs.kiyut.com/tonny/2010/10/28/oracle-java-roadmap-for-client-side/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 06:43:39 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Swing]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=101</guid>
		<description><![CDATA[Finally, Oracle speak about Java Roadmap especially for the client side at JavaOne 2010 JDK BOF session which you can see from Amy Fowler blog. From what I can understand, it boils down to several things: Java Swing Future It is still not very clear yet, how Java Swing will evolve in the future as [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Finally, Oracle speak about Java Roadmap especially for the client side at JavaOne 2010 JDK BOF session which you can see from <a href="http://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/">Amy Fowler blog</a>. From what I can understand, it boils down to several things:</p>
<p><span id="more-101"></span></p>
<h3>Java Swing Future</h3>
<p>It is still not very clear yet, how Java Swing will evolve in the future as said in the blog above</p>
<blockquote><p>The crux of the problem is that Swing is rooted in the antiquated AWT, rather than being integrated into the 2D coordinate system. Fixing this would require some massively incompatible changes and once you march down that path, well, you start asking yourself what other incompatible improvements should be made ….pretty soon the remodel becomes reconstruction and you realize that a new foundation is really needed.</p></blockquote>
<p>But don&#8217;t get me wrong, it is not whether Swing will vanish or not, of course everything will be evolved. But, the focus is on the <strong>evolution of Swing</strong> and it is still unclear how Swing will evolve in the future. As you can see from the things that I quote above, <em>&#8220;Swing is rooted in the antiquated AWT&#8230;  and fixing this would require some massively incompatible changes &#8230;remodel becomes reconstruction &#8230;&#8221;</em></p>
<p>However, the good news is that whatever decision Oracle made to Swing evolution, <em>&#8220;it’s still there and it isn’t going anywhere&#8221;</em> as Amy said. </p>
<h3>Java FX Future</h3>
<p>On the other hand, Java FX get the most focus and attention for Java client side and have much more clear <a href="http://javafx.com/roadmap/">roadmap</a>. In contrast to Swing, Java FX has more modern underlying structure (Prism + scene-graph + UI controls) plus a hardware-accelerated graphics pipeline with a UI rooted in a 2D/3D scene-graph can do. Imagine what you can do as Java developer for either business application or RIA media frenzy application like you saw on iPhone, etc with hundreds of rotating media cubes or jumbling block. It will gonna be interesting.</p>
<p>And from what I can understand from <a href="http://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/">Amy&#8217;s blog</a>. Currently, Oracle is converting JavaFX to a proper Java library and killing JavaFX script. So Java developers don’t have to learn a new language to use it. And the good news is <em>&#8220;&#8230; Much of the JavaFX stack has <strong>already been ported off of script</strong>, so this is all quite real and the team is ecstatic to be doing Java again..&#8221; said Amy</em></p>
<h3>Development Environment/Tools (Netbeans)</h3>
<p><em>&#8220;A sleeper detail from Thomas Kurian’s keynote is that NetBeans will be the Java development IDE of choice going forward. This is very good news for Swing, ensuring it’s support and upkeep for a long time to come.&#8221;</em></p>
<p>And on the JavaFX front <em>&#8220;we are working closely with that team to ensure JavaFX2.0 is toolable from the start.&#8221;</em></p>
<h3>Summary</h3>
<p>So my summary are<br />
&#8211; Swing evolution is uncertain yet, but Swing is here to stay.<br />
&#8211; JavaFX script is dead, but soon there will be JavaFX as Java library.<br />
&#8211; Netbeans will provide tooling support for JavaFX</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a href="http://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/">A Heartfelt Ramble on Swing &#038; JavaFX</a></li>
<li><a href="http://fxexperience.com/2010/09/javafx-2-0/">JavaFX 2.0 at JavaOne 2010</a></li>
<li><a href="http://javafx.com/roadmap/">JavaFX 2010-2011 Roadmap</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2010/10/28/oracle-java-roadmap-for-client-side/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Book Review: Netbeans Platform 6.9 Developer&#8217;s Guide</title>
		<link>http://blogs.kiyut.com/tonny/2010/09/15/book-review-netbeans-platform-69-developers-guide/</link>
		<comments>http://blogs.kiyut.com/tonny/2010/09/15/book-review-netbeans-platform-69-developers-guide/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 10:16:05 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Book Review]]></category>
		<category><![CDATA[Netbeans Platform]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=79</guid>
		<description><![CDATA[Netbeans Platform 6.9 Developer&#8217;s Guide by Jürgen Petri comes with 273 pages. This is not Java beginner book or learning Java book, and not about Netbeans IDE as well. The author assumes zero Netbeans Platform knowledge. This book is written for developers who are comfortable with Java and Swing, and who would like to use [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.packtpub.com/netbeans-platform-6-8-developers-guide/book?utm_source=blogs.kiyut.com&#038;utm_medium=bookrev&#038;utm_content=blog&#038;utm_campaign=mdb_004434">Netbeans Platform 6.9 Developer&#8217;s Guide</a> by Jürgen Petri comes with 273 pages. This is not Java beginner book or learning Java book, and not about Netbeans IDE as well. The author assumes zero Netbeans Platform knowledge. This book is written for developers who are comfortable with Java and Swing, and who would like to use a framework (<a href="http://netbeans.org/features/platform/index.html">Netbeans Platform</a>) as the basis of their Swing applications. </p>
<p><span id="more-79"></span><br />
The chapters structure is nice and follow the logical step and easy to follow:</p>
<ul>
<li>Chapter 1, Module: the basic building block of Netbeans Platform Application.</li>
<li>Chapter 2, Forms: You learn how forms are created for usage on the NetBeans Platform, how their layout is set, and how to implement the related handling of events.
</li>
<li>Chapter 3, Window System: The NetBeans Window System, together with the API that it exposes, lets you arrange forms on the screen within a docking framework.
</li>
<li>Chapter 4, Lookup: The Lookup API provides a communication mechanism, comparable to an event bus, which is of central significance in the creation of NetBeans Platform applications.
</li>
<li>Chapter 5, Actions: You learn how to create actions and how to invoke them from menus and toolbars, including keyboard shortcut and context sensitive action.
</li>
<li>Chapter 6, Nodes and Explorer Views:  A sophisticated MVC implementation for displaying business objects is made available via a set of extensible Swing components, which you can use without very much work at all.
</li>
<li>Chapter 7, File System: The File System API lets you access a NetBeans Platform&#8217;s virtual filesystem, which serves as the application&#8217;s central registry and configuration system.
</li>
<li>Chapter 8, Data System: The Datasystems API gives you access to the content of files. You learn how to extend a NetBeans Platform application to provide support for custom data types.
</li>
<li>Chapter 9, Dialogs: The responsibilities of dialogs in an application extend from the display of simple messages to the management of step-by-step procedural wizards.
</li>
<li>Chapter 10, Settings: which introduces you to the most important APIs and the entry points into the centralized Options window.
</li>
<li>Chapter 11, Help: HTML files constituting your documentation can be integrated into the application which can be invoked using action or keyboard shortcut
</li>
<li>Chapter 12, Branding: which enables the application&#8217;s ancillary details, such as icons and splash screens, to be customized.
</li>
<li>Chapter 13, Distribution and Updates: To let you distribute applications, and examine the various distribution mechanisms for NetBeans Platform applications including installer and online update.</ul>
</li>
<p>Important, the book&#8217;s author write </p>
<blockquote><p>&#8220;This book doesn&#8217;t aim to explicate all that the NetBeans Platform offers or to explore each and every corner of its many features. Rather, this book guides you through the development of a specific Java desktop application, while showing you everything that is relevant in the context of the particular application itself. That process, in turn, will lead you through the main features relevant to the development of most general<br />
applications on the NetBeans Platform.&#8221;</p></blockquote>
<p>For me, this book is really good to introduce Netbeans Platform development. It discuss all or most important API in Netbeans Platform from basic module creation to deployment and how to integrate them all together. Another good thing is this book using single application sample (Task Management Application) through out all the chapters. So each chapter add more features to the application sample, rather than each chapter using different example to describe the Netbeans Platform API. However, this book is not without flaw. Chapter 2 (Forms) discuss too much about Swing Layout and Netbeans Form Builder which is not necessary (IMHO, this book is not about Swing and Netbeans IDE, but about Netbeans Platform). Other than that, the book is good introduction to Netbeans Platform development.</p>
<p>I have been developing Netbeans Platform Application since few years and release (public release) at least 3 applications based on Netbeans Platform, so I know my way around Netbeans Platform API. But this book still give me few surprises regarding Netbeans API, and my favorite is the Lookup API (Chapter 4). And yes you can teach old dog new trick <img src="https://s.w.org/images/core/emoji/2.4/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Link To the Book</p>
<ul>
<li><a href="http://www.packtpub.com/netbeans-platform-6-8-developers-guide/book?utm_source=blogs.kiyut.com&#038;utm_medium=bookrev&#038;utm_content=blog&#038;utm_campaign=mdb_004434">Netbeans Platform 6.9 Developer&#8217;s Guide</a></li>
<li><a href="http://wiki.netbeans.org/PetriEnglishTranslationErrata">Book Errata</a></li>
<li><a href="http://netbeanside61.blogspot.com/2010/09/book-review-netbeans-platform-69.html">Another Review of this book</a> by Tushar Joshi</li>
</ul>
<p>Additional Link related to Netbeans Platform</p>
<ul>
<li><a href="http://edu.netbeans.org/contrib/slides/netbeans-platform/">NetBeans Platform Teaching Resources</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2010/09/15/book-review-netbeans-platform-69-developers-guide/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Packt launch 5th annual Open Source Awards</title>
		<link>http://blogs.kiyut.com/tonny/2010/08/26/packt-launch-5th-annual-open-source-awards/</link>
		<comments>http://blogs.kiyut.com/tonny/2010/08/26/packt-launch-5th-annual-open-source-awards/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 05:01:29 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=71</guid>
		<description><![CDATA[I just received an email from Packt Publishing regarding its Open Source Awards, so I just posted here to anyone who interested. Packt launch 5th annual Open Source Awards Birmingham, UK. 9th August 2010 The 2010 Open Source Awards was launched today by Packt, inviting people to visit www.PacktPub.com and submit nominations for their favorite [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I just received an email from <a href="http://www.packtpub.com/">Packt Publishing</a> regarding its Open Source Awards, so I just posted here to anyone who interested.</p>
<p><strong>Packt launch 5th annual Open Source Awards</strong></p>
<p>Birmingham, UK. 9th August 2010</p>
<p>The 2010 Open Source Awards was launched today by Packt, inviting people to visit www.PacktPub.com and submit nominations for their favorite Open Source project. Now in its fifth year, the Award has been adapted from the established Open Source CMS Award with the wider aim of encouraging, supporting, recognizing and rewarding all Open Source projects.</p>
<p><span id="more-71"></span></p>
<p>WordPress won the 2009 Open Source Content Management System (CMS) Award in what was a very close contest with MODx and SilverStripe. While MODx was the first runner up, SilverStripe, a Most Promising CMS Award winner in 2008, made its way to the second runner up position in its first year in the Open Source CMS Award final.</p>
<p>The 2010 Award will feature a prize fund of $24,000 with several new categories introduced. While the Open Source CMS Award category will continue to recognize the best content management system, Packt is introducing categories for the Most Promising Open Source Project, Open Source E-Commerce Applications, Open Source JavaScript Libraries and Open Source Graphics Software. CMSes that won the Overall CMS Award in previous years will continue to compete against one another in the Hall of Fame CMS category.</p>
<p>These new categories will ensure that the Open Source Awards is the ultimate platform to recognise excellence within the community while supporting projects both new and old. “We believe that the adaption of the Award and the new categories will provide a new level of accessibility, with the Award recognizing a wider range of Open Source projects; both previous winners while at the same time, encouraging new projects” said Julian Copes, organizer of this year’s Awards.</p>
<p>Packt has opened up nominations for people to submit their favorite Open Source projects for each category at <a href="http://www.packtpub.com/open-source-awards-home">www.PacktPub.com/open-source-awards-home</a>. The top five in each category will go through to the final, which begins in the last week of September. For more information on the categories, please visit Packt’s website <a href="http://www.packtpub.com/blog/packt%E2%80%99s-2010-open-source-awards-announcement">www.PacktPub.com/blog/packt’s-2010-open-source-awards-announcement</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2010/08/26/packt-launch-5th-annual-open-source-awards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finally! Microsoft will support native SVG in IE9</title>
		<link>http://blogs.kiyut.com/tonny/2010/03/18/finally-microsoft-will-support-native-svg-in-ie9/</link>
		<comments>http://blogs.kiyut.com/tonny/2010/03/18/finally-microsoft-will-support-native-svg-in-ie9/#respond</comments>
		<pubDate>Thu, 18 Mar 2010 05:06:29 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Sketsa]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=60</guid>
		<description><![CDATA[Yesterday (March 16, 2010) at Microsoft&#8217;s MIX10 Conference in Las Vegas, IE General Manager Dean Hachamovitch announced that native SVG is to be included in IE9. And not only that, it is also the first browser to provide hardware-accelerated SVG support. http://blogs.msdn.com/ie/archive/2010/03/16/html5-hardware-accelerated-first-ie9-platform-preview-available-for-developers.aspx This is great news for SVG designers or developers, because soon all major [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Yesterday (March 16, 2010) at Microsoft&#8217;s MIX10 Conference in Las Vegas, IE General Manager Dean Hachamovitch announced that native SVG is to be included in IE9. And not only that, it is also the first browser to provide hardware-accelerated SVG support.</p>
<p><a href="http://blogs.msdn.com/ie/archive/2010/03/16/html5-hardware-accelerated-first-ie9-platform-preview-available-for-developers.aspx">http://blogs.msdn.com/ie/archive/2010/03/16/html5-hardware-accelerated-first-ie9-platform-preview-available-for-developers.aspx</a></p>
<p>This is great news for SVG designers or developers, because soon all major browsers will or already support SVG. Some already support SVG (Firefox, Google Chrome, Opera) and Microsoft Internet Explorer will follow the suit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2010/03/18/finally-microsoft-will-support-native-svg-in-ie9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans Platform RTL (Right To Left) Component Orientation</title>
		<link>http://blogs.kiyut.com/tonny/2009/10/21/netbeans-platform-right-to-left-component-orientation/</link>
		<comments>http://blogs.kiyut.com/tonny/2009/10/21/netbeans-platform-right-to-left-component-orientation/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:33:41 +0000</pubDate>
		<dc:creator><![CDATA[Tonny Kohar]]></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[Netbeans Platform]]></category>

		<guid isPermaLink="false">http://blogs.kiyut.com/tonny/?p=55</guid>
		<description><![CDATA[If you haven&#8217;t aware Java have support for RTL (Right-To-Left) for the User Interface, and thank to Netbeans Platform based on Swing, it is easy as well to make Netbeans Platform application to support RTL (Right-To-Left) as well Step 1: Create ComponentOrientation support class This step is optional, but make the testing easier, because it [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you haven&#8217;t aware Java have support for RTL (Right-To-Left) for the User Interface, and thank to Netbeans Platform based on Swing, it is easy as well to make Netbeans Platform application to support RTL (Right-To-Left) as well</p>
<h3>Step 1: Create ComponentOrientation support class</h3>
<p>This step is optional, but make the testing easier, because it use the value component orientation from System.getProperty(&#8220;..&#8221;), and use auto (based on Locale.getDefault() if nothing specified.</p>
<p><span id="more-55"></span></p>
<pre lang="java">
    public class ComponentOrientationSupport {

        private ComponentOrientationSupport() {
            throw new Error("ComponentOrientationSupport is a utility class for static methods"); // NOI18N
        }   

        /** 
         * Return component orientation base on the value of
         * {@code System.getProperty("alkitab.orientation")} <br/>
         * If it is not specified it will return ComponentOrientation.LEFT_TO_RIGHT
         * Possible value are:
         * <code>
         * - auto (Default), automatic setting based on Locale.getDefault()
         * - ltr, force to use Left to Right orientation
         * - rtl, force to use Right to Left orientation
         * </code>
         * @return ComponentOrientation
         */
        public static ComponentOrientation getComponentOrientation() {
            ComponentOrientation orient = ComponentOrientation.getOrientation(Locale.getDefault());

            String str = System.getProperty("component.orientation");
    
            if (str != null) {
                if (str.equals("ltr")) {
                    orient = ComponentOrientation.LEFT_TO_RIGHT;
                } else if (str.equals("rtl")) {
                    orient = ComponentOrientation.RIGHT_TO_LEFT;
                }
            }

            return orient;
        }

        /** Apply the getComponentOrientation to the specified container
         * @param container Container
         */
        public static void applyComponentOrientation(Container container) {
            container.applyComponentOrientation(getComponentOrientation());
        }
    }
</pre>
<h3>Step 2: Apply the component orientation for the MainWindow</h3>
<p>In order to apply the component orientation to the MainWindow, you need to do that in the ModuleInstall eg:</p>
<pre lang="java">
    @Override
    public  void restored() {
        super.restored();

        // initialize the orientation
        String orientationKey = "component.orientation";
        String strOrientation = System.getProperty(orientationKey);
        if (strOrientation == null) {
            strOrientation = "auto";
        } else {
            strOrientation = strOrientation.trim().toLowerCase();
        }
        System.setProperty(orientationKey, strOrientation); // re-setting the System property to the correct value

        // do something else
        //....

        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
            public void run() {
                ComponentOrientationSupport.applyComponentOrientation(WindowManager.getDefault().getMainWindow());
                
                // do something else
                //....
            }
        });
    }
</pre>
<h3>Step 3: Apply the component orientation for each TopComponent</h3>
<p>You need to apply component orientation for each TopComponent you have eg:</p>
<pre lang="java">
    public final class MyTopComponent extends TopComponent {
        private MyTopComponent() {
            initComponents();
            setName(...);
            setToolTipText(...);

            // do something else
            //....
            
            ComponentOrientationSupport.applyComponentOrientation(this);
        }
    }
</pre>
<h3>Step 4: Testing</h3>
<p>Because it is using System.getProperty(&#8220;..&#8221;), so it is easy to test the UI. You only need to assign that component.orientation=auto|ltr|rtl to the environment. In Netbeans Platform based application you can do that in the suite project.properties by adding</p>
<pre lang="java">
run.args.extra=-J-Dcomponent.orientation=rtl ...your other things eg: -J-Xms64m -J-Xmx128m ...
</pre>
<p>Or for deploying you can use ../etc/yourapp.conf as above. Or if you are not setting it up, it will use &#8220;auto&#8221; by default which is based on Locale.getDefault()</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.kiyut.com/tonny/2009/10/21/netbeans-platform-right-to-left-component-orientation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
