欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  资讯频道

JavaFX1.3发布:增强用户体验

程序员文章站 2022-05-22 22:51:04
...

JavaFX1.3已于昨天发布,这个版本较上个版本在各个方面有了很大的改进。其中包括新增加的9个 UI controls,以及9个预览的 UI controls。并且重写了之前所有的 UI controls以便使用新加入的CSS支持。性能的改进也是这个版本中的一个亮点,很多操作较1.2有了数倍甚至数十倍的性能提升,并且伴随着更少的启动时间以及更少的内存消耗。

下载:http://javafx.com/


JavaFX1.3发布:增强用户体验
 
JavaFX 1.3 Top 10:

1.New Controls

JavaFX1.3发布:增强用户体验
 
import javafx.scene.control.*;
import javafx.scene.layout.VBox;
import javafx.geometry.Insets;

var list = ["apples", "bananas", "oranges", "pears", "cabbage"];

ScrollView {
  width: 250
  height: 250
  managed: false
  node: VBox {
    padding: Insets {top: 10, left: 10, bottom: 10, right: 10}
    spacing: 10
    content: [
      PasswordBox {promptText: "enter password"}
      Separator {}
      ChoiceBox {
        items: list
      }
      ListView {
        vertical: false
        items: list
      }
    ]
  }
}

2.新的布局
3.性能的改进
4.CSS的增强
5.对3D的支持
JavaFX1.3发布:增强用户体验
 
6.电视模拟器
JavaFX1.3发布:增强用户体验
 
7.Conditional

import javafx.runtime.*;

println("Effect enabled: {Platform.isSupported(ConditionalFeature.EFFECT)}");
println("Input Method enabled: {Platform.isSupported(ConditionalFeature.INPUT_METHOD)}");
println("Scene 3D enabled: {Platform.isSupported(ConditionalFeature.SCENE3D)}");
println("Shape Clip enabled: {Platform.isSupported(ConditionalFeature.SHAPE_CLIP)}");

8.自定义Cursor

9.更快的动画
expensiveNode.cache = true;
expensiveNode.cacheHint = CacheHint.QUALITY;
...
// Do an animation
expensiveNode.cacheHint = CacheHint.SPEED;
Timeline {
    keyFrames: [
        KeyFrame {
            time: 2s
            values: [
                expensiveNode.scaleX => 2.0,
                expensiveNode.scaleY => 2.0,
                expensiveNode.rotate => 360,
                expensiveNode.cacheHint => CacheHint.QUALITY
            ]
       }
    ]
}.play();


10.预览的功能

 
点击查看详情:http://steveonjava.com/javafx-1-3-top-10/


更多新特性:
# Performance improvements in the JavaFX Runtime
# New NetBeans IDE 6.9 Beta with improved editing and an updated JavaFX Composer plug-in
# New features and enhanced performance in JavaFX Production Suite
# A native JavaFX font family called Amble
# Support for the development of TV applications, including a new TV emulator
# Availability of the mobile emulator on the Mac platform
# Bind performance: 2-3x faster
# Applet start-up time: 20% faster (with Java SE 6u18+)
# Text Rendering: 5-10x faster (frames per second/FPS)
# Highly complex animations: up to 10x faster (FPS)
# Memory usage: 20-33% reduction (real-world apps, w/ Java SE 6u18+)
# UI Controls: 50% faster, 33%-50% less memory (typical)

 

JavaFX1.3发布:增强用户体验
                                       1.2与1.3对比图

相关标签: performance JavaFX