<?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>JavaFX News, Demos and Insight // FX Experience &#187; UI Design</title>
	<atom:link href="http://fxexperience.com/category/ui-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://fxexperience.com</link>
	<description>Sharing the Experience of JavaFX</description>
	<lastBuildDate>Mon, 21 May 2012 03:34:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Introducing Scenic View</title>
		<link>http://fxexperience.com/2012/05/introducing-scenic-view/</link>
		<comments>http://fxexperience.com/2012/05/introducing-scenic-view/#comments</comments>
		<pubDate>Mon, 07 May 2012 00:11:50 +0000</pubDate>
		<dc:creator>Jonathan Giles</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1956</guid>
		<description><![CDATA[Developing user interfaces is tricky, regardless of whether you&#8217;re just trying to understand the high level scenegraph layout, or whether you&#8217;re pushing pixels for a finely tuned user interface. I understand and feel for people in this situation. UI developers come up with all kinds of tricks, for example, temporarily introducing a bold one pixel [...]]]></description>
			<content:encoded><![CDATA[<p>Developing user interfaces is tricky, regardless of whether you&#8217;re just trying to understand the high level scenegraph layout, or whether you&#8217;re pushing pixels for a finely tuned user interface. I understand and feel for people in this situation. UI developers come up with all kinds of tricks, for example, temporarily introducing a bold one pixel border of varying colours around components to better understand the user interface. I certainly know I have done that countless times in the past when building user interfaces, and frankly, it is painful and massively time consuming.</p>
<p>Inside the JavaFX team, since times of yore (that is, since at least JavaFX 1.3, but perhaps earlier &#8211; my memory fails me here), we&#8217;ve had this remarkable little tool that was called Scenic View. It somehow just burst into existence, through the brilliance of <a href="http://amyfowlersblog.wordpress.com/">Amy Fowler</a>, whom many should know as the layout guru for both Swing and JavaFX. Scenic View is a tool that can be called to browse a live view of the application scenegraph. Here&#8217;s a screenshot:</p>
<p><img class="aligncenter size-full wp-image-1958" title="sv1" src="http://fxexperience.com/wp-content/uploads/2012/05/sv11.png" alt="" width="668" height="593" /><span id="more-1956"></span></p>
<p>The nice thing about Scenic View is that it can also display overlays in your user interface to indicate three things: the baselineOffset, the boundsInParent, and the layoutBounds. These let you very easily see why your user interface is the way it is. I&#8217;ve attached another screenshot below, which shows this. The third rectangle in has been selected in ScenicView, and as such has a yellow filled rectangle to indicate its boundsInParent, and a green dashed (and unfilled) rectangle to indicate the layoutBounds. The interesting thing to note is that despite the rectangle having been rotated, the layoutBounds still reflect the unrotated rectangle, and that this is what the layout containers use to lay out nodes. In other words, the rectangles on either side of the rotated rectangle make no allowance for the rotation (although there are ways to force this to happen if that is what you want &#8211; listen to Amy&#8217;s talk (linked below) to learn more).</p>
<p><img class="aligncenter size-full wp-image-1960" title="sv2" src="http://fxexperience.com/wp-content/uploads/2012/05/sv2.png" alt="" width="545" height="451" /></p>
<p>Amy presented her <a href="http://www.parleys.com/#st=5&amp;id=2734&amp;sl=0">Introduction to JavaFX layout</a> talk at JavaOne San Francisco in October 2011, and I&#8217;ve gone on to re-present it at JavaOne conferences in Japan and India. What we covered in these talks was a whole bunch of layout fundamentals, and then we worked through how to use these fundamentals to build a JavaFX user interface. The worked example was on building aspects of the Scenic View application, and then we used the Scenic View application to demonstrate some of the layout concepts we had spoken about previously.</p>
<p>The Scenic View application shown above only differs visually from what Amy presented at JavaOne (which you can see in the link above). This is all I&#8217;ve done &#8211; the rest is all from Amy. What you can see in the image above is standard JavaFX, styled with a bit of custom CSS (borrowed heavily from Scene Builder). There are still a few visual quirks I&#8217;d like to improve, but I&#8217;ve been wanting to get this released for a very, very long time, so I&#8217;ll do that first, and then we can talk about improvements.</p>
<p>So, today, I am finally able to put up a <a href="http://dl.dropbox.com/u/6320469/ScenicView.jar">jar file of the ScenicView application</a>. Drop this into your project, and simply fire up Scenic View by calling ScenicView.show(scene) with the scene of your application. There is actually a secret shortcut that will automatically start up Scenic View from your running application, but that won&#8217;t stay around forever so I won&#8217;t publicise it (although it is in our open source code, so maybe you can find it)&#8230;.</p>
<p>Please, leave comments, requests for functionality, and offers to add said functionality in the comments section below. I look forward to your feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/05/introducing-scenic-view/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Announcing: FX Experience Tools</title>
		<link>http://fxexperience.com/2012/03/announcing-fx-experience-tools/</link>
		<comments>http://fxexperience.com/2012/03/announcing-fx-experience-tools/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 02:27:16 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1755</guid>
		<description><![CDATA[I have some cool new stuff for you today. I have been working on porting some of the little tools I wrote for JavaFX 1.X. Also I was inspired by the web css button creator UiParade Button Builder. So I created a simple theming tool for JavaFX. This is something I have wanted to do [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: left;" title="FxExperienceToolsIcon-256" src="http://fxexperience.com/wp-content/uploads/2012/03/FxExperienceToolsIcon-256.png" alt="" width="256" height="256" />I have some cool new stuff for you today. I have been working on porting some of the little tools I wrote for JavaFX 1.X. Also I was inspired by the web css button creator <a title="uiparade button builder" href="http://www.uiparade.com/wp-content/themes/artiste/live-tools/index.html" target="_blank">UiParade Button Builder</a>. So I created a simple theming tool for JavaFX. This is something I have wanted to do for ages and is actually the second one I have written. The first started from the point of view of supporting every feature that can be done with CSS in JavaFX, and this turned out to be a huge undertaking as there is an amazing amount of flexibility in styling the JavaFX controls with CSS. So this one was inspired by the UiParade one and tried to give a simple set of controls to adjust the look. Some of them are quite clever that you adjust one slider and it is adjusting dozens of css properties in varying amounts for you. I have also made the source code available for all of these apps along with the custom controls like a color picker. So you can download it and see how its works. Hopefully we will add more tools to it over time as we have ideas or have time to do some.</p>
<h2 style="clear: left;"><span id="more-1755"></span></h2>
<h2 style="clear: left;">Tools:  Caspian Styler</h2>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.32.36-AM1.png"><img class="aligncenter size-medium wp-image-1760" title="Caspian Styler" src="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.32.36-AM1-300x206.png" alt="" width="300" height="206" /></a></p>
<p>This lets you customize the look of the default skin for JavaFX (Caspian) to create all kinds of themes. In the end it generates a CSS file that you can attach to your Scene and it will apply to all controls in your application. With a little customization of the selectors in the generated file you could make it apply on only certain named panels or controls. Would you guys like a button only one as well?</p>
<h2>Tools: Animation Spline Editor</h2>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.33.36-AM.png"><img class="aligncenter size-medium wp-image-1762" title="Spline Editor" src="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.33.36-AM-300x206.png" alt="" width="300" height="206" /></a></p>
<p>When you are animating in JavaFX you can apply an interpolator to the animation to control how the animation accelerates and decelerates. There are some preset ones built in like EASE_IN or EASE_OUT, there is also a customizable one created by Interpolator.SPLINE(&#8230;). This little tool lets you graphically experiment with the input to that function and see what the resulting animation looks like if applied to a scale, rotate, fade or translate animation. You can then hit the copy button to copy the code that is needed that you can then paste direct into your application.</p>
<h2>Tools: Derived Color Calculator</h2>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.35.30-AM.png"><img class="aligncenter size-medium wp-image-1757" title="Derived Color Calculator" src="http://fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.35.30-AM-300x206.png" alt="" width="300" height="206" /></a></p>
<p>JavaFX CSS has the advanced feature of derived colors. These are colors that are lighter or darker versions of some named color. This is used extensively throughout the default Caspian skin which is how we are able to do color theming with CSS like Caspian Styler above does. When you are working with derived colors you often have a design from a designer with an absolute color in it like #EEEEEE and you want to know what the derivation percentage would be from your chosen base color. This calculator will help work that out for you. It will also show you that you have to be careful choosing your base color as not all colors can be created from all base colors.</p>
<h2>Getting the Application</h2>
<p>I have packaged the application as a native Mac app bundle and as a Windows installer so it should be simple to get it installed and try it out.</p>
<p><a class="big-blue-button" href="http://fxexperience.com/tools/FxExperienceTools.dmg"><span class="download-arrow">↓</span> Download Mac DMG</a>   <a class="big-blue-button" href="http://fxexperience.com/tools/fxetools.exe"><span class="download-arrow">↓</span> Download Windows Installer</a></p>
<h2>The Code</h2>
<p>There is a <a href="https://github.com/fxexperience/code" target="_blank">FX Experience GitHub repo</a> with all the code so you can go grab it and play with it. We will be putting all the code from future blogs in there and slowly adding all the code from old blogs as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/03/announcing-fx-experience-tools/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Customized Segmented ToolBar Buttons</title>
		<link>http://fxexperience.com/2012/02/customized-segmented-toolbar-buttons/</link>
		<comments>http://fxexperience.com/2012/02/customized-segmented-toolbar-buttons/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 19:17:09 +0000</pubDate>
		<dc:creator>Richard Bair</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[FXML]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1681</guid>
		<description><![CDATA[One of Jasper&#8217;s favorite websites is called Dribbble, which is a place for designers to post whatever work they&#8217;re currently working on for others to view and be inspired from. I got hooked on Dribbble last Thursday and have been looking at a bunch of the mockups and itching to try implementing some of them [...]]]></description>
			<content:encoded><![CDATA[<p>One of Jasper&#8217;s favorite websites is called <a href="http://dribbble.com">Dribbble</a>, which is a place for designers to post whatever work they&#8217;re currently working on for others to view and be inspired from. I got hooked on Dribbble last Thursday and have been looking at a bunch of the mockups and itching to try implementing some of them in JavaFX. Here is my first attempt.</p>
<p><a href="http://dribbble.com/shots/412425-Class-Attendance?list=popular&#038;offset=3"><img src="http://fxexperience.com/wp-content/uploads/2012/02/SegmentedButtonBar-Designer.png" alt="" title="SegmentedButtonBar Designer" width="800" class="aligncenter size-full wp-image-1691" /></a></p>
<p>One of the use cases we used for our CSS support and our ToolBar API was that we wanted to support a style of toolbar button which (at least for me) was popularized on the Mac, which is referred to by Cocoa as a &#8220;segmented&#8221; button. This is essentially nothing more than an HBox of buttons that has been styled such that the first button has rounded left edges, the center buttons are squared up, and the last button has rounded right edges. In the image above by <a href="http://dribbble.com/bady"/>Bady</a>, you can see the segmented button bar in the toolbar area of the application.<br />
<span id="more-1681"></span><br />
So to begin with, here is the Java code that goes into producing this app. This one is going to only have a toolbar, segmented button bar, and then the body area will just be the blue color you see in the above design. I actually will list two different examples here which both produce the same view and which both use the same CSS file. The first is just plain Java, while the second uses FXML to define the UI and a Java file simply loads the UI and configures the stage.</p>
<p><b>SegmentedButtonBarApp &#8211; Just Java</b></p>
<pre class="brush: java; title: ; notranslate">
public class SegmentedButtonBarApp extends Application {
    @Override public void start(Stage stage) throws Exception {
        BorderPane root = new BorderPane();
        root.setId(&quot;background&quot;);

        ToolBar toolBar = new ToolBar();
        root.setTop(toolBar);

        Region spacer = new Region();
        spacer.getStyleClass().setAll(&quot;spacer&quot;);

        HBox buttonBar = new HBox();
        buttonBar.getStyleClass().setAll(&quot;segmented-button-bar&quot;);
        Button sampleButton = new Button(&quot;Tasks&quot;);
        sampleButton.getStyleClass().addAll(&quot;first&quot;);
        Button sampleButton2 = new Button(&quot;Administrator&quot;);
        Button sampleButton3 = new Button(&quot;Search&quot;);
        Button sampleButton4 = new Button(&quot;Line&quot;);
        Button sampleButton5 = new Button(&quot;Process&quot;);
        sampleButton5.getStyleClass().addAll(&quot;last&quot;, &quot;capsule&quot;);
        buttonBar.getChildren().addAll(sampleButton, sampleButton2, sampleButton3, sampleButton4, sampleButton5);
        toolBar.getItems().addAll(spacer, buttonBar);

        Scene scene = new Scene(root, 800, 600);
        scene.getStylesheets().add(getClass().getResource(&quot;segmented.css&quot;).toExternalForm());
        stage.setScene(scene);
        stage.setTitle(&quot;Segmented Button Bar&quot;);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
</pre>
<p><b>SegmentedButtonBarFXMLApp.java and SegmentedButtonBar.fxml &#8211; Java and FXML</b></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;?import java.lang.*?&gt;
&lt;?import javafx.scene.control.*?&gt;
&lt;?import javafx.scene.layout.*?&gt;

&lt;BorderPane id=&quot;background&quot; prefWidth=&quot;800.0&quot; prefHeight=&quot;600.0&quot; xmlns:fx=&quot;http://javafx.com/fxml&quot;&gt;
    &lt;top&gt;
        &lt;ToolBar&gt;
            &lt;items&gt;
                &lt;Region styleClass=&quot;spacer&quot; /&gt;
                &lt;HBox styleClass=&quot;segmented-button-bar&quot;&gt;
                    &lt;Button text=&quot;Tasks&quot; styleClass=&quot;first&quot; /&gt;
                    &lt;Button text=&quot;Administrator&quot; /&gt;
                    &lt;Button text=&quot;Search&quot; /&gt;
                    &lt;Button text=&quot;Line&quot; /&gt;
                    &lt;Button text=&quot;Process&quot; styleClass=&quot;last&quot; /&gt;
                &lt;/HBox&gt;
            &lt;/items&gt;
        &lt;/ToolBar&gt;
    &lt;/top&gt;
&lt;/BorderPane&gt;
</pre>
<pre class="brush: java; title: ; notranslate">
public class SegmentedButtonBarFXMLApp extends Application{
    @Override public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource(&quot;SegmentedButtonBar.fxml&quot;));
        Scene scene = new Scene(root);
        scene.getStylesheets().add(getClass().getResource(&quot;segmented.css&quot;).toExternalForm());
        stage.setScene(scene);
        stage.setTitle(&quot;Segmented Button Bar From FXML&quot;);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
</pre>
<p>Both of these approach yield the same approach. I think the FXML file in this case is easier to visualize than reading the raw Java code, but either approach is valid. In both approaches you will notice that I have not done any visual styling whatsoever in the code or FXML, it has all been abstracted away to the css file. Here is what the application looks like without any CSS being applied.</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Unstyled-SegmentedButtonBar.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/Unstyled-SegmentedButtonBar.png" alt="" title="Unstyled SegmentedButtonBar" width="754" height="616" class="aligncenter size-full wp-image-1682" /></a></p>
<p>So now lets apply one section of the CSS file at a time, and see how it modifies the look of the application.</p>
<h3>The CSS</h3>
<p>I started off by defining the following rule in CSS:</p>
<pre class="brush: css; title: ; notranslate">
#background {
    -light-black: rgb(74, 75, 78);
    -dark-highlight: rgb(87, 89, 92);
    -dark-black: rgb(39, 40, 40);
    -darkest-black: rgb(5, 5, 5);
    -mid-gray: rgb(216, 222, 227);
    -fx-background-color: -mid-gray;
}
</pre>
<p>There are two things going on in this code. First, you will note that it selects only the node(s) with the id of &#8220;background&#8221;. The node in our scene graph with this id is the BorderPane which forms the root of the scene graph. The first chunk of the CSS file defines the color palette. In JavaFX CSS you can create arbitrary &#8220;variables&#8221; in your CSS by simply defining a declaration, such as <code>-dark-black: rub(39, 40, 40);</code>. Thereafter, you can refer to these named colors.</p>
<div id="attachment_1684" class="wp-caption aligncenter" style="width: 210px"><a href="http://fxexperience.com/wp-content/uploads/2012/02/SegmentedButtonBar-Palette.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/SegmentedButtonBar-Palette.png" alt="" title="SegmentedButtonBar Palette" width="200" height="40" class="size-full wp-image-1684" /></a><p class="wp-caption-text">SegmentedButtonBar Palette</p></div>
<p>After doing nothing other than defining the color palette and the background, our app now looks like this:</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Styled-Background.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/Styled-Background.png" alt="" title="Styled Background" width="754" height="616" class="aligncenter size-full wp-image-1686" /></a></p>
<p>The background now has this mid-gray color, while the rest of the app looks unchanged. Now, lets style the ToolBar.</p>
<pre class="brush: css; title: ; notranslate">
.tool-bar {
    -fx-base: -dark-black;
    -fx-font-size: 12pt;
    -fx-background-color:
        linear-gradient(to bottom, derive(-fx-base,-30%), derive(-fx-base,-60%)),
        linear-gradient(to bottom, -light-black 2%, -dark-black 98%);
    -fx-background-insets: 0, 0 0 1 0;
    -fx-padding: .9em 0.416667em .9em 0.416667em;
    -fx-effect: dropshadow(two-pass-box,black,5,.2,0,0);
}
</pre>
<p>Here, I am selecting all toolbars in my app to be styled like this. I could have given my tool bar a special style class or ID so that I only targeted it, but in this case this is OK, since I am not using any other tool bars in my app, and if I were, I could style them explicitly by style class or ID if I wanted to. I am telling the toolbar to use the base color of -dark-black. I think the only reason for doing so is so that those automatically derived colors that I&#8217;m not about to override (of which I think only the text fill is ultimately going to be affected) will be styled correctly by default for being on a dark background. I&#8217;ve tweaked the font size to be a bit smaller (on mac it defaults to 13pt).</p>
<p>I&#8217;ve given the toolbar a new background gradient. It simply goes from top-to-bottom. I actually copied this out of caspian.css and then modified the main gradient (the second one in the list) to go from our -light-black palette color to our -dark-black gradient color. I tweaked the insets so that the border (the first gradient in the list) isn&#8217;t drawn on the bottom of the toolbar. I also tweaked the padding so that it would come out pretty close to the designer&#8217;s intent. Finally, I added a drop shadow.</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Styled-ToolBar.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/Styled-ToolBar.png" alt="" title="Styled ToolBar" width="640" height="145" class="aligncenter size-full wp-image-1687" /></a></p>
<p>Now that we&#8217;ve styled the tool bar, it is time to style the segmented buttons (that is, after all, what this post is supposed to be about!). Actually styling the segmented buttons is really pretty easy.</p>
<pre class="brush: css; title: ; notranslate">
.segmented-button-bar .button {
    -fx-background-color:
        -darkest-black,
        -dark-highlight,
        linear-gradient(to bottom, -light-black 2%, -dark-black 98%);
    -fx-background-insets: 0, 1 1 1 0, 2 1 1 1;
    -fx-background-radius: 0;
    -fx-padding: 0.4em 1.833333em 0.4em 1.833333em;
}

.segmented-button-bar .button.first {
    -fx-background-insets: 0, 1, 2 1 1 1;
    -fx-background-radius: 3 0 0 3, 2 0 0 2, 2 0 0 2;
}

.segmented-button-bar .button.last {
    -fx-background-insets: 0, 1 1 1 0, 2 1 1 1;
    -fx-background-radius: 0 3 3 0, 0 2 2 0, 0 2 2 0;
}

.segmented-button-bar .button:pressed {
    -fx-background-color:
        -darkest-black,
        rgb(55, 57, 58),
        linear-gradient(to top, -light-black 2%, -dark-black 98%);
}
</pre>
<p>The segmented buttons are styled such that the first and last are half-rounded, and the middle buttons are squared up. With web CSS you have the &#8220;first-child&#8221; and &#8220;last-child&#8221; pseudo-classes. However these are not implemented in JavaFX, so instead I added the &#8220;first&#8221; and &#8220;last&#8221; style classes to the first and last buttons, respectively. This allows me to use a nice CSS rule to target them separately from any other random button added to the segmented button bar.</p>
<p>Oh, and my &#8220;segmented button bar&#8221; isn&#8217;t a control &#8212; it is just an HBox with some special CSS style. I gave the hbox the style class &#8220;segmented-button-bar&#8221;, and then here from CSS I will target all buttons that are within a segmented-button-bar, and style them specially.</p>
<p>The button is drawn using 3 overlapping background fills. The first is the dark outline, the second is the &#8220;highlight&#8221; &#8212; a lighter line draw to give the bezel look, and then the gradient that fills the rest of the body. The only trick with these is to correctly specify the insets and the corner radius&#8217; so everything ends up looking right. Look closely at the following zoomed-in screenshot of the design:</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/Search-Button-Zoomed-In.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/Search-Button-Zoomed-In.png" alt="" title="Search Button Zoomed In" width="810" height="264" class="aligncenter size-full wp-image-1688" /></a></p>
<p>You will notice that there is, on the left of this button, a black line and a highlight line. So does the black line belong to the button to the left of the &#8220;Search&#8221; button? Who draws it? In my case, I decided that the highlight line on the left would be drawn by this button, and the dark line on the right would also be drawn by this button. Thus you can butt multiple buttons against each other and they appear to &#8220;share&#8221; a border. Notice that the middle button draws the black lines on the top and bottom. So basically what I did was draw the black background, then draw a highlight background overtop of it adjusted such that it drew over most of the black background, just leaving 1 px on the top and bottom showing through. Then I drew the main fill adjusted so that the highlight was obscured except for 1 px on the top and left.</p>
<p>The first and last buttons were likewise tweaked to get the right look. The only additional thing done there was to make sure that the corner radius for the top-left and bottom-left edges (for the first button) were rounded and the top-right and bottom-right were squared. The same idea for the last button.</p>
<p>And that&#8217;s it. A SegmentedButtonBar where you can drop in buttons and they will be styled to match the colors, gradients, and so forth that the designer intended. And done by me: somebody who, unlike Jasper, isn&#8217;t very good at making a pretty UI <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Oh, you may be wondering about that &#8220;spacer&#8221; region. I just gave it a simple style to push over the button bar a little ways.</p>
<pre class="brush: css; title: ; notranslate">
.tool-bar .spacer {
    -fx-padding: 0 5.417em 0 0;
}
</pre>
<p>And finally, our app looks pretty good!</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2012/02/SegmentedButtonBar-App-Final2.png"><img src="http://fxexperience.com/wp-content/uploads/2012/02/SegmentedButtonBar-App-Final2.png" alt="" title="SegmentedButtonBar-App-Final2" width="754" height="616" class="aligncenter size-full wp-image-1701" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/02/customized-segmented-toolbar-buttons/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Fun JavaFX 2.0 Audio Player</title>
		<link>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/</link>
		<comments>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 08:10:11 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1586</guid>
		<description><![CDATA[I was inspired by Dean Iverson&#8217;s tweet with a audio equalizer in JavaFX: #JavaFX rocks. Literally. An example from our upcoming Pro JavaFX 2 book: pic.twitter.com/tSI4Vry4 and the equalizer view from that Pro JavaFX 2 example app: pic.twitter.com/T6jxvrf9 . updated pic.twitter.com/FqzgVimG So wanted to have a go at doing one my self, so little while later [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fxexperience.com/wp-content/uploads/2012/01/FXExperiencePlayer-BG.png"><img class="aligncenter size-medium wp-image-1587" title="FXExperiencePlayer" src="http://fxexperience.com/wp-content/uploads/2012/01/FXExperiencePlayer-BG-300x190.png" alt="" width="300" height="190" /></a></p>
<p>I was inspired by <a href="http://twitter.com/deanriverson">Dean Iverson&#8217;s</a> tweet with a audio equalizer in JavaFX:</p>
<blockquote><p>#JavaFX rocks. Literally. An example from our upcoming Pro JavaFX 2 book: <a href="http://pic.twitter.com/tSI4Vry4">pic.twitter.com/tSI4Vry4</a><br />
and the equalizer view from that Pro JavaFX 2 example app: <a href="http://pic.twitter.com/T6jxvrf9">pic.twitter.com/T6jxvrf9</a><br />
. updated <a href="http://pic.twitter.com/FqzgVimG">pic.twitter.com/FqzgVimG</a></p></blockquote>
<p>So wanted to have a go at doing one my self, so little while later I have a design and built a working application. Demo video after the break.</p>
<p><span id="more-1586"></span></p>
<p><iframe src="http://www.youtube.com/embed/QhFXd3Ost3w?rel=0&amp;hd=1" frameborder="0" width="960" height="720"></iframe></p>
<h3>The Design</h3>
<p>I started the design with a free Photoshop file from Diego Monzon:</p>
<p><a href="http://dribbble.com/shots/146460-UI-Rack-Pro-7-Freebie"><img class="alignnone" title="Starting Free PSD" src="http://dribbble.com/system/users/11040/screenshots/146460/ui7.jpg?1309482012" alt="" width="400" height="300" /></a></p>
<p>You will see that some of it like the cool VU meters made it direct though to my design but then I played around with the other parts. I have added a link to the Photoshop file I created so you can see what I have done if you are intrested. From the photoshop file I produced a few PNG files which are used in the application, you can see them in the src images directory. I found a free LCD dot matrix font from dafont which is what I am using for the text on the screen. You can see in the code how this is loaded in JavaFX.</p>
<p><a title="Photoshop design" href="http://fxexperience.com/applications/FXExperiencePlayer-BG.psd.zip">Download the Photoshop File</a> 18Mb</p>
<h4>The Code</h4>
<p>The application did not take that long to build, guess about a day in total and about 800 lines of code. I think it is fully working other than the balance is a little fiddly with the mouse. All the control customizations should have full keyboard navigation <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . It is mostly standard UI Controls just styled with Images and CSS. The round knobs like balance and volume I had to do something special for and created a knob skin for the Slider control. There was a bunch of the standard logic to load and parse M3U and XML playlists, a very simple data model object PlayList which just contains a url which it was loaded from and a observable list of Pairs, each Pair being a name for the song and a url to the song. We did not have all the low level media API I needed for the VU meters but as they are only really for show I made of some data from what we can get from AudioSpectrumListener.</p>
<p><a title="Source and NB Project" href="http://fxexperience.com/applications/FxExperiencePlayer.zip">Download the source and Netbeans Project</a> 1.5Mb</p>
<p>Hope you enjoy playing with this fun little app as much as I did creating it. Hope it goes to show that you can create pretty much any UI that you can imagine in JavaFX 2.0 and even use standard controls so you maintain keyboard navigation, accessibility etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/01/fun-javafx-2-0-audio-player/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Styling FX Buttons with CSS</title>
		<link>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/</link>
		<comments>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 23:36:03 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1523</guid>
		<description><![CDATA[A number of people have asked me recently can I create this look or that look using CSS in JavaFX. Or they have said that you could never do that! So I thought I would do a little experiment and try recreating a bunch of common button styles purely using CSS. So without further ado, [...]]]></description>
			<content:encoded><![CDATA[<p>A number of people have asked me recently can I create this look or that look using CSS in JavaFX. Or they have said that you could never do that! So I thought I would do a little experiment and try recreating a bunch of common button styles purely using CSS. So without further ado, here is the result:</p>
<p><img class="aligncenter size-full wp-image-1524" title="CSS Styled Buttons" src="http://fxexperience.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-20-at-2.51.18-PM.png" alt="" width="706" height="873" /><br />
<span id="more-1523"></span><br />
All of these are mostly created with multiple background fill layers each with a gradient. Then there is a little font tweaking and some subtle effects. So for example all you need to make a JavaFX button look like a Windows 7 button is:</p>
<pre class="brush: css; title: ; notranslate">
#windows7-default {
    -fx-background-color:
        #3c7fb1,
        linear-gradient(#fafdfe, #e8f5fc),
        linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
</pre>
<p>The first line defines the 3 background fills, first is solid color and the other two are linear gradients. The background-insets offsets the backgrounds so they do not 100% paint over each other and the second background is 1px in from the outside and the 3rd background is 2px in from the outside of the button. The background-radius us setting the corner radius&#8217;s of the 3 backgrounds getting smaller as the backgrounds move in, this makes the gap between the borders a consistent 1 pixel all the way around. Padding adds extra space around the text to make the button bigger by default. Then the last two lines set the text color and size. That is all there is too it.</p>
<p>I have not included styles for the pressed, over and focused states of all the buttons but they can all be easily added in a similar way. I have included a over and pressed state for the &#8220;Record Sales&#8221; button as a example. </p>
<p>You can download the complete Netbeans project with all the code here.<br />
<b><a href="/applications/ButtonStyles.zip">ButtonStyles.zip</a></b></p>
<p>Here is the CSS code of all the button styles you see above:</p>
<pre class="brush: css; title: ; notranslate">
#green {
    -fx-background-color:
        linear-gradient(#f0ff35, #a9ff00),
        radial-gradient(center 50% -40%, radius 200%, #b8ee36 45%, #80c800 50%);
    -fx-background-radius: 6, 5;
    -fx-background-insets: 0, 1;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 5, 0.0 , 0 , 1 );
    -fx-text-fill: #395306;
}
#round-red {
    -fx-background-color: linear-gradient(#ff5400, #be1d00);
    -fx-background-radius: 30;
    -fx-background-insets: 0;
    -fx-text-fill: white;
}
#bevel-grey {
    -fx-background-color:
        linear-gradient(#f2f2f2, #d6d6d6),
        linear-gradient(#fcfcfc 0%, #d9d9d9 20%, #d6d6d6 100%),
        linear-gradient(#dddddd 0%, #f6f6f6 50%);
    -fx-background-radius: 8,7,6;
    -fx-background-insets: 0,1,2;
    -fx-text-fill: black;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
}
#glass-grey {
    -fx-background-color:
        #c3c4c4,
        linear-gradient(#d6d6d6 50%, white 100%),
        radial-gradient(center 50% -40%, radius 200%, #e6e6e6 45%, rgba(230,230,230,0) 50%);
    -fx-background-radius: 30;
    -fx-background-insets: 0,1,1;
    -fx-text-fill: black;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 3, 0.0 , 0 , 1 );
}
#shiny-orange {
    -fx-background-color:
        linear-gradient(#ffd65b, #e68400),
        linear-gradient(#ffef84, #f2ba44),
        linear-gradient(#ffea6a, #efaa22),
        linear-gradient(#ffe657 0%, #f8c202 50%, #eea10b 100%),
        linear-gradient(from 0% 0% to 15% 50%, rgba(255,255,255,0.9), rgba(255,255,255,0));
    -fx-background-radius: 30;
    -fx-background-insets: 0,1,2,3,0;
    -fx-text-fill: #654b00;
    -fx-font-weight: bold;
    -fx-font-size: 14px;
    -fx-padding: 10 20 10 20;
}
#dark-blue {
    -fx-background-color:
        #090a0c,
        linear-gradient(#38424b 0%, #1f2429 20%, #191d22 100%),
        linear-gradient(#20262b, #191d22),
        radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
    -fx-background-radius: 5,4,3,5;
    -fx-background-insets: 0,1,2,0;
    -fx-text-fill: white;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
    -fx-font-family: &quot;Arial&quot;;
    -fx-text-fill: linear-gradient(white, #d0d0d0);
    -fx-font-size: 12px;
    -fx-padding: 10 20 10 20;
}
#dark-blue Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.9) , 1, 0.0 , 0 , 1 );
}
#record-sales {
    -fx-padding: 8 15 15 15;
    -fx-background-insets: 0,0 0 5 0, 0 0 6 0, 0 0 7 0;
    -fx-background-radius: 8;
    -fx-background-color:
        linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12 100%),
        #9d4024,
        #d86e3a,
        radial-gradient(center 50% 50%, radius 100%, #d86e3a, #c54e2c);
    -fx-effect: dropshadow( gaussian , rgba(0,0,0,0.75) , 4,0,0,1 );
    -fx-font-weight: bold;
    -fx-font-size: 1.1em;
}
#record-sales:hover {
    -fx-background-color:
        linear-gradient(from 0% 93% to 0% 100%, #a34313 0%, #903b12 100%),
        #9d4024,
        #d86e3a,
        radial-gradient(center 50% 50%, radius 100%, #ea7f4b, #c54e2c);
}
#record-sales:pressed {
    -fx-padding: 10 15 13 15;
    -fx-background-insets: 2 0 0 0,2 0 3 0, 2 0 4 0, 2 0 5 0;
}
#record-sales Text {
    -fx-fill: white;
    -fx-effect: dropshadow( gaussian , #a30000 , 0,0,0,2 );
}
#rich-blue {
    -fx-background-color:
        #000000,
        linear-gradient(#7ebcea, #2f4b8f),
        linear-gradient(#426ab7, #263e75),
        linear-gradient(#395cab, #223768);
    -fx-background-insets: 0,1,2,3;
    -fx-background-radius: 3,2,2,2;
    -fx-padding: 12 30 12 30;
    -fx-text-fill: white;
    -fx-font-size: 12px;
}
#rich-blue Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 0, 0.0 , 0 , 1);
}
#big-yellow {
    -fx-background-color:
        #ecebe9,
        rgba(0,0,0,0.05),
        linear-gradient(#dcca8a, #c7a740),
        linear-gradient(#f9f2d6 0%, #f4e5bc 20%, #e6c75d 80%, #e2c045 100%),
        linear-gradient(#f6ebbe, #e6c34d);
    -fx-background-insets: 0,9 9 8 9,9,10,11;
    -fx-background-radius: 50;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-text-fill: #311c09;
    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.1) , 2, 0.0 , 0 , 1);
}
#big-yellow Text {
    -fx-effect: dropshadow( one-pass-box , rgba(255,255,255,0.5) , 0, 0.0 , 0 , 1);
}
#iphone-toolbar {
    -fx-background-color: linear-gradient(#98a8bd 0%, #8195af 25%, #6d86a4 100%);
}
#iphone {
    -fx-background-color:
        #a6b5c9,
        linear-gradient(#303842 0%, #3e5577 20%, #375074 100%),
        linear-gradient(#768aa5 0%, #849cbb 5%, #5877a2 50%, #486a9a 51%, #4a6c9b 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 7 30 7 30;
    -fx-text-fill: #242d35;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 12px;
    -fx-text-fill: white;
}
#iphone Text {
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 0, 0.0 , 0 , -1 );
}
#ipad-dark-grey {
    -fx-background-color:
        linear-gradient(#686868 0%, #232723 25%, #373837 75%, #757575 100%),
        linear-gradient(#020b02, #3a3a3a),
        linear-gradient(#9d9e9d 0%, #6b6a6b 20%, #343534 80%, #242424 100%),
        linear-gradient(#8a8a8a 0%, #6b6a6b 20%, #343534 80%, #262626 100%),
        linear-gradient(#777777 0%, #606060 50%, #505250 51%, #2a2b2a 100%);
    -fx-background-insets: 0,1,4,5,6;
    -fx-background-radius: 9,8,5,4,3;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-text-fill: white;
    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.2) , 1, 0.0 , 0 , 1);
}
#ipad-dark-grey Text {
    -fx-effect: dropshadow( one-pass-box , black , 0, 0.0 , 0 , -1 );
}
#ipad-grey {
    -fx-background-color:
        linear-gradient(#686868 0%, #232723 25%, #373837 75%, #757575 100%),
        linear-gradient(#020b02, #3a3a3a),
        linear-gradient(#b9b9b9 0%, #c2c2c2 20%, #afafaf 80%, #c8c8c8 100%),
        linear-gradient(#f5f5f5 0%, #dbdbdb 50%, #cacaca 51%, #d7d7d7 100%);
    -fx-background-insets: 0,1,4,5;
    -fx-background-radius: 9,8,5,4;
    -fx-padding: 15 30 15 30;
    -fx-font-family: &quot;Helvetica&quot;;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-text-fill: #333333;
    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.2) , 1, 0.0 , 0 , 1);
}
#ipad-grey Text {
    -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
}
#lion-default {
    -fx-background-color:
        rgba(0,0,0,0.08),
        linear-gradient(#5a61af, #51536d),
        linear-gradient(#e4fbff 0%,#cee6fb 10%, #a5d3fb 50%, #88c6fb 51%, #d5faff 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: #242d35;
    -fx-font-size: 14px;
}
#lion {
    -fx-background-color:
        rgba(0,0,0,0.08),
        linear-gradient(#9a9a9a, #909090),
        linear-gradient(white 0%, #f3f3f3 50%, #ececec 51%, #f2f2f2 100%);
    -fx-background-insets: 0 0 -1 0,0,1;
    -fx-background-radius: 5,5,4;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: #242d35;
    -fx-font-size: 14px;
}
#windows7-default {
    -fx-background-color:
        #3c7fb1,
        linear-gradient(#fafdfe, #e8f5fc),
        linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
#windows7 {
    -fx-background-color:
        #707070,
        linear-gradient(#fcfcfc, #f3f3f3),
        linear-gradient(#f2f2f2 0%, #ebebeb 49%, #dddddd 50%, #cfcfcf 100%);
    -fx-background-insets: 0,1,2;
    -fx-background-radius: 3,2,1;
    -fx-padding: 3 30 3 30;
    -fx-text-fill: black;
    -fx-font-size: 14px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2011/12/styling-fx-buttons-with-css/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Alternate row highlighting in empty TableView (and ListView) rows</title>
		<link>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/</link>
		<comments>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 04:53:05 +0000</pubDate>
		<dc:creator>Jonathan Giles</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1499</guid>
		<description><![CDATA[One thing I see asked a lot (either directly via email, or in the rather excellent JavaFX Forums) is why does TableView (and ListView) look like this in JavaFX 2.0: Or, more specifically, why it doesn&#8217;t look like this: I can see where this question comes from, given this is how Swing&#8217;s JTable looks: It [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I see asked a lot (either directly via email, or in the rather excellent <a href="https://forums.oracle.com/forums/forum.jspa?forumID=1385&amp;start=0">JavaFX Forums</a>) is why does TableView (and ListView) look like this in JavaFX 2.0:</p>
<div id="attachment_1500" class="wp-caption aligncenter" style="width: 509px"><img class="size-full wp-image-1500" title="blog-table-1" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-1.png" alt="" width="499" height="310" /><p class="wp-caption-text">A TableView control using default styling and API as provided in JavaFX 2.0.</p></div>
<p><span id="more-1499"></span>Or, more specifically, why it doesn&#8217;t look like this:</p>
<div id="attachment_1502" class="wp-caption aligncenter" style="width: 508px"><img class="size-full wp-image-1502" title="blog-table-2" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-2.png" alt="" width="498" height="307" /><p class="wp-caption-text">A TableView without alternate row highlighting in empty rows</p></div>
<p>I can see where this question comes from, given this is how Swing&#8217;s JTable looks:</p>
<div id="attachment_1501" class="wp-caption aligncenter" style="width: 535px"><img class="size-full wp-image-1501" title="blog-table-3" src="http://fxexperience.com/wp-content/uploads/2011/11/blog-table-3.png" alt="" width="525" height="188" /><p class="wp-caption-text">Swing JTable</p></div>
<p>It comes down to taste I guess, but given that there is a subset of developers who expect this look, I thought I&#8217;d put a blog post up here to clarify how it is done (and to save me having to explain it to people individually by email!) <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  All you need is the following CSS for TableView:</p>
<pre class="brush: css; title: ; notranslate">
.table-row-cell:empty {
    -fx-background-color: white;
}

.table-row-cell:empty .table-cell {
    -fx-border-width: 0px;
}
</pre>
<p>Similarly, for ListView, you can get away with just the first statement above (slightly modified for ListView):</p>
<pre class="brush: css; title: ; notranslate">
.list-cell:empty {
    -fx-background-color: white;
}
</pre>
<p>The end result is precisely what you see in the second image above (there ain&#8217;t no photoshop trickery here!) <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Hopefully this helps people customising their user interfaces, and hopefully also encourages you to further explore what is possible. The best starting point is the excellent <a href="http://docs.oracle.com/javafx/">JavaFX documentation website</a>, the <a href="http://docs.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html">CSS Reference</a> (which is about to be updated for 2.0.2 I believe), and as always, the caspian.css file that ships with every JavaFX release (embedded within jfxrt.jar).</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2011/11/alternate-row-highlighting-in-empty-tableview-and-listview-rows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Custom Cell Caching</title>
		<link>http://fxexperience.com/2010/06/custom-cell-caching/</link>
		<comments>http://fxexperience.com/2010/06/custom-cell-caching/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 06:09:23 +0000</pubDate>
		<dc:creator>Jonathan Giles</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=883</guid>
		<description><![CDATA[Ok, I know we&#8217;ve been going on about custom cells / cell factories a bit recently, but I wanted to do one more post about a very useful topic: caching within cell content. These days &#8216;Hello World&#8217; has been replaced by building a Twitter client, so I&#8217;ve decided to frame this topic in terms of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I know we&#8217;ve been going on about custom cells / cell factories a bit recently, but I wanted to do one more post about a very useful topic: caching within cell content.</p>
<p>These days &#8216;Hello World&#8217; has been replaced by building a Twitter client, so I&#8217;ve decided to frame this topic in terms of building a Twitter client. Because I don&#8217;t actually care about the whole web service side of thing, I&#8217;ve neglected to implement the whole &#8216;real data&#8217; / web services aspect of it. If you want to see an actual running implementation with real data, have a look at <span>William Antônio&#8217;s <a href="http://bit.ly/cXsqUR">Twitter client</a>, which is using this ListCell implementation.</span></p>
<p><span><span id="more-883"></span>So, in all the posts to this site related to cells, I&#8217;m sure you&#8217;ve probably come to appreciate the ways in which you should create a ListView or TreeView with custom cell factories. Therefore, what I really want to cover in this post is just the custom cell implementation, and the importance of caching. A Twitter client wouldn&#8217;t be a true client without showing the users profile image, so this is my target for caching. Without caching, each time the cell was updated (i.e. the content changes due to scrolling, or when we scroll a user out of screen and then back in), we&#8217;d have to redownload and load the image. This would lead to considerable lag and a poor user experience. What we need to do is load the image once, cache it, and reuse it whenever the image URL is requested by a cell. At the same time, we don&#8217;t want to run the PC dry of memory by loading all profile images into memory. Enter: <a href="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html">SoftReference</a> caching.<br />
</span></p>
<p><span><strong>Word of warning</strong>: I&#8217;m not a caching expert. It is possible that I&#8217;ve done something stupid, and I hope you&#8217;ll let me know, but I believe that the code below should at least be decent. I&#8217;ll happily update this example if anyone gives me useful feedback.</span></p>
<p><span>Check out the code below, and I&#8217;ll continue to discuss it afterwards.</span></p>
<pre class="brush: javafx; title: ; notranslate">
import model.Tweet;

import java.lang.ref.SoftReference;
import java.util.HashMap;

import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.util.Math;
import javafx.scene.control.Label;
import javafx.scene.control.ListCell;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Container;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;

// controls whether the cache is used or not. This _really_ shouldn't be false!
def useCache = true;

// map of String -&gt; SoftReference (of Image)
def map = new HashMap();

def IMAGE_SIZE = 48;

public class TwitterListCell extends ListCell {

    // used to represent the users image
    var imageView:ImageView;

    // a slightly bigger and bolder label for the persons name
    var personName:Label = Label {
        font: Font.font(&quot;Arial&quot;, FontWeight.BOLD, 13);
    }

    // the message label
    var message:Label = Label {
        textWrap: true
    }

    override var node = Container {
        content: bind [ imageView, personName, message ]

        override function getPrefHeight(width:Number):Number {
            def w = listView.width;
            Math.max(IMAGE_SIZE, personName.getPrefHeight(w) + message.getPrefHeight(w));
        }

        override function doLayout():Void {
            var x:Number = -1.5;
            var y:Number = 0;
            var listWidth = listView.width;
            var cellHeight = height;

            // position image
            Container.positionNode(imageView, x, y, IMAGE_SIZE, cellHeight,
                HPos.CENTER, VPos.TOP, false);

            // position text at the same indent position regardless of whether
            // an image exists or not
            x += IMAGE_SIZE + 5;
            var textWidth = listWidth - x;
            var personNameHeight = personName.getPrefHeight(textWidth);
            Container.resizeNode(personName, textWidth, personNameHeight);
            Container.positionNode(personName, x, y, listWidth - x, personNameHeight,
                HPos.LEFT, VPos.TOP, false);

            y += personNameHeight;
            Container.resizeNode(message, textWidth, message.getPrefHeight(textWidth));
            Container.positionNode(message, x, y, listWidth - x, height - personNameHeight,
                HPos.LEFT, VPos.TOP, false);
        }
    }

    override var onUpdate = function():Void {
        var tweet = item as Tweet;

        personName.text = tweet.person.name;
        message.text = tweet.message;

        // image handling
        if (map.containsKey(tweet.person.image)) {
            // the image has possibly been cached, so lets try to get it
            var softRef = map.get(tweet.person.image) as SoftReference;

            // get the image out of the SoftReference wrapper
            var image = softRef.get() as Image;

            // check if it is null - which would be the case if the image had
            // been removed by the garbage collector
            if (image == null) {
                // we need to reload the image
                loadImage(tweet.person.image);
            } else {
                // the image is available, so we can reuse it without the
                // burden of having to download and reload it into memory.
                imageView = ImageView {
                    image: image;
                }
            }
        } else {
            // the image is not cached, so lets load it
            loadImage(tweet.person.image);
        }
    };

    function loadImage(url:String) {
        // create the image and imageview
        var image = Image {
            url: url
            height: IMAGE_SIZE
            preserveRatio: true
            backgroundLoading: true
        }
        imageView = ImageView {
            image: image;
        }

        if (useCache) {
            // put into cache using a SoftReference
            var softRef = new SoftReference(image);
            map.put(url, softRef);
        } else {
            map.remove(url);
        }
    }
}
</pre>
<p><span>You&#8217;ll note that in this example most of the code is pretty standard. A few variables are created for the image and text, and then I&#8217;ve gone the route of laying the content out in a Container, but you can achieve a similar layout using the available layout containers. Following this I have defined an onUpdate function, which is called whenever the cell should be updated. This is usually called due to a user interaction, which may potentially change the Cell.item value, which would of course require an update of the cell&#8217;s visuals.</span></p>
<p><span>The bulk, and most important part, of the onUpdate function deals with loading the users profile image, or retrieving and reusing the cached version of it. Note the use of the global HashMap, which maps between the URL of the users image and the Image itself. Because it is global (i.e. static), this map will be available, and used, by all TwitterListCell instances. Also important to note is that I didn&#8217;t put the ImageView itself into the HashMap as a Node can not be placed in multiple positions in the scenegraph, but an Image can be.</span></p>
<p><span>The rest of the code in this class really just deals with the fact that a SoftReference may clear out it&#8217;s reference to the Image object if the garbage collector needs the memory, in which case we need to reload the image again. The other obvious part is the need to also put the image into the cache if it&#8217;s not already there.</span></p>
<p><span>Shown below is the end result, but remember that there is a working version of this demo in William Antônio&#8217;s <a href="http://bit.ly/cXsqUR">Twitter client</a>, which is a very early work in progress.</span></p>
<p><img src="http://fxexperience.com/wp-content/uploads/2010/06/twitter-listcell1.PNG" alt="twitter-listcell" title="twitter-listcell" width="187" height="366" class="aligncenter size-full wp-image-893" /></p>
<p><span>I hope this might be useful to people, and as always we&#8217;re keen to hear your thoughts and feedback, and what you&#8217;re hoping us to cover. Until next time &#8211; cheers! <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2010/06/custom-cell-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text Effects</title>
		<link>http://fxexperience.com/2009/11/text-effects/</link>
		<comments>http://fxexperience.com/2009/11/text-effects/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:22:51 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=258</guid>
		<description><![CDATA[I came across the cool blog by Rakesh Menon the other day &#8220;JavaFX &#8211; Text Effects&#8221;. It got me thinking how many other cool text effects could we do in JavaFX. Quick research for ideas came up with &#8220;50 Stunning Photoshop Text Effect Tutorials&#8221; blog post on Smashing Magazine. So I picked a couple fun [...]]]></description>
			<content:encoded><![CDATA[<p>I came across the cool blog by Rakesh Menon the other day <a title="Text Effects Blog" href="http://blogs.sun.com/rakeshmenonp/entry/javafx_text_effects" target="_blank">&#8220;JavaFX &#8211; Text Effects&#8221;</a>. It got me thinking how many other cool text effects could we do in JavaFX. Quick research for ideas came up with <a href="http://www.smashingmagazine.com/2009/03/04/50-stunning-photoshop-text-effect-tutorials/">&#8220;50 Stunning Photoshop Text Effect Tutorials&#8221;</a> blog post on Smashing Magazine. So I picked a couple fun ones and had a go <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>Neon Text</h2>
<p style="text-align: center;"><a title="Run Neon Sign Demo" href="http://fxexperience.com/webstart/texteffects/neon/Text_Effects.jnlp"><img class="aligncenter size-full wp-image-259" title="Neon Sign Screenshot" src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-14.png" alt="Neon Sign Screenshot" width="680" height="402" />Click To Run</a></p>
<p><span id="more-258"></span><br />
The first example the came to my attention as I could see how I could have used it in our recent game, was <a href="http://www.spoono.com/photoshop/tutorials/tutorial.php?id=20">Neon Text @ spoono.com</a>. This is achieved in JavaFX by applying multiple innershadow and dropshadow effects to the text. Here is the complete code for the test application above.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.image.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Neon Sign&quot;
    resizable: false
    scene: Scene {
        width: width, height: height
        content: [
            ImageView { image: Image{ url: &quot;{__DIR__}bricks.jpg&quot;} }
            Rectangle {
                width: width, height: height
                fill: RadialGradient {
                    centerX: 0.5, centerY: 0.5
                    radius: 0.7, proportional: true
                    stops: [
                        Stop{offset: 0.4, color: Color.rgb(0,0,0,0.1)}
                        Stop{offset: 1, color: Color.rgb(0,0,0,0.8)}
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.MULTIPLY
                    bottomInput: DropShadow {
                        color: Color.rgb(254,235,66,0.3)
                        offsetX: 5, offsetY: 5
                        radius: 5
                        spread: 0.2
                    }
                    topInput: Blend{
                        mode: BlendMode.MULTIPLY
                        bottomInput: DropShadow {
                            color: Color.web(&quot;#f13a00&quot;)
                            radius: 20
                            spread: 0.2
                        }
                        topInput: Blend{
                            mode: BlendMode.MULTIPLY
                            bottomInput: InnerShadow {
                                color: Color.web(&quot;#feeb42&quot;)
                                radius: 9
                                choke: 0.8
                            }
                            topInput: InnerShadow {
                                color: Color.web(&quot;#f13a00&quot;)
                                radius: 5
                                choke: 0.4
                            }
                        }
                    }
                }
                fill: Color.WHITE
                font : Font { name: &quot;Harlow&quot; size : 110 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;Neon Sign&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Snow &#038; Ice</h2>
<p style="text-align: center;"><a title="Run Snow n Ice Demo" href="http://fxexperience.com/webstart/texteffects/snow/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-11.png" alt="Snow &amp; Ice" title="Snow &amp; Ice" width="680" height="502" class="aligncenter size-full wp-image-263" />Click To Run</a></p>
<p>This one was based on the Tutsplus.com article <a href="http://psd.tutsplus.com/text-effects-tutorials/icey-styles-in-photoshop/">Icey Styles in Photoshop</a> but as we do not have the Bevel and Emboss effect that photoshop has yet I had do my best to simulate it with inner and drop shadows.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 400;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Snow &amp; Ice&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: RadialGradient {
                    centerX: 0.5, centerY: 0.5
                    radius: 0.7, proportional: true
                    stops: [
                        Stop{offset: 0.4, color: Color.web(&quot;#34365e&quot;)}
                        Stop{offset: 1, color: Color.web(&quot;#0d0f3a&quot;)}
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.SRC_OVER
                    bottomInput: DropShadow {
                        color: Color.rgb(0,0,0,0.1)
                        offsetX: 8, offsetY: 8
                        radius: 2
                    }
                    topInput: Blend{
                        mode: BlendMode.SRC_OVER
                        bottomInput: DropShadow {
                            color: Color.web(&quot;#21233f&quot;)
                            radius: 4
                            spread: 0.9
                        }
                        topInput: Blend{
                            mode: BlendMode.DARKEN
                            bottomInput: InnerShadow {
                                color: Color.web(&quot;#cee3f4&quot;)
                                radius: 5
                                choke: 0.7
                                offsetX: -4, offsetY: -4
                            }
                            topInput: Blend{
                                mode: BlendMode.MULTIPLY
                                bottomInput: InnerShadow {
                                    color: Color.web(&quot;#6c7fee&quot;)
                                    radius: 7
                                    choke: 0.2
                                    offsetX: 2, offsetY: 2
                                }
                                topInput: InnerShadow {
                                    color: Color.web(&quot;#a5ebff&quot;)
                                    radius: 4
                                    offsetX: -2, offsetY: -2
                                }
                            }
                        }
                    }
                }
                fill: Color.web(&quot;#f7fafb&quot;)//web(&quot;#e5f5fb&quot;)
                strokeWidth: 3
                font : Font {
                    name: &quot;Kabel&quot;
                    size : 120
                }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) - 20
                content: bind if (textBox.rawText == &quot;&quot;) then &quot;Snow \n&amp; Ice&quot; else textBox.rawText
            }
            textBox = TextBox {
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Recessed</h2>
<p style="text-align: center;"><a title="Run Recessed Demo" href="http://fxexperience.com/webstart/texteffects/recessed/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-12.png" alt="Recessed" title="Recessed" width="680" height="402" class="aligncenter size-full wp-image-265" />Click To Run</a></p>
<p>After playing with a couple from tutorials I thought I would have a go at one my self. This is a version of the classic web recessed text effect. The designer <a href="http://www.alexbuga.com/">Alex Buga</a> used this technique to great effect on his website. Unfortunately its down for redesign at the moment but for those who missed it here is a snap shot.</p>
<p><a href="http://fxexperience.com/wp-content/uploads/2009/11/Picture-15.png"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-15-300x230.png" alt="Alex Buga.com" title="Alex Buga.com" width="300" height="230" class="aligncenter size-medium wp-image-267" /></a></p>
<p>Here is the code for this sample. Its much simpler than the first two as it only uses two effects and a gradient fill on the text. It could be applied to any color just by changing the text fill gradient to be darker version of the background it is sitting on.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Recessed&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.rgb(202,202,202) }
                        Stop { offset: 1, color: Color.rgb(97,97,97) }
                    ]
                }
            }
            text = Text {
                effect: Blend{
                    mode: BlendMode.MULTIPLY
                    bottomInput: DropShadow {
                        color: Color.rgb(255,255,255,0.5)
                        offsetX: 1, offsetY: 1
                        radius: 0
                    }
                    topInput: InnerShadow {
                        color: Color.rgb(0,0,0,0.7)
                        offsetX: 2, offsetY: 2
                        radius: 5
                    }
                }
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.rgb(190,190,190) }
                        Stop { offset: 1, color: Color.rgb(170,170,170) }
                    ]
                }
                font : Font { name: &quot;Arial Black&quot;, size : 90 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;Recessed&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<h2>Stand Out</h2>
<p style="text-align: center;"><a title="Run Stand Out Demo" href="http://fxexperience.com/webstart/texteffects/standout/Text_Effects.jnlp"><img src="http://fxexperience.com/wp-content/uploads/2009/11/Picture-13.png" alt="Stand Out" title="Stand Out" width="680" height="402" class="aligncenter size-full wp-image-269" />Click To Run</a></p>
<p>One last little example for you, this one is going for a chrome look. This only uses a single simple reflection effect most of it is done with a gradient fill and gradient stroke.</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
import javafx.scene.control.*;

var width = 600;
var height = 300;
var text:Text;
var textBox:TextBox;
Stage {
    title: &quot;Text Effects: Stand Out&quot;
    resizable: false
    scene: Scene {
        width: width
        height: height
        content: [
            Rectangle {
                width: width, height: height
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0, color: Color.web(&quot;#6c6a6a&quot;) }
                        Stop { offset: 1, color: Color.web(&quot;#3e3d3d&quot;) }
                    ]
                }
            }
            text = Text {
                effect: Reflection {
                        topOffset: -4
                }
                fill: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0.03, color: Color.web(&quot;#cccccc&quot;) }
                        Stop { offset: 0.499, color: Color.web(&quot;#fdfdfd&quot;) }
                        Stop { offset: 0.5, color: Color.web(&quot;#999999&quot;) }
                        Stop { offset: 0.99, color: Color.web(&quot;#dddddd&quot;) }
                    ]
                }
                stroke: LinearGradient {
                    startX: 0, endX: 0, startY: 0, endY: 1
                    stops: [
                        Stop { offset: 0.03, color: Color.web(&quot;#e9e5e5&quot;) }
                        Stop { offset: 0.06, color: Color.web(&quot;#909090&quot;) }
                        Stop { offset: 0.23, color: Color.web(&quot;#d1d1d1&quot;) }
                        Stop { offset: 0.34, color: Color.web(&quot;#9f9f9f&quot;) }
                        Stop { offset: 0.60, color: Color.web(&quot;#7b7b7b&quot;) }
                        Stop { offset: 0.67, color: Color.web(&quot;#aeaeae&quot;) }
                        Stop { offset: 0.76, color: Color.web(&quot;#7b7b7b&quot;) }
                        Stop { offset: 0.94, color: Color.web(&quot;#676766&quot;) }
                        Stop { offset: 0.99, color: Color.web(&quot;#e5e5e4&quot;) }
                    ]
                }
                font : Font { name: &quot;Arial Black&quot;, size : 80 }
                layoutX: bind (width - text.layoutBounds.width)/2
                layoutY: bind (height/2) + 20
                content: bind textBox.rawText
            }
            textBox = TextBox {
                text:&quot;STAND OUT&quot;
                layoutX: 100
                layoutY: height - 40
                width: width-200
            }
        ]
    }
}
</pre>
<p>I hope you have enjoyed these <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Have a go see what you can create your self it would be great to be able to put together a &#8220;50 Stunning JavaFX Text Effect Tutorials&#8221; blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/11/text-effects/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Win $2000 in RIA Exemplar Challenge</title>
		<link>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/</link>
		<comments>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 12:01:15 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Controls]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=176</guid>
		<description><![CDATA[Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application) See the official announcement for more details on the rules etc. Announcing the JavaFXpert RIA Exemplar Challenge Announcing the JavaFXpert RIA Exemplar Challenge I will be judging the entries for their visual design with the help of [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application)</strong></p></blockquote>
<p>See the official announcement for more details on the rules etc. <a title="Announcing the JavaFXpert RIA Exemplar Challenge" href="http://learnjavafx.typepad.com/weblog/2009/10/announcing-the-javafxpert-ria-exemplar-challenge.html" target="_blank">Announcing the JavaFXpert RIA Exemplar Challenge</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Announcing the JavaFXpert RIA Exemplar Challenge</div>
<p>I will be judging the entries for their visual design with the help of fellow graphics judge <a href="http://www.curious-creature.org/">Romain Guy</a>. To help all the designers entering here are a couple of the original designs for the Caspian theme along with links to the photoshop files they were created with. This way you can see the how all the all the controls visuals are contracted using vector shapes and layer effects.</p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls.psd.zip"><img class="aligncenter" title="Download Controls Photoshop PSD" src="http://fxexperience.com/caspian/Controls.png" alt="" width="500" height="211" /></a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls.psd.zip">Download Controls.PSD.ZIP</a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls-Mockup.psd.zip"><img class="aligncenter" title="Download Controls Mockup Photoshop PSD" src="http://fxexperience.com/caspian/Controls-Mockup.png" alt="" width="643" height="641" /></a></p>
<p style="text-align: center;"><a href="http://fxexperience.com/caspian/Controls-Mockup.psd.zip">Download Controls Mockup.PSD.ZIP</a></p>
<p style="text-align: left;">I also thought maybe some links to sites with good articles on design might be helpful. Most of these are associated with Web Design rather than Application User Interface Design but there is a large amount of cross over and I have not found any good sites on Application User Interface myself.</p>
<ul>
<li><a href="http://www.smashingmagazine.com/" target="_blank">Smashing Magazine</a></li>
<li><a href="http://abduzeedo.com" target="_blank">Abduzeedo</a></li>
<li><a href="http://www.outlawdesignblog.com/">Outlaw Design Blog</a></li>
<li><a href="http://www.hongkiat.com/blog/">Hongkiat</a></li>
<li><a href="http://www.noupe.com/">Noupe</a></li>
</ul>
<p>Here are a few links for inspiration:</p>
<ul>
<li><a href="http://www.madebysofa.com/#work">Sofa</a></li>
<li><a href="http://280slides.com/">280 Slides</a></li>
<li><a href="http://280atlas.com/what.php">280 Atlas</a></li>
<li><a href="http://www.atebits.com/tweetie-mac/">atebits</a></li>
<li><a href="http://metalabdesign.com/">metalabdesign</a></li>
<li><a href="http://transmissionapps.com/">transmissionapps</a></li>
<li><a href="http://www.icondesigner.net/">Icon Designer</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/10/win-2000-in-ria-exemplar-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free icons for your JavaFX applications</title>
		<link>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/</link>
		<comments>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 20:16:11 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=122</guid>
		<description><![CDATA[Icons are a important part of any application so here is a few nice free collections I have come across that you might find helpful. You can add add a icon to a button like this: assuming the icon &#8220;icon.png&#8221; is in the same directory(package) as your source file. Developpers Icons by Sekkyumu Basic set [...]]]></description>
			<content:encoded><![CDATA[<p>Icons are a important part of any application so here is a few nice free collections I have come across that you might find helpful. You can add add a icon to a button like this:</p>
<pre class="brush: css; title: ; notranslate">
Button {
    graphic: ImageView{ image: Image{ url:&quot;{__DIR__}icon.png&quot;}}
}
</pre>
<p>assuming the icon &#8220;icon.png&#8221; is in the same directory(package) as your source file.</p>
<h3>Developpers Icons by Sekkyumu</h3>
<p><a href="http://Sekkyumu.deviantart.com/art/Developpers-Icons-63052312"><img class="alignnone" title="Developpers Icons by Sekkyumu" src="http://fc03.deviantart.com/fs27/i/2008/035/5/d/Developpers_Icons_by_Sekkyumu.png" alt="" width="600" height="288" /></a></p>
<h3><span id="more-122"></span>Basic set by prokofusha</h3>
<p><a href="http://prokofusha.deviantart.com/art/Basic-set-125164098"><img class="alignnone" title="Basic set by prokofusha" src="http://fc08.deviantart.com/fs42/i/2009/158/7/f/Basic_set_by_prokofusha.png" alt="" width="446" height="807" /></a></p>
<h3>Free Vector Icon Set by monofactor</h3>
<p><a href="http://www.monofactor.com/free-vector-icon-set-1-25-icons/"><img class="alignnone" title="Free Vector Icons" src="http://www.monofactor.com/files/mf_icons1.jpg" alt="" width="525" height="162" /></a></p>
<p>Lots more nice icons in this Smashing Magazine article <a href="http://www.smashingmagazine.com/2008/05/21/40-professional-icon-sets-for-free-download/">40 Professional Icon Sets For Free Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/07/free-icons-for-your-javafx-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

