★ wanayoo — archive 1999 http://blogs.oracle.com/thejavatutorials/tags/documentationNouvelle recherche | Portail wanayoo

Sunday Sep 18, 2011

Changes in Builds 44 and 45 that Affect the JavaFX Docs

Code changes to be aware of when using the JavaFX 2.0 Beta documentation with JavaFX 2.0 Beta SDK (builds 44 and 45).[Read More]

Friday Sep 02, 2011

Changes in Build 42 that Affect the JavaFX Docs

Code changes to be aware of when using the JavaFX 2.0 Beta documentation with JavaFX 2.0 Beta SDK (build 42).[Read More]

Friday Aug 19, 2011

What's New in the JavaFX 2.0 Beta Docs

 

New JavaFX 2.0 Beta docs have been added and some of the existing docs have been updated to coincide with the release of the JavaFX 2.0 Beta SDK (build 40).

New Docs

Getting Started with FXML Introduction to FXML, an XML-based declarative markup language for defining user interfaces in JavaFX applications. The Getting Started guide takes you step-by-step through the construction of a user interface for a login application.
Using JavaFX Charts Multiple-page tutorial that introduces basic features of graphical charts available in the JavaFX SDK. Learn how to build typical charts in their applications; define a series of data; adjust main chart elements such as axes, plot, legend, and title; handle animated data; process mouse events on charts; and change the visual appearance of chart elements.
Using Text and Text Effects in JavaFX Learn how to add text to your applications and how to provide text with some fancy effects.

Updated Docs

What Is JavaFX? Added information about FXML. Updated information for the samples, which are now downloaded separately from the SDK.
Getting Started with JavaFX Updated sample code for a change to the Blend API.
JavaFX Architecture and Framework Added a section about deployment.
Using JavaFX Properties and Binding Updated code examples and discussions to use the latest APIs.
Working with the JavaFX Scene Graph Introduced two new examples that animate the scene using transitions and builders.
Creating Transitions and Timeline Animation in JavaFX Created additional code with custom interpolators for the sample application. Added information on interpolators.
Skinning JavaFX Applications with CSS Updated examples and text to reflect the renaming of the .scene style class to .root. Includes a sample application.
Deploying JavaFX Applications Added instructions for using the JavaFX Packager tool at the command line and in Ant tasks. Includes command line syntax and examples.
Installing JavaFX Added instructions for using the new JavaFX SDK installer and for downloading and running the JavaFX samples, which are now separate from the SDK.
API Documentation Updated to reflect JavaFX 2.0 Beta SDK (build 40).
JavaFX CSS Reference Guide Updated to JavaFX 2.0.

See http://download.oracle.com/javafx/ for a list of all of the JavaFX 2.0 documentation.

Friday Aug 05, 2011

JavaFX 2.0 Beta Packager Tool Now Available

The latest JavaFX 2.0 Beta Build 38 release contains an interim version of the JavaFX Packager tool, an executable file in the \bin directory of the JavaFX SDK. This blog gives you some preliminary information about this tool. For other information about JavaFX deployment, see Deploying JavaFX Applications.

The tool can be invoked in either of two ways:

  • From the command line
    Set the Windows PATH environment variable to the \bin directory of your JavaFX SDK installation, then at the command line enter javafxpackagers with no options, which displays the help.

  • Using Ant tasks
    You can use the options from the javafxpackager command in your Ant tasks. See the example in Using the JavaFX Packager Tool with Ant Tasks.

The JavaFX Packager tool performs any of the following tasks from the command line or in Ant scripts:

Table 1 Types of Commands in javafxpackager Command and Ant Tasks

Task and Description Description javafxpackager Command
Parameter
Ant Task/Class

Make All

  • Compiles source files
  • Runs the Create JAR task.
  • Runs the Deploy task

-makeall

(Not Available)

Create a JAR Archive


  • Creates a JAR archive from compiled source files
  • Creates binary files from any CSS files

-createjar

FXJar task, FXJar class

Deploy (Generate Files for Web Deployment)


  • Generates JNLP and HTML files for web deployment

-deploy

DeployFXTask class

Convert CSS Files to Binary Format


  • Only converts CSS files to binary format

-createBSS

CSSToBinTask class

Sign JAR Files


  • Digitally signs JAR files with a certificate

(Not available in this release)

FXSignJarTask class


JavaFX Packager Commands

The following sections contain a description of the commands listed in Table 1.

Make All

The command-line version of the JavaFX Packager tool has a -makeall command, which is a convenience command to produce deployment files with minimal configuration. The -makeall command performs the following tasks:

  • Compiles the source files

  • Runs the -createjar command, which includes converting the CSS files to their binary form.

  • Runs the -deploy command, which generates the JNLP and HTML files.

  • Converts the CSS files to their binary form.

The -makeall command presumes all the application sources are located in the src directory and places the result files in the dist directory. You can set a limited number of other options, described in the command line help.

Prior to calling the packaging (Create Jar) and deployment tasks, the -makeall command compiles the source files as well. For compilation, it searches for a JDK installation in directories specified by the JAVA_HOME or java.home system variables and for a JavaFX SDK installation in directories specified by the JAVAFX_HOME or javafx.home system variables.

Create a JAR Archive

The Create JAR command in the JavaFX Packager tool packages files into an executable JAR file that contains the application. Other options you can set are described in the command line help.

By default, the Create JAR command also includes the JavaFX Launcher in the JAR archive. The JavaFX Launcher is responsible for locating the installed JavaFX Runtime and invoking the main application class using this Runtime. Use the -noembedlauncher option to keep the launcher from being embedded.

Deploy (Generate Files for Web Deployment)

The Deploy command generates HTML and JNLP files for web deployment scenarios. You can set the options described in the command line help. For more information about web deployment files, see Deploying JavaFX Application Files in the Deploying JavaFX Applications.

Convert CSS Files to Binary Format

Converting CSS files to binary form is by default included in the -createjar command functionality, but the -createbss command can be invoked independently if you only want to convert CSS files to binary form. You can specify the input and output files as options. See the command line help for the list of options.

Sign JAR Files

This command, currently available only through an Ant task, signs a JAR file with a certificate you provide. There are options to specify the keystore file, key alias in the keystore, keystore password, key password, and type of keystore. See the <fxsignjar> element in the example Ant script below.

About Source Files

The type of source files required for each command is shown in the following table.

Table 2 Source File Types According to Command or Task Type

Command Type Source File Types

Make All (command line only)

JavaFX code files and other application resources

Create Jar

Classes and other application resources

Deploy

JAR files and resources

Create BSS

CSS files

For Ant tasks, the source files for all commands are specified by the standard Ant fileset element, and for the command line interface the source files are specified by a combination of the -srcdir and -srcfiles parameters.

The -srcfiles option works in a similar manner as the Ant include option of the fileset element, in that if it is not present, all files in the preceding -srcdir are included, and if it is present, only files listed are included. For example, the following option includes both the temp\out.jar file and the content of the temp\dir2 and tmp directories:

-srcdir temp -srcfiles out.jar;dir2 -srcdir tmp

The command line version does not support advanced features of Ant, such as the **/*.html notation.

Using the JavaFX Packager Tool with Ant Tasks

Ant tasks can be configured in the same way as the javafxpackager command line options. The following example shows how the tasks and command line options are used in elements and attributes. Stay tuned for more documentation, coming soon.

Example 3-1 Ant Task Example Using JavaFX Packager Tool Options

<project name="HelloWorld" default="do-deploy" basedir=".">
    <target name="app-config">
        <property name="applet.width" value="600"/>

        <property name="applet.height" value="450"/>
    </target>
 
    <target name="init-fx-tasks">
        <property name="javafx.tools.ant.jar"
                  value="/javafx/jfx-deploy/artifacts/sdk/tools/ant-javafx.jar"/>
        <taskdef name="fxdeploy"
                 classname="com.sun.javafx.tools.ant.DeployFXTask"
                 classpath="${javafx.tools.ant.jar}"/>
        <taskdef name="fxjar"
                 classname="com.sun.javafx.tools.ant.FXJar"
                 classpath="${javafx.tools.ant.jar}"/>

        <taskdef name="fxsignjar"
                 classname="com.sun.javafx.tools.ant.FXSignJarTask"
                 classpath="${javafx.tools.ant.jar}"/>
    </target>
 
    <target name="do-deploy" depends="app-config, init-fx-tasks">
        <delete file="jar/HelloWorld.jar"/>
        <fxjar destfile="jar/HelloWorld.jar"
               applicationClass="helloworld.HelloRectangle" >
            <fileset dir="classes"/>

            <manifest>
              <attribute name="Implementation-Vendor" value="FX Team"/>
              <attribute name="Implementation-Title" value="HelloWorld"/>
              <attribute name="Implementation-Version" value="1.0"/>
            </manifest>
        </fxjar>

 
        <fxdeploy width="${applet.width}" height="${applet.height}"
                  outdir="deploy" embedJNLP="true"
                  outfile="HelloWorld"
            <info title="HelloWorld"
                  vendor="FX Team"/>
            <application name="HelloWorld"
                         appclass="helloworld.HelloRectangle"/>
            <resources type="eager">
               <fileset dir="jar">
                  <include name="HelloWorld.jar"/>

               </fileset>
            </resources>
        </fxdeploy>
        <genkey alias="TestAlias" storepass="xyz123" 
            keystore="sign/test.keystore"
            dname="CN=Deploy, OU=JavaFX Dev, O=Oracle, C=US"/>
        <fxsignjar keystore="sign/test.keystore" alias="TestAlias" 
            storepass="xyz123" destDir="sign">
           <fileset file="jar/HelloWorld.jar"/>
        </fxsignjar>

    </target>
</project>

Tuesday Jul 26, 2011

Top 5 Docs to Introduce You to JavaFX

JavaFX 2.0 Beta is out, and if you want to know what JavaFX is all about, start with these docs:

1

What is JavaFX?

Maybe you've worked with previous versions of JavaFX or maybe you are new to JavaFX. Either way, this doc explains the features of JavaFX 2.0 Beta and what type of applications you can build with it.

2

Getting Started With JavaFX

Once you've gotten a feel for JavaFX, you're ready to try building an application. This guide steps you through the basics of a JavaFX application, then shows how to enhance the application with visual effects and bring it to life with animation.

3

JavaFX Architecture and Framework

Now for a little deep diving. This guide explains the JavaFX 2.0 APIs and the programming model.

4

UI Controls and Layout

Many applications need controls. Here you'll learn about the button, text box, scroll bar, and the rest of the controls, and also how to ensure they are properly positioned, aligned, and resized. You'll see samples of how to use each control.

5

But wait, there's more

We have documentation about the JavaFX scene graph, embedded browser, media, interoperability with Swing, and more. You'll find it all at download.oracle.com/javafx.

About

user12610255

Search

Categories
Archives
« October 2011
SunMonTueWedThuFriSat
      
1
2
4
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
31
     
Today