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

<channel>
	<title>open source. open mind.</title>
	<atom:link href="http://jayskills.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jayskills.com</link>
	<description>Java? Java! Java-Java-ching-ching-ching</description>
	<lastBuildDate>Fri, 26 Apr 2013 09:46:27 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Simple hierarchical popupmenu for Node</title>
		<link>http://jayskills.com/blog/2013/03/20/simple-hierarchical-popupmenu-for-node/</link>
		<comments>http://jayskills.com/blog/2013/03/20/simple-hierarchical-popupmenu-for-node/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 16:35:09 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1270</guid>
		<description><![CDATA[I recently got a question how you can organize your Node&#8217;s popup menus hierarchically, while keeping registration declarative. Organizing your actions hierachically in the Layer and then using Lookups.forPath().lookupAll(Action.class) doesn&#8217;t work, the result is a flat list. So here&#8217;s the simplest version I know: I&#8217;ll leave it as an exercise for you to change the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jayskills.com/wp-content/uploads/2013/03/Bildschirmfoto-2013-03-20-um-17.28.23.png"><img class="size-medium wp-image-1276 alignnone" title="Bildschirmfoto 2013-03-20 um 17.28.23" src="http://jayskills.com/wp-content/uploads/2013/03/Bildschirmfoto-2013-03-20-um-17.28.23-300x205.png" alt="" width="300" height="205" /></a></p>
<p>I recently got a question how you can organize your Node&#8217;s popup menus hierarchically, while keeping registration declarative. Organizing your actions hierachically in the Layer and then using Lookups.forPath().lookupAll(Action.class) doesn&#8217;t work, the result is a flat list. So here&#8217;s the simplest version I know:</p>
<pre class="brush: java; title: ; notranslate">
AbstractNode example = new AbstractNode(Children.LEAF) {
            @Override
            public Action[] getActions(boolean context) {
                return findActionsForFolder(FileUtil.getConfigFile(&quot;MYPATH&quot;));
            }

            protected Action[] findActionsForFolder(FileObject folder) {
                ArrayList actions = new ArrayList();
                if (folder != null &amp;&amp; folder.isFolder()) {

                FileObject[] children = folder.getChildren();
                for (FileObject fileObject : children) {
                    if (fileObject.isFolder()) {
                        Action[] findActionsForFolder = findActionsForFolder(fileObject);
                        Action menu = new MenuAction(fileObject.getName(), findActionsForFolder);
                        actions.add(menu);
                    } else {
                        try {
                            Action action = (Action) DataObject.find(fileObject).getLookup().lookup(InstanceCookie.class).instanceCreate();
                            actions.add(action);
                        } catch (IOException ex) {
                            Exceptions.printStackTrace(ex);
                        } catch (ClassNotFoundException ex) {
                            Exceptions.printStackTrace(ex);
                        }
                    }
                }
}
                return actions.toArray(new Action[actions.size()]);
            }
        };
</pre>
<p>I&#8217;ll leave it as an exercise for you to change the code to use InstanceCookie.Of&#8230;<br />
And here&#8217;s the MenuNode:</p>
<pre class="brush: java; title: ; notranslate">class MenuAction extends AbstractAction implements Presenter.Popup, Presenter.Menu {

Action[] actions;
String name;
public JMenu menu;

public MenuAction(String name, Action[] findActionsForFolder) {
super(name);
this.name = name;
this.actions = findActionsForFolder;
this.menu = new JMenu(name);
for (Action action : actions) {
if (action instanceof Presenter.Popup) {
menu.add(((Presenter.Popup)action).getPopupPresenter());
} else {
menu.add(action);
}

}
}

@Override
public void actionPerformed(ActionEvent e) {
}

@Override
public JMenuItem getPopupPresenter() {

return menu;
}

@Override
public JMenuItem getMenuPresenter() {
return menu;
}
}
</pre>
<p>That&#8217;s it. Now register your actions under MYPATH in hierarchies, e.g.:</p>
<pre class="brush: java; title: ; notranslate">@ActionID(
category = &quot;Build&quot;,
id = &quot;asd.SomeAction&quot;)
@ActionRegistration(
displayName = &quot;#CTL_SomeAction&quot;)
@ActionReference(path = &quot;MYPATH/mysubcategory/usd&quot;, position = 0)
@Messages(&quot;CTL_SomeAction=asd&quot;)
public final class SomeAction implements ActionListener {

@Override
public void actionPerformed(ActionEvent e) {
// TODO implement action body
}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/03/20/simple-hierarchical-popupmenu-for-node/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call me Chuck!</title>
		<link>http://jayskills.com/blog/2013/02/28/call-me-chuck/</link>
		<comments>http://jayskills.com/blog/2013/02/28/call-me-chuck/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 07:18:27 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1266</guid>
		<description><![CDATA[Wanna play some Java Game in your Browser, but your Java plugin is disabled? No Problem for Chuck Norris: just head over to http://jayday.de and click the banner image (a+s+d keys to move Duke).]]></description>
			<content:encoded><![CDATA[<p>Wanna play some Java Game in your Browser, but your Java plugin is disabled? No Problem for Chuck Norris: just head over to<a href=" http://jayday.de"> http://jayday.de</a> and click the banner image (a+s+d keys to move Duke).</p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/28/call-me-chuck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A star is born</title>
		<link>http://jayskills.com/blog/2013/02/15/a-star-is-born/</link>
		<comments>http://jayskills.com/blog/2013/02/15/a-star-is-born/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 08:00:16 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1247</guid>
		<description><![CDATA[I&#8217;ve just implemented the A* algorithm for the TileEngine. Might come handy for calculating the attack path in a &#8220;Tower Defense&#8221; style game, or for moving to  a location in touch based games like &#8220;Emily&#8221;. Here I use it in the tilemap editor: And here in a game prototype: Placing obstacles forces recalculation (the guys [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just implemented the A* algorithm for the TileEngine. Might come handy for calculating the attack path in a &#8220;Tower Defense&#8221; style game, or for moving to  a location in touch based games like &#8220;Emily&#8221;.</p>
<pre class="brush: java; title: ; notranslate">import de.eppleton.fx2d.tileengine.TileMap;
import de.eppleton.fx2d.tileengine.TileMapLayer;
import java.util.*;

public class AStar {

    public static PathNode getPath(TileMap map, TileMapLayer layer, AStarTile start, AStarTile goal) {

        boolean[][] playField = new boolean[map.getWidth()][map.getHeight()];
        for (int x = 0; x &lt; playField.length; x++) {
            boolean[] bs = playField[x];
            for (int y = 0; y &lt; bs.length; y++) {
                int idx = x + (y * map.getWidth());
                bs[y] = layer.getGid(idx) == 0;
            }
        }

        PriorityQueue&lt;PathNode&gt; openList = new PriorityQueue&lt;&gt;();
        List&lt;PathNode&gt; closedList = new ArrayList&lt;&gt;();
        PathNode stn = new PathNode(null, 0, 0, start.x, start.y);
        openList.add(stn);
        while (!openList.isEmpty()) {
            PathNode toExpand = openList.poll();
            List&lt;PathNode&gt; successors = new ArrayList&lt;&gt;();
            int ex = toExpand.getX();
            int ey = toExpand.getY();
            addSuccessor(playField, ex - 1, ey, toExpand, goal, successors);
            addSuccessor(playField, ex, ey - 1, toExpand, goal, successors);
            addSuccessor(playField, ex + 1, ey, toExpand, goal, successors);
            addSuccessor(playField, ex, ey + 1, toExpand, goal, successors);
            for (PathNode candidate : successors) {
                if (candidate.x == goal.x &amp;&amp; candidate.y == goal.y) {
                    return candidate;
                }
                if (alreadyFound(candidate, closedList)) {
                    continue;
                }
                if (alreadyFound(candidate, openList)) {
                    continue;
                }
                openList.add(candidate);

            }
            closedList.add(toExpand);
        }
        return null;
    }

    public static void addSuccessor(boolean[][] playField, int ex, int ey, PathNode toExpand, AStarTile goal, List&lt;PathNode&gt; successors) {
        if (ex &lt; 0 || ey &lt; 0 || ex &gt;= playField.length || ey &gt;= playField[ex].length) {
            return;
        }

        if (playField[ex][ey]) {
            PathNode n = new PathNode(toExpand, ex, ey);
            n.g = g(n);
            n.h = h(n, goal);
            n.f = n.g + n.h;
            successors.add(n);
        }
    }

    private static boolean alreadyFound(PathNode n, Collection&lt;PathNode&gt; l) {
        for (PathNode no : l) {
            if (no.getX() == n.getX() &amp;&amp; no.getY() == n.getY() &amp;&amp; no.getF() &lt;= n.getF()) {
                return true;
            }
        }
        return false;
    }

    private static float g(PathNode n) {
        PathNode p = n.getParent();
        return p.g + 1;
    }

    private static float h(PathNode act, AStarTile goal) {
        int distX = Math.abs(act.getX() - goal.x);
        int distY = Math.abs(act.getY() - goal.y);
        float ret = (float) Math.sqrt(distX * distX + distY * distY);
        return ret;
    }

    public static class AStarTile {

        int x, y;

        public AStarTile(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static class PathNode implements Comparable&lt;PathNode&gt; {

        private PathNode parent;
        private float f, g, h;

        public PathNode getParent() {
            return parent;
        }
        private int x, y;

        public int getX() {
            return x;
        }

        public int getY() {
            return y;
        }

        float getF() {
            return f;
        }

        private PathNode(PathNode parent, float g, float h, int x, int y) {
            this.parent = parent;
            this.x = x;
            this.y = y;
            this.g = g;
            this.h = h;
            this.f = g + h;
        }

        private PathNode(PathNode parent, int x, int y) {
            this(parent, 0, 0, x, y);
        }

        @Override
        public int compareTo(PathNode o) {
            return f &gt; o.f ? 1 : f == o.f ? 0 : -1;
        }
    }
}</pre>
<p>Here I use it in the tilemap editor:</p>
<p><iframe width="640" height="480" src="http://www.youtube.com/embed/HwHHt1gxFqE?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>And here in a game prototype:</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/1SUzfrLlNB4?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>Placing obstacles forces recalculation (the guys who get stuck when I place a rock can&#8217;t find a path &#8217;cause the start tile is invalid):</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/1L1sY2NV8m8?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/15/a-star-is-born/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing JavaFX ListView</title>
		<link>http://jayskills.com/blog/2013/02/14/javafx-listview-with-custom-display/</link>
		<comments>http://jayskills.com/blog/2013/02/14/javafx-listview-with-custom-display/#comments</comments>
		<pubDate>Thu, 14 Feb 2013 07:20:04 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1237</guid>
		<description><![CDATA[I&#8217;ve started to create a TileMap Editor for my JavaFX game engine. In this editor I&#8217;ve got a ListView that displays the Layers. Each Layer is represented by it&#8217;s name and a CheckBox is displayed next to it, so you can choose if you want to show or hide the layer: But simply adding the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started to create a TileMap Editor for my JavaFX game engine. In this editor I&#8217;ve got a ListView that displays the Layers. Each Layer is represented by it&#8217;s name and a CheckBox is displayed next to it, so you can choose if you want to show or hide the layer:</p>
<div id="attachment_1240" class="wp-caption alignnone" style="width: 650px"><a href="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.23.31.png"><img class="size-large wp-image-1240 " title="Bildschirmfoto 2013-02-13 um 11.23.31" src="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.23.31-1024x791.png" alt="" width="640" height="494" /></a><p class="wp-caption-text">The Layer List of my TileMapEditor</p></div>
<p>But simply adding the TileMapLayer objects into a ObservableList and displaying them with a ListView will result in this:</p>
<div id="attachment_1241" class="wp-caption alignnone" style="width: 650px"><a href="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.27.02.png"><img class="size-large wp-image-1241 " title="Bildschirmfoto 2013-02-13 um 11.27.02" src="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.27.02-1024x781.png" alt="" width="640" height="488" /></a><p class="wp-caption-text">Displaying a TileMapLayer in a ListView with default rendering</p></div>
<p>In order to display the CheckBox, we need to do this:</p>
<pre class="brush: java; title: ; notranslate">layerList = FXCollections.observableArrayList(tileMap.getLayers());
        listView = new ListView&lt;TileMapLayer&gt;();
        listView.setItems(layerList);
        if (!layerList.isEmpty()) {
            listView.getSelectionModel().select(layerList.get(0));
        }
        Callback&lt;TileMapLayer, ObservableValue&lt;Boolean&gt;&gt; getProperty = new Callback&lt;TileMapLayer, ObservableValue&lt;Boolean&gt;&gt;() {
            @Override
            public BooleanProperty call(TileMapLayer layer) {

                return layer.getVisibleProperty();

            }
        };
        Callback&lt;ListView&lt;TileMapLayer&gt;, ListCell&lt;TileMapLayer&gt;&gt; forListView = CheckBoxListCell.forListView(getProperty);

        listView.setCellFactory(forListView);</pre>
<p>Resulting in this:</p>
<div id="attachment_1242" class="wp-caption alignnone" style="width: 650px"><a href="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.31.43.png"><img class="size-large wp-image-1242 " title="Bildschirmfoto 2013-02-13 um 11.31.43" src="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.31.43-1024x777.png" alt="" width="640" height="485" /></a><p class="wp-caption-text">Using a CheckBoxListCell to display the Layers</p></div>
<p>Now we only need to show some more meaningful text. You can do that by adding a StringConverter. Fortunately the factory method takes a StringConverter as it&#8217;s second argument:</p>
<pre class="brush: java; title: ; notranslate">layerList = FXCollections.observableArrayList(tileMap.getLayers());
        listView = new ListView&lt;TileMapLayer&gt;();
        listView.setItems(layerList);
        if (!layerList.isEmpty()) {
            listView.getSelectionModel().select(layerList.get(0));
        }
        Callback&lt;TileMapLayer, ObservableValue&lt;Boolean&gt;&gt; getProperty = new Callback&lt;TileMapLayer, ObservableValue&lt;Boolean&gt;&gt;() {
            @Override
            public BooleanProperty call(TileMapLayer layer) {

                return layer.getVisibleProperty();

            }
        };
        StringConverter stringConverter = new StringConverter&lt;TileMapLayer&gt;() {
            @Override
            public String toString(TileMapLayer t) {
                return t.getName();
            }

            @Override
            public TileMapLayer fromString(String string) {
                for (TileMapLayer tileMapLayer : layerList) {
                    if (string.equals(tileMapLayer.getName())) {
                        return tileMapLayer;
                    }
                }
                return null;
            }
        };
        Callback&lt;ListView&lt;TileMapLayer&gt;, ListCell&lt;TileMapLayer&gt;&gt; forListView = CheckBoxListCell.forListView(getProperty, stringConverter);

        listView.setCellFactory(forListView);</pre>
<p>That&#8217;s it, now the TileMapLayer will be displayed as desired:</p>
<p><a href="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.23.31.png"><img class="size-large wp-image-1240 alignnone" title="Bildschirmfoto 2013-02-13 um 11.23.31" src="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-13-um-11.23.31-1024x791.png" alt="" width="640" height="494" /></a></p>
<p>&nbsp;</p>
<p>And here&#8217;s a video of the Application in action:</p>
<p><iframe width="640" height="480" src="http://www.youtube.com/embed/GS_yYFlQZMs?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/14/javafx-listview-with-custom-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Space Invaders in less than 175 LOC</title>
		<link>http://jayskills.com/blog/2013/02/13/space-invaders-in-less-than-175-loc/</link>
		<comments>http://jayskills.com/blog/2013/02/13/space-invaders-in-less-than-175-loc/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 10:04:09 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1217</guid>
		<description><![CDATA[With the current version of the API I&#8217;m at less than 175 LOC for Space Invaders. I&#8217;ve got lot&#8217;s of &#8220;Functional Interfaces&#8221; in my APIs that can be converted to Lambda Expressions with JavaFX 8( e.g. SpriteProvider and CollisionHandler). That will make the code nicer and shorter. I could probably also reduce the linecount by [...]]]></description>
			<content:encoded><![CDATA[<p>With the current version of the API I&#8217;m at less than 175 LOC for Space Invaders. I&#8217;ve got lot&#8217;s of &#8220;Functional Interfaces&#8221; in my APIs that can be converted to Lambda Expressions with JavaFX 8( e.g. SpriteProvider and CollisionHandler). That will make the code nicer and shorter. I could probably also reduce the linecount by bundling the recources (e.g. TileSets) and creating more factories and Builders (SpriteBuilder). But I&#8217;m getting closer to what I want&#8230;</p>
<pre class="brush: java; title: ; notranslate">
package de.eppleton.fx2d.samples.spaceinvaders;

import de.eppleton.fx2d.collision.*;
import de.eppleton.fx2d.*;
import de.eppleton.fx2d.action.*;
import de.eppleton.fx2d.tileengine.*;
import java.util.Collection;
import java.util.logging.*;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.scene.canvas.*;
import javafx.scene.input.*;
import javafx.scene.media.*;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javax.xml.bind.JAXBException;
import org.openide.util.Lookup;
import org.openide.util.lookup.Lookups;

public class SpaceInvaders extends Game {

    Points TEN = new Points(10);
    Points TWENTY = new Points(30);
    Points THIRTY = new Points(40);
    DoubleProperty invaderXVelocity = new SimpleDoubleProperty(0.3);
    AudioClip shootSound = new AudioClip(SpaceInvaders.class.getResource(&quot;/assets/sound/shoot.wav&quot;).toString());
    AudioClip invaderKilledSound = new AudioClip(SpaceInvaders.class.getResource(&quot;/assets/sound/invaderkilled.wav&quot;).toString());
    MediaPlayer mediaPlayer = new MediaPlayer(new Media(SpaceInvaders.class.getResource(&quot;/assets/sound/invader_loop1.mp3&quot;).toString()));
    int score = 0;
    String message;
    int[][] enemies = new int[][]{
        {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
        {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}
    };

    @Override
    protected void initGame() {
        final GameCanvas canvas = getCanvas();
        try {
            TileSet invaders = TileMapReader.readSet(&quot;/assets/graphics/invaders1.tsx&quot;);
            TileSet playerTiles = TileMapReader.readSet(&quot;/assets/graphics/player.tsx&quot;);
            final TileSetAnimation animation30 = new TileSetAnimation(invaders, new int[]{0, 1}, 2);
            final TileSetAnimation animation10 = new TileSetAnimation(invaders, new int[]{4, 5}, 2);
            final TileSetAnimation animation20 = new TileSetAnimation(invaders, new int[]{2, 3}, 2);
            final TileSetAnimation playerAnimation = new TileSetAnimation(playerTiles, new int[]{0}, 100_000);
            for (int i = 0; i &lt; enemies.length; i++) {
                int[] is = enemies[i];
                for (int j = 0; j &lt; is.length; j++) {
                    Points points = is[j] == 30 ? THIRTY : is[j] == 20 ? TWENTY : TEN;
                    Sprite sprite = new Sprite(canvas, &quot;&quot; + ((j * 11) + i), 50 + (40 * j), 140 + (40 * i), 30, 20, Lookups.fixed(points));
                    sprite.setAnimation(is[j] == 30 ? animation30 : is[j] == 20 ? animation20 : animation10);
                    sprite.setVelocityXProperty(invaderXVelocity);
                }
            }
            Sprite player = new Sprite(canvas, playerAnimation, &quot;Player&quot;, 350, 620, 40, 30, Lookup.EMPTY);
            player.setAnimation(playerAnimation);
            player.addAction(KeyCode.LEFT, ActionFactory.createMoveAction(playerAnimation, &quot;left&quot;, -4, 0, 0, 0));
            player.addAction(KeyCode.RIGHT, ActionFactory.createMoveAction(playerAnimation, &quot;right&quot;, 4, 0, 0, 0));
            player.addAction(KeyCode.UP, new ShootAction(playerAnimation, &quot;fire&quot;, new BulletProvider(), new HitHandler(), shootSound));
        } catch (JAXBException ex) {
            Logger.getLogger(SpaceInvaders.class.getName()).log(Level.SEVERE, null, ex);
        }
        canvas.addLayer(new Background());
        canvas.addBehaviour(new MoveInvadersBehavior());
        mediaPlayer.setCycleCount(MediaPlayer.INDEFINITE);
        mediaPlayer.play();
        canvas.addLayer(new SpriteLayer());
        canvas.start();
    }

    @Override
    protected double getViewPortWidth() {
        return 700;
    }

    @Override
    protected double getViewPortHeight() {
        return 700;
    }

    public static void main(String[] args) {
        launch(args);
    }

    private class Points {

        int points;

        public Points(int points) {
            this.points = points;
        }

        public int getPoints() {
            return points;
        }
    }

    static class BulletProvider implements SpriteProvider {

        @Override
        public Sprite getSprite(GameCanvas parent, double x, double y) {
            return new Sprite(parent, &quot;bullet&quot;, x, y + 10, 10, 20, Lookup.EMPTY);
        }
    }

    class HitHandler implements CollisionHandler {

        @Override
        public void handleCollision(Collision collision) {
            Points points = collision.getSpriteTwo().getLookup().lookup(Points.class);
            if (points != null) {
                score += points.getPoints();
                invaderKilledSound.play();
                collision.getSpriteOne().remove();
                collision.getSpriteTwo().remove();
            }
        }
    }

    class MoveInvadersBehavior extends Behavior {

        @Override
        public boolean perform(GameCanvas canvas, long nanos) {
            Collection&lt;Sprite&gt; sprites = canvas.getSprites();
            boolean stop = false;
            boolean win = true;
            for (Sprite sprite1 : sprites) {
                if (sprite1.getLookup().lookup(Points.class) != null) {
                    win = false;
                    if (sprite1.getX() &gt; 650 || sprite1.getX() &lt; 50) {
                        invaderXVelocity.set(-invaderXVelocity.doubleValue() * (stop ? 0 : 1.3));
                        if (sprite1.getY() &gt;= 600) {
                            message = &quot;Game Over!&quot;;
                            stop = true;
                            mediaPlayer.stop();
                        }
                        for (Sprite sprite2 : sprites) {
                            if (sprite2.getLookup().lookup(Points.class) != null) {
                                sprite2.setY(sprite2.getY() + (stop ? 0 : 20));
                            }
                        }
                        break;
                    }
                }
            }
            if (win) {
                message = &quot;You win!&quot;;
                canvas.stop();
                mediaPlayer.stop();
            }
            return true;
        }
    }

    class Background extends Layer {        

        @Override
        public void draw(GraphicsContext graphicsContext, double x, double y, double width, double height) {
            graphicsContext.setFill(Color.BLACK);
            graphicsContext.fillRect(0, 0, width, height);
            graphicsContext.setFill(Color.WHITE);
            graphicsContext.setFont(Font.font(&quot;OCR A Std&quot;, 20));
            graphicsContext.fillText(&quot;SCORE&lt;1&gt;    HI-SCORE    SCORE&lt;2&gt;&quot;, 30, 30);
            graphicsContext.fillText(&quot;&quot; + score + &quot;            9990   &quot;, 30, 60);
            graphicsContext.fillText(message, 300, 400);
            graphicsContext.fillText(&quot;&quot; + 3 + &quot;                   CREDIT &quot; + 1, 30, 680);
            graphicsContext.setFill(Color.GREEN);
            graphicsContext.fillRect(30, 650, 640, 4);
        }
    }
}
</pre>
<p>Here&#8217;s a video of the game:</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/xWDGum5nY64?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/13/space-invaders-in-less-than-175-loc/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JavaFX Kurs mit Toni Epple in München</title>
		<link>http://jayskills.com/blog/2013/02/12/javafx-2-kurs-mit-toni-epple-in-munchen-neuneuneu/</link>
		<comments>http://jayskills.com/blog/2013/02/12/javafx-2-kurs-mit-toni-epple-in-munchen-neuneuneu/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 16:47:27 +0000</pubDate>
		<dc:creator>barbarella</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1223</guid>
		<description><![CDATA[JavaFX 2 wird die neue Standard-Bibliothek für die Entwicklung von grafischen Benutzeroberflächen in Java. Seit Java SE 7 Update 6 wird JavaFX bereits zusammen mit Oracles Java Laufzeitumgebung ausgeliefert. In diesem Kurs lernen Sie, wie Sie mit JavaFX grafisch ansprechende Applikationen entwickeln können und welche Features und Tools Ihnen dazu zur Verfügung stehen. Dieser Kurs [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jayskills.com/wp-content/uploads/2013/02/FX1.jpg"><img class="wp-image-1227 alignleft" src="http://jayskills.com/wp-content/uploads/2013/02/FX1.jpg" alt="" width="168" height="111" /></a></p>
<p><strong>JavaFX 2</strong> wird die neue Standard-Bibliothek für die Entwicklung von grafischen Benutzeroberflächen in Java. Seit Java SE 7 Update 6 wird JavaFX bereits zusammen mit Oracles Java Laufzeitumgebung ausgeliefert. In diesem Kurs lernen Sie, wie Sie mit JavaFX grafisch ansprechende Applikationen entwickeln können und welche Features und Tools Ihnen dazu zur Verfügung stehen.</p>
<p>Dieser Kurs ist so konzipiert, dass Sie schnell einen Überblick über die gesamte JavaFX-API erhalten. Schritt für Schritt erfahren Sie, wie man eine erste Anwendung baut, wie man das eigene Datenmodell in der Oberfläche darstellt und editierbar macht und wie man die Anwendung mit Graphen, Animationen, Audio und Video anreichert, um ein modernes ansprechendes UI zu erhalten.  Ein besonderes Augenmerk gilt den vorhandenen Tools, die bei der Entwicklung und beim Debuggen unterstützen.</p>
<p>Der Kurs richtet sich gleichermaßen an Einsteiger und Umsteiger. Swing-Entwickler, die das neue Standard-UI erlernen möchten, erfahren, welche Änderungen das Arbeiten mit einem SceneGraph mit sich bringt, und wie sie Anwendungen schrittweise mit JavaFX anreichern und schließlich portieren können. Java-Entwickler, die erst in die GUI-Entwicklung einsteigen, lernen von Grund auf, wie man moderne Benutzerüberflächen  mithilfe von JavaFX entwickelt</p>
<p><strong>weitere Infos unter: <a href="http://eppleton.de/de//index.php?option=com_seminar&amp;task=3&amp;cid=40">eppleton.de</a><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/12/javafx-2-kurs-mit-toni-epple-in-munchen-neuneuneu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A minimal JavaFX Presentation (in JavaFX)</title>
		<link>http://jayskills.com/blog/2013/02/12/a-minimal-javafx-presentation-in-javafx/</link>
		<comments>http://jayskills.com/blog/2013/02/12/a-minimal-javafx-presentation-in-javafx/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 15:05:11 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1213</guid>
		<description><![CDATA[If you want to do a presentation about JavaFX, it&#8217;s very handy to do the presentation itself in JavaFX. This way you can easily show your examples without leaving the presentation. Here&#8217;s a very minimal example how to do that. In NetBeans set up a new JavaFX Project &#8220;New Project&#8221; -> &#8220;JavaFX&#8221; -> &#8220;JavaFX Application&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to do a presentation about JavaFX, it&#8217;s very handy to do the presentation itself in JavaFX. This way you can easily show your examples without leaving the presentation. Here&#8217;s a very minimal example how to do that.</p>
<p>In NetBeans set up a new JavaFX Project &#8220;New Project&#8221; -> &#8220;JavaFX&#8221; -> &#8220;JavaFX Application&#8221; and name it &#8220;FXPresenter&#8221;. Now create the Slide class. It&#8217;s used to load an FXML file:</p>
<pre class="brush: java; title: ; notranslate">package fxpresenter;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.layout.AnchorPane;

public class Slide extends AnchorPane implements Initializable {

    public Slide(String slide) {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(slide));
        fxmlLoader.setRoot(this);
        fxmlLoader.setController(this);
        try {
            fxmlLoader.load();
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        }
    }

    @Override
    public void initialize(URL url, ResourceBundle rb) {
    }
}</pre>
<p>Next we need a Presentation that contains the slides and switches between them:</p>
<pre class="brush: java; title: ; notranslate">package fxpresenter;

import java.util.ArrayList;
import java.util.List;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.stage.Screen;

public class Presentation extends Group {

    private List&lt;Slide&gt; slides;
    private int index;
    private Slide current;
    public EventHandler&lt;KeyEvent&gt; keyEventHandler;

    public Presentation() {
        this.slides = new ArrayList&lt;&gt;();
        keyEventHandler = new EventHandler&lt;KeyEvent&gt;() {
            public void handle(final KeyEvent keyEvent) {
                if (keyEvent.getCode() == KeyCode.LEFT) {
                    previousSlidePlease();
                } else if (keyEvent.getCode() == KeyCode.RIGHT) {
                    nextSlidePlease();
                }
            }
        };
    }

    public void addSlide(Slide slide) {
        addSlide(slides.size(), slide);
    }

    public void addSlide(int index, Slide slide) {
        slides.add(index, slide);
    }

    public void previousSlidePlease() {
        if (index &gt; 0) {
            index--;
        }
        setSlide(index);
    }

    public void nextSlidePlease() {
        if (index &lt; slides.size() - 1) {
            index++;
        }
        setSlide(index);
    }

    public void setSlide(int index) {
        if (current != null) {
            getChildren().remove(current);
            current.removeEventHandler(KeyEvent.KEY_PRESSED, keyEventHandler);
        }
        current = slides.get(index);
        current.addEventHandler(KeyEvent.KEY_PRESSED, keyEventHandler);

        scaleToFit();
        getChildren().add(slides.get(index));
        current.requestFocus();
    }

    void start() {
        index = -1;
        nextSlidePlease();
    }

    private void scaleToFit() {
        javafx.geometry.Rectangle2D screenBounds = Screen.getPrimary().getBounds();
        double prefWidth = current.getPrefWidth();
        double prefHeight = current.getPrefHeight();
        double scaleX = screenBounds.getWidth() / prefWidth;
        double scaleY = screenBounds.getHeight() / prefHeight;
        double centerX = (screenBounds.getWidth() / 2) - (prefWidth / 2);
        double centerY = (screenBounds.getHeight() / 2) - (prefHeight / 2);
        setTranslateX(centerX);
        setTranslateY(centerY);
        setScaleX(scaleX);
        setScaleY(scaleY);
    }
}
</pre>
<p>It should be pretty obvious what the code does: If you set a slide it will be scaled to fit the screen, and it will listen to key events. pressing the right arrow moves to the next slide, and the right arrow key set&#8217;s the previous slide.<br />
And finally we need an Application to display the whole stuff in full screen:</p>
<pre class="brush: java; title: ; notranslate">package fxpresenter;

import java.util.List;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class FXPresenter extends Application {

    @Override
    public void start(Stage stage) throws Exception {

        final Presentation presentation = new Presentation();
        presentation.addSlide(new Slide(&quot;Slide1.fxml&quot;));
        presentation.addSlide(new Slide(&quot;Slide2.fxml&quot;));

        final Scene scene = new Scene(presentation);
        stage.setScene(scene);
        stage.setFullScreen(true);
        presentation.start();
        List&lt;Screen&gt; screens = Screen.getScreens();

        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }

}
</pre>
<p>You&#8217;re done. Now you can go ahead and create your slides. For the sample create two new FXML files named &#8220;Slide1.fxml&#8221; and &#8220;Slide2.fxml&#8221;, and style them using the SceneBuilder, and your ready to go. Here&#8217;s a little video showing how you can use SceneBuilder to create the Slides:</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/j7YWKPT6NV4?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/12/a-minimal-javafx-presentation-in-javafx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pong! in less than 80 LOC</title>
		<link>http://jayskills.com/blog/2013/02/05/pong-in-less-than-100-loc/</link>
		<comments>http://jayskills.com/blog/2013/02/05/pong-in-less-than-100-loc/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 14:52:27 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[javafx]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1204</guid>
		<description><![CDATA[My idea for the JavaFX game engine is to create an API that makes coding games really easy. So my first goal was to be able to create a simple game like Pong! in less than 100 lines of code. So after creating the API I optimized it a bit and voilà this is Pong [...]]]></description>
			<content:encoded><![CDATA[<p>My idea for the JavaFX game engine is to create an API that makes coding games really easy. So my first goal was to be able to create a simple game like Pong! in less than 100 lines of code. So after creating the API I optimized it a bit and voilà this is Pong in less than 100 LOC (including imports and some empty lines):</p>
<pre class="brush: java; title: ; notranslate">
import de.eppleton.fx2d.*;
import de.eppleton.fx2d.action.*;
import de.eppleton.fx2d.physics.*;
import de.eppleton.fx2d.physics.action.PhysicsActionFactory;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.input.KeyCode;
import javafx.scene.text.Font;
import org.jbox2d.common.Vec2;
import org.jbox2d.dynamics.*;
import org.openide.util.Lookup;

public class Pong extends Game {

    int scorePlayer, scoreComputer = 0;

    @Override
    protected void initGame() {
        GameCanvas canvas = getCanvas();
        final PhysicsEngine physicsEngine = new PhysicsEngine(new Vec2(0, 0), new Vec2(0, 6), 100, canvas, true);
        canvas.addLayer(new Layer() {
            @Override
            public void draw(GraphicsContext graphicsContext, double x, double y, double width, double height) {
                graphicsContext.setFont(Font.font(&quot;Verdana&quot;, 36));
                graphicsContext.fillText(&quot;&quot; + scorePlayer + &quot;   &quot; + scoreComputer, 380, 60);
            }
        });
        physicsEngine.createWall(0, 580, 800, 10);
        physicsEngine.createWall(0, 10, 800, 10);
        addBall(canvas, physicsEngine, 400, 300);
        canvas.addBehaviour(new Action() {
            @Override
            public boolean perform(Sprite sprite, GameCanvas playingField) {
                Sprite sprite1 = playingField.getSprite(&quot;ball&quot;);
                if (sprite1 != null) {
                    Body ball = sprite1.getLookup().lookup(Body.class);
                    if (ball.getPosition().x &lt;= 0) {
                        scoreComputer++;
                        physicsEngine.remove(ball);
                        addBall(playingField, physicsEngine, 400, 300);
                    } else if (ball.getPosition().x &gt;= 8 ) {
                        scorePlayer++;
                        physicsEngine.remove(ball);
                        addBall(playingField, physicsEngine, 400, 300);
                    }
                }
                return true;
            }
        });
        Sprite bat = new Sprite(canvas, &quot;Player&quot;, 10, 262, 30, 75, Lookup.EMPTY);
        physicsEngine.createDefaultBody(bat, BodyType.KINEMATIC, 1, .4f, 0);
        bat.addAction(KeyCode.A, PhysicsActionFactory.createLinearMoveAction(null, &quot;up&quot;, new Vec2(0, 4), new Vec2(0, 0)));
        bat.addAction(KeyCode.Z, PhysicsActionFactory.createLinearMoveAction(null, &quot;down&quot;, new Vec2(0, -4), new Vec2(0, 0)));
        Sprite computer = new Sprite(canvas, &quot;Computer&quot;, 750, 262, 30, 75, Lookup.EMPTY);
        physicsEngine.createDefaultBody(computer, BodyType.KINEMATIC, 1, .3f, 0);
        computer.addBehaviour(new Action() {
            @Override
            public boolean perform(Sprite sprite, GameCanvas playingField) {
                Body me = sprite.getLookup().lookup(Body.class);
                Sprite ball = playingField.getSprite(&quot;ball&quot;);
                if (ball != null) {
                    Body lookup = ball.getLookup().lookup(Body.class);
                    me.setLinearVelocity(lookup.getPosition().y &gt; me.getPosition().y
                            ? new Vec2(0, -1.5f) : new Vec2(0, 1.5f));
                }
                return true;
            }
        });
    }

    private void addBall(GameCanvas canvas, PhysicsEngine physicsEngine, int x, int y) {
        Sprite ball = new Sprite(canvas, &quot;ball&quot;, x, y, 20, 20, Lookup.EMPTY);
        Body ballBody = physicsEngine.createDefaultBody(ball, BodyType.DYNAMIC, 1, .4f, .2f, true);
        ballBody.setLinearVelocity(new Vec2(4, 1));
    }

    public static void main(String[] args) {
        launch(args);
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/05/pong-in-less-than-100-loc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaFX Game Engine now with Physics</title>
		<link>http://jayskills.com/blog/2013/02/04/javafx-game-engine-now-with-physics/</link>
		<comments>http://jayskills.com/blog/2013/02/04/javafx-game-engine-now-with-physics/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 17:13:12 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[javafx]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1197</guid>
		<description><![CDATA[I&#8217;ve just added a pluggable physics engine to my game engine. So now there are three modules: the core game engine that allows for the creation of simple canvas based games, and an optional tile engine that can read TMX files and render TileBased Worlds and Sprite animations, as well as a pluggable physics Engine [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just added a pluggable physics engine to my game engine. So now there are three modules: the core game engine that allows for the creation of simple canvas based games, and an optional tile engine that can read TMX files and render TileBased Worlds and Sprite animations, as well as a pluggable physics Engine that you can use to add realistic physics. Using the NetBeans Lookups API it&#8217;s really simple to make it pluggable. Ah, and there&#8217;s a fourth module with demos.</p>
<p>The Physics API is still very simple, but you can already do some nice stuff. A nice goodie is the DebugLayer that you can add to the GameCanvas to render the JBox2D bodies. This way you can easily test and debug a game and find bugs with custom Sprite rendering. I&#8217;m also trying to provide some helper methods for mapping the Bodies and Shapes to the Sprites, since that&#8217;s sometimes confusing&#8230;</p>
<p>The first game I created is the &#8220;Hello World!&#8221; of Games, Pong! Here you can get an impression of the current API:</p>
<p><iframe width="640" height="480" src="http://www.youtube.com/embed/gY78eS9QZU8?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/04/javafx-game-engine-now-with-physics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Code Templates with NetBeans</title>
		<link>http://jayskills.com/blog/2013/02/03/custom-code-templates-with-netbeans/</link>
		<comments>http://jayskills.com/blog/2013/02/03/custom-code-templates-with-netbeans/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 13:29:59 +0000</pubDate>
		<dc:creator>tuenn</dc:creator>
				<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://jayskills.com/?p=1189</guid>
		<description><![CDATA[In the last weeks I&#8217;ve shown you some of the NetBeans Code Templates. The existing ones are nice, but what is even nicer is, that you can easily create your own Java templates. We can for example create the &#8220;2no&#8221; template I used to get the Node delegate from a DataObject as shown here: Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>In the last weeks I&#8217;ve shown you some of the NetBeans Code Templates. The existing ones are nice, but what is even nicer is, that you can easily create your own Java templates. We can for example create the &#8220;<strong>2no</strong>&#8221; template I used to get the Node delegate from a DataObject as shown here:</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/dRAzAk8Ixvg?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>Here&#8217;s how:</p>
<p>Go to &#8220;<strong>Settings</strong>&#8220;-&gt; &#8220;<strong>Editor</strong>&#8221; -&gt; &#8220;<strong>Code</strong> <strong>Templates</strong>&#8221; and select &#8220;<strong>Java</strong>&#8221; as the Language:</p>
<p><a href="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-02-um-14.08.19.png"><img class="size-large wp-image-1190 alignnone" title="Bildschirmfoto 2013-02-02 um 14.08.19" src="http://jayskills.com/wp-content/uploads/2013/02/Bildschirmfoto-2013-02-02-um-14.08.19-1024x736.png" alt="" width="640" height="460" /></a></p>
<p>Now click the &#8220;<strong>New</strong>&#8221; Button, a dialog will ask for an abbreviation, enter &#8220;<strong>2no</strong>&#8220;. The abbreviation will be added to the table, and you can edit the &#8220;<strong>Expanded Text</strong>&#8220;. Add this:</p>
<pre class="brush: plain; title: ; notranslate">

${nodeType type=&quot;org.openide.nodes.Node&quot; default=&quot;Node&quot; editable=&quot;false&quot;} ${node newVarName default=&quot;n&quot;} = ${dob instanceof=&quot;org.openide.loaders.DataObject&quot; default=&quot;dob&quot;}.getNodeDelegate();
${cursor}
</pre>
<p>The <strong>type</strong> definition in the beginning will automatically add the import for <strong>org.openide.nodes.Node. </strong>The default defines, that we will get &#8220;<strong>Node</strong>&#8221; as the first String, and it&#8217;s not editable by the user. Then we define a new variable with a default name of  &#8221;<strong>n</strong>&#8220;. If that name isn&#8217;t available in our scope NetBeans will check for the next free name by adding an int to the String (e.g. &#8220;<strong>n1</strong>&#8220;).  Next we declare, that we want to call a method called &#8220;<strong>getNodeDelegate()</strong>&#8221; on a &#8220;<strong>org.openide.datasystems.DataObject</strong>&#8220;, and if there is none in the scope use &#8220;<strong>dob</strong>&#8221; instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayskills.com/blog/2013/02/03/custom-code-templates-with-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
