FX Experience Has Gone Read-Only
I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!
tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.
by Jonathan Giles | Feb 12, 2012 | Links
Welcome to another weeks worth of interesting JavaFX links. I hope you enjoy! 🙂
- Another week brings another developer preview release of JavaFX 2.1, this week taking the build number up to b12.
- Brian Burkhalter, a member of the JavaFX media team, has blogged about the upcoming MPEG-4 multimedia support in JavaFX 2.1.
- Michael Heinrichs has put up another useful post, this week detailing when to use a ChangeListener, and when to use an InvalidationListener in JavaFX. This is very useful to know as there can be major performance repercussions if you don’t understand the difference.
- Dustin Marx continues his posts on JavaFX, this week detailing path transitions in the JavaFX 2.x animation APIs.
- It seems playing with TextField is popular now. Following on from Richards blogs mentioned last week, Thomas Bolz has blogged about has blogged about creating both a JavaFX NumberTextField, and a Spinner control. Dierk König has done a simliar thing, except he shows how he did it using GroovyFX.
- In another post by Dierk, he covers the basics about UI construction with JavaFX.
- The slides and code from Weiqi Gao’s talk at the St. Louis Java Users Group is now available online.
Catch you all next week!
by Jonathan Giles | Feb 6, 2012 | Links
Sorry for the delayed post this week, I’ve been a little bogged down in other work recently. But anywho, here we go for another week – enjoy! 🙂
JavaFX
Swing
That’s all for another week. Catch you again in a weeks time.
by Richard Bair | Feb 6, 2012 | FXML
While writing the last blog post on segmented buttons, I found a bug (or rather, a feature missing from ToolBar). I had to use the following FXML:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane id="background" prefWidth="800.0" prefHeight="600.0" xmlns:fx="http://javafx.com/fxml">
<top>
<ToolBar>
<items>
<Region styleClass="spacer" />
<HBox styleClass="segmented-button-bar">
<Button text="Tasks" styleClass="first" />
<Button text="Administrator" />
<Button text="Search" />
<Button text="Line" />
<Button text="Process" styleClass="last" />
</HBox>
</items>
</ToolBar>
</top>
</BorderPane>
You will notice that the ToolBar required the <items> element for adding the, well, items to the ToolBar. This extra level of verbosity was just asking to be smashed. I filed & fixed & Greg reviewed the fix for RT-19476. As of a few minutes ago, this fix has gone into the control’s scrum forest and should be making its way into the next weekly build. So now, you can just say:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane id="background" prefWidth="800.0" prefHeight="600.0" xmlns:fx="http://javafx.com/fxml">
<top>
<ToolBar>
<Region styleClass="spacer" />
<HBox styleClass="segmented-button-bar">
<Button text="Tasks" styleClass="first" />
<Button text="Administrator" />
<Button text="Search" />
<Button text="Line" />
<Button text="Process" styleClass="last" />
</HBox>
</ToolBar>
</top>
</BorderPane>
It’s the little things in life, really 😉
by Richard Bair | Feb 6, 2012 | Controls, CSS, FXML, Layout, Tips n' Tricks, UI Design
One of Jasper’s favorite websites is called Dribbble, which is a place for designers to post whatever work they’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.
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 “segmented” 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 Bady, you can see the segmented button bar in the toolbar area of the application.
(more…)
by Richard Bair | Feb 3, 2012 | Controls, CSS
I started writing an article about how to write new UI controls for OpenJFX using all the internal APIs and architecture and so forth. But then I discovered that the control I was writing as a proof of concept was not using any private API at all, and actually was implementing the Skin differently than I had imagined previously, and I thought I ought to blog about it. Behold, the MoneyField!
(more…)