JavaFX layout considerations

As the team is getting ready to release JavaFX 1.0 Mobile, I was experimenting with layout considerations of deploying of JavaFX applications to mobile devices.

Below are a couple of considerations for developers who will build applications for devices that have typical screen size of 320x240 pixels. The example below (inspired by Josh), draws a centered circle and uses for its radius a % of the width of the device screen size.

The other interesting point that the example illustrates is how to convert a String type into an Number. Java developers will recall using something parseInt to achieve this task (i.e. int foo = Integer.parseInt("7";);). Similarly, in JavaFX you could use this technique as follows:

var myNumber:Number = Integer.parseInt("7");

Serious developers may want to read this blog by Amy Fowler that provides a lot more details on layout management in JavaFX Script.

In general, one has to cautious about calling Java libraries and should stick to the "common" JavaFX APIs. Keep in mind that javafx.ext.swing, javafx.scene.effects packages are out of bounds for mobile developers. Also the mobile emulator (bundled with NetBeans and the SDK) is not yet available for the Mac.

Comments:

[Trackback] Bookmarked your post over at Blog Bookmarker.com!

Posted by cautious on February 11, 2009 at 12:06 PM PST #

Post a Comment:
Comments are closed for this entry.
About

octav

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today