• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
何が変わった JavaFX 2.0
 

何が変わった JavaFX 2.0

on

  • 3,580 views

Japan JavaFX User Group Seminar on 10 Dec. 2011.

Japan JavaFX User Group Seminar on 10 Dec. 2011.

Statistics

Views

Total Views
3,580
Views on SlideShare
2,749
Embed Views
831

Actions

Likes
2
Downloads
13
Comments
0

5 Embeds 831

http://d.hatena.ne.jp 497
http://skrb.hatenablog.com 196
http://freerss.net 119
http://webcache.googleusercontent.com 10
http://a0.twimg.com 9

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    何が変わった JavaFX 2.0 何が変わった JavaFX 2.0 Presentation Transcript

    • 何が変わった
    • Agenda Position の変化 JavaFX 1.x JavaFX 2.0 How to Write Conclusion
    • Position の変化 JavaFXJava SE Java ME
    • Position の変化JavaFX 1.xJavaFX Script
    • Position の変化JavaFX 2.0 Java
    • JDK/JRE AWT Swing Java 2DJava JAI/ImageIO JOGL SwingX Java 3D JMF SWTNon-Java JavaFX
    • JDK/JRE AWT Swing Java 2DJava JAI/ImageIO JOGL SwingX Java 3D JMF JavaFX 2.0 SWTNon-Java
    • JDK/JRE AWT Swing JavaFX 3.0 Java 2D JavaSE8Java JAI/ImageIO JOGL SwingX Java 3D JMF 2.0 SWTNon-Java
    • Java ME Java SEJavaCard CLDC CDC SE Embedded SE
    • Java ME Java SE CDCJavaCard CLDC SE Embedded SE JavaFX
    • 何が変わった インスタンシエーション Scene Graph追加された機能 削除された機能
    • Stage Scene VBox HBox TableViewStage Scene VBox HBox Label TextBox Button TableView
    • public class Hello extends Application { @OverrideScene Graph の構築 public void start(Stage stage) { // コンテナ Group container = new Group(); // シーングラフのルート要素を生成し、コンテナを貼る Scene scene = new Scene(container, 100, 20); stage.setScene(scene); // ラベルを生成しコンテナに貼る Label label = new Label("Hello, World!"); container.getChildren().add(label); } stage.show(); stage.setVisible(true); SceneGraph public static void main(String[] args) { Application.launch(args); }}
    • Java public void start(Stage stage) { stage.setTitle("Custom Browser"); VBox vbox = new VBox(10); vbox.setLayoutY(10); Scene scene = new Scene(vbox, 800, 600); HBox hbox = new HBox(10); hbox.setAlignment(Pos.CENTER); TextField field = new TextField(); field.setPrefWidth(400); hbox.getChildren().add(field); Button button = new Button("Load"); hbox.getChildren().add(button); vbox.getChildren().add(hbox); WebView view = new WebView(); vbox.getChildren().add(view); stage.setScene(scene); stage.show(); }
    • <VBox xmlns:fx="http://javafx.com/fxml" fx:controller="contents.browser2" spacing="10" layoutY="10"> <children> <HBox spacing="10" style="-fx-alignment: center">Java + FXML <children> <TextField fx:id="field" prefWidth="200" onAction="#handleAction" /> <Button text="Load" onAction="#handleAction" /> </children> </HBox> <WebView fx:id="view" /> </children> </VBox> public class browser2 { @FXML private TextField field; @FXML private WebView view; private WebEngine engine; @FXML private void handleAction(ActionEvent event) { String url = field.getText(); engine.load(url); } }
    • WebView/WebEnginePreloaderProduction SuiteREST/JSON Perser
    • App DesignEffecttceffE
    • WebView/WebEngine
    • WebView/WebEngine
    • Animation 自動補完
    • Animation
    • Animation 自動補完
    • Animation 自動補完
    • EffectNode image = ...; Node image = ...;GaussianBlur blur = new GaussianBlur(); DropShadow shdw= new DropShadow();blur.setRadius(10.0); shdw.setOffsetX(5); shdw.setOffsetY(5);image.setEffect(blur); image.setEffect(shdw);Node image = ...; Node image = ...;image.setEffect(new Reflection()); image.setEffect(new SepiaTone());
    • CSS Scene scene = new Scene(container, 400, 100); // スタイルシートの設定 scene.getStylesheets().add("/style.css");.button { .button { -fx-font: 24pt "SansSerif"; -fx-font: 16pt "SansSerif"; -fx-text-fill: #006666; -fx-text-fill: #00FF33; -fx-background-color: orange; -fx-background-color: #0066FF; -fx-border-radius: 20; -fx-border-radius: 0; -fx-background-radius: 20; -fx-background-radius: 0; -fx-padding: 5; -fx-padding: 20;} }
    • CSS Scene scene = new Scene(container, 400, 100); // スタイルシートの設定 scene.getStylesheets().add("/style.css");.button { .button { -fx-font: 24pt "SansSerif"; -fx-font: 16pt "SansSerif"; -fx-text-fill: #006666; -fx-text-fill: #00FF33; -fx-background-color: orange; -fx-background-color: #0066FF; -fx-border-radius: 20; -fx-border-radius: 0; -fx-background-radius: 20; -fx-background-radius: 0; -fx-padding: 5; -fx-padding: 20;} }
    • MediaMedia media = new Media(url);MediaPlayer player = new MediaPlayer(media);MediaView view = new MediaView(player);player.play();
    • Bind View Observer Pattern Model Event Controller
    • Bind View Model Bind Controller // モデル DoubleProperty xProperty = new DoubleProperty(); Slider slider = new Slider(50, 300, 0); // モデルにスライダの値をバインドさせる xProperty.bind(slider.valueProperty()); Rectangle rect = new Rectangle(50, 10, 50, 30); // 四角の x 座標にモデルをバインドさせる rect.xProperty().bind(xProperty);
    • Conclusion JavaFX 2.0 Java の GUI ライブラリ JavaSE 8 JavaFX 3.0 を含む OpenJFX FXML Media HTMLAnimation Tool Effect N etBeans 7.1 uilder CSS Scene B Bind デザイナ向けツールが ...
    • 何が変わった