<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>JNBB - Joschs NetBeans Blog</title>
	<atom:link href="http://www.aljoscha-rittner.de/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aljoscha-rittner.de/blog</link>
	<description>Das Blog rund um Java und NetBeans</description>
	<lastBuildDate>Mon, 04 Jun 2012 06:53:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Lookup und Swing-Tricks: Wie ich Events zu Lookup-Changes bekomme</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2012/05/23/swing-tricks-wie-ich-events-zu-lookup-changes-bekomme/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2012/05/23/swing-tricks-wie-ich-events-zu-lookup-changes-bekomme/#comments</comments>
		<pubDate>Wed, 23 May 2012 13:00:01 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[nodes]]></category>
		<category><![CDATA[swing]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=1025</guid>
		<description><![CDATA[Ich melde mich mal mit einer Kleinigkeit zurück.

Der Kunde wünscht sich bei der Auswahl von Nodes auch die Modifier der Tastatur zu ermitteln. Üblicherweise ist das gar nicht möglich, wenn man nur mit Lookup-Listener auf Results arbeitet (was ja ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Ich melde mich mal mit einer Kleinigkeit zurück.</p>
<p>Der Kunde wünscht sich bei der Auswahl von Nodes auch die Modifier der Tastatur zu ermitteln. Üblicherweise ist das gar nicht möglich, wenn man nur mit Lookup-Listener auf Results arbeitet (was ja die Regel sein sollte).</p>
<p>Da Swing ja singlethreaded ist und die meisten Lookup-Benachrichtigungen sich auch daran halten (außer man erzwingt Mutlithreading &#8211; was böse ist), kann man einfach über das AWT das aktuelle Event ermitteln:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003399;">AWTEvent</span> currentEvent <span style="color: #339933;">=</span> <span style="color: #003399;">EventQueue</span>.<span style="color: #006633;">getCurrentEvent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>Da AWTEvent recht schmalbrüstig ist, müssen wir es noch casten. Beispiel:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> currentEvent <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">InputEvent</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; mods <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">InputEvent</span><span style="color: #009900;">&#41;</span>currentEvent<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getModifiers</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>Ist kein aktuelles Event vorhanden, wird null zurückgegeben, was mit instanceof ohne NPE abgefangen wird. Dann erhalten wir aber auch keine Modifier.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2012/05/23/swing-tricks-wie-ich-events-zu-lookup-changes-bekomme/';
var dzone_title = 'Lookup und Swing-Tricks: Wie ich Events zu Lookup-Changes bekomme';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div> <p><a href="http://www.aljoscha-rittner.de/blog/?flattrss_redirect&amp;id=1025&amp;md5=b9678a02bc116b21c6b6bd47c1c7a449" title="Flattr" target="_blank"><img src="http://www.aljoscha-rittner.de/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2012/05/23/swing-tricks-wie-ich-events-zu-lookup-changes-bekomme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX 2 Multiplatform in einer NetBeans Platform App</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2012/03/02/javafx-2-multiplatform-in-einer-netbeans-platform-app/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2012/03/02/javafx-2-multiplatform-in-einer-netbeans-platform-app/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 09:36:33 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=1016</guid>
		<description><![CDATA[Da auch JavaFX 2 mit einem eigenen Native-Loader kommt, haben wir in einer NetBeans Platform wieder das Problem, die DLL/SO/... Bibliotheken an die richtige Stelle zu bekommen.

Man kann natürlich den Anwender JavaFX installieren und bin-Pfade einrichten lassen. Aber bequemer ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Da auch JavaFX 2 mit einem eigenen Native-Loader kommt, haben wir in einer NetBeans Platform wieder das Problem, die DLL/SO/&#8230; Bibliotheken an die richtige Stelle zu bekommen.</p>
<p>Man kann natürlich den Anwender JavaFX installieren und bin-Pfade einrichten lassen. Aber bequemer ist es natürlich, wenn sich die Platform Application darum kümmert.</p>
<p>Hier eine extrem simple (und nicht für alle Plattformen gültige) Lösung.</p>
<p>Es wird davon ausgegangen, dass sich die javafx-2.0.jar in dem Ordner cluster/modules/ext/somename befindet. Cluster ist der suite-Name. Der Pfad modules/ext ist Standard für externe Bibliotheken und somename ist (ggf.) ein Codename-Base-Name der externen Bibliothek oder &#8220;lib&#8221; (das ist JavaFX aber egal). Ich habe z.B. com.oracle verwendet (die aus der Gruppen-ID meiner Maven-Artifakte kommt).</p>
<p>Will ich nun (nur) Windows in 32bit und 64bit unterstützen, lege ich in dem ext-Order noch bin und darunter amd63 und x86 an. Also: cluster/modules/ext/bin/amd64 und cluster/modules/ext/bin/x86. Der Native Loader von JavaFX sucht immer (von der javafx-2.0.jar) in ../bin. Ich muss also nun die DLL&#8217;s kopieren.</p>
<p>Hier ein Beispiel meiner Dateistrukturen:</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/03/javaFXstructure.png"><img src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/03/javaFXstructure.png" alt="" title="javaFXstructure" width="779" height="568" class="alignnone size-full wp-image-1020" /></a></p>
<p>Da JavaFX fast mit Java7 verheiratet ist, werde ich auch nur mit Java7-nio den Weg beschreiten:</p>
<pre>
<div class="codecolorer-container java5 dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java5 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Installer <span style="color: #000000; font-weight: bold;">extends</span> ModuleInstall <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; @<span style="color: #003399; font-weight: bold;">Override</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> restored<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003399; font-weight: bold;">Class</span> c = Installer.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003399; font-weight: bold;">URL</span> u = c.<span style="color: #006633;">getProtectionDomain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getCodeSource</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getLocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003399; font-weight: bold;">String</span> path = u.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; &nbsp;font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> path.<span style="color: #006633;">startsWith</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file:/&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> path.<span style="color: #006633;">endsWith</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.jar!/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; path = path.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; path = path.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, path.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>-<span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #006600; font-weight: bold;">int</span> pos = path.<span style="color: #006633;">lastIndexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; &nbsp;font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> pos <span style="color: #339933;">&gt;</span>= <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; path = path.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; FileSystem fs = FileSystems.<span style="color: #006633;">getDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Path dest = fs.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span>path, <span style="color: #0000ff;">&quot;ext&quot;</span>, <span style="color: #0000ff;">&quot;bin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Path source = fs.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span>path, <span style="color: #0000ff;">&quot;ext&quot;</span>, <span style="color: #0000ff;">&quot;bin&quot;</span>, <span style="color: #003399; font-weight: bold;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;os.arch&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; &nbsp;font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>Path toCopy : Files.<span style="color: #006633;">newDirectoryStream</span><span style="color: #009900;">&#40;</span>source<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path destFile = fs.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span>dest.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, toCopy.<span style="color: #006633;">getFileName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Files.<span style="color: #006633;">copy</span><span style="color: #009900;">&#40;</span>toCopy, destFile, StandardCopyOption.<span style="color: #006633;">REPLACE_EXISTING</span>, StandardCopyOption.<span style="color: #006633;">COPY_ATTRIBUTES</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">IOException</span> ex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exceptions.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span>ex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>Am aufwendigsten ist die Ermittlung des Modulpfades per URL u = c.getProtectionDomain().getCodeSource().getLocation(); mit dem Extrahieren des eigentlichen Pfades (man sieht, WebStart wird nicht unterstützt). Den Path &#8220;source&#8221; ermittle ich ausschließlich über os.arch. Das ist natürlich nicht wirklich nützlich für Plattformen wie Linux. Wer weitere Plattformen unterstützen will, sollte noch zusätzliche Systemparameter ermitteln und weitere Unterordner anlegen. Ich würde aber explizit die Methoden aus org.openide.util.Utilities (isMac, isUnix, isWindows) verwenden. Die System Properties sind da zu geschwätzig. </p>
<p>Nehmen wir an, es würde alles fehl schlagen (weil wir Bibliotheken nicht mitliefern), dann sollte man noch eine eigene Hilfsklasse basteln, die den erfolgreichen (oder nicht erfolgreichen) Kopiervorgang an andere Module liefern kann (z.B. JavaFXHelper.isJavaFXAvailable()). Wenn man das nämlich nicht abprüft und doch JavaFX verwendet, sind die Abstürze so hart, dass häufig nicht mal das Hauptfenster angezeigt wird. Im Log findet ihr dann Fehler wie: java.lang.UnsatisfiedLinkError: Can&#8217;t load library: &#8230;</p>
<p>Was allerdings schön ist: mehr ist nicht zu machen. Man muss nicht (wie in einem alten Artikel von mir beschrieben) eine Startup-Klasse der Platform unterschieben, um JavaFX zu nutzen. </p>
<p>Einen Mini-WebBrowser fügt man so in eine TopComponent ein:</p>
<pre>
<div class="codecolorer-container java5 dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java5 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> JFXPanel fxPanel = <span style="color: #000000; font-weight: bold;">new</span> JFXPanel<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; add<span style="color: #009900;">&#40;</span>fxPanel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Platform.<span style="color: #006633;">runLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; @<span style="color: #003399; font-weight: bold;">Override</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399; font-weight: bold;">Group</span> group = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">Group</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Scene scene = <span style="color: #000000; font-weight: bold;">new</span> Scene<span style="color: #009900;">&#40;</span>group<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; fxPanel.<span style="color: #006633;">setScene</span><span style="color: #009900;">&#40;</span>scene<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; view = <span style="color: #000000; font-weight: bold;">new</span> WebView<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; view.<span style="color: #006633;">setMinSize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1024</span>, <span style="color: #cc66cc;">768</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; view.<span style="color: #006633;">setPrefSize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1024</span>, <span style="color: #cc66cc;">768</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; group.<span style="color: #006633;">getChildren</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">add</span> <span style="color: #009900;">&#40;</span>view<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>view ist eine Feldvariable der TopComponent. Mit der Methode:</p>
<pre>
<div class="codecolorer-container java5 dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java5 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> browseTo <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399; font-weight: bold;">String</span> url<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; Platform.<span style="color: #006633;">runLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @<span style="color: #003399; font-weight: bold;">Override</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; view.<span style="color: #006633;">getEngine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">load</span><span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>kann man eine Webseite öffnen (http:// muss aber am Anfang der URL stehen).</p>
<p>Viel Spaß mit JavaFX in der NetBeans Platform.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2012/03/02/javafx-2-multiplatform-in-einer-netbeans-platform-app/';
var dzone_title = 'JavaFX 2 Multiplatform in einer NetBeans Platform App';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div> <p><a href="http://www.aljoscha-rittner.de/blog/?flattrss_redirect&amp;id=1016&amp;md5=94cfe13023884d3fde1f00554313a4bd" title="Flattr" target="_blank"><img src="http://www.aljoscha-rittner.de/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2012/03/02/javafx-2-multiplatform-in-einer-netbeans-platform-app/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>NetBeans Release 7.1.1 ist da</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2012/03/01/netbeans-release-7-1-1-ist-da/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2012/03/01/netbeans-release-7-1-1-ist-da/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 10:00:45 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=1009</guid>
		<description><![CDATA[Seit kurzer Zeit ist ein neues Release von NetBeans fertig und kann hier heruntergeladen werden.

Die Version 7.1.1 bring kleinere Neuerungen:

	Java ME SDK 3.0.5 Unterstützung
	Bundle GlassFish 3.1.2 Update
	JavaFX 2.0.3 SDK Unterstützung
	Maven 3.0.4 Upgrade

Dazu wurden 123 Fehler berichtigt, die noch in ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/03/nb711.png"><img class="alignright size-full wp-image-1010" title="nb711" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/03/nb711.png" alt="" width="195" height="219" /></a>Seit kurzer Zeit ist ein neues Release von NetBeans fertig und kann <a title="Download NetBeans" href="http://netbeans.org/downloads/" target="_blank">hier heruntergeladen</a> werden.</p>
<p>Die Version 7.1.1 bring kleinere Neuerungen:</p>
<ul>
<li>Java ME SDK 3.0.5 Unterstützung</li>
<li>Bundle GlassFish 3.1.2 Update</li>
<li>JavaFX 2.0.3 SDK Unterstützung</li>
<li>Maven 3.0.4 Upgrade</li>
</ul>
<p>Dazu wurden <a title="Bugs resolved for NetBeans 7.1.1" href="http://netbeans.org/bugzilla/buglist.cgi?target_milestone=7.1.1&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED" target="_blank">123 Fehler</a> berichtigt, die noch in 7.1 waren oder bis 7.1.1 entdeckt wurden. Hier eine Liste der P1 Fehler:</p>
<table border="0" cellspacing="0" cellpadding="4" width="611">
<colgroup>
<col width="52"></col>
<col width="543"></col>
</colgroup>
<tbody>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b205620"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=203009"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">[71cat] 			ArrayIndexOutOfBoundsException: -72</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b206134"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=205835"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Closing 			editor clone not handled correctly;<br />
editor TC out of sync with 			disk file</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b206347"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=206134"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">[regression] 			Use of FindUsages modifies all<br />
documents with references</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b206946"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=206347"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Applications 			not using OSGi don&#8217;t start on NbP 7.1</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Linu</span></span></td>
<td width="543"><a name="b206948"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=206946"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Can&#8217;t 			deploy to remote GlassFish 3.1.1 server</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b207080"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=206984"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Mercurial 			gives getaddrinfo failed</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b207214"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=207080"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Insufficient 			CSS parser error recovery</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b208211"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=207214"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">[71cat] 			Scanning projects never ends</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b208279"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208226"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Add 			friend dependency for Java ME</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b208451"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208279"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Find 			Occurences (Alt+F7) tries wrongly to modify the file</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Mac</span></span></td>
<td width="543"><a name="b208456"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208451"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Evaluate 			org.openide.awt<br />
.ActionsTest.testTooltipsContainAccelerator<br />
failure 			on Mac</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b208636"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208456"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">ScriptingCreateFromTemplateTest<br />
.testCreateFromTemplateEncodingProperty 			failure</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b208677"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208636"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">ME 			3.0.5 emulator never starts on Win 7 64bit</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">All</span></span></td>
<td width="543"><a name="b208678"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208677"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Failing 			test 			org.netbeans.modules.apisupport.project.<br />
NbModuleProviderImplTest.testGetDependencyVersion</span></span></span></a></td>
</tr>
<tr bgcolor="#ffffff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a name="b208706"></a><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208678"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">Failing 			tests in release71_fixes branch</span></span></span></a></td>
</tr>
<tr bgcolor="#f4f7ff">
<td width="52"><span style="color: #771111;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;">Wind</span></span></td>
<td width="543"><a href="http://netbeans.org/bugzilla/show_bug.cgi?id=208706"><span style="color: #1e2a60;"><span style="font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;"><span style="text-decoration: underline;">REST 			sample cannot be deployed to GlassFish 3.1.2.</span></span></span></a></td>
</tr>
</tbody>
</table>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2012/03/01/netbeans-release-7-1-1-ist-da/';
var dzone_title = 'NetBeans Release 7.1.1 ist da';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div> <p><a href="http://www.aljoscha-rittner.de/blog/?flattrss_redirect&amp;id=1009&amp;md5=293039d79585736e60786d9ffe43e5e2" title="Flattr" target="_blank"><img src="http://www.aljoscha-rittner.de/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2012/03/01/netbeans-release-7-1-1-ist-da/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die wichtigsten Tastatur-Tricks in der NetBeans IDE</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2012/02/27/die-wichtigsten-tastatur-tricks-in-der-netbeans-ide/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2012/02/27/die-wichtigsten-tastatur-tricks-in-der-netbeans-ide/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:16:15 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=982</guid>
		<description><![CDATA[Es gibt ein paar kleine Tricks, um mit der IDE etwas schneller arbeiten zu können. Die folgende Liste ist bei weitem nicht vollständig, sondern beschreibt nur die Shortcuts, die ich gerne nutze (auch die Verwendung von einigen Assistenten).
Zwischenablage / ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/netbeans-stamp-71.png"><img class="alignright size-full wp-image-1003" title="netbeans-stamp-71" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/netbeans-stamp-71.png" alt="" width="112" height="115" /></a>Es gibt ein paar kleine Tricks, um mit der IDE etwas schneller arbeiten zu können. Die folgende Liste ist bei weitem nicht vollständig, sondern beschreibt nur die Shortcuts, die ich gerne nutze (auch die Verwendung von einigen Assistenten).</p>
<h2>Zwischenablage / Clipboard</h2>
<p>Mehr durch Zufall bekommt man mit, dass Strg+C / Ctrl-C die komplette Zeile in die Zwischenablage kopiert, wenn man kein Zeichen selektiert. Das ist sehr praktisch, weil man sich die Tastenkürzel für das Markieren einer kompletten Zeile ersparen kann.</p>
<p>Strg-V / Ctrl-V fügt die Zwischenablage ein. Aber mit der Umschalt/Shift Taste wird der importierte Quelltext noch zugleich formatiert. Umschalt+Strg+V ist damit meine häufigst verwendete Tastaturkombination.</p>
<h2>Löschen</h2>
<p>Strg+E löscht eine komplette Zeile, ohne sie markieren zu müssen.</p>
<h2>Auskommentieren</h2>
<p>Schnell muss mal eine Zeile raus aus den Programmablauf, löschen will man sie aber nicht. Toggle Comment [Strg+Umschalt+C] hilft hier, um selektierte Zeilen schnell auszukommentieren oder die Kommentare wieder zu entfernen.</p>
<h2>Zeilen bewegen / duplizieren</h2>
<p>Mit den Pfeil/Cursor Tasten und Alt+Umschalt / Alt-Shift, kann man die aktuelle Zeile oder die markierten Zeilen nach oben oder unten verschieben, bzw. ein- oder ausrücken.</p>
<p>Sehr praktisch ist auch das Kopieren der aktuellen Zeile (oder der markierten Zeilen). Pfeil / Cursor auf und ab mit Strg+Umschalt / Ctrl+Shift erzeugt eine Kopie über oder unter dem Original. Dabei wird die Zwischenablage / Clipboard nicht verändert.</p>
<p>So kann man z.B. relativ schnell Felder in Klassen duplizieren, um dann nur den Namen zu ändern.</p>
<h2>Actions für &#8220;Java-Zeile beenden&#8221;</h2>
<p>Das sind Shortcut-Actions, die auf deutschen Tastaturen nicht funktionieren. Bevor man diese Funktionen nutzen kann, muss man diese in den Options neu zuweisen. Dazu geht man in die Optionen (Tools -&gt; Options), dort auf die Keymap. Im Suchfeld gibt man &#8220;Complete Line&#8221; ein. Man bekommt zwei Editor Actions die auf Ctrl+SEMICOLON und Ctrl+Shift+SEMICOLON hören. Die eine Action (Complete Line) wird auf ALT+COMMA geändert, die andere (Complete Line and Create New Line) auf Ctrl-Alt-COMMA.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/completeLine.gif"><img class="alignleft size-full wp-image-1007" title="completeLine" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/completeLine.gif" alt="Complete Line in NetBeans" width="204" height="84" /></a>Jetzt kann man mitten im Bearbeiten der Zeile die Shortcuts eingeben. Die IDE fügt dann ein ; an das Ende der Zeile an und fügt (auf Wunsch) eine neue Zeile ein.</p>
<h2>Rechteckige Selektion im Editor</h2>
<p>Die Texteditoren haben neuerdings zu der klassischen Zeichen/Zeilen-Selektion nun eine rechteckige Selektion. Die kann man mit Strg+Umschalt+R aktivieren und deaktivieren. Man kann dann mit der Maus oder Umschalt+Pfeiltaste einen rechteckigen Bereich markieren. Das Besondere ist nicht das Kopieren des Bereiches, sondern die Eingabe von neuen Daten in den Bereich. Jede Zeile aus dem rechteckigen bereich erhält die neue Eingabe. Somit kann man z.B. sehr schnell einen Bereich von public Feldern in private ändern.</p>
<p>public int a;<br />
public String b;<br />
public double c;</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/rect-change-netbeans.gif"><img class="alignleft size-full wp-image-1001" title="rect-change-netbeans" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/rect-change-netbeans.gif" alt="Rectangular Selection Manipulation" width="336" height="168" /></a>Nun mit Strg+Umschalt+R den Selektionsmodus auf Rechteckig ändern und alle drei public&#8217;s selektieren. Dann einfach private eingeben. Alle drei Felddeklarationen haben nun private als Modifier. Es ist zu empfehlen die Selektion nach solchen Operationen wieder zurückzusetzen.</p>
<h2>Alles hybsch machen</h2>
<p>Mit Strg+Umschalt+F wird der selektierte Bereich (oder alles, wenn keine Markierung existiert) neu durchformatiert.</p>
<h2>Quelltextvervollständigung / Codecompletion</h2>
<h3>Import Statements aufräumen und ergänzen</h3>
<p>Die Tastenkombination Strg+Umschalt+I wirft ungenutzte Imports raus, löst *-Imports auf und fügt fehlende Imports hinzu. Wenn Klassennamen doppelt existieren, dann muss man die passenden Klassen in einem Dialog bestätigen. Man braucht die Kombination seltener, seit dem Strg+V und Strg+Umschalt+V automatisch die Imports mit übertragen. Aber manchmal braucht man es doch noch.</p>
<h3>Methoden überschreiben</h3>
<p>Man kann den Alt-Einf / Alt-Insert Assistenten verwenden, oder direkt den Namen der zu überschreibenden Methode eingeben und dann Strg+Leertaste / Ctrl-SPACE drücken (natürlich im Body der Klasse). Es wird dann vorgeschlagen, eine Methode aus der Liste zum Überschreiben auszuwählen. Mit Enter bestätigen, erzeugt die Methode mit dem super-Aufruf der überschriebenen Methode.</p>
<h3>Variablenzuweisungen von der IDE</h3>
<p>Ma sollte möglichst nicht mit einer VAriablenzuweisung beginnen, sondern erst den Methodenaufruf  schreibe. Beispiel:</p>
<p>getDimension();</p>
<p>Man bleibt mit dem Eingabecursor hinter den Semikolon. Die IDE wird schon jetzt eine gelbe Lanpe (Hint) bei der Zeilennummer einblenden. Nicht mit der Maus anklicken (dauert zu lange), einfach Alt+Enter. Es erscheint idR. nur ein Hinweis: Einen Rückgabewert einer neuen Variable zuordnen. Einfach mit Enter bestätigen und die IDE erzeugt:</p>
<p>Dimension dimension = getDimension();</p>
<p>Dazu den passenden Import. Außerdem ist der Variablenname dimension markiert, so dass man ihn ggf. überschreiben kann.</p>
<h3>POJOs erzeugen</h3>
<p>Ein sehr einfacher Weg, um Plain Old Java Objects zu erzeugen, ist wieder per Assistent. Erstmal eine Klasse anlegen. Im Body der Klasse nur Alt+Einfügen / Alt+Insert tippen.</p>
<p>In der Auswahlbox &#8220;Add Property&#8221; auswählen. Der Assistent erlaubt nun neben den Namen und Typ auch weitere nützliche Optionen zu aktivieren. Insbesondere &#8220;Bound&#8221; erleichtert viel Arbeit, weil damit das PropertyChangeSupport für die set&#8217;er Methoden erzeugt wird.</p>
<p>Nie wieder muss man diesen Boilerplate Code schreiben:</p>
<pre>/**
 * Set the value of name
 *
 * @param name new value of name
 */
public void setName(String name) {
   String oldName = this.name;
   this.name = name;
   propertyChangeSupport.firePropertyChange(PROP_NAME, oldName, name);
}</pre>
<p>Nun kann man mit den Klassen erstmal arbeiten. Wenn man später die Architektur etwas aufmöbeln will, kann man aus der Klasse ein Interface extrahieren (Im Kontextmenü: Refactor -&gt; Extract Interface).</p>
<h2>Navigation</h2>
<h3>Hyperlinks für Klassen, Methoden und Felder</h3>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/hyperlink-netbeans.gif"><img class="alignright size-full wp-image-1002" title="hyperlink-netbeans" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2012/02/hyperlink-netbeans.gif" alt="Hyperlink Navigation in NetBeans" width="352" height="276" /></a>Strg-Taste / CTRL  halten und mit dem Mauszeiger über einen Namen (Methode, Feld, Klassenname) gehen. Es erscheint ein Hyperlink. Ein Klick darauf und man springt zur Deklaration (öffnet dabei ggf. einen neuen Editor).</p>
<h3>Aktuelle Editor-Datei im Projektfenster markieren</h3>
<p>Wenn man keine sofortige Synchronisation aktiviert hat (View -&gt; Synchronize Editor with Views), dann stimmt die markierte Datei im Projektfenster nicht mit der aktuell bearbeiteten Datei im Editor überein. Strg+Umschalt+1 markiert die Datei im Projektfenster (und öffnet ggf. das zugehörige Projekt). Das ist dann besonders nützlich, wenn man in eine Klasse per Strg+Mausklick (wie ein Browser-Hyperlink) über Methodennamen gesprungen ist oder der Debugger die Quelltexte geöffnet hatte.</p>
<h3>Klasse suchen</h3>
<p>Strg+O (Goto Type) ist ein Suchdialog für Klassennamen. In dem Dialog den Suchbegriff eingeben, Doppelklick auf eines der Ergebnisse öffnet die Datei. Strg-Umschalt-1 zeigt die Datei dann in der Projekts-Struktur.</p>
<h3>Zu Zeilennummer springen</h3>
<p>Strg+G (Goto Linenumber) öffnet einen Dialog, um eine Zeilennummer einzugeben. Dorthin springt dann der Eingabecursor. Wer Exceptions per Mail zugeschickt bekommt, wird das Feature lieben.</p>
<h3>Alle Implementationen eines Interfaces</h3>
<p>Vor der Deklarationszeile eines Interfaces, abstrakter Klassen und überschriebener Klassen erscheint in der Zeilennummer ein kleines (i). Klickt man darauf, wird eine Liste aller bekannten Implementationen angezeigt. Per Klick kann man in die einzelnen Implementationen springen. Das ist nützlich, wenn man Interface erweitert (neue Methoden-Signaturen) und damit die Kassen angepasst werden müssen.</p>
<h3>Editor maximieren</h3>
<p>Eigentlich ist der Editor immer zu klein, zumindest geht es mir so. Der Doppelklick auf die Registerzunge zum Maximieren des Editors ist nett aber umständlich. Das Tastenkürzel Maximize Windows [Strg+ESC] ist da schneller. Entgegen des Namens setzt [Strg+ESC] die vergrößerte Registerzunge auch wieder zurück.</p>
<h2>Generelle Probleme mit Tastenkürzel</h2>
<p>Wer Ubuntu verwendet, wird mit allen Tastenkürzeln unglücklich werden, die mit Alt+Umschalt / Alt+Shift eingeleitet werden. Das klappt unter Ubuntu nicht, da Alt+Umschalt schon vom System belegt ist. Man muss diese Kürzel unter Tools -&gt; Options -&gt; Keymap ändern.</p>
<p>Nutzer deutscher Tastenlayouts kämpfen mit den Shortcuts, deren Keycodes sowieso per Umschalt / Shift zu erreichen sind (Komma, Semikolon, Stern) oder per AltGr (geschweifte und Eckige Klammern). Da muss man meistens die Zugriffs-Kürzel der Actions ebenfalls unter Tools -&gt; Options -&gt; Keymap anpassen.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2012/02/27/die-wichtigsten-tastatur-tricks-in-der-netbeans-ide/';
var dzone_title = 'Die wichtigsten Tastatur-Tricks in der NetBeans IDE';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div> <p><a href="http://www.aljoscha-rittner.de/blog/?flattrss_redirect&amp;id=982&amp;md5=b8a41b1716f008c6bc133487bb65566b" title="Flattr" target="_blank"><img src="http://www.aljoscha-rittner.de/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2012/02/27/die-wichtigsten-tastatur-tricks-in-der-netbeans-ide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BeanDev: New DZone Refcard for NetBeans 7.0 Platform</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/04/04/beandev-new-dzone-refcard-for-netbeans-7-0-platform/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/04/04/beandev-new-dzone-refcard-for-netbeans-7-0-platform/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 09:59:03 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[rcp]]></category>
		<category><![CDATA[refcard]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=979</guid>
		<description><![CDATA[Hi!

The new updated Refcard #80 by Heiko Böck, Anton Epple, Miloš Šilhánek, Andreas Stefik, Geertjan Wielenga, and Tom Wheeler for the brand new NetBeans 7 Platform is published.



You can find many informations about the NetBeans Platform, a getting started ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Hi!</p>
<p>The new updated Refcard #80 by Heiko Böck, Anton Epple, Miloš Šilhánek, Andreas Stefik, Geertjan Wielenga, and Tom Wheeler for the brand new NetBeans 7 Platform is published.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/04/refzcard-80.png"><img class="size-full wp-image-980 alignnone" title="refzcard-80" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/04/refzcard-80.png" alt="" width="642" height="830" /></a></p>
<p>You can find many informations about the NetBeans Platform, a getting started intro, main features, NetBeans Platform modules,  NetBeans Platform APIs, reusable GUI components and  more.</p>
<p>In this Refcard, you are introduced to the key concerns of the NetBeans Platform so that you can save years of work when developing robust and extensible applications.</p>
<p>Six pages packed with many informations, <a href="http://refcardz.dzone.com/refcardz/netbeans-platform-70?oid=hom37739">download this Refcard #80 now</a>!</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/04/04/beandev-new-dzone-refcard-for-netbeans-7-0-platform/';
var dzone_title = 'BeanDev: New DZone Refcard for NetBeans 7.0 Platform';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/04/04/beandev-new-dzone-refcard-for-netbeans-7-0-platform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IDEDev: Bundle-Key Hyperlinks im Editor Quelltext</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/04/01/idedev-bundle-key-hyperlinks-im-editor-quelltext/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/04/01/idedev-bundle-key-hyperlinks-im-editor-quelltext/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 09:04:21 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[quicktip]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=974</guid>
		<description><![CDATA[Moin!

Bin gerade mit 1001 Sachen beschäftigt und habe mein Blog etwas vernachlässigt. Aber einen kleinen Tipp habe ich gerade zur Hand. In einem älteren Blogeintrag erwähnte ich die Fähigkeit, dass NetBeans in den 7'er Dev-Builds Bundle Einträge in ein ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Bin gerade mit 1001 Sachen beschäftigt und habe mein Blog etwas vernachlässigt. Aber einen kleinen Tipp habe ich gerade zur Hand. In einem <a href="http://www.aljoscha-rittner.de/blog/archive/2010/12/21/idedev-bundle-texte-direkt-im-quelltext/">älteren Blogeintrag</a> erwähnte ich die Fähigkeit, dass NetBeans in den 7&#8242;er Dev-Builds Bundle Einträge in ein Code-Fold bringen kann. Es wird dann der Wert des Standard-Bundle angezeigt.</p>
<p style="text-align: left;">Es gibt aber noch ein nettes Feature. Man kann mit der Strg-Taste + Mausklick nun auch direkt zur Bundle-Datei zum Schlüssel springen. Es funktioniert genau so, wie man auch zu Klassen, Methoden und Variablen-Deklarationen springen kann.</p>
<p style="text-align: left;"><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/04/BundleJump.jpg"><img class="alignleft size-full wp-image-975" title="BundleJump" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/04/BundleJump.jpg" alt="" width="600" height="80" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">Mit dem Klick wird die Bundle-Datei geöffnet und der Cursor auf den Schlüssel gesetzt. Wenn man nun die Tastenkombination Strg+1 drückt, wird diese Bundle Datei auch im Project Explorer selektiert (soweit man nicht sowieso eine automatische Selektion aktiviert hat).</p>
<p style="text-align: left;">Beste Grüße!</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/04/01/idedev-bundle-key-hyperlinks-im-editor-quelltext/';
var dzone_title = 'IDEDev: Bundle-Key Hyperlinks im Editor Quelltext';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/04/01/idedev-bundle-key-hyperlinks-im-editor-quelltext/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaFXDev: Screen capture tool with 200 lines and 500ms startup time</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/03/09/javafxdev-screen-capture-tool-with-200-lines-and-500ms-startup-time/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/03/09/javafxdev-screen-capture-tool-with-200-lines-and-500ms-startup-time/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 16:15:34 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=955</guid>
		<description><![CDATA[Hi!

Here is my next test with the JavaFX 2.0 ea release. I've created a 200-liner to capture parts from the desktop. The "Snipper" detects mouse dragging and two different key strokes (Escape and the letter 'A'). The captured picture ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Hi!</p>
<p>Here is my next test with the JavaFX 2.0 ea release. I&#8217;ve created a 200-liner to capture parts from the desktop. The &#8220;Snipper&#8221; detects mouse dragging and two different key strokes (Escape and the letter &#8216;A&#8217;). The captured picture is automatically stored in the user.home/snapshot path.</p>
<p>Before I start to explain the code, I show a small picture about the different scene graph nodes:</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/03/layeredSnipper.jpg"><img class="aligncenter size-full wp-image-958" title="layeredSnipper" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/03/layeredSnipper.jpg" alt="" width="849" height="550" /></a></p>
<p>At the bottom is the Desktop (I use only the primary screen, but it&#8217;s possible to detect all additional screens). The stage is created by the JavaFX Launcher class. I modify the stage to a transparent style and fullscreen mode. The scene (embedded in the stage) captures the mouse events (button pressed, released and dragging). The scene itself has a transparent fill color and contains one group with three different nodes. In the KeyPane-Node I capture the key events. The node is focusable and transparent to mouse events (any mouse event sinks down to the scene). GlassPane is a node with a Shape created by the screen bounds with a rectangular hole. This hole is calculated by the mouse gestures from the user. At last I&#8217;ve a visual representation for the user interaction: a red rectangular lasso node.</p>
<p><span id="more-955"></span>Disclaimer: <em>The solution here is based on the early access release through the <a href="http://javafx.com/partners/">JavaFX partner</a> program. This “best practice” may change significantly between now and  the final version. However, I’ll show only a concept, not compilable  code.</em></p>
<p>Here the start up:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; @Override<br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> start<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> Stage stage<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; primaryStage <span style="color: #339933;">=</span> stage<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003399;">Group</span> group <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Group</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; Scene scene <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Scene<span style="color: #009900;">&#40;</span>group<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; scene.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">TRANSPARENT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// default is white</span><br />
&nbsp; &nbsp; scene.<span style="color: #006633;">setCursor</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Cursor</span>.<span style="color: #006633;">CROSSHAIR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; stage.<span style="color: #006633;">setStyle</span><span style="color: #009900;">&#40;</span>StageStyle.<span style="color: #006633;">TRANSPARENT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; stage.<span style="color: #006633;">setFullScreen</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; stage.<span style="color: #006633;">setScene</span><span style="color: #009900;">&#40;</span>scene<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; stage.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; screenBounds <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Rectangle</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; Screen.<span style="color: #006633;">getPrimary</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBounds</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; Screen.<span style="color: #006633;">getPrimary</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getBounds</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>Nothing special. Only few notes: The Scene-fill must be transparent and the Screen class provides more than the primary screen. But this small example captures only from the primary screen.</p>
<p>I have a special helper class named Rebounder. This class creates and manipulates the lasso rectangle and calculates the shape with the hole for the GlassPane. The KeyPane needs the Rebounder for a fullscreen capture. The scene mouse handlers are call the rebounder with the current mouse points.</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000000; font-weight: bold;">class</span> Rebounder <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003399;">Rectangle</span> lasso<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">double</span> px<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">double</span> py<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; Rebounder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; lasso <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Rectangle</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setSmooth</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setStroke</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">RED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setStrokeWidth</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setStrokeType</span><span style="color: #009900;">&#40;</span>StrokeType.<span style="color: #006633;">OUTSIDE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setMouseTransparent</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">Rectangle</span> start<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> x, <span style="color: #000066; font-weight: bold;">double</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setX</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setY</span><span style="color: #009900;">&#40;</span>y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; px <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; py <span style="color: #339933;">=</span> y<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> lasso<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">Rectangle</span> rebound<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> x, <span style="color: #000066; font-weight: bold;">double</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">abs</span><span style="color: #009900;">&#40;</span>x <span style="color: #339933;">-</span> px<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">abs</span><span style="color: #009900;">&#40;</span>y <span style="color: #339933;">-</span> py<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setX</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">min</span><span style="color: #009900;">&#40;</span>x, px<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setY</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Math</span>.<span style="color: #006633;">min</span><span style="color: #009900;">&#40;</span>y, py<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> lasso<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">Rectangle</span> stop<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> x, <span style="color: #000066; font-weight: bold;">double</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; rebound<span style="color: #009900;">&#40;</span>x, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; lasso.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> lasso<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">boolean</span> isStopped<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #339933;">!</span>lasso.<span style="color: #006633;">isVisible</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; Node getLasso<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> lasso<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">Shape</span> shapeBuilder<span style="color: #009900;">&#40;</span><span style="color: #003399;">Rectangle</span> r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> r <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">?</span> Path.<span style="color: #006633;">subtract</span><span style="color: #009900;">&#40;</span>screenBounds, r<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Rectangle</span><span style="color: #009900;">&#40;</span>screenBounds.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, screenBounds.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>In the constructor I create the lasso node. The three methods start(x,y), rebound(x,y) and stop (x,y) are called by mousePressed, mouseDragged and mouseReleased. The shapeBuilder-method returns a shape for the GlassPane.</p>
<p>Here are my mouse handlers:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; scene.<span style="color: #006633;">setOnMousePressed</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> EventHandler<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handle<span style="color: #009900;">&#40;</span><span style="color: #003399;">MouseEvent</span> me<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glassPane.<span style="color: #006633;">setShape</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rebounder.<span style="color: #006633;">shapeBuilder</span><span style="color: #009900;">&#40;</span>rebounder.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span>me.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, me.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; scene.<span style="color: #006633;">setOnMouseDragged</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> EventHandler<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handle<span style="color: #009900;">&#40;</span><span style="color: #003399;">MouseEvent</span> me<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glassPane.<span style="color: #006633;">setShape</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rebounder.<span style="color: #006633;">shapeBuilder</span><span style="color: #009900;">&#40;</span>rebounder.<span style="color: #006633;">rebound</span><span style="color: #009900;">&#40;</span>me.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span>, me.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; scene.<span style="color: #006633;">setOnMouseReleased</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> EventHandler<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handle<span style="color: #009900;">&#40;</span><span style="color: #003399;">MouseEvent</span> me<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>rebounder.<span style="color: #006633;">isStopped</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span>rebounder.<span style="color: #006633;">stop</span><span style="color: #009900;">&#40;</span>me.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span>, me.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>A very straight forward implementation.</p>
<p>Ok we miss the KeyPane and the GlassPane. The KeyPane is complete transparent, contains only a screen wide rectangle which is focusable and captures key events:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000000; font-weight: bold;">class</span> KeyPane <span style="color: #000000; font-weight: bold;">extends</span> <span style="color: #003399;">Group</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> KeyPane<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> Stage stage, <span style="color: #000000; font-weight: bold;">final</span> Rebounder rebounder<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">Rectangle</span> keyEventPane <span style="color: #339933;">=</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Rectangle</span><span style="color: #009900;">&#40;</span>screenBounds.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, screenBounds.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; keyEventPane.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">TRANSPARENT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; keyEventPane.<span style="color: #006633;">setStroke</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; keyEventPane.<span style="color: #006633;">setMouseTransparent</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; keyEventPane.<span style="color: #006633;">setFocusTraversable</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// for keyPressed events</span><br />
&nbsp; &nbsp; &nbsp; keyEventPane.<span style="color: #006633;">setOnKeyPressed</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> EventHandler<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handle<span style="color: #009900;">&#40;</span><span style="color: #003399;">KeyEvent</span> key<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>key.<span style="color: #006633;">getCode</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> KeyCode.<span style="color: #006633;">VK_ESCAPE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stage.<span style="color: #006633;">setVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// == Close</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>key.<span style="color: #006633;">getCode</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> KeyCode.<span style="color: #006633;">VK_A</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Rectangle</span><span style="color: #009900;">&#40;</span>screenBounds.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span>, screenBounds.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; getChildren<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">add</span> <span style="color: #009900;">&#40;</span>keyEventPane<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>In my GlassPane I&#8217;ve only the calculated shape and a small help text:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000000; font-weight: bold;">class</span> GlassPane <span style="color: #000000; font-weight: bold;">extends</span> <span style="color: #003399;">Group</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">void</span> setShape<span style="color: #009900;">&#40;</span><span style="color: #003399;">Shape</span> shape, <span style="color: #000066; font-weight: bold;">boolean</span> showInfo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>getChildren<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">isEmpty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; getChildren<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> shape <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">double</span> BLUE <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.95</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Stop<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> stops <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.00</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.2</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.7</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.25</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.4</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.70</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.7</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> Stop<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1.0</span>, <span style="color: #003399;">Color</span>.<span style="color: #006633;">color</span><span style="color: #009900;">&#40;</span>BLUE, BLUE, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0.3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; LinearGradient lg <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LinearGradient<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #000066; font-weight: bold;">true</span>, CycleMethod.<span style="color: #006633;">NO_CYCLE</span>, stops<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; shape.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span>lg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; shape.<span style="color: #006633;">setMouseTransparent</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; shape.<span style="color: #006633;">setStroke</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; getChildren<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>shape<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> showInfo <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Text info <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;'ESC' to leave the Snipper<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;'A' to capture the whole screen<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;Drag the mouse to capture a rectangle&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">WHITE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setTranslateX</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setTranslateY</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setScaleX</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setScaleY</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setEffect</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> DropShadow<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info.<span style="color: #006633;">setMouseTransparent</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getChildren<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">add</span> <span style="color: #009900;">&#40;</span>info<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>I fill the shape with a LinearGradient paint.</p>
<p>In the start method I stick all panes together:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; KeyPane keyPane <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> KeyPane<span style="color: #009900;">&#40;</span>stage, rebounder <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Rebounder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; glassPane <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GlassPane<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; glassPane.<span style="color: #006633;">setShape</span><span style="color: #009900;">&#40;</span>rebounder.<span style="color: #006633;">shapeBuilder</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>, <span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
<br />
&nbsp; &nbsp; group.<span style="color: #006633;">getChildren</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">addAll</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Node<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span>keyPane, glassPane, rebounder.<span style="color: #006633;">getLasso</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>Ok where is the heart of my Snipper application? The capture method?</p>
<p>The capture method is currently developed with the java.awt.Robot class. So we need to leave the JavaFX thread and dive into the EventQueue. But first we must hide the whole stage window to get an good image from the desktop. But don&#8217;t use stage.setVisible (false) (it closes the application). I resize the stage to a zero dimension. Here my capture method:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> capture<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">Rectangle</span> finished<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; primaryStage.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; primaryStage.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003399;">EventQueue</span>.<span style="color: #006633;">invokeLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>finished.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>finished.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> 0.0d <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">Robot</span> robot <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Robot</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">BufferedImage</span> img <span style="color: #339933;">=</span> robot.<span style="color: #006633;">createScreenCapture</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> java.<span style="color: #006633;">awt</span>.<span style="color: #003399;">Rectangle</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>finished.<span style="color: #006633;">getX</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>finished.<span style="color: #006633;">getY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>finished.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span>, <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span>finished.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">File</span> folder <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user.home&quot;</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;snapshots&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; folder.<span style="color: #006633;">mkdirs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">File</span> file <span style="color: #339933;">=</span> <span style="color: #003399;">File</span>.<span style="color: #006633;">createTempFile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jfx2_screen_capture&quot;</span>, <span style="color: #0000ff;">&quot;.jpg&quot;</span>, folder<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ImageIO.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>img, <span style="color: #0000ff;">&quot;jpg&quot;</span>, file<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> ex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Logger.<span style="color: #006633;">getLogger</span><span style="color: #009900;">&#40;</span>Snipper.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">log</span><span style="color: #009900;">&#40;</span>Level.<span style="color: #006633;">SEVERE</span>, <span style="color: #000066; font-weight: bold;">null</span>, ex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Platform.<span style="color: #006633;">runLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glassPane.<span style="color: #006633;">setShape</span><span style="color: #009900;">&#40;</span>rebounder.<span style="color: #006633;">shapeBuilder</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>, <span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryStage.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span>screenBounds.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryStage.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span>screenBounds.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>With this few 200 lines I&#8217;ve created a very useful screen capture application. The start up time is incredible: Between the main method and the complete visible stage the JavaFX framework needs only 500ms on my one year old double-core notebook. The complete startup (double-click the jar) is under a second (hard to stop the time). I need only one AWT dependency to the Robot class. I hope this could be changed to increase the startup time (e.g. with the internal FXRobot class).</p>
<p>best regards,<br />
Josh.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/03/09/javafxdev-screen-capture-tool-with-200-lines-and-500ms-startup-time/';
var dzone_title = 'JavaFXDev: Screen capture tool with 200 lines and 500ms startup time';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/03/09/javafxdev-screen-capture-tool-with-200-lines-and-500ms-startup-time/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>JavaFXDev: NetBeans Platform with JavaFX 2.0ea</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/03/04/javafxdev-netbeans-platform-with-javafx-2-0ea/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/03/04/javafxdev-netbeans-platform-with-javafx-2-0ea/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 18:48:46 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[javafx]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=942</guid>
		<description><![CDATA[Hi!

Alan O’Leary shows in his blog a WebView integration in Swing. It is a not good documented feature, how to integrate JavaFX 2.0 controls into a swing application. But an integration is a main goal for the JavaFX 2.0 ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Hi!</p>
<p><a href="http://www.linkedin.com/in/alanoleary">Alan O’Leary</a> shows in <a href="http://a1o1.posterous.com/java-fx20-embedding-webview-in-swing">his blog</a> a WebView integration in Swing. It is a not good documented feature, how to integrate JavaFX 2.0 controls into a swing application. But an integration is a main goal for the JavaFX 2.0 release.</p>
<p>As an enthusiastic NetBeans Platform/RCP developer and <a href="http://javafx.com/partners/">JavaFX partner</a>, I work since two days to marriage JavaFX 2.0 and a NetBeans Platform Application. And yes, it works <img src='http://www.aljoscha-rittner.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;ve created a maven based platform application with a special starter Main.class. I need to launch the JavaFX toolkit system before any other module bootstrapping. The solution here is based on the early access release through the <a href="http://javafx.com/partners/">JavaFX partner</a> program. This &#8220;best practice&#8221; may change significantly between now and the final version. However, I&#8217;ll show only a concept, not compilable code.</p>
<p>The solution behind the bootstrapping a <a href="http://platform.netbeans.org">NetBeans Platform</a> is based on a <a href="http://wiki.netbeans.org/DevFaqPlatformAppAuthStrategies">FAQ</a> by Tom Wheeler. My Main.class is a JavaFX Application class &#8211; I need this Application instance to get rid of from invoke exceptions. The created Stage object by the Launcher can be ignored.</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #000000; font-weight: bold;">extends</span> Application<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> NB_MAIN_CLASS <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;org.netbeans.core.startup.Main&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// do whatever you need here (e.g. show a custom login form)</span><br />
&nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Launch Java FX&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">long</span> ms <span style="color: #339933;">=</span> <span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; Launcher.<span style="color: #006633;">launch</span><span style="color: #009900;">&#40;</span>Main.<span style="color: #000000; font-weight: bold;">class</span>, args<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// This is the main start up for JavaFX 2.0</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Launched Java FX in &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> ms<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;ms&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// once you're done with that, hand control back to NetBeans</span><br />
&nbsp; &nbsp; <span style="color: #003399;">ClassLoader</span> classloader <span style="color: #339933;">=</span> <span style="color: #003399;">Thread</span>.<span style="color: #006633;">currentThread</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getContextClassLoader</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">Class</span> mainClass <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span>NB_MAIN_CLASS, <span style="color: #000066; font-weight: bold;">true</span>, classloader<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #003399;">Object</span> mainObject <span style="color: #339933;">=</span> mainClass.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003399;">Method</span> mainMethod <span style="color: #339933;">=</span> mainClass.<span style="color: #006633;">getDeclaredMethod</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;main&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span>.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; mainMethod.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>mainObject, <span style="color: #009900;">&#40;</span><span style="color: #003399;">Object</span><span style="color: #009900;">&#41;</span> args<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; @Override<br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> start<span style="color: #009900;">&#40;</span>Stage stage<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Nothing to do, forget the stage....</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>The Main class is in a standard Java archive. This JAR file and all the JavaFX files must be in the platform/core folder.</p>
<p>At runtime all the core-Libs are available to the whole NetBeans Platform modules (and plugins). For the compiler I need a special dependency to the runtime:</p>
<pre>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sun.javafx<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tools<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>system<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;systemPath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${basedir}/../../corelauncher/mainlauncher/src/main/lib/jfxrt.jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/systemPath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
</pre>
<p>The system path depends on your project structure.</p>
<p>Now I can access all the JavaFX classes in a NetBeans module.</p>
<p>Please note, any scene construction needs to be build up in the JavaFX event queue thread. This is <strong>not</strong> the EventDispatcher-Thread from Swing!</p>
<p>My favorite call to jump in the JavaFX event thread is: <span style="text-decoration: line-through;">Toolkit.getDefault().defer (Runnable)</span> javafx.application.Platform.runLater (Runnable). <span style="text-decoration: line-through;">But the Toolkit class is in a com.* package. IMHO in the future we get an official way to do this.</span></p>
<p>The creation of a WebView component is pretty similar to the sample from Alan. But I don&#8217;t need a stage object:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; Platform.<span style="color: #006633;">runLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; group <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Group</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Scene scene <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Scene<span style="color: #009900;">&#40;</span>group<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; browser <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WebView<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> WebEngine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; browser.<span style="color: #006633;">getEngine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">addChangeListener</span><span style="color: #009900;">&#40;</span>PropertyReference.<span style="color: #006633;">WILDCARD</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ChangeListener</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> handle<span style="color: #009900;">&#40;</span>Bean paramBean, PropertyReference paramPropertyReference<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>paramPropertyReference.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">EventQueue</span>.<span style="color: #006633;">invokeLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Jump to Swing EventDispatcher...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BrowserTopComponent.<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">setDisplayName</span><span style="color: #009900;">&#40;</span>browser.<span style="color: #006633;">getEngine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>paramPropertyReference.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">EventQueue</span>.<span style="color: #006633;">invokeLater</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Jump to Swing EventDispatcher...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">String</span> url <span style="color: #339933;">=</span> browser.<span style="color: #006633;">getEngine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tfUrl.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addHistory<span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; group.<span style="color: #006633;">getChildren</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>browser<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; group.<span style="color: #006633;">setScaleX</span><span style="color: #009900;">&#40;</span>0.8d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; group.<span style="color: #006633;">setScaleY</span><span style="color: #009900;">&#40;</span>0.8d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Reflection r <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Reflection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; r.<span style="color: #006633;">setTopOffset</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; group.<span style="color: #006633;">setEffect</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; scene.<span style="color: #006633;">setFill</span><span style="color: #009900;">&#40;</span>javafx.<span style="color: #006633;">scene</span>.<span style="color: #006633;">paint</span>.<span style="color: #003399;">Color</span>.<span style="color: #006633;">BLACK</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; browser.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span>panel.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; browser.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span>panel.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; panel.<span style="color: #006633;">setScene</span><span style="color: #009900;">&#40;</span>scene<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; panel.<span style="color: #006633;">addComponentListener</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ComponentAdapter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> componentResized<span style="color: #009900;">&#40;</span><span style="color: #003399;">ComponentEvent</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Platform.<span style="color: #006633;">runLater</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Runnable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Jump from Swing-EventDispatcher to the JavaFX Thread:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browser.<span style="color: #006633;">setWidth</span><span style="color: #009900;">&#40;</span>panel.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browser.<span style="color: #006633;">setHeight</span><span style="color: #009900;">&#40;</span>panel.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>I&#8217;ve added some useful listeners. Please aware the switches between different threads (Swing and JavaFX).</p>
<p>The result is a beautiful NetBeans Platform application with an embedded JavaFX 2.0 WebView:</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/03/JavaFX-in-NetBeans-RCP.jpg"><img class="aligncenter size-full wp-image-946" title="JavaFX in NetBeans RCP" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/03/JavaFX-in-NetBeans-RCP.jpg" alt="" width="700" height="604" /></a></p>
<p>PS.: I like the Twitter message from <a href="http://twitter.com/deanriverson">Dean Riverson</a>: &#8220;<em>Ok, I call a moratorium on rotating and reflecting WebView&#8230;</em>&#8221; (<a href="http://twitter.com/deanriverson/status/43747528306462720">origin</a>).  -</p>
<p>I have to write 100 times:</p>
<div style="background-color: #008000;"><span style="color: #ffffff;">I&#8217;ll never rotate and reflect WebView again, I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again,I&#8217;ll never rotate and reflect WebView again, &#8230;</span></div>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/03/04/javafxdev-netbeans-platform-with-javafx-2-0ea/';
var dzone_title = 'JavaFXDev: NetBeans Platform with JavaFX 2.0ea';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/03/04/javafxdev-netbeans-platform-with-javafx-2-0ea/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Training: Lingen/Ems &#8211; FH Osnabrück &#8211; NetBeans Platform Certified Training</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/02/28/training-lingenems-fh-osnabrueck-netbeans-platform-certified-training/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/02/28/training-lingenems-fh-osnabrueck-netbeans-platform-certified-training/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 08:33:38 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans Certified Platform Training]]></category>
		<category><![CDATA[lingen]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=921</guid>
		<description><![CDATA[Moin!

Letzten Donnerstag und Freitag war es mal wieder soweit, ein sehr intensives und hoffentlich für die Teilnehmer spannendes Training ist zu Ende gegangen.



In zwei Tagen haben wir (Geertjan und ich) mehr als 20 Teilnehmern, an der Fachhochschule Osnabrück Lingen/Ems, ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Letzten Donnerstag und Freitag war es mal wieder soweit, ein sehr intensives und hoffentlich für die Teilnehmer spannendes Training ist zu Ende gegangen.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0292-small.png"><img class="aligncenter size-full wp-image-925" title="IMAG0292-small" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0292-small.png" alt="" width="800" height="479" /></a></p>
<p>In zwei Tagen haben wir (<a title="DZone: Lingen on NetBeans Platform" href="http://netbeans.dzone.com/nb-lingen?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+zones%2Fnetbeans+%28NetBeans+Zone%29">Geertjan</a> und ich) mehr als 20 Teilnehmern, an der <a href="http://www.mut.hs-osnabrueck.de/">Fachhochschule Osnabrück Lingen/Ems</a>, die NetBeans Plattform in einem <a title="NBPCT" href="http://www.aljoscha-rittner.de/blog/netbeans-platform-certified-training/">Trainings-Kurs</a> nahe gebracht. Es hat uns besonders gefreut, dass alle Anwesenden bis 18:00 am Freitag durchgehalten haben. Und nein, die Tür war nicht abgeschlossen <img src='http://www.aljoscha-rittner.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <span id="more-921"></span></p>
<p>Die Inhalte waren, wie immer, nicht ohne. Windows System API, Lookups, System File System, Nodes, Explorer und Visual Library waren die Kernthemen. Durch all diese Themen zog sich natürlich: &#8220;Modulare Softwareentwicklung&#8221;. So wurde den Studenten schnell klar, dass es ohne Theorie nicht geht. Es schien auch einige überrascht zu haben, dass es hier nicht nur darum ging, in der NetBeans Plattform ein paar Swing-Programme zu entwickeln. Wir vermitteln immer dazu &#8211; völlig vom Produkt losgelöst &#8211; wichtige Paradigmen der modularen Entwicklung von Software. Darunter fallen Punkte wie Separation of Concern, Single Responsible Principle, Komponentenorientierung, Kohäsion und Entkopplung.</p>
<p>Mit vielen eingeschobenen Workshops haben wir dieses Thema von der trockenen Grundlage auf das praktische Feld verschoben.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0288-small.png"><img class="aligncenter size-full wp-image-926" title="IMAG0288-small" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0288-small.png" alt="" width="800" height="479" /></a></p>
<p>Für einen besonders guten Einstieg in die NetBeans Platform API haben alle Teilnehmer des Kurses eine DZone NetBeans Platform Refcard erhalten. Ich hoffe, dass sich diese 2-seitige DIN-A3 Karte nun immer neben dem Bildschirm befindet.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/NBP-refzcard.png"><img class="aligncenter size-full wp-image-922" title="DZone NBP refcard" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/NBP-refzcard.png" alt="" width="320" height="413" /></a></p>
<p>Ich war begeistert, dass einige Studenten sich am Freitag Abend zu kleinen Entwicklergruppen zusammengeschlossen haben, um erste Projekte in der NetBeans RCP Welt zu realisieren. Ich freue mich auf die Ergebnisse!</p>
<p>Ganz großen Dank an die Organisation des Events und kulinarische Betreuung. Es gab immer genug Kaffee und andere Getränke und vor allem ein fantastisches Buffet. Da kommen wir doch gerne wieder!</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0284-small.png"><img class="aligncenter size-full wp-image-927" title="IMAG0284-small" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/02/IMAG0284-small.png" alt="" width="800" height="479" /></a></p>
<p>Auf unseren <a title="edu-NetBeans dot org" href="http://edu.netbeans.org/courses/nbplatform-certified-training/">edu-Seiten</a> gibt es unsere Präsentationen zum nachlesen und nacharbeiten: <a title="NBPCT Slides" href="http://edu.netbeans.org/contrib/slides/netbeans-platform/">Trainings-Präsentationen</a>. Ein sehr wichtiger Anlaufpunkt ist auf jeden Fall die Platform-Seite: <a title="Platform: All docs" href="http://netbeans.org/features/platform/all-docs.html">platform.netbeans.org</a>.</p>
<p>Fragen im Nachgang werden über die NetBeans Platform Certified Students Mailingliste abgehandelt. Natürlich stehen auch die <a href="http://forums.netbeans.org/">englisch</a>- und <a href="http://netbeans-forum.de/">deutschsprachigen</a> NetBeans Foren zur Verfügung.</p>
<p>Beste Grüße!</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/02/28/training-lingenems-fh-osnabrueck-netbeans-platform-certified-training/';
var dzone_title = 'Training: Lingen/Ems &#8211; FH Osnabrück &#8211; NetBeans Platform Certified Training';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/02/28/training-lingenems-fh-osnabrueck-netbeans-platform-certified-training/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEDev: NetBeans 7 Beta2 und spezielles zu Git und JUnit</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/02/18/idedev-netbeans-7-beta2-und-spezielles-zu-git-und-junit/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/02/18/idedev-netbeans-7-beta2-und-spezielles-zu-git-und-junit/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 11:28:11 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=916</guid>
		<description><![CDATA[Moin!

Gestern kündigte ich ja die Beta2 zur NetBeans 7.0 IDE an. Zwei Dinge hatte ich da unterschlagen, die hier noch einer besonderen Erwähnung bedürfen.
Git
In der Beta2 kann man nun (ohne Plugin) git als Versionierungssystem nutzen. Der Git Plan im ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Gestern kündigte ich ja die Beta2 zur NetBeans 7.0 IDE an. Zwei Dinge hatte ich da unterschlagen, die hier noch einer besonderen Erwähnung bedürfen.</p>
<h2>Git</h2>
<p>In der Beta2 kann man nun (ohne Plugin) git als Versionierungssystem nutzen. Der <a href="http://netbeans.org/projects/versioncontrol/pages/Git_plan">Git Plan im Wiki</a> gibt schon einen recht guten Überblick, was funktioniert und worauf man noch warten muss.</p>
<p>Folgende Features sollten funktionieren:</p>
<ul>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Quick_overview_of_file_status_in_IDE">Quick overview of file status in IDE</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#View_Modifications_%28Show_Changes%29">View_Modifications_(Show_Changes)</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Add">Add</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Commit">Commit</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Add_or_Exclude_to_or_from_commit">Add oder Exclude bei commit</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Reset_Changes_%28Revert_local_changes%29">Reset Changes (Lokale Änderungen zurücknehmen)</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Diff_-_view_local_modifications">Diff &#8211; Lokale Änderungen vergleichen</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Inline_diff_-_show_local_modifications_in_a_files_sidebar">Inline diff -Lokale Änderungen in der Files sidebar</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Repository_Init">Repository Init</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Ignore">Ignore</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Checkout">Checkout</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Create_Branch">Create Branch</a></li>
<li> <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Switch_to_Branch">Switch to Branch</a> <strong> </strong>, siehe Checkout</li>
<li><a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Merge_from_Branch">Merge from Branch</a></li>
</ul>
<p>Bis zum Finale ist noch einiges zu tun, gerade für das Distributing steht noch was aus (<a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Repository_Clone">Repository Clone</a>, <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Pull">Pull</a>, <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Push">Push</a>, <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Fetch">Fetch</a>), die Vervollständigung der Branching und Merging Tools (<a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Merge_from_Branch">Merge from Branch</a>, <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Export_uncommited_changes_%28Local_changes%29">Export uncommited changes (Local changes)</a>, <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Apply_Patch">Apply Patch</a>) sowie <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Search_history_of_files">Search history of files</a> und eine <a href="http://netbeans.org/projects/versioncontrol/pages/Git_uc#Blame">Blame</a> Integration.</p>
<h2>JUnit</h2>
<p>Trotz der verwirrenden und unterschiedlichen, teils negativen, Meldungen wird JUnit natürlich weiter von NetBeans unterstützt. Allerdings muss JUnit in Zukunft extra aus dem Plugin-Center geladen werden. Fest integriert ist nur ein Bridge-Modul zu JUnit. Unabhängig zu rechtlichen Vorgaben hat das in Zukunft vielleicht sogar Vorteile, wenn es um die Integration von anderen Unit-Tools geht (z.B durch eine einheitliche API).</p>
<p>Ich hoffe, dass heute der <a title="NetBeans 7 Beta2" href="http://download.netbeans.org/netbeans/7.0/beta2/">Download</a> nicht so überlastet ist wie gestern. Viel Spaß mit NetBeans 7.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/02/18/idedev-netbeans-7-beta2-und-spezielles-zu-git-und-junit/';
var dzone_title = 'IDEDev: NetBeans 7 Beta2 und spezielles zu Git und JUnit';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/02/18/idedev-netbeans-7-beta2-und-spezielles-zu-git-und-junit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEDev: NetBeans 7 Beta2 is out</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/02/17/idedev-netbeans-7-beta2-is-out/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/02/17/idedev-netbeans-7-beta2-is-out/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 16:26:01 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=911</guid>
		<description><![CDATA[Moin!

Ab heute ist NetBeans 7.0 Beta 2 verfügbar zum Download.

Die Highlights sind:

	JDK 7 Unterstützung
	Integration des WebLogic Servers
	Verbesserungen, um eine Oracle Datenbank einzubinden
	Glassfish 3.1 Unterstützung
	Maven 3 Support
	Remote URL-JavaDoc Support (JavaDoc muss nicht mehr lokal installiert sein)
	Neuer GridBagLayout Customizer
	Für JavaEE CDI, ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Ab heute ist NetBeans 7.0 Beta 2 verfügbar <a title="NetBeans Downloads" href="http://dlc.sun.com.edgesuite.net/netbeans/7.0/beta2/">zum Download</a>.</p>
<p>Die Highlights sind:</p>
<ul>
<li>JDK 7 Unterstützung</li>
<li>Integration des WebLogic Servers</li>
<li>Verbesserungen, um eine Oracle Datenbank einzubinden</li>
<li>Glassfish 3.1 Unterstützung</li>
<li>Maven 3 Support</li>
<li>Remote URL-JavaDoc Support (JavaDoc muss nicht mehr lokal installiert sein)</li>
<li>Neuer GridBagLayout Customizer</li>
<li>Für JavaEE CDI, REST Dienste und Java Persistence Verbesserungen, zudem Bean Validation</li>
<li>JSF Component Bibliothekenunterstützung,  PrimeFaces ist mit an Board</li>
<li>Verbesserte EL-Unterstützung in JSF</li>
<li>HTML5</li>
<li>JSON</li>
<li>PHPDoc-Generierung</li>
<li>PHP Rename Refactoring und Safe delete Refactoring</li>
<li>PHP 5.3 Alias-Unterstützung</li>
<li>C/C++ kann nun besser Binär-Libs importieren</li>
<li>C/C++ Projekt-Typ mit Quelltexten auf Remote-Servern</li>
<li>Endlich für PHP User: Word-Wrap im Editor</li>
<li>Der Profiler wurde aufgebohrt</li>
<li>Verbesserte Überprüfung von externen Änderungen an Quelltexten außerhalb der IDE</li>
</ul>
<p>Auch die NetBeans Platform bekommt Erweiterungen:</p>
<ul>
<li>Annotationen für Actions, TopComponents und <a href="https://netbeans.org/bugzilla/show_bug.cgi?id=192750">NbBundle.</a></li>
<li>Eigene Annotationen für Maven-Projekte</li>
<li>Performance Steigerungen und bessere Integration des Profilers</li>
<li>Und etliche <a title="NetBeans API Changes" href="http://bits.netbeans.org/dev/javadoc/apichanges.html">API-Änderungen</a>, hier ein paar schöne Änderungen rausgepickt:
<ul>
<li><a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/apichanges.html#custom-icons">Icons für Update-Center</a></li>
<li><a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-ui/apichanges.html#PluginManager.openInstallWizard">openInstallWizard für den PluginMananger</a></li>
<li><a href="http://bits.netbeans.org/dev/javadoc/org-openide-explorer/apichanges.html#TreeView.quickSearchAllowed">QuickSearch im TreeView (de)aktivieren</a></li>
<li>OutlineView-Tree-Spalte kann nun eine <a href="http://bits.netbeans.org/dev/javadoc/org-openide-explorer/apichanges.html#OutlineView.setTreeHorizontalScrollBarPolicy">horizontale Scrollbar erhalten</a>. (Sehr nützlich!)</li>
<li><a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-viewmodel/apichanges.html#issue-186672">Eigene TableCellRenderer</a></li>
</ul>
</li>
</ul>
<p>Ich hoffe nur die Maven Artifacts werden für Beta2 zeitnah freigegeben, am SNAPSHOT teste ich ungern.</p>
<p>Die aktuellen <a title="NetBeans 7 Release Notes" href="http://netbeans.org/community/releases/70/">Release-Notes (en)</a> stehen natürlich auch zur Verfügung. Sehr umfangreich ist, wie immer, die <a href="http://wiki.netbeans.org/NewAndNoteworthyNB70">NewAndNoteworthy</a> Seite.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/02/17/idedev-netbeans-7-beta2-is-out/';
var dzone_title = 'IDEDev: NetBeans 7 Beta2 is out';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/02/17/idedev-netbeans-7-beta2-is-out/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BeanDev: native2ascii Datei Konverter. NetBeans Plugin Idee</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/02/03/beandev-native2ascii-datei-konverter-netbeans-plugin-idee/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/02/03/beandev-native2ascii-datei-konverter-netbeans-plugin-idee/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 14:14:59 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=905</guid>
		<description><![CDATA[Moin!

Ich habe mal wieder was für meine Ideensammlung: Plugins, die ich schon immer mal programmieren wollte, aber nie die Zeit dazu fand.

Heute der native2ascii Konverter für Dateien, die man im Project-Explorer markiert hat. Kontextmenü mit folgenden Befehlen:

	To ASCII...
	Reverse to ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Ich habe mal wieder was für meine Ideensammlung: Plugins, die ich schon immer mal programmieren wollte, aber nie die Zeit dazu fand.</p>
<p>Heute der native2ascii Konverter für Dateien, die man im Project-Explorer markiert hat. Kontextmenü mit folgenden Befehlen:</p>
<ul>
<li>To ASCII&#8230;</li>
<li>Reverse to native&#8230;</li>
<li>Native to native&#8230;</li>
</ul>
<p><em><span id="more-905"></span>To ASCII</em> wandelt von einem vorgegebenen Encoding in die \u-Notation. <em>Reverse to native</em> fragt nach eine Encoding, in der die Datei konvertiert werden soll und <em>Native to native</em> fast beide Transformationen zusammen.</p>
<p>Vielleicht kann man das dem existierenden kenai.com Projekt <a title="kenai.com Native2Ascii" href="http://kenai.com/projects/nb-native2ascii/downloads/directory/nbms/6.7">NATIVE2ASCII</a> hinzufügen? Ich muss mal Hlavki fragen und mit einem hg-clone einen Prototypen schreiben&#8230; wenn ich mal wieder Zeit habe.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/02/03/beandev-native2ascii-datei-konverter-netbeans-plugin-idee/';
var dzone_title = 'BeanDev: native2ascii Datei Konverter. NetBeans Plugin Idee';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/02/03/beandev-native2ascii-datei-konverter-netbeans-plugin-idee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaDev: Java auf dem Desktop &#8211; Come on Oracle!</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/02/01/javadev-java-auf-dem-desktop-come-on-oracle/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/02/01/javadev-java-auf-dem-desktop-come-on-oracle/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 17:00:36 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=896</guid>
		<description><![CDATA[Moin!

Eines der massiv unterschätzten Themen ist Java auf dem Desktop. Immer wieder höre ich von Entwicklern, dass Web-Oberflächen, Java EE, Server und Backend-Development die Domäne für Java sei.

Ich denke mal, man muss da ein wenig über den Tellerrand hinaus ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Eines der massiv unterschätzten Themen ist <em>Java auf dem Desktop</em>. Immer wieder höre ich von Entwicklern, dass Web-Oberflächen, Java EE, Server und Backend-Development die Domäne für Java sei.</p>
<p>Ich denke mal, man muss da ein wenig über den Tellerrand hinaus schauen. Sicherlich ist Java nicht die 1a Desktop Sprache, weil für die vielen netten Gimmiks einfach die nativen OS spezifischen Schnittstellen fehlen. Aber mal ehrlich, warum sollte eine so robuste Programmiersprache auf dem Desktop nichts taugen? Seit 15 Jahren entwickele ich Java-Desktop-Applikationen zunächst für eine kurze Zeit mit AWT, dann seit Swing 1.1 raus war, Swing-Applikationen.<span id="more-896"></span>Ich plagte mich davor mit der Microsoft Welt und auch mit 4GL Sprachen rum. Aber kein Framework hat mir so viele Freiheiten und so eine stabile Grundlage gegeben, wie es Java mit Swing und den ganzen zusätzlichen Bibliotheken konnte.</p>
<p>Zwar spricht man heute bei Java vom Cobol des einundzwanzigsten Jahrhunderts, aber auch das ist völlig unterschätzt. Denn neben der Masse an Programmen, die Java (wie ehemals Cobol) trägt, gibt es doch eine Weiterentwicklung die ganz sicher keine Stagnation erfährt.</p>
<p><a title="Gosling and the Java Desktop" href="http://blogs.sun.com/geertjan/entry/james_gosling_the_massive_popularity">Geertjan hat in seinem Blog</a> selbst mal wieder eine Lanze für den Desktop Einsatz von Java gebrochen und da ein Zitat von James Gosling ausgegraben, das ich hier gerne wiederhole:</p>
<blockquote><p>If I had to say I&#8217;m jaded it&#8217;s sort of about the fact that people&#8217;s attention is so focused on the web. And it feels to me like that&#8217;s 10% of the computing landscape. If you look at what goes on in, say, biology. Huge, huge computational problems in biology. The people who do protein folding up in San Francisco, which is kind of everybody there, that stuff is really really cool. It sure doesn&#8217;t show up on anybody&#8217;s &#8220;cool&#8221; radar but, you know, all modern medicine research, it&#8217;s computers. Right, it&#8217;s computing. And none of that has any magic pixie dust coolness on it and modern materials. It&#8217;s, again, all computer simulation and all the rest of that and the computing behind that and the rest of that, most people don&#8217;t even think of it as computing because it&#8217;s something that a scientist does. Talk to most people in physics, they spend most of their time writing code, not doing physics experiments. And it&#8217;s just a cool world filled with thousands and thousands of different things and it feels like the web is only a corner of it.</p></blockquote>
<p>Hinter dem ganzen Internet mit all seinen Online-Applikationen, Webservices, Shops, Social Media, Blogs, Twitter-Diensten, Online-Spielen usw. verbirgt sich eine Welt in der Computer auch für etwas anderes gebraucht werden. Eine Welt im Business-Bereich, eine Welt in der Forschung und Wissenschaft, eine Welt in der Produktentwicklung, eine Welt von Künstlern, Designern, Entwicklern und Autoren. Welten, wo Programme auf browserbasierten Oberflächen nur die zweite Wahl sind.</p>
<p>Wenn man sich das mal klar macht, kann man Goslings Aussage verstehen, wenn er vom Internet nur als eine 10% Ecke der Computerwelt spricht. Gefühlt wird jeder immer sagen, das ist mehr: Das Internet füllt mein Leben als Computer-Nerd sicher zu 90% aus. Aber die produktive Entwicklungsarbeit geschieht immer noch auf dem Desktop. Sicher, Server- und Webgestützt, aber Desktopprogramme schlagen Browser-Ajax-Anwendungen immer noch in ihrer Bedienbarkeit, Reaktion und Funktionalität.</p>
<p>Auch die NetBeans-Plattform als klassisches RCP Framework zeigt mit seinen ganzen existierenden Derivaten, dass der Desktop eben nicht eine verarmte Softwarelandschaft ist. Im Gegenteil, da wo massive Robustheit, gute Wartbarkeit und flexible Schnittstellen zu anderen tausenden Frameworks benötigt werden, ist Java auf dem Desktop, nach meinem Dafürhalten, die zentrale Plattform.</p>
<p>Was tatsächlich allein schon auf der NetBeans Plattform existiert, <a href="http://platform.netbeans.org/screenshots.html">zeigt eindrucksvoll die Liste</a> auf netbeans.org. Hier ein paar Screenshots:</p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/northrop_thumb.png" alt="" width="200" height="134" /></a></p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/masstk_ss_full_01_thumb.png" alt="" width="200" height="155" /></a></p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/puzzle_thumb.png" alt="" width="200" height="118" /></a></p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/intellihome_thumb.png" alt="" width="200" height="156" /></a></p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/sepix-sales-system_thumb.png" alt="" width="200" height="157" /></a></p>
<p><a href="http://platform.netbeans.org/screenshots.html"><img class="alignnone" src="http://netbeans.org/images_www/screenshots/platform/blueMarine_thumb.png" alt="" width="200" height="150" /></a></p>
<p>und Hundert mehr. Diese Applikationen sind ausschließlich auf der NetBeans Plattform entstanden und stellen keine vollständige Liste dar. Dazu gibt es wieder unzählige reine Swing-Applikationen und Anwendungen, die auf dem Eclipse RCP Framework basieren.</p>
<p>Alles Anwendungen die stabil und robust in den Firmen dieser Welt werkeln. Vielleicht unbeachtet und nicht immer sichtbar in dem omnipräsenten Internet, aber wichtig für Entwicklung und Wirtschaft.</p>
<p>Aber die Entwickler stöhnen, sie vermissen den Anschluss zu den ganzen schönen Gimmicks, die Silverlight, Adobe Air und andere Frameworks bieten, um Desktop-Anwender das 110%-Feeling zu geben. Unabhängig davon, ob man das wirklich braucht, vielleicht gibt es mit JavaFX for Swing eine Lösung, die Desktop-Apps auch für den privaten Desktop wieder attraktiver macht. Vielleicht schaffen wir es SwingX und Labs-Komponenten verstärkt in das JDK aufzunehmen. Vielleicht wird es endlich eine HTML-Browser-Komponente in den Standard-Runtimes geben. Eventuell sieht man die Notwendigkeit, dass Java einfacher mit nativen Schnittstellen arbeiten kann, sei es zum OS, sei es zu Hardware-Schnittstellen.</p>
<p>Ich denke schon, dass es da eine Zukunft gibt. Die geballte Wucht der vorhandenen Applikationen kann sowieso nur eine Richtung vorgeben. Ich hoffe nur, dass die Macht des Faktischen auch bei Oracle erhört wird.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/02/01/javadev-java-auf-dem-desktop-come-on-oracle/';
var dzone_title = 'JavaDev: Java auf dem Desktop &#8211; Come on Oracle!';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/02/01/javadev-java-auf-dem-desktop-come-on-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BeanDev: BetterIconView in NetBeans Plattform aufgenommen</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/31/beandev-bettericonview-in-netbeans-plattform-aufgenommen/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/31/beandev-bettericonview-in-netbeans-plattform-aufgenommen/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 20:53:27 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=877</guid>
		<description><![CDATA[You can find an English version on NetBeans Zone.

Moin!

Bei den NetBeans Certified Trainings übernehme ich regelmäßig den Teil Nodes &#38; Explorer Views (pdf). Dabei stelle ich regelmäßig die unterschiedlichen Views vor. Dafür habe ich ein kleines Demo-Programm geschrieben. Das ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>You can find an English version on <a title="From IconView to BetterIconView" href="http://netbeans.dzone.com/news/iconview-bettericonview">NetBeans Zone</a>.</p>
<p>Moin!</p>
<p>Bei den <a title="NetBeans Certified Training" href="http://www.aljoscha-rittner.de/blog/netbeans-platform-certified-training/">NetBeans Certified Trainings</a> übernehme ich regelmäßig den Teil <a title="Nodes &amp; Explorer Views (de)" href="http://edu.netbeans.org/contrib/slides/netbeans-platform/nbp-javabeans_de.pdf">Nodes &amp; Explorer Views</a> (pdf). Dabei stelle ich regelmäßig die unterschiedlichen Views vor. Dafür habe ich ein kleines Demo-Programm geschrieben. Das Programm zeigt allerdings nicht nur die Vorzüge der Views, sondern auch die Probleme mit deren Darstellungen. Gerade das IconView glänzt nicht gerade mit schöner Optik. Ich hatte aus der Not eine Tugend gemacht und gerade für das Training eine eigene Implementation vorbereitet. Damit kann man den Teilnehmern sehr leicht zeigen, wie man eigene Views für die Nodes-API erstellen kann.</p>
<p><span id="more-877"></span>Dieses BetterIconView hat es <a title="Toni Epple" href="http://eppleton.de/blog/">Toni Epple</a> angetan und er zeigte es im Dezember letzten Jahres <a title="Blog from Jaroslav Tulach" href="http://wiki.apidesign.org/wiki/Blogs">Jaroslav Tulach</a>. Er hatte gestern Zeit gehabt, meine paar Codezeilen zu nehmen, um damit das alte IconView zu ersetzen.</p>
<p>Wie man an dem Beispiel des alten IconView erkennen kann, funktioniert so einiges nicht. Fokusrahmen fehlt, Größenberechnung in der Höhe ist zu groß und die Nodes überlappen sich bei langen Texten.</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/01/OldIconView.png"><img class="size-full wp-image-879 alignnone" title="OldIconView" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/01/OldIconView.png" alt="" width="448" height="406" /></a></p>
<p>Meine neue Implementation ist zwar recht einfach und nicht im jeden Detail perfekt, aber sicherlich um einiges besser, als die alte Version in der NetBeans Plattform.</p>
<p>Hier ein Screenshot mit drei selektierten Nodes und dem korrekten Fokusrahmen-Verhalten:</p>
<p><a href="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/01/BetterIconView.png"><img class="alignnone size-full wp-image-880" title="BetterIconView" src="http://www.aljoscha-rittner.de/blog/wp-content/uploads/2011/01/BetterIconView.png" alt="" width="459" height="423" /></a></p>
<p>Den Quelltext kann man <a title="HG NetBeans, BetterIconView" href="http://hg.netbeans.org/ergonomics/rev/35bc1a0d8259">hier einsehen</a>. Es ist wirklich sehr einfach ein ListView zu erweitern, um ein neues IconView zu erzeugen, deswegen werden da keine großen Überraschungen auftauchen.</p>
<p>Man sollte nur berücksichtigen, dass man in Views nicht mit dem Nodes aus dem Modell des Entwicklers arbeitet, sondern mit optimierten Wrappern. In einem Renderer (hier ListCellRenderer) konvertiert man das übergebene Value-Objekt in ein Node mit der Hilfsklasse Visualizer:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Node node <span style="color: #339933;">=</span> Visualizer.<span style="color: #006633;">findNode</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>Hat man diese Hürde geschafft, kann man alles realisieren, was Swing zu bieten hat. Der Kreativität sind also keine Grenzen gesetzt. Ich möchte da zum Beispiel auch auf Geertjans Blog verweisen, wo er die <a title="Creating an Explorer View with Visual Library" href="http://blogs.sun.com/geertjan/entry/creating_an_explorer_view_with">Visual Library als Explorer-View</a> nutzt.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/31/beandev-bettericonview-in-netbeans-plattform-aufgenommen/';
var dzone_title = 'BeanDev: BetterIconView in NetBeans Plattform aufgenommen';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/31/beandev-bettericonview-in-netbeans-plattform-aufgenommen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEDev: NetBeans IDE 7 ohne Ruby On Rails Unterstützung</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/27/idedev-netbeans-ide-7-ohne-ruby-on-rails-unterstuetzung/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/27/idedev-netbeans-ide-7-ohne-ruby-on-rails-unterstuetzung/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 12:50:14 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=869</guid>
		<description><![CDATA[Moin!

Leider erreichte mich heute über die Mailingliste eine nicht sehr schöne Nachricht. Die Ruby On Rails Entwicklung wird nicht mehr vom NetBeans Core Team unterstützt.

Tinuola Awopetu von Oracle beschreibt es so:
After thorough consideration, we have taken the difficult step ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Leider erreichte mich heute über die Mailingliste eine nicht sehr schöne Nachricht. Die <a title="Ruby on rails Homepage" href="http://rubyonrails.org/">Ruby On Rails</a> Entwicklung wird nicht mehr vom NetBeans Core Team unterstützt.</p>
<p>Tinuola Awopetu von Oracle beschreibt es so:</p>
<blockquote><p>After thorough consideration, we have taken the difficult step to discontinue support for Ruby on Rails in the NetBeans IDE.</p></blockquote>
<p><span id="more-869"></span></p>
<p>Dabei werden zwei Hauptgründe genannt. Erstens:</p>
<blockquote><p>Java SE 7 and Java Development Kit 7 (JDK 7) are the next major releases of the Java SE platform, which Oracle is committed to deliver in 2011. A key objective of the NetBeans IDE has always been to offer superior support for the Java platform. To maintain that objective and capitalize on the JDK 7 release themes&#8211;multi-language support, developer productivity and performance&#8211;it is necessary that our engineering resources are committed to a timely and quality release of NetBeans IDE 7.0.</p></blockquote>
<p>Das Entwicklerteam will sich auf den Fokus JDK 7 konzentrieren, damit NetBeans 7 eine 100% Unterstützung mit dem Release bieten kann. Damit setzt Oracle (wie auch schon in der Vergangenheit angekündigt wurde), verstärkt auf die Java-Entwicklung. Ruby on Rails kann da nicht in der gewünschten Qualität einfließen.</p>
<p>Oracle sieht aber nicht nur einen stärkeren Fokus bei Java, sondern sieht Ruby on rails überhaupt im Abwind. Das ist der zweite Grund:</p>
<blockquote><p>Second: Although our Ruby support has historically been well received, based on existing low usage trends we are unable to justify the continued allocation of resources to support the feature.</p></blockquote>
<p>Ab dem 27. Januar 2011 wird Ruby on rails aus den Dev-Builds verschwinden. Entwickler aus der Community, die Ruby on Rails weiter unterstützen wollen, werden auf die <a title="Ruby Support NetBeans" href="http://wiki.netbeans.org/RubySupport">NetBeans Ruby Support Seite</a> verwiesen.</p>
<p>Feedback zu dieser Entscheidung wird ebenfalls gewünscht. Oracle verweist dazu auf die <a title="NetBeans Foren" href="http://netbeans.org/community/lists/top.html">Mailinglisten/Foren</a>, <a title="NetBeans Twitter" href="http://twitter.com/netbeans">Twitter</a> oder den <a title="NetBeans Contact" href="http://netbeans.org/about/contact.html">direkten Kontakt</a> zum NetBeans IDE Team.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/27/idedev-netbeans-ide-7-ohne-ruby-on-rails-unterstuetzung/';
var dzone_title = 'IDEDev: NetBeans IDE 7 ohne Ruby On Rails Unterstützung';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/27/idedev-netbeans-ide-7-ohne-ruby-on-rails-unterstuetzung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaDev: Transparente Swing-Buttons</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/26/javadev-transparente-swing-buttons/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/26/javadev-transparente-swing-buttons/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 15:50:39 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jbutton]]></category>
		<category><![CDATA[swing]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=864</guid>
		<description><![CDATA[Moin!

Nur ein kleines Appetithäppchen. Wenn man transparente JButtons benötigt, weil die dahinter liegenden JPanels Grafiken oder Farbverläufe haben, benötigt man besonders beim Windows-System Look&#38;Feel einen Trick.

Zunächst reicht es nicht, nur setOpaque (false) zu verwenden. Es wird trotzdem ein Hintergrund ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Nur ein kleines Appetithäppchen. Wenn man transparente JButtons benötigt, weil die dahinter liegenden JPanels Grafiken oder Farbverläufe haben, benötigt man besonders beim Windows-System Look&amp;Feel einen Trick.</p>
<p>Zunächst reicht es nicht, nur setOpaque (false) zu verwenden. Es wird trotzdem ein Hintergrund als Füller gemalt. Die ui-Klasse ist so leider programmiert. Man kann aber eine transparente Hintergrundfarbe setzen:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TransparentButton <span style="color: #000000; font-weight: bold;">extends</span> <span style="color: #003399;">JButton</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> TransparentButton <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; setBackground <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Color</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>, <span style="color: #cc66cc;">255</span>, <span style="color: #cc66cc;">255</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; setOpaque <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
</pre>
<p>Wenn man bei (halb-) transparenten Hintergrundfarben das setOpaque (false) vergisst, hat man übrigens sehr unschöne Back-Buffer Effekte. D.h. die Optimierungen im Swing-Framework verursachen dann unschöne zerhackte Grafikeffekte. In Kombination funktioniert es aber super.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/26/javadev-transparente-swing-buttons/';
var dzone_title = 'JavaDev: Transparente Swing-Buttons';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/26/javadev-transparente-swing-buttons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaDev: Installer und Launcher für Java Programme</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/17/javadev-installer-und-launcher-fuer-java-programme/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/17/javadev-installer-und-launcher-fuer-java-programme/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 08:21:15 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[launcher]]></category>
		<category><![CDATA[packager]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=857</guid>
		<description><![CDATA[Moin!

Die Frage kommt immer wieder mal, deswegen wollte ich hier eine kleine Liste an Programmen erfassen, die Java-Programme in native Betriebssysteme integrieren, Installer erzeugen oder das Starten vereinfachen.

Ich habe dafür drei Gruppen. Die Launcher sind Executables, die Java-Programme wie ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Die Frage kommt immer wieder mal, deswegen wollte ich hier eine kleine Liste an Programmen erfassen, die Java-Programme in native Betriebssysteme integrieren, Installer erzeugen oder das Starten vereinfachen.</p>
<p>Ich habe dafür drei Gruppen. Die <strong>Launcher</strong> sind Executables, die Java-Programme wie native Programme starten lassen. Das ist üblicherweise nur unter Windows notwendig. Linux und Mac behandeln Java-Programme wie alle anderen Executables. Die nächste Gruppe wäre <strong>Installer</strong>. Diese Werkzeuge erzeugen aus Java-Projekten Installationspakete, die es dem Anwender ermöglichen per Kommandozeile oder Assistenten Java-Programme zu installieren oder später zu deinstallieren. Die letzte Gruppe behandelt <strong>Packer</strong>. Darin fasse ich Tools zusammen, die 3rd-Party-Libs in ein JAR zusammenfassen, JARs komprimieren oder Klassen so umbenennen, so dass eine Quelltextwiederherstellung sehr schwer gemacht wird (Obfuscator).</p>
<p>Ich würde mich freuen, wenn ein paar <strong>Anregungen</strong> und <strong>Erfahrungsberichte</strong> rein kommen würden. Für die NetBeans Platform gibt es schon <a title="NetBeans Platform Installer" href="https://blogs.oracle.com/geertjan/entry/generate_a_netbeans_platform_installer">integrierte Installer</a> für Windows, Linux, MacOS und Solaris sowie eine WebStart Variante. Außerdem einen Pack200 Tool für den Installer. Da braucht man für die meisten Fälle keine externen Tools.</p>
<p>Hier also eine Liste, die ich schon so gesammelt habe:<span id="more-857"></span></p>
<h2>Launcher</h2>
<ul>
<li><a title="WinRun for Java" href="http://winrun4j.sourceforge.net/">WinRun4J</a>
<ul>
<li>Lizenz: <a title="Common Public License" href="http://www.eclipse.org/legal/cpl-v10.html">CPL</a></li>
<li>OS: Windows</li>
<li>Integration: Kommandozeile, Eclipse Plugin</li>
<li>Ein Executable mit native Bindings, Windows DDE-Zugriff, konfigurierbarem Icon, INI-Datei für Startparameter, Dienste-Wrapper, Systemlog-Unterstützung und Konsolenmodus.</li>
<li>Es unterstützt auch das Packaging von 3rd-Party Bibliotheken.</li>
<li>Soweit ich das sehen kann, hat man mindestens immer ein JAR und eine Java-Umgebung muss installiert sein.</li>
</ul>
</li>
<li><a href="http://launch4j.sourceforge.net/">Launch4j</a>
<ul>
<li>Lizenz: <a title="BSD Lizenz" href="http://www.opensource.org/licenses/bsd-license.html">BSD</a> und <a title="MIT Lizenz" href="http://www.opensource.org/licenses/mit-license.html">MIT</a></li>
<li>OS: Alle Java-Plattformen (Ziel bleibt aber Windows)</li>
<li>Integration: Kommandozeile, Ant, Maven, <a title="Screenshots" href="http://sourceforge.net/project/screenshots.php?group_id=95944">GUI (Wizard)</a></li>
<li>Launch4j erzeugt eine Windows Executable-Datei, die alle JARs, native Bibliotheken und sogar ein Embedded JRE enthalten kann.</li>
<li>Es unterstützt eigene Icons für die Exe, JAR&#8217;s werden nicht beim Start extrahiert, unterstützt auch Konsolenanwendungen,</li>
</ul>
</li>
</ul>
<h2>Installer</h2>
<ul>
<li><a title="Open Installer" href="http://java.net/projects/openinstaller/">Open Installer</a> (Crossplatform Installer)
<ul>
<li>Lizenz: <a title="CDDL 1.0" href="http://www.opensource.org/licenses/cddl1.php">CDDL 1.0</a></li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Kommandozeile, NetBeans Platform Installer</li>
<li>Ich erwähne den Open Installer hier, weil dieser in der NetBeans Platform integriert ist und als Installer für den Glassfish verwendet wird. Ansonsten würde ich als Entwickler die Finger davon lassen, weil das Projekt extrem schlecht dokumentiert ist. Am besten den Quelltext anschauen, wenn man eine hohes Maß an Interesse und Leidensfähigkeit hat.</li>
</ul>
</li>
<li><a title="Antigen" href="http://antigen.sourceforge.net/">Antigen</a> (Ant Installer Generator)
<ul>
<li>Lizenz: k/a</li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Ant, Kommandozeile, (evtl. Maven)</li>
<li>Erzeugt aus Ant-Scripts einen grafischen Installer</li>
<li>Alle Programmbestandteile werden in einem JAR-Installer gepackt. Eine Java Runtime muss auf dem Zielrechner existieren.</li>
</ul>
</li>
<li><a title="InstallJammer, Features" href="http://www.installjammer.com/features">InstallJammer</a>
<ul>
<li>Lizenz: GPL mit &#8220;<a title="GPL with Exception" href="http://www.installjammer.com/docs/index.html?License">Special Exception</a>&#8220;, darf kommerziell genutzt werden</li>
<li>OS: Multiplattform (tck/tcl), Windows 98, ME, 2000, XP, 2003, Vista, 2008, Linux, FreeBSD, Solaris, HP-UX, AIX</li>
<li>Integration: Kommandozeile, GUI</li>
<li>InstallJammer ist eine mächtige OpenSource Lösung die einen nativen Installer mit umfangreicher Buildumgebung anbietet. Der Installer ist nicht auf Java-Programme beschränkt. JRE wird vom Installer nur gesucht, aber nicht bei Bedarf installiert. Man kann aber das JRE wohl über <a title="Forum, JRE bei Bedarf installieren" href="http://www.installjammer.com/forums/viewtopic.php?f=1&amp;t=1156&amp;p=6103&amp;hilit=jre#p6103">Actions mitinstallieren</a>.</li>
<li>Mehrsprachigkeit, Multiplattform, Nativer Installer im OS-Look, Benutzerdefinierte Aktionen, Installer-Profile (Kommandozeile, GUI, Silent, usw), GUI-Bearbeitung der Assistenten-Panels, Themen, Deinstallationsroutinen.</li>
<li>Umfangreiche <a title="Dokumentation zu InstallJammer" href="http://www.installjammer.com/docs/">Dokumentation</a></li>
</ul>
</li>
<li><a title="Install for Java" href="http://www.ej-technologies.com/products/install4j/overview.html">Install4j</a>
<ul>
<li>Lizenz: Kommerziell (Windows Single ab 600€, Multiplatform Single ab 1700€, nach oben offen&#8230;)</li>
<li>OS: Win32, Win64, Linux RPM, MacOS, Unix</li>
<li>Integration: Ant, Kommandozeile, GUI</li>
<li>Dieser kommerzielle Installer bietet einen GUI oder Kommandozeileninstaller (auch Silent), JRE-Pacakging oder Detection, GUI und Scriptsprache, Mehrsprachigkeit, Dienste-Unterstützung, eigenes Icon und sehr vieles mehr.</li>
</ul>
</li>
<li><a href="http://www.advancedinstaller.com/top-freeware-features.html">Advanced Installer for Java Freeware Edition</a>
<ul>
<li>Lizenz: Kommerziell, Freeware Edition</li>
<li>OS: Windows</li>
<li>Integration: Kommandozeile, <a title="GUI" href="http://www.advancedinstaller.com/main-screen-shot.html">GUI</a></li>
<li>Die Freeware Edition bietet einen MSI Installer Generator für Java Programme mit UAC Unterstützung, Registry-Zugriff, 32bit und 64bit, Scripting über XML-Konfiguration.</li>
<li>JRE Bundling ist <em>nicht </em>in der Free Edition, Custom Icon ist <em>nicht</em> möglich.</li>
<li><a title="Fähigkeiten im Vergleich" href="http://www.advancedinstaller.com/feats-list.html">Feature Matrix</a></li>
</ul>
</li>
</ul>
<h2>Packer</h2>
<ul>
<li><a title="One JAR" href="http://one-jar.sourceforge.net/">one-jar</a>
<ul>
<li>Lizenz: <a title="Lizenz" href="http://one-jar.sourceforge.net/index.php?page=documents&amp;file=license">Proprietär, OpenSource</a>, BSD?</li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Ant, Maven</li>
<li>Erzeugt aus mehreren JAR-Bibliotheken eine einzelne ausführbare JAR-Datei</li>
<li>Unterstützt auch native Bibliotheken, die während des Starts in das Dateisystem entpackt werden.</li>
</ul>
</li>
<li><a href="http://proguard.sourceforge.net/">ProGuard</a> (Obfuscator)
<ul>
<li>Lizenz: GPL</li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Kommandozeile, Ant</li>
<li>Verändert sprechende Bezeichner (z.B. Paket und Klassennamen) in kompilierten JARs in verkürzte oder randomisierte Namen, um die Wiederherstellung von bearbeitbaren Quelltext zu erschweren.</li>
<li>Unterstützt viele Plattformen (Java 1.1 bis 6, ME, Android)</li>
</ul>
</li>
<li><a title="pack200 JavaSE 5" href="http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/pack200.html">pack200</a> JAR Packager
<ul>
<li>Lizenz: <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u21-license-159167.txt">Oracle License</a></li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Kommandozeile</li>
<li>Ein Tool des Java SE SDKs von Oracle, dass seit Java 5 JAR Dateien besonders effizient packen kann.</li>
<li>Der Einsatz sind üblicherweise webbasierte Java-Anwendungen, damit diese im Download möglichst wenig Bandbreite verwenden</li>
</ul>
</li>
<li><a title="Script für Ant" href="http://java.sun.com/developer/technicalArticles/java_warehouse/single_jar/">Ant Script für die NetBeans IDE</a>
<ul>
<li>Lizenz: k/a</li>
<li>OS: Alle Java-Plattformen</li>
<li>Integration: Ant, NetBeans IDE</li>
<li>Es handelt sich dabei nicht um ein Programm, sondern ein Ant-Target-Script zum Erstellen von Single-JARs. Der verlinkte Blogeintrag beschreibt, wie man in NetBeans dieses Script integrieren kann.</li>
</ul>
</li>
</ul>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/17/javadev-installer-und-launcher-fuer-java-programme/';
var dzone_title = 'JavaDev: Installer und Launcher für Java Programme';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div> <p><a href="http://www.aljoscha-rittner.de/blog/?flattrss_redirect&amp;id=857&amp;md5=c3582beedba5b83f96ea14b0a8999d1c" title="Flattr" target="_blank"><img src="http://www.aljoscha-rittner.de/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/17/javadev-installer-und-launcher-fuer-java-programme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>IDEDev: Hudson Continious Integration (CI) wird Jenkins</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/12/idedev-hudson-continious-integration-ci-wird-jenkins/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/12/idedev-hudson-continious-integration-ci-wird-jenkins/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 06:16:54 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=850</guid>
		<description><![CDATA[Moin!

Kohsuke Kawaguchi hat es gestern veröffentlicht. Der Name Hudson CI ist gestorben. Der Continious Integration Server soll in Jenkins (CI?) umbenannt werden.

Wie Kohsuke in einer Nachricht schreibt, konnte Oracle, trotz einer ein Monat langen Kommunikation, nicht davon überzeugt werden, ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p><a title="Blog" href="http://kohsuke.org/">Kohsuke Kawaguchi</a> hat es <a title="Bye bye Hudson" href="http://kohsuke.org/bye-bye-hudson-hello-jenkins/">gestern veröffentlicht</a>. Der Name Hudson CI ist gestorben. Der <a title="Wikipedia" href="http://de.wikipedia.org/wiki/Kontinuierliche_Integration">Continious Integration Server</a> soll in Jenkins (CI?) umbenannt werden.</p>
<p>Wie Kohsuke in einer Nachricht schreibt, konnte Oracle, trotz einer ein Monat langen Kommunikation, nicht davon überzeugt werden, dass der Name Hudson CI in einer &#8220;neutralen Organisation&#8221; gut aufgehoben wäre.</p>
<blockquote><p>The central issue was that we couldn’t convince Oracle to put the trademark under a neutral party’s custody (such as <a href="http://sfconservancy.org/">Software Freedom Conservancy</a>), to level the playing field.</p></blockquote>
<p><span id="more-850"></span>Er führt aber auch aus, dass Oracle Pläne mit Hudson verfolgen will, die der aktuellen Entwicklung des CI-Servers nicht entspricht. Dazu gehöre auch eine erheblich formalisiertere Projektstruktur, Änderungen in der Architektur und das verstärkte Einbinden von 3rd-Party Abhängigkeiten.</p>
<blockquote><p>Aside from this, Oracle wanted a broader change to the way the Hudson  project operates, including a far more formal change review process,  architectures, 3rd party dependencies and their licenses, and so on.</p></blockquote>
<p>[...]</p>
<blockquote><p>All of those still might not have been a show-stopper if we felt that there is a genuine trust between us, but in this case, we just failed to build such a relationship, even after a month long conversation.</p></blockquote>
<p>Als Konsequenz soll das Projekt in Jenkins umbenannt werden. Dieser Name ist erneut ein &#8220;Buttler&#8221;-Name aus dem englischen Sprachraum und soll aktuell von keinem anderen Software-Projekt beansprucht sein.</p>
<blockquote><p>So in the end, we’d like to propose the community that we regrettably abandon the name “Hudson” and rename to “Jenkins” — it’s another English-sounding butler name that doesn’t collide with any software project as far as I can tell.</p></blockquote>
<p>Das Proposal für die Namensänderung wurde im <a href="http://www.hudson-labs.org/content/hudsons-future">Hudson Lab</a> veröffentlicht:</p>
<blockquote>
<h3>The Proposal</h3>
<p>First, we rename the project &#8211; the choice for a new name is <strong>Jenkins</strong>, which we think evokes the same sort of English butler feel as Hudson. We&#8217;ve already registered domains, Twitter users, etc for the new name, and have done our best to verify that there are no existing trademarks which would conflict with it. Kohsuke will be registering the trademark for Jenkins in his name, with the intent of transferring ownership of the trademark to the umbrella of the <a href="http://www.sfconservancy.org/">Software Freedom Conservancy</a> once the Jenkins project has been admitted to it (which, I should add, is very much our plan, hopefully in their next round of new projects in a few months &#8211; we&#8217;ve already had preliminary contacts with SFC). We still invite Oracle to remain involved with the project, on equal terms with all other contributors, and hope they&#8217;ll take us up on this invitation.</p>
<p>[...]</p></blockquote>
<p>Das Proposal umfasst aber mehr als nur eine Namensänderung. Außerdem soll die Infrastruktur des Projektes komplett von Oracle weg verschoben und ein Governance Board eingerichtet werden.</p>
<p>Ich würde mich freuen, wenn der CI Server auch in Zukunft in der NetBeans IDE unterstützt wird. Hudson <a title="Hudson als CI Server" href="http://www.aljoscha-rittner.de/blog/archive/2010/05/10/idedev-netbeans-und-maven-mit-hudson-als-ci-server/">nutze ich</a> schon seit einiger Zeit, um zentralisierte Maven- und Ant-Builds durchzuführen.</p>
<p>Noch besser wäre es, Oracle würde mit seinem verbleibenden Hudson Projekt sich nicht zu weit von Jenkins entfernen. Konkurrenz belebt zwar das Geschäft, aber in diesem Fall wäre der Nutzen für die Anwender fraglich.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/12/idedev-hudson-continious-integration-ci-wird-jenkins/';
var dzone_title = 'IDEDev: Hudson Continious Integration (CI) wird Jenkins';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/12/idedev-hudson-continious-integration-ci-wird-jenkins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BeanDev: Plugins schneller testen</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/10/beandev-plugins-schneller-testen/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/10/beandev-plugins-schneller-testen/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 17:35:26 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[NetBeans Plattform]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=843</guid>
		<description><![CDATA[Moin!

Wenn man kleine schnelle Testumgebungen für NetBeans IDE-Plugins haben möchte, sollte man sich diese FAQ anschauen.

DevFaqNetBeansFullHack
Can I test changes to the IDE without going through the license check and so on?

Ja, tatsächlich geht das. Mit einem kleinen Parameter [cc ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Wenn man kleine schnelle Testumgebungen für NetBeans IDE-Plugins haben möchte, sollte man sich <a title="DevFaqNetBeansFullHack" href="http://wiki.netbeans.org/DevFaqNetBeansFullHack">diese FAQ</a> anschauen.</p>
<blockquote>
<h1>DevFaqNetBeansFullHack</h1>
<h2>Can I test changes to the IDE without going through the license check and so on?</h2>
</blockquote>
<p>Ja, tatsächlich geht das. Mit einem kleinen Parameter <code class="codecolorer text dawn"><span class="text">netbeans.full.hack</span></code> auf <code class="codecolorer text dawn"><span class="text">true</span></code> gesetzt, werden einiges an Dialogen, Test und Remotezugriffen (Auto Update Center, Maven Index) deaktiviert:<br />
<span id="more-843"></span></p>
<blockquote>
<ul>
<li> Auto Update background check (to see if updates are available); you can still use AU via <strong>Tools &gt; Plugin Manager</strong></li>
<li> prompting about still-running tasks when shutting down</li>
<li> license dialog</li>
<li> import of old user directory</li>
<li> IDE registration dialog</li>
<li> dialog suggesting that you submit usage statistics</li>
<li> welcome screen displayed by default and RSS feed refreshed</li>
<li> blocking dialog when some modules could not be loaded</li>
<li> use of <tt>~/NetBeansProjects/</tt> for newly created projects (<tt>java.io.tmpdir</tt> will be used instead)</li>
<li> resizing gesture submit dialog (<tt>SubmitStatus.resize</tt>)</li>
<li> weekly Maven repository indexing (can be configured in Options dialog)</li>
<li> long package name for default group ID in new Maven project (<tt>test</tt> used instead)</li>
</ul>
</blockquote>
<p>So können Plugin-Tests und automatisierte Tasks mit Aufruf der NetBeans IDE ohne störende Dialoge durchgeführt werden.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/10/beandev-plugins-schneller-testen/';
var dzone_title = 'BeanDev: Plugins schneller testen';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/10/beandev-plugins-schneller-testen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEDev: SevenBeans NetBeans IDE Plugin für Windows7 Feeling</title>
		<link>http://www.aljoscha-rittner.de/blog/archive/2011/01/06/idedev-sevenbeans-netbeans-ide-plugin-fur-windows7-feeling/</link>
		<comments>http://www.aljoscha-rittner.de/blog/archive/2011/01/06/idedev-sevenbeans-netbeans-ide-plugin-fur-windows7-feeling/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 17:29:38 +0000</pubDate>
		<dc:creator>Aljoscha Rittner</dc:creator>
				<category><![CDATA[NetBeans IDE]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[windows7]]></category>

		<guid isPermaLink="false">http://www.aljoscha-rittner.de/blog/?p=835</guid>
		<description><![CDATA[Moin!

Das Plugin SevenBeans bringt für die NetBeans IDE das 100% Native-Feeling auf Windows 7 Betriebssystemen.

Mit diesem Plugin erhält man zu dem NetBeans-Taskbar Icon eine

	Jumplist (spezielles Kontextmenü per rechter Maustaste),
	Iconoverlays (d.h. ein Build wird in der Taskbar als Badged Icon ...]]></description>
			<content:encoded><![CDATA[<p class="wp-flattr-button"></p><p>Moin!</p>
<p>Das Plugin <a title="SevenBeans Homepage" href="http://www.strixcode.com/sevenbeans/">SevenBeans</a> bringt für die NetBeans IDE das 100% Native-Feeling auf Windows 7 Betriebssystemen.</p>
<p>Mit diesem Plugin erhält man zu dem NetBeans-Taskbar Icon eine</p>
<ul>
<li>Jumplist (spezielles Kontextmenü per rechter Maustaste),</li>
<li>Iconoverlays (d.h. ein Build wird in der Taskbar als Badged Icon dargestellt),</li>
<li>Den hellgrünen Fortschrittsbalken im Taskbar-Icon,</li>
<li>Minivorschau der geöffneten Tabs, wenn man mit der Maus über das Taskbar-Icon fährt</li>
<li>und einen Konfigurationsdialog in den Options, um alle neuen Features ein- oder auszuschalten.</li>
</ul>
<p><span id="more-835"></span>SevenBeans basiert auf der Technologie von <a title="J7Goodies Homepage" href="http://www.strixcode.com/j7goodies/">J7Goodies</a>, ein Framework um Swing-Anwendungen mit solchen Features auszustatten.</p>
<p>Eine Jumplist wird so zum Kinderspiel:</p>
<pre>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">DestinationList albums<span style="color: #339933;">;</span><br />
albums.<span style="color: #006633;">addFile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Users<span style="color: #000099; font-weight: bold;">\\</span>Alex<span style="color: #000099; font-weight: bold;">\\</span>My Pictures<span style="color: #000099; font-weight: bold;">\\</span>Bachelor Party.alb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
albums.<span style="color: #006633;">addFile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Users<span style="color: #000099; font-weight: bold;">\\</span>Alex<span style="color: #000099; font-weight: bold;">\\</span>My Pictures<span style="color: #000099; font-weight: bold;">\\</span>Family.alb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
albums.<span style="color: #006633;">addFile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Users<span style="color: #000099; font-weight: bold;">\\</span>Alex<span style="color: #000099; font-weight: bold;">\\</span>My Pictures<span style="color: #000099; font-weight: bold;">\\</span>Flowers.alb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
DestinationList tasks<span style="color: #339933;">;</span><br />
tasks.<span style="color: #006633;">addTask</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/camera&quot;</span>, <span style="color: #0000ff;">&quot;Import from camera&quot;</span>, cameraIconPath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
tasks.<span style="color: #006633;">addTask</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/scan&quot;</span>, <span style="color: #0000ff;">&quot;Scan a photo&quot;</span>, scannerIconPath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
JumpList jumpList<span style="color: #339933;">;</span><br />
jumpList.<span style="color: #006633;">appendRecentCategory</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jumpList.<span style="color: #006633;">appendCustomCategory</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Albums&quot;</span>, albums<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jumpList.<span style="color: #006633;">appendTasks</span><span style="color: #009900;">&#40;</span>tasks<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jumpList.<span style="color: #006633;">save</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</pre>
<p>Viele weitere Beispiele finden sich auf der J7Goodies Homepage.</p>
<p>Schön ist es, dass das Plugin für NetBeans schon fertig ist. Die aktuelle Version kann <a title="Download SevenBeans" href="http://www.strixcode.com/sevenbeans/">hier heruntergeladen</a> werden.</p>
<p>Beste Grüße,<br />
Josch.</p>
<div class="dzone_button" style="float: right; margin-left: 10px;">
<script type="text/javascript">
var dzone_url = 'http://www.aljoscha-rittner.de/blog/archive/2011/01/06/idedev-sevenbeans-netbeans-ide-plugin-fur-windows7-feeling/';
var dzone_title = 'IDEDev: SevenBeans NetBeans IDE Plugin für Windows7 Feeling';
var dzone_blurb = '';
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.aljoscha-rittner.de/blog/archive/2011/01/06/idedev-sevenbeans-netbeans-ide-plugin-fur-windows7-feeling/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
