SlideShare a Scribd company logo
1 of 29
Download to read offline
Structure
Structure


 SceneGraph
GUI = Tree
Stage
                        Stage
                        Scene
                        Scene
                       VBox
                       VBox
                       HBox
                       HBox
                       TableView
                       TableView



Stage
Stage   Scene VBox
        Scene VBox   HBox
                     HBox          Label
                                   Label
                                   TextBox
                                   TextBox
                                   Button
                                   Button
                     TableView
                     TableView
public class Hello extends Application {
    @Override
    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();    SceneGraph
        stage.setVisible(true);


    public static void main(String[] args) {
        Application.launch(args);
    }
}
XML     Script

       GroovyFX
FXML   ScalaFX
        Visage
<VBox xmlns:fx="http://javafx.com/fxml"
      fx:controller="contents.browser2"
      spacing="10" layoutY="10">
    <children>
        <HBox spacing="10" style="-fx-alignment: center">
            <children>
                <TextField fx:id="field" prefWidth="200"
                           onAction="#handleAction" />
                <Button text="Load" onAction="#handleAction" />
            </children>
        </HBox>
        <WebView fx:id="view" />
    </children>
</VBox>
<VBox xmlns:fx="http://javafx.com/fxml"
      fx:controller="contents.browser2"
      spacing="10" layoutY="10">
    <children>
        <HBox spacing="10" style="-fx-alignment: center">
            <children>
                <TextField fx:id="field" prefWidth="200"
                           onAction="#handleAction" />
                <Button text="Load" onAction="#handleAction" />
            </children>
        </HBox>
        <WebView fx:id="view" />
    </children>
</VBox>


          View
          FXML
                                           Model
                                            Java

            Controller
              Java
<VBox xmlns:fx="http://javafx.com/fxml"
      fx:controller="contents.browser2"
      spacing="10" layoutY="10">
    <children>
        <HBox spacing="10" style="-fx-alignment: center">
            <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 View
    private TextField field;
    @FXML FXML
    private WebView view;
    private WebEngine engine;
                                           Model
                                            Java
    @FXML
    private void handleAction(ActionEvent event) {
        String url = field.getText();
        engine.load(url);
    }       Controller
}             Java
Contents
Control


            Node
Container          Shape



Contents
Web/HTML   Media
Web/HTML
Web/HTML
Web/HTML
  Media


Media media = new Media(url);
MediaPlayer player = new MediaPlayer(media);
MediaView view = new MediaView(player);

player.play();
Animation



        自動補完
Animation



        自動補完
Animation
Animation
Effect


Node 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

Contents    Design
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;
}                                          }
Structure

  Tool
     Logic

  Design SceneBuilder

Contents        Design
Conclusion

Structure    Design

     JavaFX
Contents      Tool
で開く

新世代   GUI

More Related Content

What's hot

まよいの墓(WebVR編)
まよいの墓(WebVR編)まよいの墓(WebVR編)
まよいの墓(WebVR編)KatsuyaENDOH
 
code hay cho blogspot
code hay cho blogspotcode hay cho blogspot
code hay cho blogspotHuy Nguyen
 
10 ソーシャルブックマーク3
10 ソーシャルブックマーク310 ソーシャルブックマーク3
10 ソーシャルブックマーク3文樹 高橋
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventRobert Nyman
 
TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08Andy Gelme
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build Systemklipstein
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMatteo Pagani
 
Knockout.js Overview
Knockout.js OverviewKnockout.js Overview
Knockout.js Overview민태 김
 
Django - Know Your Namespace: Middleware
Django - Know Your Namespace: MiddlewareDjango - Know Your Namespace: Middleware
Django - Know Your Namespace: Middlewarehowiworkdaily
 
Java script errors &amp; exceptions handling
Java script  errors &amp; exceptions handlingJava script  errors &amp; exceptions handling
Java script errors &amp; exceptions handlingAbhishekMondal42
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichRobert Nyman
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJSEdi Santoso
 
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-1603021543447b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344Branislav Simandel
 

What's hot (20)

まよいの墓(WebVR編)
まよいの墓(WebVR編)まよいの墓(WebVR編)
まよいの墓(WebVR編)
 
code hay cho blogspot
code hay cho blogspotcode hay cho blogspot
code hay cho blogspot
 
10 ソーシャルブックマーク3
10 ソーシャルブックマーク310 ソーシャルブックマーク3
10 ソーシャルブックマーク3
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
 
TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08TinyMCE: WYSIWYG editor 2010-12-08
TinyMCE: WYSIWYG editor 2010-12-08
 
Introducción mvc
Introducción mvcIntroducción mvc
Introducción mvc
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
фабрика Blockly
фабрика Blocklyфабрика Blockly
фабрика Blockly
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applications
 
Knockout.js Overview
Knockout.js OverviewKnockout.js Overview
Knockout.js Overview
 
Django - Know Your Namespace: Middleware
Django - Know Your Namespace: MiddlewareDjango - Know Your Namespace: Middleware
Django - Know Your Namespace: Middleware
 
Jsf lab
Jsf labJsf lab
Jsf lab
 
Javascript1
Javascript1Javascript1
Javascript1
 
Java script errors &amp; exceptions handling
Java script  errors &amp; exceptions handlingJava script  errors &amp; exceptions handling
Java script errors &amp; exceptions handling
 
Ext JS Introduction
Ext JS IntroductionExt JS Introduction
Ext JS Introduction
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJS
 
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-1603021543447b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344
7b615dc2-ba86-4ecd-8b1f-d0d32de89a0c-160302154344
 
javascript examples
javascript examplesjavascript examples
javascript examples
 

Viewers also liked

JRubyで作るapiサーバー
JRubyで作るapiサーバーJRubyで作るapiサーバー
JRubyで作るapiサーバーYamamoto Kazuhisa
 
JavaOneで聴いてきたディープなJavaFXセッション
JavaOneで聴いてきたディープなJavaFXセッションJavaOneで聴いてきたディープなJavaFXセッション
JavaOneで聴いてきたディープなJavaFXセッションTakashi Aoe
 
JavaFX + FXML + CSS = Java の次世代 GUI
JavaFX + FXML + CSS = Java の次世代 GUIJavaFX + FXML + CSS = Java の次世代 GUI
JavaFX + FXML + CSS = Java の次世代 GUIYuichi Sakuraba
 
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1夏サミ 2013 基調講演 長沢パート資料 #natsumiS1
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1智治 長沢
 
Javaのプログラムはどうやって動いているの? GC編
Javaのプログラムはどうやって動いているの? GC編Javaのプログラムはどうやって動いているの? GC編
Javaのプログラムはどうやって動いているの? GC編Yuichi Sakuraba
 
Javaのプログラムはどうやって動いているの? JVM編
Javaのプログラムはどうやって動いているの? JVM編Javaのプログラムはどうやって動いているの? JVM編
Javaのプログラムはどうやって動いているの? JVM編Yuichi Sakuraba
 

Viewers also liked (8)

JRubyで作るapiサーバー
JRubyで作るapiサーバーJRubyで作るapiサーバー
JRubyで作るapiサーバー
 
Java7再入門講座
Java7再入門講座Java7再入門講座
Java7再入門講座
 
JavaOneで聴いてきたディープなJavaFXセッション
JavaOneで聴いてきたディープなJavaFXセッションJavaOneで聴いてきたディープなJavaFXセッション
JavaOneで聴いてきたディープなJavaFXセッション
 
What Is JavaFX
What Is JavaFXWhat Is JavaFX
What Is JavaFX
 
JavaFX + FXML + CSS = Java の次世代 GUI
JavaFX + FXML + CSS = Java の次世代 GUIJavaFX + FXML + CSS = Java の次世代 GUI
JavaFX + FXML + CSS = Java の次世代 GUI
 
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1夏サミ 2013 基調講演 長沢パート資料 #natsumiS1
夏サミ 2013 基調講演 長沢パート資料 #natsumiS1
 
Javaのプログラムはどうやって動いているの? GC編
Javaのプログラムはどうやって動いているの? GC編Javaのプログラムはどうやって動いているの? GC編
Javaのプログラムはどうやって動いているの? GC編
 
Javaのプログラムはどうやって動いているの? JVM編
Javaのプログラムはどうやって動いているの? JVM編Javaのプログラムはどうやって動いているの? JVM編
Javaのプログラムはどうやって動いているの? JVM編
 

Similar to JavaFXで開く新世代GUI

JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about youAlexander Casall
 
UIWebViewでつくるUI
UIWebViewでつくるUIUIWebViewでつくるUI
UIWebViewでつくるUIcocopon
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)Alexander Casall
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXStephen Chin
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with MobelloJeong-Geun Kim
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 
Rails 6 frontend frameworks
Rails 6 frontend frameworksRails 6 frontend frameworks
Rails 6 frontend frameworksEric Guo
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1Bitla Software
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]Stephen Chin
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkara JUG
 
Declarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKDeclarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKBéla Varga
 

Similar to JavaFXで開く新世代GUI (20)

JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about you
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
UIWebViewでつくるUI
UIWebViewでつくるUIUIWebViewでつくるUI
UIWebViewでつくるUI
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFX
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with Mobello
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Sencha Touch
Sencha TouchSencha Touch
Sencha Touch
 
Rails 6 frontend frameworks
Rails 6 frontend frameworksRails 6 frontend frameworks
Rails 6 frontend frameworks
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Prototype UI
Prototype UIPrototype UI
Prototype UI
 
Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
Declarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKDeclarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDK
 

More from Yuichi Sakuraba

Vector API - Javaによるベクターコンピューティング
Vector API - JavaによるベクターコンピューティングVector API - Javaによるベクターコンピューティング
Vector API - JavaによるベクターコンピューティングYuichi Sakuraba
 
Oracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SEOracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SEYuichi Sakuraba
 
Project Loom + Project Panama
Project Loom + Project PanamaProject Loom + Project Panama
Project Loom + Project PanamaYuichi Sakuraba
 
Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド - Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド - Yuichi Sakuraba
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateYuichi Sakuraba
 
今こそStream API入門
今こそStream API入門今こそStream API入門
今こそStream API入門Yuichi Sakuraba
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateYuichi Sakuraba
 
Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update Yuichi Sakuraba
 
Dockerに向けて、Javaもダイエット
Dockerに向けて、JavaもダイエットDockerに向けて、Javaもダイエット
Dockerに向けて、JavaもダイエットYuichi Sakuraba
 
Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11Yuichi Sakuraba
 
琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -Yuichi Sakuraba
 
Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsYuichi Sakuraba
 
モジュール移行の課題と対策
モジュール移行の課題と対策モジュール移行の課題と対策
モジュール移行の課題と対策Yuichi Sakuraba
 
Project Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector APIProject Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector APIYuichi Sakuraba
 
Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来Yuichi Sakuraba
 
Introduction of Project Jigsaw
Introduction of Project JigsawIntroduction of Project Jigsaw
Introduction of Project JigsawYuichi Sakuraba
 
Encouragement of Java SE 9
Encouragement of Java SE 9Encouragement of Java SE 9
Encouragement of Java SE 9Yuichi Sakuraba
 

More from Yuichi Sakuraba (20)

Vector API - Javaによるベクターコンピューティング
Vector API - JavaによるベクターコンピューティングVector API - Javaによるベクターコンピューティング
Vector API - Javaによるベクターコンピューティング
 
Oracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SEOracle Code One - Java KeynoteとJava SE
Oracle Code One - Java KeynoteとJava SE
 
Project Loom + Project Panama
Project Loom + Project PanamaProject Loom + Project Panama
Project Loom + Project Panama
 
Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド - Project Loom - 限定継続と軽量スレッド -
Project Loom - 限定継続と軽量スレッド -
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
 
今こそStream API入門
今こそStream API入門今こそStream API入門
今こそStream API入門
 
Oracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE UpdateOracle Code One 報告会 Java SE Update
Oracle Code One 報告会 Java SE Update
 
Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update Learn Language 2018 Java Language Update
Learn Language 2018 Java Language Update
 
Dockerに向けて、Javaもダイエット
Dockerに向けて、JavaもダイエットDockerに向けて、Javaもダイエット
Dockerに向けて、Javaもダイエット
 
What's New in Java
What's New in JavaWhat's New in Java
What's New in Java
 
Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11Migration Guide to Java SE 10, and also Java SE 11
Migration Guide to Java SE 10, and also Java SE 11
 
琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -琥珀色のJava - Project Amber -
琥珀色のJava - Project Amber -
 
Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & Solutions
 
モジュール移行の課題と対策
モジュール移行の課題と対策モジュール移行の課題と対策
モジュール移行の課題と対策
 
Project Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector APIProject Jigsawと、ちょっとだけVector API
Project Jigsawと、ちょっとだけVector API
 
Java SE 9の全貌
Java SE 9の全貌Java SE 9の全貌
Java SE 9の全貌
 
Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来Java SEの現在、過去 そして未来
Java SEの現在、過去 そして未来
 
Java SE 9 のススメ
Java SE 9 のススメJava SE 9 のススメ
Java SE 9 のススメ
 
Introduction of Project Jigsaw
Introduction of Project JigsawIntroduction of Project Jigsaw
Introduction of Project Jigsaw
 
Encouragement of Java SE 9
Encouragement of Java SE 9Encouragement of Java SE 9
Encouragement of Java SE 9
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

JavaFXで開く新世代GUI

  • 1.
  • 2.
  • 3.
  • 7. Stage Stage Scene Scene VBox VBox HBox HBox TableView TableView Stage Stage Scene VBox Scene VBox HBox HBox Label Label TextBox TextBox Button Button TableView TableView
  • 8. public class Hello extends Application { @Override 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(); SceneGraph stage.setVisible(true); public static void main(String[] args) { Application.launch(args); } }
  • 9. XML Script GroovyFX FXML ScalaFX Visage
  • 10. <VBox xmlns:fx="http://javafx.com/fxml" fx:controller="contents.browser2" spacing="10" layoutY="10"> <children> <HBox spacing="10" style="-fx-alignment: center"> <children> <TextField fx:id="field" prefWidth="200" onAction="#handleAction" /> <Button text="Load" onAction="#handleAction" /> </children> </HBox> <WebView fx:id="view" /> </children> </VBox>
  • 11. <VBox xmlns:fx="http://javafx.com/fxml" fx:controller="contents.browser2" spacing="10" layoutY="10"> <children> <HBox spacing="10" style="-fx-alignment: center"> <children> <TextField fx:id="field" prefWidth="200" onAction="#handleAction" /> <Button text="Load" onAction="#handleAction" /> </children> </HBox> <WebView fx:id="view" /> </children> </VBox> View FXML Model Java Controller Java
  • 12. <VBox xmlns:fx="http://javafx.com/fxml" fx:controller="contents.browser2" spacing="10" layoutY="10"> <children> <HBox spacing="10" style="-fx-alignment: center"> <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 View private TextField field; @FXML FXML private WebView view; private WebEngine engine; Model Java @FXML private void handleAction(ActionEvent event) { String url = field.getText(); engine.load(url); } Controller } Java
  • 14. Control Node Container Shape Contents
  • 15. Web/HTML Media
  • 18. Web/HTML Media Media media = new Media(url); MediaPlayer player = new MediaPlayer(media); MediaView view = new MediaView(player); player.play();
  • 19. Animation 自動補完
  • 20. Animation 自動補完
  • 23. Effect Node 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());
  • 24. CSS Contents Design
  • 25. 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; } }
  • 26. 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; } }
  • 27. Structure Tool Logic Design SceneBuilder Contents Design
  • 28. Conclusion Structure Design JavaFX Contents Tool