Search |
||
JavaFX Script Doodles, #2: a tabbed rectanglePosted by joshy on February 18, 2008 at 6:27 PM PST
Before I dive into my second doodle I'd like to mention the following Groodle. Allow me to explain. Andres Almiray saw my first JavaFX Doodle and decided to recreate it using the GraphicsBuilder syntax of Groovy; hence a Groodle! :) His first version is verbose, but later he updated it using the new alias syntax to be more compact. JavaFX is still a more concise syntax (IMHO), but Groovy is getting close and certainly has it's own strengths. I hope in the future Groovy will be another great way to build graphically rich apps on the Java platform. After all, why have one awesome way to build apps when you can have two! Be sure to watch Andres' excellent blog for updates. Now, on to the next doodle. A Tabbed Round RectangleThis is another sample for you to paste into NetBeans. It's a tabbed rectangle that looks like this:
Here's the basic code. I started by subclassing
So that's pretty straight forward. A clean definition with decent defaults. Good defaults are always important, since it lets developers get started right away. Now I could create this by drawing a rotated rectangle for the tab on top of a regular round rectangle, but that wouldn't be very dynamic. Really I want something that grows and shrinks properly. Then I can use it in cool transition effects, (more on that later). So instead of doing some funky shape unions I just made the shape out of curves and line segments. Note the
It's those bind statements above which contain the magic. Each part of the shape is defined in terms of the To use this new shape, just create an instance like this:
That will give you a decent looking shape but how about some animation? A nice transition would be handy. The code below does this by changing the
And here's what this would look like. Notice the
Enjoy. Any ideas for more doodles? »
Comments
Comments are listed in date ascending order (oldest first)
Submitted by aalmiray on Mon, 2008-02-18 23:00.
Thanks for the kind words Joshua, I'll be sure to let you know when Groodle #2 is ready =-)
Do you think you could put a webstart demo or a flash movie? I'll surely love to see your doodles in action.
Submitted by psychostud on Tue, 2008-02-19 05:28.
Can u please show how we can animate java fx components
Submitted by emcmanus on Wed, 2008-02-20 10:28.
This is another sample for you to paste into NetBeans.
It might be that I'm stupid, but I wasted a certain amount of time trying to get this sample to do something. It's not enough to paste it into NetBeans. You also have to click on the tiny preview icon above the editor window where you've pasted the code. The NetBeans experience leaves something to be desired here: the function of this icon isn't available on any menu (that I could find) and the familiar function Run, which is available through menus and a much bigger button, doesn't actually do anything useful.
Submitted by aalmiray on Tue, 2008-02-19 16:04.
Here is the link to Groodle #2 as promised: http://jroller.com/aalmiray/entry/gfx_doodle_2
Keep it up!
Submitted by magrawal on Sat, 2008-02-23 14:21.
I have been looking for a simple way to display RDBMS data in a desktop application. My observation is posted here.
Seems to be too much code and too many objects for a common task. Is it too much to wish for a swing jDBTable component that would work something like this (with all the nice BeansBindings happening in the background):
CachedResultSet rs = ResultSet.executeQuery();
jDBTable j = new jDBTable(rs); the ideal jDBTable would connect to the ResultSet while the frame is being rendered, so that it would be possible for users to select columns to display in a dialog. The JSF people have already accomplished most of this for the web. Terrence, I have tried to use
Submitted by universaldegrees on Sat, 2009-09-05 01:13.
Terrence, I have tried to use the Mysauifu, but i don't find some informations that i need to develop for it. Could you help me? My project uses Bluetooth to emulate the Serial Port. I like Java, then I started to look for a VM for a WinCE or a Palm TouchScreen. I would use CDC, but I cannot. In the Palm, I have problems with the QWERTY keys. The Commands in J2ME use only the keys that have another function on the device, such the key that opens the main menu or the key that opens the Calendar of the device. I'm lost. I don't found any information that help me, and I look for it very very often. I'm a begginer in the J2ME World, then I 'm learning this. I don't found a CDC VM that supports Bluetooth. The setup of the Creme VM didn't run in my device (an HP iPAQ 200, with WinCe 5.0 OS). The MySaifu runs, but i have a problem: I don't find another information about the JSR that it supports. Could you tell me if Mysaifu supports Bluetooth connections? Thanks in advance -- Bruna Rocha, Student of Telematics
Online accredited High School | Online Diploma | Get GED Online
But does JavaFX Mobile 1.2
Submitted by universaldegrees on Sat, 2009-09-05 01:14.
But does JavaFX Mobile 1.2 need JME 3.0? In this case I'd be worried enough that we will have to wait for a long time before seeing a real phone :-( AFAIK there are two phones today that are JavaFX ready: HTC Diamond Touch and the LG that was demoed yesterday at the Sun Mobility General Session. Since the former went on the market about one year ago, and I suppose was JavaFX-powered when JavaFX Mobile was announced in Barcelona the past February, I think still runs JavaFX 1.1. But I hoped that the new LG ran JavaFX 1.2. Probably Sun should make clear a couple of things. I bet that most people rushed to get the JavaFX 1.2 version and started upgrading their application, but if the available real phones are still 1.1 we have to change our plans...
online homeschooling | GED test
nice
Submitted by truballer212 on Tue, 2009-10-06 06:21.
great article. it really was insightful vigrx plus
|
||
|
|