<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3655588967811866161</id><updated>2011-09-10T03:50:56.765-07:00</updated><title type='text'>JavaFX Exploration</title><subtitle type='html'>A journey discovering the world of JavaFX</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-1560509751289644309</id><published>2010-09-24T14:45:00.000-07:00</published><updated>2010-09-24T14:45:56.623-07:00</updated><title type='text'>The JavaFX 2.0 Roadmap</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Apparently some major changes are waiting around the corner regarding JavaFX with the up and coming version 2.0. Had a look at the &lt;a href="http://javafx.com/roadmap/"&gt;roadmap&lt;/a&gt;&amp;nbsp;today and have been checking out various blogs about the topic.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;My (noobish but still) impression is that things&amp;nbsp;definitely&amp;nbsp;are going in the right direction. One problem though with the road map is that it promises loads of exciting things but not so much in there about how all these goals are going to be accomplished. It is kind of like my wishlist for&amp;nbsp;Christmas when I was smaller, loads of great stuff on it and marvelous plans in my head about what I would do with all my presents. But then much to often I ended up sitting there with a new pair of socks, another silver spoon for the collection and&amp;nbsp;finally&amp;nbsp;some crayons with&amp;nbsp;accompanied&amp;nbsp;drawing-papers. The paper was always the gray cheap one made from recycled newspapers or something.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Guess my personal roadmap must be revised a little now. Probably going to focus more now on filling up some of the many gaps in my Java-knowledge while waiting for Oracle to deliver that remote controlled super fast airplane that will change my world to a much better place.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-1560509751289644309?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/1560509751289644309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/09/javafx-20-roadmap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1560509751289644309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1560509751289644309'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/09/javafx-20-roadmap.html' title='The JavaFX 2.0 Roadmap'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-4764856979165861649</id><published>2010-08-18T17:01:00.000-07:00</published><updated>2010-08-18T17:01:50.755-07:00</updated><title type='text'>First real application</title><content type='html'>Have finished and published my first real JavaFX program. My previous work have only been small projects to test things in JavaFX. But now I also have produced a small&amp;nbsp;application&amp;nbsp;that&amp;nbsp;actually serves a purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;The application can be tested &lt;/b&gt;&lt;a href="http://www.pokerbiblioteket.se/?q=node/116"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;&lt;b&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
The application is a tool used for improving your poker playing skills. Lets start out with a picture of the&amp;nbsp;application.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TGxsgDOLrII/AAAAAAAAAJI/r045bf0WFqU/s1600/StartHandTool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TGxsgDOLrII/AAAAAAAAAJI/r045bf0WFqU/s400/StartHandTool.png" width="342" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The type of poker game is Texas Hold'em. In this game every player gets two starting cards. These two cards can form 169 different starting hands that all are represented in the grid in the picture. A3s for example means an ace and a&amp;nbsp;three&amp;nbsp;in the same suite (both being hearts or spades for example). A3&amp;nbsp;with&amp;nbsp;out a&amp;nbsp;trailing&amp;nbsp;s means ace and three of&amp;nbsp;different&amp;nbsp;suites.&lt;br /&gt;
&lt;br /&gt;
Below the grid of hands we have a slider. The slider controls the number of hands selected going from 0 to 100% of the hands. Starting out by choosing top hands (according to another software called Poker Stove) and then including worse and worse hands.&lt;br /&gt;
&lt;br /&gt;
In the example above the top 17.9 percent of the starting hands are selected and hence displayed in black.&lt;br /&gt;
&lt;br /&gt;
It is common to use special poker trackers that store information&amp;nbsp;about&amp;nbsp;opponents playing style when playing poker on line. These trackers for example present information of which percentage a player opens with a bet in&amp;nbsp;certain&amp;nbsp;situations. This percentage of hands can be chosen with the slider in application. And the range of hands that equals this&amp;nbsp;percentage&amp;nbsp;is then&amp;nbsp;visualized.&lt;br /&gt;
&lt;br /&gt;
Have tested to&amp;nbsp;access the application on the web site from a couple of different computers and it seems to take about ten seconds or so to load which I find&amp;nbsp;acceptable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-4764856979165861649?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/4764856979165861649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/08/first-real-application.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/4764856979165861649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/4764856979165861649'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/08/first-real-application.html' title='First real application'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WLVXGpYWS-4/TGxsgDOLrII/AAAAAAAAAJI/r045bf0WFqU/s72-c/StartHandTool.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-1555246794178333686</id><published>2010-07-26T11:56:00.000-07:00</published><updated>2010-07-26T12:48:52.378-07:00</updated><title type='text'>Animations test</title><content type='html'>Tried out some animation concepts. Nothing fancy but hey must start somewhere.&lt;br/&gt;
&lt;br/&gt;
Used the JavaFX Composer in NetBeans. Have a text that says Berra (my nick name) and a button. There are then two states. In the start state things look like this.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TE3cW6jaBFI/AAAAAAAAAI4/xRQl0jpE1Qw/s1600/startState.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 284px;" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TE3cW6jaBFI/AAAAAAAAAI4/xRQl0jpE1Qw/s400/startState.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5498293006322238546" /&gt;&lt;/a&gt;
&lt;br/&gt;
Pressing the button causes the text to fall down rapidly. The fall stops when the bottom is almost reached.&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TE3cXoabK8I/AAAAAAAAAJA/Fez9S1WWj6Y/s1600/endState.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 284px;" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TE3cXoabK8I/AAAAAAAAAJA/Fez9S1WWj6Y/s400/endState.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5498293018632596418" /&gt;&lt;/a&gt;
&lt;br/&gt;
The first button is replaced with another button that makes the text go up but with less speed than it went down. Once the text is up again the original button comes back and things start over.&lt;br/&gt;
&lt;br/&gt;
Complete source code &lt;a href="http://sites.google.com/site/henriksamuelsson/code-examples"&gt;here&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-1555246794178333686?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/1555246794178333686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/07/animations-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1555246794178333686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1555246794178333686'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/07/animations-test.html' title='Animations test'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WLVXGpYWS-4/TE3cW6jaBFI/AAAAAAAAAI4/xRQl0jpE1Qw/s72-c/startState.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-21362362034257823</id><published>2010-07-01T16:01:00.000-07:00</published><updated>2010-07-05T16:48:55.105-07:00</updated><title type='text'>Project Poker Part 6</title><content type='html'>Moving on a little with my poker application.&lt;br/&gt;
&lt;br/&gt;
One thing missing is a panel used to display information about a player. The minimal compulsory set of player data is made up of the name which identifies a player and the number of chips the player has. Have now designed a panel that can be used to display this set of data.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WLVXGpYWS-4/TDJn3_bsyHI/AAAAAAAAAIo/a7HA5D6GwpI/s1600/Player+Panel.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 184px; height: 96px;" src="http://4.bp.blogspot.com/_WLVXGpYWS-4/TDJn3_bsyHI/AAAAAAAAAIo/a7HA5D6GwpI/s400/Player+Panel.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5490565107336136818" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
The name of the player is displayed with the use of a Label, that is centered by the use of a Stack layout. Should a player have a too long name so will it be cut and ended off with a ellipsis.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WLVXGpYWS-4/TDJq092E-2I/AAAAAAAAAIw/LQkyZ9Lorrk/s1600/Player+Panel+with+long+name.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 184px; height: 96px;" src="http://4.bp.blogspot.com/_WLVXGpYWS-4/TDJq092E-2I/AAAAAAAAAIw/LQkyZ9Lorrk/s400/Player+Panel+with+long+name.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5490568353905179490" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
The chip count is also represented with the us of a Label. This means that if a player should have a really large amount of chips so will the number of chips be cut off like for the name of the player. This is not the desired behavior. Will have to fix this later, but not really a prioritized thing right now since there are loads of other things to do.&lt;br/&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-21362362034257823?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/21362362034257823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/07/project-poker-part-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/21362362034257823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/21362362034257823'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/07/project-poker-part-6.html' title='Project Poker Part 6'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WLVXGpYWS-4/TDJn3_bsyHI/AAAAAAAAAIo/a7HA5D6GwpI/s72-c/Player+Panel.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-9152236184368716439</id><published>2010-06-26T10:39:00.001-07:00</published><updated>2010-06-26T11:12:25.896-07:00</updated><title type='text'>Slider</title><content type='html'>Have been playing around a bit with the JavaFX slider control. Used two sliders in the following example. There is a text that is lighted by a red light source. The azimuth and elevation of the light is controlled by the two sliders.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WLVXGpYWS-4/TCY7dYZ4-iI/AAAAAAAAAIQ/fjegwGkU_28/s1600/sliders.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 167px;" src="http://2.bp.blogspot.com/_WLVXGpYWS-4/TCY7dYZ4-iI/AAAAAAAAAIQ/fjegwGkU_28/s400/sliders.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5487138571950815778" /&gt;&lt;/a&gt;
&lt;br/&gt;
The source code for the example can be found &lt;a href="http://docs.google.com/Doc?docid=0AZMh6YZMF3udZGdzajRneGhfMTAyZ2Z4OWp4Y2M&amp;hl=sv&amp;authkey=COXkgI0B"&gt;here&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
Noted that the right pointing arrow key on the keyboard will change the focus form the vertical slider to the horizontal slider. The arrow key that points upward will set focus on the vertical slider. The left and down arrows will however strangely enough not have this effect.&lt;br/&gt;
&lt;br/&gt;
Another strange thing is that markings on the vertical slider seems to be reversed. The starting position of the vertical slider is set to 135 in the code, but the markers indicates that it is set to 45 when running the code. I do not think that the bug is in my code. It is probably instead a resident somewhere in javafx.scene.control.Slider package.&lt;br/&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-9152236184368716439?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/9152236184368716439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/slider.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/9152236184368716439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/9152236184368716439'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/slider.html' title='Slider'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_WLVXGpYWS-4/TCY7dYZ4-iI/AAAAAAAAAIQ/fjegwGkU_28/s72-c/sliders.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-3519679430521643495</id><published>2010-06-19T11:21:00.001-07:00</published><updated>2010-06-19T11:35:00.765-07:00</updated><title type='text'>Project Poker Part 5</title><content type='html'>Moving on today working a little bit on my poker table. Had already done a frame for the table. Added a background filled with a bluish gradient, trying to match the color of the frame. Finally placed five cards on the table, like there will be when playing Omaha for example.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TB0K3cj0ivI/AAAAAAAAAHw/KoMdz6hfbbM/s1600/Table+with+cards.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 166px;" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TB0K3cj0ivI/AAAAAAAAAHw/KoMdz6hfbbM/s320/Table+with+cards.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484551868882651890" /&gt;&lt;/a&gt;
&lt;br/&gt;
Starting to get a little collections of parts that can be combined in different ways now. Must start documenting and place my code in a library, not as fun as developing new things but must be done - sigh.&lt;br/&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-3519679430521643495?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/3519679430521643495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/3519679430521643495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/3519679430521643495'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-5.html' title='Project Poker Part 5'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WLVXGpYWS-4/TB0K3cj0ivI/AAAAAAAAAHw/KoMdz6hfbbM/s72-c/Table+with+cards.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-1515567242145721334</id><published>2010-06-18T03:36:00.000-07:00</published><updated>2010-06-18T06:07:38.185-07:00</updated><title type='text'>Project Poker Part 4</title><content type='html'>The progress do fare with my poker software is that it now exists a set of cards. Time to make a table to have somewhere to place the cards.&lt;br/&gt;
&lt;br/&gt;
Lets seek some inspiration from the giant of on line poker - PokerStars. One of the layouts available on PokerStars looks like this.&lt;br/&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBtOgHZiAOI/AAAAAAAAAHI/91kqGP52kvE/s1600/PokerStarsTable.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 289px;" src="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBtOgHZiAOI/AAAAAAAAAHI/91kqGP52kvE/s400/PokerStarsTable.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484063284902625506" /&gt;&lt;/a&gt;
&lt;br/&gt;
Now knowing kind of what I want its time to go to work. Lets start by coding the frame around the table. This would on a real poker table consist of padded oval where the players can rest their arms. So what is needed is some kind of an ellipse. It should also have some effect applied to it to make it look cuddly and filled with padding.&lt;br/&gt;
&lt;br/&gt;
Probably many ways to code the frame but one solution is to do it in four steps like this:&lt;br/&gt;
&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;1. &lt;/span&gt;Start out with a rectangle with very rounded corners.&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
def outerTableFrame = Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 10, y: 10&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 500, height: 250&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;arcWidth: 250, arcHeight: 250&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.GREEN&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;};
&lt;/code&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBtfZ2lrSoI/AAAAAAAAAHQ/xzgP0L4b27E/s1600/outerTableFrame.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 208px;" src="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBtfZ2lrSoI/AAAAAAAAAHQ/xzgP0L4b27E/s400/outerTableFrame.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484081869008620162" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;2. &lt;/span&gt;Then take another smaller rectangle and place it on the first rectangle&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
def innerTableFrame = Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 25, y: 25&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 470, height: 220&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;arcWidth: 220, arcHeight: 220&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.PINK&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;};
&lt;/code&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBthw5K_O_I/AAAAAAAAAHY/SHE4NP37kFo/s1600/innerTableFrame.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 208px;" src="http://4.bp.blogspot.com/_WLVXGpYWS-4/TBthw5K_O_I/AAAAAAAAAHY/SHE4NP37kFo/s400/innerTableFrame.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484084463862234098" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;3. &lt;/span&gt;Make a new shape by using ShapeSubtract. The pink parts will be "subtracted" from the green parts which will result in a new shape consisting of the green rectangle not covered by the pink rectangle. (Note that the color also changes, probably because black i set to default color in the ShapeSubtract class)&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
var tableFrame: Shape = ShapeSubtract {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;a: outerTableFrame&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;b: innerTableFrame&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;};
&lt;/code&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TBtkJTva2gI/AAAAAAAAAHg/VM_fWPuy12g/s1600/tableFrame.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 208px;" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TBtkJTva2gI/AAAAAAAAAHg/VM_fWPuy12g/s400/tableFrame.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484087082334476802" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;span style="font-weight:bold;"&gt;4. &lt;/span&gt;Make the frame look padded by applying a Ligthning effect. Finally choose a color, in this case blue since it seems to be the color of JavaFX&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
var tableFrame: Shape = ShapeSubtract {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;a: outerTableFrame&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;b: innerTableFrame&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;effect: Lighting {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;diffuseConstant: 1.0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;specularConstant: 1.0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;specularExponent: 20&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;surfaceScale: 1.5&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.DARKBLUE&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;};
&lt;/code&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WLVXGpYWS-4/TBtnaGx0guI/AAAAAAAAAHo/ciiQY1ijZxg/s1600/decoratedTableFrame.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 208px;" src="http://2.bp.blogspot.com/_WLVXGpYWS-4/TBtnaGx0guI/AAAAAAAAAHo/ciiQY1ijZxg/s400/decoratedTableFrame.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5484090669447545570" /&gt;&lt;/a&gt;
&lt;br/&gt;
See the complete source code &lt;a href="http://docs.google.com/View?id=dgsj4gxh_101hgkfq9gj"&gt;here&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-1515567242145721334?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/1515567242145721334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1515567242145721334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/1515567242145721334'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-4.html' title='Project Poker Part 4'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WLVXGpYWS-4/TBtOgHZiAOI/AAAAAAAAAHI/91kqGP52kvE/s72-c/PokerStarsTable.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-8453746395622739819</id><published>2010-06-16T06:57:00.000-07:00</published><updated>2010-06-16T14:51:26.571-07:00</updated><title type='text'>Project Poker Part 3</title><content type='html'>Have tuned my poker cards during the day. The previous version of the cards had some flaws regarding misaligned symbols. &lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WLVXGpYWS-4/TBk7FnIJKxI/AAAAAAAAAG4/VgEFxBxHpZ8/s1600/unaligned+cards.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 220px; height: 120px;" src="http://3.bp.blogspot.com/_WLVXGpYWS-4/TBk7FnIJKxI/AAAAAAAAAG4/VgEFxBxHpZ8/s320/unaligned+cards.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5483478988888812306" /&gt;&lt;/a&gt;&lt;br/&gt;
Note how the smaller symbols do not line up vertically. The larger (simple) decoration of the cards is also misplaced depending on the width of the symbol.&lt;br/&gt;
&lt;br/&gt;
Solved the problem with the smaller symbols by placing them in a wrapper made up of a VBox layout. This made it possible to have the symbols vertically aligned by centering them.&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
public-read def vbox: javafx.scene.layout.VBox = javafx.scene.layout.VBox {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;layoutX: 3&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;layoutY: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;content: [rank, suite,]&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;spacing: -10&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;nodeVPos: javafx.geometry.VPos.TOP&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;nodeHPos: javafx.geometry.HPos.CENTER&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}
&lt;/code&gt;&lt;br/&gt;
&lt;br/&gt;
Used a Tile layout as a wrapper for the larger decoration. By making the tile a bit wider than the width of the largest character we get a parent that can be used to center the decoration in the right place.&lt;br/&gt;
&lt;br/&gt;
&lt;code&gt;
def __layoutInfo_tile: javafx.scene.layout.LayoutInfo = javafx.scene.layout.LayoutInfo {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 32.0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
public-read def decorationTile: javafx.scene.layout.Tile = javafx.scene.layout.Tile {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;layoutX: 24&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;layoutY: 26&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;layoutInfo: __layoutInfo_tile&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;content: [decoration]&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;columns: 1&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;rows: 1&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hgap: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;vgap: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;hpos: javafx.geometry.HPos.CENTER&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}
&lt;/code&gt;&lt;br /&gt;
&lt;br/&gt;
There are probably more refined ways to solve the alignment problems but this seems to work and I well settle with the current solution for now.&lt;br /&gt;
&lt;br /&gt;
The complete set of cards looks like this now (click for full size version).&lt;br /&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WLVXGpYWS-4/TBlFXh1kkNI/AAAAAAAAAHA/MfZxWJHuIAo/s1600/deck+of+cards.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 131px;" src="http://2.bp.blogspot.com/_WLVXGpYWS-4/TBlFXh1kkNI/AAAAAAAAAHA/MfZxWJHuIAo/s320/deck+of+cards.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5483490291822661842" /&gt;&lt;/a&gt;
&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-8453746395622739819?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/8453746395622739819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/8453746395622739819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/8453746395622739819'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-3.html' title='Project Poker Part 3'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WLVXGpYWS-4/TBk7FnIJKxI/AAAAAAAAAG4/VgEFxBxHpZ8/s72-c/unaligned+cards.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-2342551773726873393</id><published>2010-06-14T14:42:00.000-07:00</published><updated>2010-06-15T04:00:13.787-07:00</updated><title type='text'>Project Poker Part 2</title><content type='html'>The plan for the day was to draw a complete deck of cards using JavaFX. The cards shall later be used in my poker application.&lt;br /&gt;
&lt;br /&gt;
Had already done one card the other day. The idea was to just run some nested for loops to spit out the other cards. Should have been  quick and easy to accomplish. But I encountered various problems and it took me quite a few hours to get somewhere. Here is a picture showing how fare I got today.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WLVXGpYWS-4/TBakE5gRTAI/AAAAAAAAAGw/4G0K4pexhW8/s1600/DeckOfCards.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 166px;" src="http://1.bp.blogspot.com/_WLVXGpYWS-4/TBakE5gRTAI/AAAAAAAAAGw/4G0K4pexhW8/s320/DeckOfCards.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5482750000432761858" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The cards are scaled down to fit in the blog. They will be a bit bigger in the actual application. Things that remains to be done is changing the color and some adjustments to the design, like better lining up the symbols.

No source code today because it is a bit of a mess at the moment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-2342551773726873393?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/2342551773726873393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/2342551773726873393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/2342551773726873393'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-2.html' title='Project Poker Part 2'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WLVXGpYWS-4/TBakE5gRTAI/AAAAAAAAAGw/4G0K4pexhW8/s72-c/DeckOfCards.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-6124717059329687991</id><published>2010-06-13T08:30:00.000-07:00</published><updated>2010-06-14T15:04:15.206-07:00</updated><title type='text'>Project Poker Part 1</title><content type='html'>I have a background in the world of on-line poker. Thought it would be good little exercise to build my own complete poker client/server software combo in Java/JavaFX.&lt;br /&gt;
&lt;br /&gt;
Many of my posts in this blog will deal with this work that will be named Project Poker.&lt;br /&gt;
&lt;br /&gt;
Have designed one card from the deck today. The cards could of course be drawn in some drawing software like Inkscape for example. But I feel that doing the complete design of the cards and so on directly in JavaFx will be more versatile. Will be simple to transform the design later on if needed. Should also hopefully give better performance.&lt;br /&gt;
&lt;br /&gt;
Anyway here is my card, an ace of spades.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WLVXGpYWS-4/TBT79So32qI/AAAAAAAAAGo/V1A5Bkn7xug/s1600/A+Card.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 128px; height: 147px;" src="http://3.bp.blogspot.com/_WLVXGpYWS-4/TBT79So32qI/AAAAAAAAAGo/V1A5Bkn7xug/s320/A+Card.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5482283676810599074" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
See the source code &lt;a href="http://docs.google.com/View?id=dgsj4gxh_100t9fz96dh"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-6124717059329687991?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/6124717059329687991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/6124717059329687991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/6124717059329687991'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/project-poker-part-1.html' title='Project Poker Part 1'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WLVXGpYWS-4/TBT79So32qI/AAAAAAAAAGo/V1A5Bkn7xug/s72-c/A+Card.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-6691935837739991613</id><published>2010-06-08T01:25:00.001-07:00</published><updated>2010-06-08T08:55:50.644-07:00</updated><title type='text'>Drop Shadows</title><content type='html'>Tested the concept of drop shadows today. The idea is to have a shadow under an graphical object to make it look like it hovers.&lt;br /&gt;
&lt;br /&gt;
Applied a drop shadow to the Swedish Flag from my previous blog entry. The entire flag should have a shadow. The blue bottom rectangle in the flag has the same size as the entire flag so the desired effect can be achieved by adding a drop shadow to this rectangle.&lt;br /&gt;
&lt;br /&gt;
The code that give the drop shadow can be seen in the following snippet:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
effect: DropShadow {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;color: Color.rgb(32, 32, 32),&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;offsetY: 5,&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;offsetX: 5,&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;radius: 15&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
The default color of the drop shadow is black but in this example a gray tone is used instead which is defined by the color argument above.&lt;br /&gt;
&lt;br /&gt;
The final result can be seen in the picture below.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WLVXGpYWS-4/TA5nmiIcrNI/AAAAAAAAAGg/W14-5rAqD8Y/s1600/Drop+Shadow+Flag.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 208px; height: 167px;" src="http://3.bp.blogspot.com/_WLVXGpYWS-4/TA5nmiIcrNI/AAAAAAAAAGg/W14-5rAqD8Y/s320/Drop+Shadow+Flag.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5480431708251401426" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Complete source code can be found &lt;a href="http://docs.google.com/View?id=dgsj4gxh_99qzx9z3fj"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-6691935837739991613?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/6691935837739991613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/drop-shadows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/6691935837739991613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/6691935837739991613'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/drop-shadows.html' title='Drop Shadows'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WLVXGpYWS-4/TA5nmiIcrNI/AAAAAAAAAGg/W14-5rAqD8Y/s72-c/Drop+Shadow+Flag.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3655588967811866161.post-4745967100086197083</id><published>2010-06-05T06:02:00.000-07:00</published><updated>2010-06-06T21:54:43.257-07:00</updated><title type='text'>A flag for the national day</title><content type='html'>Swedish national day tomorrow. Lets celebrate it by making a Swedish flag in JavaFX.&lt;br /&gt; 
&lt;br /&gt;
What we want is yellow cross on a blue background. In more detail according to the  law about Swedish flags so  shall the proportions of the flag be 10 to 16 (height to length). The blue fields closest to the flag pole shall have the proportions 4 to 5 and the outer blue fields 4 to 9. The thickness of the arms making up yellow cross should be half as thick as the height of the blue fields. The RGB values of the colors should be &lt;span class="bgeee"&gt;#005B99 (blue) and &lt;/span&gt;&lt;span class="bgeee"&gt;#FCD116 (yellow).&lt;br /&gt;
&lt;br /&gt;
We now at least have some kind of specification of what we want so lets get going.&lt;br /&gt;
&lt;br /&gt;
We need a title, a stage and a scene and finally a place to put our content that is the actual flag. Lets make the scene of our projects 100 times 160 pixels because this is the proportions of the flag. Some thinking and typing produces the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
import javafx.stage.Stage;&lt;br /&gt;
import javafx.scene.Scene;&lt;br /&gt;
&lt;br /&gt;
Stage {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;title: "Swedish Flag"&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;scene: Scene {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 160&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;height: 100&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;content: [&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;// TODO Add code for flag here&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;]&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
}
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Start out the making of the actual flag by constructing a blue rectangle. This is done by the following code.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 0, y: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 160, height: 100&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.rgb(0, 91, 153)&lt;br /&gt;
}
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Adding two yellow rectangles in a similar fashion and then putting it all together gives the final code:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
import javafx.stage.Stage;&lt;br /&gt;
import javafx.scene.Scene;&lt;br /&gt;
import javafx.scene.shape.Rectangle;&lt;br /&gt;
import javafx.scene.paint.Color;&lt;br /&gt;
&lt;br /&gt;
Stage {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;title: "Swedish Flag"&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;scene: Scene {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 160&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;height: 100&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;content: [&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 0, y: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 160, height: 100&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.rgb(0, 91, 153)&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 50, y: 0&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 20, height: 100&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.rgb(252, 209, 22)&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Rectangle {&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;x: 0, y: 40&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;width: 160, height: 20&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;fill: Color.rgb(252, 209, 22)&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;]&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;
}
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The result when running the script is the following flag picture&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WLVXGpYWS-4/TAppUPF2iQI/AAAAAAAAAGE/GkqsYVPsmO4/s1600/Swedish+Flag.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 168px; height: 127px;" src="http://3.bp.blogspot.com/_WLVXGpYWS-4/TAppUPF2iQI/AAAAAAAAAGE/GkqsYVPsmO4/s320/Swedish+Flag.png" alt="" id="BLOGGER_PHOTO_ID_5479307693019007234" border="0" /&gt;&lt;/a&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3655588967811866161-4745967100086197083?l=javafxexploration.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javafxexploration.blogspot.com/feeds/4745967100086197083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/flag-for-national-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/4745967100086197083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3655588967811866161/posts/default/4745967100086197083'/><link rel='alternate' type='text/html' href='http://javafxexploration.blogspot.com/2010/06/flag-for-national-day.html' title='A flag for the national day'/><author><name>Henrik "Berra" Samuelsson</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WLVXGpYWS-4/TAppUPF2iQI/AAAAAAAAAGE/GkqsYVPsmO4/s72-c/Swedish+Flag.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
