JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

JavaFX 1.3 API | Overview | Java FX

javafx.animation

Provides the set of classes for the time-based animation framework.

Provides the set of classes for the time-based animation framework.

This framework defines a mapping of time to values for the target variable. This variable transitions between the declared values at certain points in time, by using the declared interpolation function to calculate the in-between value.

 
javafx.animation.transition

Provides the set of classes for ease of use transition based animations.

Provides the set of classes for ease of use transition based animations.

It offers a simple framework for incorporating animations onto an internal Timeline. It also provides high level constructs to compose the effects of multiple animations.

 
javafx.async

Provides the set of classes for javafx.async.

Provides the set of classes for javafx.async.

This package provides the ability to run application code on threads other than the JavaFX event dispatch thread. The ability to control the execution and track the progress of the application code is also provided.

 
javafx.data
javafx.data.feed
javafx.data.feed.atom

This package contains all the data structures for parsing a document that conforms to the Atom Syndication Format

This package contains all the data structures for parsing a document that conforms to the Atom Syndication Format

 
javafx.data.feed.rss

This package contains all the data structures for parsing an RSS document.

This package contains all the data structures for parsing an RSS document.

 
javafx.data.pull
javafx.data.xml
javafx.date
javafx.ext.swing

Provides the set of graphical user interface component classes that, to the maximum degree possible, work the same on all platforms.

Provides the set of graphical user interface component classes that, to the maximum degree possible, work the same on all platforms.

This is a second paragraph test.

 
javafx.fxd
javafx.geometry

Provides the set of 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Provides the set of 2D classes for defining and performing operations on objects related to two-dimensional geometry.

 
javafx.io
javafx.io.http

This package contains the classes for communicating via HTTP.

This package contains the classes for communicating via HTTP.

 
javafx.lang

This package provides JavaFX Script Runtime APIs

This package provides JavaFX Script Runtime APIs

Builtins

This class is automatically imported to all JavaFX Scripts

FX

The FX class contains number of static entry points for a couple of different API sets provided by JavaFX Script.
  • Application Model

    JavaFX Script APIs are categorized into following profiles.

    • Common Profile

      This API is common across all platforms

    • Desktop Profile

      This API is available only in the desktop environment (browser & standalone)

    • Mobile Profile

      This API is available only in the mobile environment.

    If an application needs to be portable across all screens, it has to limit itself to common profile APIs. The JavaFX Script Runtime has the ability to run JavaFX Scripts that use the common or desktop API sets in any supported Browser.

  • Argument or Parameter Handling

    JavaFX Scripts can get Arguments or Parameters in 2 different forms

    • Named

      Named Parameters come in the form of a Name, Value pair typically from HTML, JAD or JNLP files. They can also be passed as a commandline argument in the form of "name=value".

      Use the getArgument() api for Named parameters

    • Unnamed

      Unnamed Arguments are always passed on the commandline.

      Use the FX.getArguments() api for Named parameters

    These cannot be combined, if they are it will behave as space seperated arguments.

  • SystemProperty information

 
javafx.reflect

Provides reflective access to JavaFX values and types.

Provides reflective access to JavaFX values and types. This packages defines a Java API (rather than a JavaFX API), so it can be used from both Java and JavaFX code. A future JavaFX API may be layered on top of this.

Context

The objects in this package are directly or indirectly created from a FXContext. In the default case there is a single FXContext instance that uses Java reflection. You get one of these by doing:
 FXLocal.Context ctx = FXLocal.getContext();
 
Alternatively, you can do:
 FXContext ctx = FXContext.getInstance();
 
The latter is more abstract (as it supports proxying for remote VMs) but the more specific FXLocal.Context supports some extra operations that only make sense for same-VM reflection.

Values

The various reflection operations do not directly use Java values. Instead, an javafx.reflect.FXObjectValue is a handle or proxy for an Object. This extra layer of indirection isn't needed in many cases, but it is useful for remote invocation, remote control, or in general access to data in a different VM.

Object creation

To do the equivalent of the JavaFX code:
 var x = ...;
 var z = Foo { a: 10; b: bind x.y };
 
you can do:
 FXContext rcontext = ...;
 FXClassType cls = rcontext.findClass(...);
 FXObjectValue x = ...;
 FXObjectValue z = cls.allocation();
 z.initVar("a", ???);
 z.bindVar("b", ???);
 z.initialize();
 

Sequence operations

Use javafx.reflect.FXSequenceBuilder to create a new sequence.

To get the number of items in a sequence, use ValueRef.getItemCount. To index into a sequence, use ValueRef.getItem.

Design notes and issues

Some design principles, influenced by the "Mirrored reflection" APIs (Bracha and Ungar: Mirrors: Design Principles for Meta-level Facilities of Object-Oritented Programming Languages, OOPSLA 2004), and JDI :
  • No explicit constructors in user code.
  • Keep everything abstract, and allow indirection. For example, we might be working on objects in the current VM, or a remote VM. We might not have objects at all - a subset of the same API might be used for (say) reading from .class files.
  • Hence the core classes are interfaces or abstract.
  • On the other hand, we should avoid useless levels of indirection or "service lookup".

Limitations

  • Error handling isn't very consistent - sometimes we return null, and sometimes we throw an exception.
  • We don't support bound functions properly.

 
javafx.runtime
javafx.scene

Provides the set of base classes for the JavaFX Scene Graph API.

Provides the set of base classes for the JavaFX Scene Graph API.

This package includes the Scene class, which defines the scene to be rendered. It also includes the base Node class, a Group class that contains a sequence of child nodes for rendering, and a CustomNode class for defining Node subclasses that create internal nodes as content.

Nodes are connected in a scene graph, which is a tree-like data structure where each item in the tree has zero or one parent. Each node is either a "leaf" node with no child nodes or a "branch" with zero or more child nodes.

 
javafx.scene.chart
javafx.scene.chart.data
javafx.scene.chart.part
javafx.scene.control

Provides the set of graphical user interface control classes that, to the maximum degree possible, work the same on all platforms.

Provides the set of graphical user interface control classes that, to the maximum degree possible, work the same on all platforms.

 
javafx.scene.effect

Provides the set of classes for attaching graphical filter effects to JavaFX Scene Graph Nodes.

Provides the set of classes for attaching graphical filter effects to JavaFX Scene Graph Nodes.

An effect is a graphical algorithm that produces an image, typically as a modification of a source image. An effect can be associated with a scene graph Node by setting the Node.effect attribute. Some effects change the color properties of the source pixels (such as ColorAdjust), others combine multiple images together (such as Blend), while still others warp or move the pixels of the source image around (such as DisplacementMap or PerspectiveTransform). All effects have at least one input defined and the input can be set to another effect to chain the effects together and combine their results, or it can be left unspecified in which case the effect will operate on a graphical rendering of the node it is attached to.

 
javafx.scene.effect.light

Provides the set of classes for light source implementations needed for the Lighting effect.

Provides the set of classes for light source implementations needed for the Lighting effect.

 
javafx.scene.image

Provides the set of classes for loading and displaying images.

Provides the set of classes for loading and displaying images.

  • The javafx.scene.image.Image class is used to load images (synchronously or asynchronously). Image can be resized as it is loaded and the resizing can be performed with specified filtering quality and with an option of preserving image's original aspect ratio.
  • The javafx.scene.image.ImageView is a Node used for displaying images loaded with Image class. It allows displaying a dynamically scaled and/or cropped view of the source image. The scaling can be performed with specified filtering quality and with an option of preserving image's original aspect ratio.

 
javafx.scene.input

Provides the set of classes for mouse and keyboard input event handling.

Provides the set of classes for mouse and keyboard input event handling.

 
javafx.scene.layout

Provides the set of control classes for a layout framework that holds or organizes the nodes within it.

Provides the set of control classes for a layout framework that holds or organizes the nodes within it.

 
javafx.scene.media

Provides the set of classes for integrating audio and video into JavaFX Applications.

Provides the set of classes for integrating audio and video into JavaFX Applications. Currently, the primarily used for this package is media playback. There are 3 essential classes in the Media Package: Media, MediaPlayer, and MediaView.

This is an example of a simple media player application:

    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.scene.media.MediaView;


    Stage {
        scene: Scene {
            content: MediaView {
                mediaPlayer: MediaPlayer {
                    media: Media{ source:"file:///media/sample.fxm"}
                }
            }
        }
    }

The Stage contains a Scene, which contains a MediaView object. The MediaView object has a MediaPlayer, which is playing the Media object.

 
javafx.scene.paint

Provides the set of classes for colors and gradients used to fill shapes and backgrounds when rendering the scene graph.

Provides the set of classes for colors and gradients used to fill shapes and backgrounds when rendering the scene graph.

 
javafx.scene.shape

Provides the set of 2D classes for defining and performing operations on objects related to two-dimensional geometry.

Provides the set of 2D classes for defining and performing operations on objects related to two-dimensional geometry.

 
javafx.scene.text

Provides the set of classes for fonts and renderable Text Node.

Provides the set of classes for fonts and renderable Text Node.

 
javafx.scene.transform

Provides the set of convenient classes to perform rotating, scaling, shearing, and translation transformations for Affine objects.

Provides the set of convenient classes to perform rotating, scaling, shearing, and translation transformations for Affine objects.

 
javafx.stage

Provides the top-level container classes for JavaFX scripts.

Provides the top-level container classes for JavaFX scripts.

This package encapsulates the JavaFX graphical script surroundings for the Stage - Scene metaphor, with different capabilites available to the Stage depending on the underlying semantics of the runtime container.

The JavaFX TM Stage interface provides interfaces and classes for the environment and presentation of JavaFX script instantiations. The stage presentation specifics for each JavaFX runtime platform will allow a script to be presented on different platforms with consistent functionality across each runtime.

The main areas of functionality of javafx.stage package include

  1. Stage: Stages are the graphical container for JavaFX script instantiations. Stages are the attributed drawing surface for the JavaFX script.

  2. StageExtension: Each Stage may have one or more StageExtension instances set to provide additional functionality for the script. A StageExtension will only be utilized if the script is running within the profile specific to that StageExtension

  3. AppletStageExtension: When a JavaFX script is running within a browser, the AppletStageExtension is enabled to manage the drag transition from a browser to the desktop. Dragging a Stage out of a browser is supported in the Java TM plugin versions 6u10 and later.

  4. StageStyle: The StageStyle specifies the decoration and visibility semantics of the Stage.

 
javafx.util



Spec-Zone.ru - all specs in one place