Posts Tagged ‘Mobile’

Mobile-enabled “JavaFX SDK 1.1″

Sunday, March 8th, 2009

Read My Perv Post: The First & Basic Overview Of JavaFX

Sun Microsystems is 12 February 2009, the development environment for mobile RIA “JavaFX Mobile” released, RIA-enhanced strategies. JavaFX’s Web site, available for download.

JavaFX is a scripting language “JavaFX Script”, runtime environment. Drag the Web GUI and functionality of desktop applications and browser features, such as the ability to drop, to develop interactive Web applications. JavaFX Mobile is a mobile version.

Sun has released the “JavaFX 1.1 SDK”, the emulator “JavaFX Mobile Emulator”, including the latest version of JavaFX, JavaFX Mobile was fully supported. Developers are using it, “Java Platform Micro Edition (Java ME)” for mobile devices that operate in RIA development.

According to Sun, the world’s 26 million mobile phones which support Java, Java is a leading mobile platform. Sun’s Java RIA strategy aims to capitalize on a wide range of technology diffusion.

The Sun, JavaFX Mobile announcement and the UK Sony Ericsson, LG Electronics and Korean cell phone manufacturers and carriers such as JavaFX Moile has also said it is cooperating with the phone.

Sun Microsystems Inc.
http://www.sun.com

“JavaFX 1.1 SDK” download
http://www.javafx.com/

The First & Basic Overview Of JavaFX

Sunday, March 8th, 2009

December 2008, finally has been released JavaFX. Since 2007, it was announced at JavaOne a half years, Therefore, this release of JavaFX 1.0 was based on a series of intensive short-term and explains the JavaFX.

What is JavaFX

JavaFX is Sun Microsystems (Sun following the notation) is a new platform for rich client provides. Java is in the name, Java is platform independent. However, technology is a Java-based.
JavaFX development are done in open source. The java.net project in OpenJFX, OpenJFX-Compiler project & SceneGraph is being vigorously developed in the project. However, at present does not seem to have been the source of all.
JavaFX, 2007 in San Francisco was announced at JavaOne. Initially, RIA (Rich Internet Application) is used for the side, RIA can build not just a different user interface. For example, Java’s Swing GUI’s API is only part of the application that was created using JavaFX build, it is possible.
As described above for the Java JavaFX is built on technology, Java is well and good, Java API diversity can be used seamlessly.

JavaFX area covered by

JavaFX is a desktop PC application that operates not only cover various areas including mobile phones. JavaFX will run on Java VM. The Java VM as well as Java SE, Java ME in the CLDC (Connected Limited Device Configuration) and CDC (Connected Device Configuration) you can run. Therefore, mobile phones and smart phones, set-top box and can run JavaFX. In addition, Blu-ray players are employed by the CDC based on the BD-J, JavaFX will cover the area. CLDC does not adopt the Google Android, but the 2008 JavaOne JavaFX demo was run.
Which covers various areas such JavaFX is, in each region, in a different way of creating applications. The specific language of the script to build the user interface was developed in JavaFX Script. Using JavaFX Script, Java was once boasts the “Write Once, Run Anywhere” are able to achieve again.

JavaFX development history

JavaFX is original, SeeBeyond’s Christopher Oliver was started as a personal project of his. JavaFX is not at that time, Form Follows Function (F3) was named.
The Sun in September 2005, it acquired SeeBeyond, F3 is now Sun’s technology assets. Later, Oliver says, established in 2006 to 11 blogs, then F3 is released. Then F3 is the Java SE and Java 2D and Swing to depend on and could not work only on your desktop. However, in embedded applications in a mobile phone F3 to make this work is important. So the strategy was adopted, JavaSE was acquired companies. This is just before JavaOne 2007, and 2007 will be the month.
Usually, the phone will work CLDC, JavaSE phone company for the CDC had been developed. The CDC JSR 209 Advanced Graphics and User Interface Optional Package for the J2ME Platform with Swing and Java 2D can run. Therefore, CDC and JSR 209 for embedded applications based on JavaFX was established.
And, JavaOne 2007 in F3 is JavaFX is renamed and a major announcement was that.
JavaOne 2007 in F3 and was originally organized the session, but that did not receive much attention.
Immediately after the announcement at JavaOne, OpenJFX project is started in the JavaFX SDK was released.
Were published during this operation was in JavaFX interpreter. In other words, the interpretation of the script at startup, Java transformation classes, was the flow of work to compile from. This is a drawback that would start a long time there.
Therefore, prior to the compilation was done at every boot, the system was adopted by the compiler. To develop a compiler OpenJFX-Compiler project was launched in 2007, also GUI components SceneGraph is being developed in the project. The JavaFX Desktop for desktop of the year’s preview of the SDK was released in July. Of course, is to work on a compiler.
And December 4, JavaFX Desktop 1.0, including the JavaFX SDK 1.0 has been released. In addition, JavaFX SDK for applications built with JavaFX Mobile is also included in the beta.
The 2007 version of the compiler and interpreter version was published in the grammar and API has been changed, and many other areas. Also, Preview SDK and some API in the official version so you must be careful to change. For these changes is summarized in the Appendix at the end of this series, please do help.

NetBeans Installation

JavaFX is the Web site of the following three tools can be downloaded as a single package.

  • NetBeans IDE 6.5 for JavaFX 1.1 (NetBeans JavaFX to be incorporated into a plug-in development)
  • JavaFX 1.1 Production Suite (Plugin for Adobe Illustrator and Photoshop )
  • JavaFX 1.1 SDK (command line tools)

JavaFX
JavaFX download page

Here, NetBeans IDE 6.5 for JavaFX 1.0 using JavaFX about how to develop applications. NetBeans IDE 6.5 for JavaFX is JavaFX in the NetBeans Web site or the Web allows people to download the installer from the site. The already installed NetBeans can be installed via the Update Center.

Introduction to JavaFX Script

Actually using JavaFX NetBeans So let’s look at the steps of application development. First Project Creation Wizard “JavaFX Script Application”, choose to create a project.

Project Creation Wizard
Project Creation Wizard

Project was created
Project was created

Project was to create a simple JavaFX Script is Main.fx are included. It is particularly difficult at first just to see what you think.

package thecoders_javafxapp3;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
 
Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: Text {
font : Font {
size : 16
}
x: 10, y: 30
content: "Application content"
}
}
}

JavaFX Script is a window corresponding to the stage (Stage) have a concept. Also, in a single stage multiple scenes (Scene) can be defined. Around this concept is similar to Flex. In addition, the Java syntax is very different, it can be defined using a notation declared in the user interface.
To debug JavaFX applications will run the project, right-click “Run Project” or selected, click the button on the toolbar. NetBeans project has a main idea, you can only run from the toolbar is set to project the main project. If you want to change the main project from the project right-click menu “Set as Main Project” is set to project the main project if you choose.

JavaFX should be created immediately after the window appears as follows: When you run the project. Output in Web Click here..

JavaFX

JavaFX project was performed

JavaFX Script Editor Features

NetBeans is the JavaFX Script Editor features such as input completion and error checking script.

javafx_06

JavaFX Script code completion
The palettes that are located on the right side of the editor area drag to paste code snippets to the editor by drop. Snippets that are registered in the palette is a simple thing, JavaFX to know and control will be available in a good clue.

Palette
Palette

JavaFX event handling

As an example, with event handling and let’s create a simple JavaFX application. Creating the application of the following would change the color and the mouse to the area of the rectangle overlap. In Web Click here..

javafx_08

Mouse Over

javafx_09
Creating sample application

Source code is as follows. Rectangle is a rectangle shape to draw, onMouseEntered onMouseExited when overlapped and the shape of mouse, which describes the process to change the background color when off.

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.input.*;
/**
* @author VenuThomas
*/
 
Stage {
title: "Sample Program"
scene: Scene {
width: 350
height: 175
content:[
Rectangle {
x: 50
y: 50
width: 250
height: 55
fill: Color.BLACK
onMouseEntered: function( e: MouseEvent ):Void { var rect: Rectangle = e.node as Rectangle;
rect.fill = Color.BLUE
}
onMouseExited: function( e: MouseEvent ):Void { var rect: Rectangle = e.node as Rectangle ;
rect.fill = Color.BLACK
}
 
}
Text {
font: Font {
size: 20
name: "Monospaced"
}
x: 60,
y: 85
fill: Color.WHITE
content: bind "code.venuthomas.net"
}
]
}

There are many benefits and challenges of new technology

RIA platform and Microsoft’s Silverlight and Adobe’s AIR, which is crammed with powerful competitive platform, JavaFX and whether it is the mainstream is unclear. JavaFX is based on Java platform, but have to learn the new JavaFX Script must have the tools and the development is still far and have the disadvantage in comparison to other competing technologies.
But JavaFX rich in Java can take advantage of existing assets, JavaVM and reliability by running on a Java platform many unique advantages. Also, NetBeans plugin for JavaFX, but there is room for much improvement in terms of function, which is open-source development tools, that can get a free development environment for developers and benefits might be true.
JavaFX is still 1.1 has just been released. I look to the future trends.

Sun Microsystems Inc.
http://www.sun.com

“JavaFX 1.1 SDK” download
http://www.javafx.com/