SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
JavaFX for Business Application Developers
                        Michael Heinrichs

Freitag, 8. Juni 2012
“charles bridge” by
                        hodgers (CC BY-SA 2.0)
Freitag, 8. Juni 2012
“Coo
                             k
                        kodo ing Eggs”
                            mut (      b
                                  CC B y
                                      Y 2.0
                                              )




                                          “charles bridge” by
                                          hodgers (CC BY-SA 2.0)
Freitag, 8. Juni 2012
“Coo
                             k
                        kodo ing Eggs”
                            mut (      b
                                  CC B y
                                      Y 2.0
                                              )




                                          “charles bridge” by
                                          hodgers (CC BY-SA 2.0)
Freitag, 8. Juni 2012
The following is intended to outline our general product
                          direction. It is intended for information purposes only, and may
                        not be incorporated into any contract. It is not a commitment to
                           deliver any material, code, or functionality, and should not be
                           relied upon in making purchasing decisions. The development,
                         release, and timing of any features or functionality described for
                            Oracle’s products remains at the sole discretion of Oracle.




Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
JavaFX is the evolution of the Java rich client platform,
                        designed to provide a lightweight, hardware accelerated
                              UI platform that meets tomorrow’s needs.




Freitag, 8. Juni 2012
JavaFX is Swing in cool!




Freitag, 8. Juni 2012
•Examples

                        • Sample Application
                        • Process Overview

                        • Defining the View
                        • Hooking up Controllers

                        • Styling with CSS
Freitag, 8. Juni 2012
Examples



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Sample Application



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Java EE
                                     JavaDB
                        RESTful WS



                          Jersey
                        JavaFX UI




Freitag, 8. Juni 2012
Process Overview



Freitag, 8. Juni 2012
UX                                                                                Graphical
                                   Developer
                        Designer                                                                            Designer


                                    package com.oracle.conferenceplanner.controller;

                                    import   com.oracle.conferenceplanner.Env;
                                    import   com.oracle.conferenceplanner.Messages;
                                    import   com.oracle.conferenceplanner.entities.Session;
                                    import   com.oracle.conferenceplanner.entities.Speaker;
                                    import   com.oracle.conferenceplanner.view.GenericListCell;
                                    import   com.sun.javafx.util.MessageBus;
                                    import   java.net.URL;
                                    import   java.util.Collection;
                                    import   java.util.ResourceBundle;
                                    import   javafx.animation.Animation;
                                    import   javafx.animation.PauseTransitionBuilder;
                                    import   javafx.beans.value.ChangeListener;
                                    import   javafx.beans.value.ObservableValue;
                                    import   javafx.concurrent.Service;
                                    import   javafx.concurrent.Task;
                                    import   javafx.event.ActionEvent;
                                    import   javafx.event.EventHandler;
                                    import   javafx.fxml.FXML;
                                    import   javafx.fxml.Initializable;
                                    import   javafx.scene.control.*;
                                    import   javafx.scene.input.KeyEvent;
                                    import   javafx.util.Callback;
                                    import   javafx.util.Duration;

                                    /**
                                     *
                                     * @author Michael Heinrichs
                                     */
                                    public class MainScreen implements Initializable {

                                        @FXML   private   TextField searchField;
                                        @FXML   private   ToggleGroup toggleSearch;
                                        @FXML   private   Toggle toggleSession;
                                        @FXML   private   ProgressIndicator progressIndicator;
                                        @FXML   private   ListView searchResultList;

                                        private final Service<Collection<?>> dataFetcher = new
                                    Service<Collection<?>>() {
                                            @Override
                                            protected Task<Collection<?>> createTask() {
                                                final String currentSearchString = searchField.getText();
                                                final boolean getSessions =
                                    toggleSearch.getSelectedToggle().equals(toggleSession);
                                                return new Task<Collection<?>>() {
                                                    @Override
                                                    protected Collection<?> call() throws Exception {
                                                        return getSessions?
                                                                Session.findLike(Env.getInstance
                                    ().getWebResource(), currentSearchString)
                                                                : Speaker.findLike(Env.getInstance
                                    ().getWebResource(), currentSearchString);
                                                    }
                                                };
                                            }

                                              @Override




                                   Java Code

Freitag, 8. Juni 2012
UX                                                                                                                                            Graphical
                                                                                               Developer
                        Designer                                                                                                                                        Designer


                        <?xml version="1.0" encoding="UTF-8"?>                                  package com.oracle.conferenceplanner.controller;
                                                                                                                                                                         .root {
                        <?import   com.oracle.conferenceplanner.view.*?>                        import   com.oracle.conferenceplanner.Env;                                   -fx-background-color: black;
                        <?import   java.lang.*?>                                                import   com.oracle.conferenceplanner.Messages;                              -fx-font-family: 'Impact';
                        <?import   java.util.*?>                                                import   com.oracle.conferenceplanner.entities.Session;                  /*    -fx-font-fill: #99C0D0;*/
                        <?import   javafx.geometry.*?>                                          import   com.oracle.conferenceplanner.entities.Speaker;                      -fx-font-fill: black;
                        <?import   javafx.scene.control.*?>                                     import   com.oracle.conferenceplanner.view.GenericListCell;              }
                        <?import   javafx.scene.layout.*?>                                      import   com.sun.javafx.util.MessageBus;                                 .label {
                        <?import   javafx.scene.paint.*?>                                       import   java.net.URL;                                                       -fx-text-fill: #7C5FDD;
                        <?import   javafx.scene.shape.*?>                                       import   java.util.Collection;                                           }
                                                                                                import   java.util.ResourceBundle;                                       .text-area {
                        <SplitPane dividerPositions="0.3" focusTraversable="true"               import   javafx.animation.Animation;                                         -fx-text-fill: #7C5FDD;
                        xmlns:fx="http://javafx.com/fxml"                                       import   javafx.animation.PauseTransitionBuilder;                        }
                        fx:controller="com.oracle.conferenceplanner.controller.MainScreen">     import   javafx.beans.value.ChangeListener;                              .text-field {
                          <items>                                                               import   javafx.beans.value.ObservableValue;                                 -fx-background-color: transparent;
                            <AnchorPane>                                                        import   javafx.concurrent.Service;                                          -fx-border-color: #7C5FDD;
                              <children>                                                        import   javafx.concurrent.Task;                                             -fx-text-fill: #D99C10;
                                <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0"              import   javafx.event.ActionEvent;                                           -fx-prompt-text-fill: #7C5FDD;
                        AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"                import   javafx.event.EventHandler;                                          -fx-cursor: text;
                        AnchorPane.topAnchor="0.0">                                             import   javafx.fxml.FXML;                                               }
                                  <children>                                                    import   javafx.fxml.Initializable;
                                    <TextField fx:id="searchField" minHeight="-Infinity"        import   javafx.scene.control.*;                                         .toggle-button {
                        onKeyTyped="#handleSearchBoxTyped" promptText="Search" />               import   javafx.scene.input.KeyEvent;                                        -fx-background-color: #7C5FDD;
                                    <HBox spacing="10.0">                                       import   javafx.util.Callback;                                               -fx-background-radius: 0;
                                      <children>                                                import   javafx.util.Duration;                                               -fx-text-fill: black;
                                         <ToggleButton fx:id="toggleSession" selected="true"                                                                                 -fx-alignment: CENTER;
                        text="Session">                                                         /**                                                                          -fx-content-display: LEFT;
                                           <toggleGroup>                                         *                                                                       }
                                             <ToggleGroup fx:id="toggleSearch" />                * @author Michael Heinrichs
                                           </toggleGroup>                                        */                                                                      .toggle-button:selected {
                                         </ToggleButton>                                        public class MainScreen implements Initializable {                           -fx-background-color: #D99C10;
                                         <ToggleButton fx:id="toggleSpeaker" text="Speaker"                                                                              }
                        toggleGroup="$toggleSearch" />                                              @FXML   private   TextField searchField;
                                      </children>                                                   @FXML   private   ToggleGroup toggleSearch;                          .list-view {
                                    </HBox>                                                         @FXML   private   Toggle toggleSession;                                  -fx-background-color: transparent;
                                    <StackPane VBox.vgrow="ALWAYS">                                 @FXML   private   ProgressIndicator progressIndicator;               }
                                      <children>                                                    @FXML   private   ListView searchResultList;
                                         <ListView fx:id="searchResultList" />                                                                                           .list-view:vertical .list-cell {
                                         <ProgressIndicator fx:id="progressIndicator"               private final Service<Collection<?>> dataFetcher = new                   -fx-background-insets: 0, 5 0, 10 15, 0 25;
                        maxHeight="-Infinity" maxWidth="-Infinity" visible="false" />           Service<Collection<?>>() {                                                   -fx-padding: 15 20;
                                      </children>                                                       @Override                                                        }
                                    </StackPane>                                                        protected Task<Collection<?>> createTask() {
                                  </children>                                                               final String currentSearchString = searchField.getText();    .list-view:horizontal .list-cell {
                                </VBox>                                                                     final boolean getSessions =                                      -fx-background-insets: 0, 0 5, 5 20, 0 30;
                              </children>                                                       toggleSearch.getSelectedToggle().equals(toggleSession);                      -fx-padding: 10 25;
                              <padding>                                                                     return new Task<Collection<?>>() {                           }
                                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />                    @Override
                              </padding>                                                                        protected Collection<?> call() throws Exception {        .list-cell {
                            </AnchorPane>                                                                           return getSessions?                                      -fx-background-color: black, #7C5FDD, black, black;
                            <AnchorPane>                                                                                    Session.findLike(Env.getInstance                 -fx-background-radius: 0, 10, 5, 0;
                              <children>                                                        ().getWebResource(), currentSearchString)                                }
                                <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0"                                : Speaker.findLike(Env.getInstance
                        AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"                ().getWebResource(), currentSearchString);                               .list-cell .label {
                        AnchorPane.topAnchor="0.0">                                                             }                                                            -fx-text-fill: #7C5FDD;
                                  <children>                                                                };                                                           }
                                    <fx:include source="session_details.fxml"/>                         }
                                    <fx:include source="speaker_details.fxml"/>                                                                                          .list-cell .title {
                                  </children>                                                             @Override                                                          -fx-text-fill: #D99C10;




                             FXML                                                              Java Code                                                                               CSS

Freitag, 8. Juni 2012
Developer
                                                                                     package com.oracle.conferenceplanner.controller;

                                                                                     import  com.oracle.conferenceplanner.Env;
                                                                                     import  com.oracle.conferenceplanner.Messages;
                                                                                     import  com.oracle.conferenceplanner.entities.Session;
                                                                                     import  com.oracle.conferenceplanner.entities.Speaker;
                                                                                     import  com.oracle.conferenceplanner.view.GenericListCell;
                                                                                     import  com.sun.javafx.util.MessageBus;
                                                                                     import  java.net.URL;
                                                                                     import  java.util.Collection;
                                                                                     import  java.util.ResourceBundle;
                                                                                     import  javafx.animation.Animation;
                                                                                     import  javafx.animation.PauseTransitionBuilder;
                                                                                     import  javafx.beans.value.ChangeListener;
                                                                                     import  javafx.beans.value.ObservableValue;
                                                                                     import  javafx.concurrent.Service;
                                                                                     import  javafx.concurrent.Task;
                                                                                     import  javafx.event.ActionEvent;
                                                                                     import  javafx.event.EventHandler;
                                                                                     import  javafx.fxml.FXML;
                                                                                     import  javafx.fxml.Initializable;
                                                                                     import  javafx.scene.control.*;           .root {
                                                                                     import  javafx.scene.input.KeyEvent;          -fx-background-color: black;
                                                                                     import  javafx.util.Callback;                 -fx-font-family: 'Impact';
                                                                                     import  javafx.util.Duration;             /*    -fx-font-fill: #99C0D0;*/
                                                                                                                                   -fx-font-fill: black;
                                                                                      /**                                      }
                                   <?xml version="1.0" encoding="UTF-8"?>              *                                       .label {
                                                                                       * @author Michael Heinrichs                 -fx-text-fill: #7C5FDD;
                                   <?import com.oracle.conferenceplanner.view.*?>      */                                      }
                                   <?import java.lang.*?>                             public class MainScreen implements Initializable { {
                                                                                                                               .text-area
                                   <?import java.util.*?>                                                                          -fx-text-fill: #7C5FDD;
                                   <?import javafx.geometry.*?>                           @FXML private TextField searchField; }
                                   <?import javafx.scene.control.*?>                                                           .text-field {
                                                                                          @FXML private ToggleGroup toggleSearch;
                                   <?import javafx.scene.layout.*?>                       @FXML private Toggle toggleSession;      -fx-background-color: transparent;
                                   <?import javafx.scene.paint.*?>                                                                 -fx-border-color: #7C5FDD;
                                                                                          @FXML private ProgressIndicator progressIndicator;
                                   <?import javafx.scene.shape.*?>                        @FXML private ListView searchResultList; -fx-text-fill: #D99C10;
                                                                                                                                   -fx-prompt-text-fill: #7C5FDD;
                                   <SplitPane dividerPositions="0.3" focusTraversable="true"                                       -fx-cursor: text;
                                                                                          private final Service<Collection<?>> dataFetcher = new
                                   xmlns:fx="http://javafx.com/fxml"                  Service<Collection<?>>() {               }
                                   fx:controller="com.oracle.conferenceplanner.controller.MainScreen">
                                                                                              @Override
                                     <items>                                                                                   .toggle-button {
                                                                                              protected Task<Collection<?>> createTask() {
                                       <AnchorPane>                                                                                -fx-background-color: #7C5FDD;
                                                                                                  final String currentSearchString = searchField.getText();
                                         <children>                                               final boolean getSessions =      -fx-background-radius: 0;
                                           <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0"                                      -fx-text-fill: black;
                                                                                      toggleSearch.getSelectedToggle().equals(toggleSession);
                                   AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"                                        -fx-alignment: CENTER;
                                                                                                  return new Task<Collection<?>>() {
                                   AnchorPane.topAnchor="0.0">                                        @Override                    -fx-content-display: LEFT;
                                             <children>                                               protected Collection<?> }call() throws Exception {
                                               <TextField fx:id="searchField" minHeight="-Infinity"        return getSessions?
                                   onKeyTyped="#handleSearchBoxTyped" promptText="Search" />                                   .toggle-button:selected {
                                                                                                                   Session.findLike(Env.getInstance
                                               <HBox spacing="10.0">                  ().getWebResource(), currentSearchString)    -fx-background-color: #D99C10;
                                                 <children>                                                                    }
                                                                                                                   : Speaker.findLike(Env.getInstance
                                                    <ToggleButton fx:id="toggleSession" selected="true"
                                                                                      ().getWebResource(), currentSearchString);
                                   text="Session">                                                    }                        .list-view {
                                                      <toggleGroup>                               };                               -fx-background-color: transparent;
                                                        <ToggleGroup fx:id="toggleSearch" /> }                                 }
                                                      </toggleGroup>
                                                    </ToggleButton>                           @Override                        .list-view:vertical .list-cell {
                                                    <ToggleButton fx:id="toggleSpeaker" text="Speaker"                             -fx-background-insets: 0, 5 0, 10 15, 0 25;
                                   toggleGroup="$toggleSearch" />                                                                  -fx-padding: 15 20;
                                                 </children>                                                                   }
                                               </HBox>
                                               <StackPane VBox.vgrow="ALWAYS">                                                 .list-view:horizontal .list-cell {
                                                 <children>                                                                        -fx-background-insets: 0, 0 5, 5 20, 0 30;
                                                    <ListView fx:id="searchResultList" />                                          -fx-padding: 10 25;
                                                    <ProgressIndicator fx:id="progressIndicator"                               }
                                   maxHeight="-Infinity" maxWidth="-Infinity" visible="false" />
                                                 </children>                                                                   .list-cell {
                                               </StackPane>                                                                        -fx-background-color: black, #7C5FDD, black, black;
                                             </children>                                                                           -fx-background-radius: 0, 10, 5, 0;
                                           </VBox>                                                                             }
                                         </children>
                                         <padding>                                                                             .list-cell .label {
                                           <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />                            -fx-text-fill: #7C5FDD;
                                         </padding>                                                                            }
                                       </AnchorPane>
                                       <AnchorPane>                                                                            .list-cell .title {
                                         <children>                                                                                -fx-text-fill: #D99C10;
                                           <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0"
                                   AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
                                   AnchorPane.topAnchor="0.0">
                                             <children>
                                               <fx:include source="session_details.fxml"/>
                                               <fx:include source="speaker_details.fxml"/>
                                             </children>




                          UX                                                                                                                                                             Graphical
                                                                                        JavaFX
                        Designer                                                                                                                                                         Designer


Freitag, 8. Juni 2012
Defining the view



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Stage




Freitag, 8. Juni 2012
Stage
                        Scene




Freitag, 8. Juni 2012
Stage
                          Scene




                        Scenegraph



Freitag, 8. Juni 2012
JFrame
                        Name
                        Adress
                        Mail




                          OK     Cancel

Freitag, 8. Juni 2012
JFrame
                        Name                   JFXPanel : JComponent
                        Adress
                        Mail




                          OK     Cancel

Freitag, 8. Juni 2012
JFrame
                        Name                   JFXPanel : JComponent
                        Adress                         Scene

                        Mail




                          OK     Cancel

Freitag, 8. Juni 2012
JFrame
                        Name                   JFXPanel : JComponent
                        Adress                         Scene

                        Mail




                                                    Scenegraph
                          OK     Cancel

Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Hooking up Controllers



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Styling with CSS



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Summary



Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
Freitag, 8. Juni 2012
UX                                                                                Graphical
                                   Developer
                        Designer                                                                            Designer


                                    package com.oracle.conferenceplanner.controller;

                                    import   com.oracle.conferenceplanner.Env;
                                    import   com.oracle.conferenceplanner.Messages;
                                    import   com.oracle.conferenceplanner.entities.Session;
                                    import   com.oracle.conferenceplanner.entities.Speaker;
                                    import   com.oracle.conferenceplanner.view.GenericListCell;
                                    import   com.sun.javafx.util.MessageBus;
                                    import   java.net.URL;
                                    import   java.util.Collection;
                                    import   java.util.ResourceBundle;
                                    import   javafx.animation.Animation;
                                    import   javafx.animation.PauseTransitionBuilder;
                                    import   javafx.beans.value.ChangeListener;
                                    import   javafx.beans.value.ObservableValue;
                                    import   javafx.concurrent.Service;
                                    import   javafx.concurrent.Task;
                                    import   javafx.event.ActionEvent;
                                    import   javafx.event.EventHandler;
                                    import   javafx.fxml.FXML;
                                    import   javafx.fxml.Initializable;
                                    import   javafx.scene.control.*;
                                    import   javafx.scene.input.KeyEvent;
                                    import   javafx.util.Callback;
                                    import   javafx.util.Duration;

                                    /**
                                     *
                                     * @author Michael Heinrichs
                                     */
                                    public class MainScreen implements Initializable {

                                        @FXML   private   TextField searchField;
                                        @FXML   private   ToggleGroup toggleSearch;
                                        @FXML   private   Toggle toggleSession;
                                        @FXML   private   ProgressIndicator progressIndicator;
                                        @FXML   private   ListView searchResultList;

                                        private final Service<Collection<?>> dataFetcher = new
                                    Service<Collection<?>>() {
                                            @Override
                                            protected Task<Collection<?>> createTask() {
                                                final String currentSearchString = searchField.getText();
                                                final boolean getSessions =
                                    toggleSearch.getSelectedToggle().equals(toggleSession);
                                                return new Task<Collection<?>>() {
                                                    @Override
                                                    protected Collection<?> call() throws Exception {
                                                        return getSessions?
                                                                Session.findLike(Env.getInstance
                                    ().getWebResource(), currentSearchString)
                                                                : Speaker.findLike(Env.getInstance
                                    ().getWebResource(), currentSearchString);
                                                    }
                                                };
                                            }

                                              @Override




Freitag, 8. Juni 2012
Developer
                                                                                     package com.oracle.conferenceplanner.controller;

                                                                                     import  com.oracle.conferenceplanner.Env;
                                                                                     import  com.oracle.conferenceplanner.Messages;
                                                                                     import  com.oracle.conferenceplanner.entities.Session;
                                                                                     import  com.oracle.conferenceplanner.entities.Speaker;
                                                                                     import  com.oracle.conferenceplanner.view.GenericListCell;
                                                                                     import  com.sun.javafx.util.MessageBus;
                                                                                     import  java.net.URL;
                                                                                     import  java.util.Collection;
                                                                                     import  java.util.ResourceBundle;
                                                                                     import  javafx.animation.Animation;
                                                                                     import  javafx.animation.PauseTransitionBuilder;
                                                                                     import  javafx.beans.value.ChangeListener;
                                                                                     import  javafx.beans.value.ObservableValue;
                                                                                     import  javafx.concurrent.Service;
                                                                                     import  javafx.concurrent.Task;
                                                                                     import  javafx.event.ActionEvent;
                                                                                     import  javafx.event.EventHandler;
                                                                                     import  javafx.fxml.FXML;
                                                                                     import  javafx.fxml.Initializable;
                                                                                     import  javafx.scene.control.*;           .root {
                                                                                     import  javafx.scene.input.KeyEvent;          -fx-background-color: black;
                                                                                     import  javafx.util.Callback;                 -fx-font-family: 'Impact';
                                                                                     import  javafx.util.Duration;             /*    -fx-font-fill: #99C0D0;*/
                                                                                                                                   -fx-font-fill: black;
                                                                                      /**                                      }
                                   <?xml version="1.0" encoding="UTF-8"?>              *                                       .label {
                                                                                       * @author Michael Heinrichs                 -fx-text-fill: #7C5FDD;
                                   <?import com.oracle.conferenceplanner.view.*?>      */                                      }
                                   <?import java.lang.*?>                             public class MainScreen implements Initializable { {
                                                                                                                               .text-area
                                   <?import java.util.*?>                                                                          -fx-text-fill: #7C5FDD;
                                   <?import javafx.geometry.*?>                           @FXML private TextField searchField; }
                                   <?import javafx.scene.control.*?>                                                           .text-field {
                                                                                          @FXML private ToggleGroup toggleSearch;
                                   <?import javafx.scene.layout.*?>                       @FXML private Toggle toggleSession;      -fx-background-color: transparent;
                                   <?import javafx.scene.paint.*?>                                                                 -fx-border-color: #7C5FDD;
                                                                                          @FXML private ProgressIndicator progressIndicator;
                                   <?import javafx.scene.shape.*?>                        @FXML private ListView searchResultList; -fx-text-fill: #D99C10;
                                                                                                                                   -fx-prompt-text-fill: #7C5FDD;
                                   <SplitPane dividerPositions="0.3" focusTraversable="true"                                       -fx-cursor: text;
                                                                                          private final Service<Collection<?>> dataFetcher = new
                                   xmlns:fx="http://javafx.com/fxml"                  Service<Collection<?>>() {               }
                                   fx:controller="com.oracle.conferenceplanner.controller.MainScreen">
                                                                                              @Override
                                     <items>                                                                                   .toggle-button {
                                                                                              protected Task<Collection<?>> createTask() {
                                       <AnchorPane>                                                                                -fx-background-color: #7C5FDD;
                                                                                                  final String currentSearchString = searchField.getText();
                                         <children>                                               final boolean getSessions =      -fx-background-radius: 0;
                                           <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0"                                      -fx-text-fill: black;
                                                                                      toggleSearch.getSelectedToggle().equals(toggleSession);
                                   AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"                                        -fx-alignment: CENTER;
                                                                                                  return new Task<Collection<?>>() {
                                   AnchorPane.topAnchor="0.0">                                        @Override                    -fx-content-display: LEFT;
                                             <children>                                               protected Collection<?> }call() throws Exception {
                                               <TextField fx:id="searchField" minHeight="-Infinity"        return getSessions?
                                   onKeyTyped="#handleSearchBoxTyped" promptText="Search" />                                   .toggle-button:selected {
                                                                                                                   Session.findLike(Env.getInstance
                                               <HBox spacing="10.0">                  ().getWebResource(), currentSearchString)    -fx-background-color: #D99C10;
                                                 <children>                                                                    }
                                                                                                                   : Speaker.findLike(Env.getInstance
                                                    <ToggleButton fx:id="toggleSession" selected="true"
                                                                                      ().getWebResource(), currentSearchString);
                                   text="Session">                                                    }                        .list-view {
                                                      <toggleGroup>                               };                               -fx-background-color: transparent;
                                                        <ToggleGroup fx:id="toggleSearch" /> }                                 }
                                                      </toggleGroup>
                                                    </ToggleButton>                           @Override                        .list-view:vertical .list-cell {
                                                    <ToggleButton fx:id="toggleSpeaker" text="Speaker"                             -fx-background-insets: 0, 5 0, 10 15, 0 25;
                                   toggleGroup="$toggleSearch" />                                                                  -fx-padding: 15 20;
                                                 </children>                                                                   }
                                               </HBox>
                                               <StackPane VBox.vgrow="ALWAYS">                                                 .list-view:horizontal .list-cell {
                                                 <children>                                                                        -fx-background-insets: 0, 0 5, 5 20, 0 30;
                                                    <ListView fx:id="searchResultList" />                                          -fx-padding: 10 25;
                                                    <ProgressIndicator fx:id="progressIndicator"                               }
                                   maxHeight="-Infinity" maxWidth="-Infinity" visible="false" />
                                                 </children>                                                                   .list-cell {
                                               </StackPane>                                                                        -fx-background-color: black, #7C5FDD, black, black;
                                             </children>                                                                           -fx-background-radius: 0, 10, 5, 0;
                                           </VBox>                                                                             }
                                         </children>
                                         <padding>                                                                             .list-cell .label {
                                           <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />                            -fx-text-fill: #7C5FDD;
                                         </padding>                                                                            }
                                       </AnchorPane>
                                       <AnchorPane>                                                                            .list-cell .title {
                                         <children>                                                                                -fx-text-fill: #D99C10;
                                           <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0"
                                   AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
                                   AnchorPane.topAnchor="0.0">
                                             <children>
                                               <fx:include source="session_details.fxml"/>
                                               <fx:include source="speaker_details.fxml"/>
                                             </children>




                          UX                                                                                                                                                             Graphical
                                                                                        JavaFX
                        Designer                                                                                                                                                         Designer


Freitag, 8. Juni 2012
• http://blog.netopyr.com, @net0pyr
                        • JavaFX Website
                         http://javafx.com

                        • OTN Forum
                         http://forums.oracle.com

                        • Bugs and Feature Requests
                         http://javafx-jira.kenai.com

                        • API Discussions
                         openjfx-dev@openjdk.java.net

Freitag, 8. Juni 2012

Contenu connexe

Dernier

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

JavaFX for Business Application Developers

  • 1. JavaFX for Business Application Developers Michael Heinrichs Freitag, 8. Juni 2012
  • 2. “charles bridge” by hodgers (CC BY-SA 2.0) Freitag, 8. Juni 2012
  • 3. “Coo k kodo ing Eggs” mut ( b CC B y Y 2.0 ) “charles bridge” by hodgers (CC BY-SA 2.0) Freitag, 8. Juni 2012
  • 4. “Coo k kodo ing Eggs” mut ( b CC B y Y 2.0 ) “charles bridge” by hodgers (CC BY-SA 2.0) Freitag, 8. Juni 2012
  • 5. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Freitag, 8. Juni 2012
  • 7. JavaFX is the evolution of the Java rich client platform, designed to provide a lightweight, hardware accelerated UI platform that meets tomorrow’s needs. Freitag, 8. Juni 2012
  • 8. JavaFX is Swing in cool! Freitag, 8. Juni 2012
  • 9. •Examples • Sample Application • Process Overview • Defining the View • Hooking up Controllers • Styling with CSS Freitag, 8. Juni 2012
  • 19. Java EE JavaDB RESTful WS Jersey JavaFX UI Freitag, 8. Juni 2012
  • 21. UX Graphical Developer Designer Designer package com.oracle.conferenceplanner.controller; import com.oracle.conferenceplanner.Env; import com.oracle.conferenceplanner.Messages; import com.oracle.conferenceplanner.entities.Session; import com.oracle.conferenceplanner.entities.Speaker; import com.oracle.conferenceplanner.view.GenericListCell; import com.sun.javafx.util.MessageBus; import java.net.URL; import java.util.Collection; import java.util.ResourceBundle; import javafx.animation.Animation; import javafx.animation.PauseTransitionBuilder; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.*; import javafx.scene.input.KeyEvent; import javafx.util.Callback; import javafx.util.Duration; /** * * @author Michael Heinrichs */ public class MainScreen implements Initializable { @FXML private TextField searchField; @FXML private ToggleGroup toggleSearch; @FXML private Toggle toggleSession; @FXML private ProgressIndicator progressIndicator; @FXML private ListView searchResultList; private final Service<Collection<?>> dataFetcher = new Service<Collection<?>>() { @Override protected Task<Collection<?>> createTask() { final String currentSearchString = searchField.getText(); final boolean getSessions = toggleSearch.getSelectedToggle().equals(toggleSession); return new Task<Collection<?>>() { @Override protected Collection<?> call() throws Exception { return getSessions? Session.findLike(Env.getInstance ().getWebResource(), currentSearchString) : Speaker.findLike(Env.getInstance ().getWebResource(), currentSearchString); } }; } @Override Java Code Freitag, 8. Juni 2012
  • 22. UX Graphical Developer Designer Designer <?xml version="1.0" encoding="UTF-8"?> package com.oracle.conferenceplanner.controller; .root { <?import com.oracle.conferenceplanner.view.*?> import com.oracle.conferenceplanner.Env; -fx-background-color: black; <?import java.lang.*?> import com.oracle.conferenceplanner.Messages; -fx-font-family: 'Impact'; <?import java.util.*?> import com.oracle.conferenceplanner.entities.Session; /* -fx-font-fill: #99C0D0;*/ <?import javafx.geometry.*?> import com.oracle.conferenceplanner.entities.Speaker; -fx-font-fill: black; <?import javafx.scene.control.*?> import com.oracle.conferenceplanner.view.GenericListCell; } <?import javafx.scene.layout.*?> import com.sun.javafx.util.MessageBus; .label { <?import javafx.scene.paint.*?> import java.net.URL; -fx-text-fill: #7C5FDD; <?import javafx.scene.shape.*?> import java.util.Collection; } import java.util.ResourceBundle; .text-area { <SplitPane dividerPositions="0.3" focusTraversable="true" import javafx.animation.Animation; -fx-text-fill: #7C5FDD; xmlns:fx="http://javafx.com/fxml" import javafx.animation.PauseTransitionBuilder; } fx:controller="com.oracle.conferenceplanner.controller.MainScreen"> import javafx.beans.value.ChangeListener; .text-field { <items> import javafx.beans.value.ObservableValue; -fx-background-color: transparent; <AnchorPane> import javafx.concurrent.Service; -fx-border-color: #7C5FDD; <children> import javafx.concurrent.Task; -fx-text-fill: #D99C10; <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0" import javafx.event.ActionEvent; -fx-prompt-text-fill: #7C5FDD; AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" import javafx.event.EventHandler; -fx-cursor: text; AnchorPane.topAnchor="0.0"> import javafx.fxml.FXML; } <children> import javafx.fxml.Initializable; <TextField fx:id="searchField" minHeight="-Infinity" import javafx.scene.control.*; .toggle-button { onKeyTyped="#handleSearchBoxTyped" promptText="Search" /> import javafx.scene.input.KeyEvent; -fx-background-color: #7C5FDD; <HBox spacing="10.0"> import javafx.util.Callback; -fx-background-radius: 0; <children> import javafx.util.Duration; -fx-text-fill: black; <ToggleButton fx:id="toggleSession" selected="true" -fx-alignment: CENTER; text="Session"> /** -fx-content-display: LEFT; <toggleGroup> * } <ToggleGroup fx:id="toggleSearch" /> * @author Michael Heinrichs </toggleGroup> */ .toggle-button:selected { </ToggleButton> public class MainScreen implements Initializable { -fx-background-color: #D99C10; <ToggleButton fx:id="toggleSpeaker" text="Speaker" } toggleGroup="$toggleSearch" /> @FXML private TextField searchField; </children> @FXML private ToggleGroup toggleSearch; .list-view { </HBox> @FXML private Toggle toggleSession; -fx-background-color: transparent; <StackPane VBox.vgrow="ALWAYS"> @FXML private ProgressIndicator progressIndicator; } <children> @FXML private ListView searchResultList; <ListView fx:id="searchResultList" /> .list-view:vertical .list-cell { <ProgressIndicator fx:id="progressIndicator" private final Service<Collection<?>> dataFetcher = new -fx-background-insets: 0, 5 0, 10 15, 0 25; maxHeight="-Infinity" maxWidth="-Infinity" visible="false" /> Service<Collection<?>>() { -fx-padding: 15 20; </children> @Override } </StackPane> protected Task<Collection<?>> createTask() { </children> final String currentSearchString = searchField.getText(); .list-view:horizontal .list-cell { </VBox> final boolean getSessions = -fx-background-insets: 0, 0 5, 5 20, 0 30; </children> toggleSearch.getSelectedToggle().equals(toggleSession); -fx-padding: 10 25; <padding> return new Task<Collection<?>>() { } <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> @Override </padding> protected Collection<?> call() throws Exception { .list-cell { </AnchorPane> return getSessions? -fx-background-color: black, #7C5FDD, black, black; <AnchorPane> Session.findLike(Env.getInstance -fx-background-radius: 0, 10, 5, 0; <children> ().getWebResource(), currentSearchString) } <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0" : Speaker.findLike(Env.getInstance AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" ().getWebResource(), currentSearchString); .list-cell .label { AnchorPane.topAnchor="0.0"> } -fx-text-fill: #7C5FDD; <children> }; } <fx:include source="session_details.fxml"/> } <fx:include source="speaker_details.fxml"/> .list-cell .title { </children> @Override -fx-text-fill: #D99C10; FXML Java Code CSS Freitag, 8. Juni 2012
  • 23. Developer package com.oracle.conferenceplanner.controller; import com.oracle.conferenceplanner.Env; import com.oracle.conferenceplanner.Messages; import com.oracle.conferenceplanner.entities.Session; import com.oracle.conferenceplanner.entities.Speaker; import com.oracle.conferenceplanner.view.GenericListCell; import com.sun.javafx.util.MessageBus; import java.net.URL; import java.util.Collection; import java.util.ResourceBundle; import javafx.animation.Animation; import javafx.animation.PauseTransitionBuilder; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.*; .root { import javafx.scene.input.KeyEvent; -fx-background-color: black; import javafx.util.Callback; -fx-font-family: 'Impact'; import javafx.util.Duration; /* -fx-font-fill: #99C0D0;*/ -fx-font-fill: black; /** } <?xml version="1.0" encoding="UTF-8"?> * .label { * @author Michael Heinrichs -fx-text-fill: #7C5FDD; <?import com.oracle.conferenceplanner.view.*?> */ } <?import java.lang.*?> public class MainScreen implements Initializable { { .text-area <?import java.util.*?> -fx-text-fill: #7C5FDD; <?import javafx.geometry.*?> @FXML private TextField searchField; } <?import javafx.scene.control.*?> .text-field { @FXML private ToggleGroup toggleSearch; <?import javafx.scene.layout.*?> @FXML private Toggle toggleSession; -fx-background-color: transparent; <?import javafx.scene.paint.*?> -fx-border-color: #7C5FDD; @FXML private ProgressIndicator progressIndicator; <?import javafx.scene.shape.*?> @FXML private ListView searchResultList; -fx-text-fill: #D99C10; -fx-prompt-text-fill: #7C5FDD; <SplitPane dividerPositions="0.3" focusTraversable="true" -fx-cursor: text; private final Service<Collection<?>> dataFetcher = new xmlns:fx="http://javafx.com/fxml" Service<Collection<?>>() { } fx:controller="com.oracle.conferenceplanner.controller.MainScreen"> @Override <items> .toggle-button { protected Task<Collection<?>> createTask() { <AnchorPane> -fx-background-color: #7C5FDD; final String currentSearchString = searchField.getText(); <children> final boolean getSessions = -fx-background-radius: 0; <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0" -fx-text-fill: black; toggleSearch.getSelectedToggle().equals(toggleSession); AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" -fx-alignment: CENTER; return new Task<Collection<?>>() { AnchorPane.topAnchor="0.0"> @Override -fx-content-display: LEFT; <children> protected Collection<?> }call() throws Exception { <TextField fx:id="searchField" minHeight="-Infinity" return getSessions? onKeyTyped="#handleSearchBoxTyped" promptText="Search" /> .toggle-button:selected { Session.findLike(Env.getInstance <HBox spacing="10.0"> ().getWebResource(), currentSearchString) -fx-background-color: #D99C10; <children> } : Speaker.findLike(Env.getInstance <ToggleButton fx:id="toggleSession" selected="true" ().getWebResource(), currentSearchString); text="Session"> } .list-view { <toggleGroup> }; -fx-background-color: transparent; <ToggleGroup fx:id="toggleSearch" /> } } </toggleGroup> </ToggleButton> @Override .list-view:vertical .list-cell { <ToggleButton fx:id="toggleSpeaker" text="Speaker" -fx-background-insets: 0, 5 0, 10 15, 0 25; toggleGroup="$toggleSearch" /> -fx-padding: 15 20; </children> } </HBox> <StackPane VBox.vgrow="ALWAYS"> .list-view:horizontal .list-cell { <children> -fx-background-insets: 0, 0 5, 5 20, 0 30; <ListView fx:id="searchResultList" /> -fx-padding: 10 25; <ProgressIndicator fx:id="progressIndicator" } maxHeight="-Infinity" maxWidth="-Infinity" visible="false" /> </children> .list-cell { </StackPane> -fx-background-color: black, #7C5FDD, black, black; </children> -fx-background-radius: 0, 10, 5, 0; </VBox> } </children> <padding> .list-cell .label { <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> -fx-text-fill: #7C5FDD; </padding> } </AnchorPane> <AnchorPane> .list-cell .title { <children> -fx-text-fill: #D99C10; <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> <fx:include source="session_details.fxml"/> <fx:include source="speaker_details.fxml"/> </children> UX Graphical JavaFX Designer Designer Freitag, 8. Juni 2012
  • 27. Stage Scene Freitag, 8. Juni 2012
  • 28. Stage Scene Scenegraph Freitag, 8. Juni 2012
  • 29. JFrame Name Adress Mail OK Cancel Freitag, 8. Juni 2012
  • 30. JFrame Name JFXPanel : JComponent Adress Mail OK Cancel Freitag, 8. Juni 2012
  • 31. JFrame Name JFXPanel : JComponent Adress Scene Mail OK Cancel Freitag, 8. Juni 2012
  • 32. JFrame Name JFXPanel : JComponent Adress Scene Mail Scenegraph OK Cancel Freitag, 8. Juni 2012
  • 56. UX Graphical Developer Designer Designer package com.oracle.conferenceplanner.controller; import com.oracle.conferenceplanner.Env; import com.oracle.conferenceplanner.Messages; import com.oracle.conferenceplanner.entities.Session; import com.oracle.conferenceplanner.entities.Speaker; import com.oracle.conferenceplanner.view.GenericListCell; import com.sun.javafx.util.MessageBus; import java.net.URL; import java.util.Collection; import java.util.ResourceBundle; import javafx.animation.Animation; import javafx.animation.PauseTransitionBuilder; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.*; import javafx.scene.input.KeyEvent; import javafx.util.Callback; import javafx.util.Duration; /** * * @author Michael Heinrichs */ public class MainScreen implements Initializable { @FXML private TextField searchField; @FXML private ToggleGroup toggleSearch; @FXML private Toggle toggleSession; @FXML private ProgressIndicator progressIndicator; @FXML private ListView searchResultList; private final Service<Collection<?>> dataFetcher = new Service<Collection<?>>() { @Override protected Task<Collection<?>> createTask() { final String currentSearchString = searchField.getText(); final boolean getSessions = toggleSearch.getSelectedToggle().equals(toggleSession); return new Task<Collection<?>>() { @Override protected Collection<?> call() throws Exception { return getSessions? Session.findLike(Env.getInstance ().getWebResource(), currentSearchString) : Speaker.findLike(Env.getInstance ().getWebResource(), currentSearchString); } }; } @Override Freitag, 8. Juni 2012
  • 57. Developer package com.oracle.conferenceplanner.controller; import com.oracle.conferenceplanner.Env; import com.oracle.conferenceplanner.Messages; import com.oracle.conferenceplanner.entities.Session; import com.oracle.conferenceplanner.entities.Speaker; import com.oracle.conferenceplanner.view.GenericListCell; import com.sun.javafx.util.MessageBus; import java.net.URL; import java.util.Collection; import java.util.ResourceBundle; import javafx.animation.Animation; import javafx.animation.PauseTransitionBuilder; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.*; .root { import javafx.scene.input.KeyEvent; -fx-background-color: black; import javafx.util.Callback; -fx-font-family: 'Impact'; import javafx.util.Duration; /* -fx-font-fill: #99C0D0;*/ -fx-font-fill: black; /** } <?xml version="1.0" encoding="UTF-8"?> * .label { * @author Michael Heinrichs -fx-text-fill: #7C5FDD; <?import com.oracle.conferenceplanner.view.*?> */ } <?import java.lang.*?> public class MainScreen implements Initializable { { .text-area <?import java.util.*?> -fx-text-fill: #7C5FDD; <?import javafx.geometry.*?> @FXML private TextField searchField; } <?import javafx.scene.control.*?> .text-field { @FXML private ToggleGroup toggleSearch; <?import javafx.scene.layout.*?> @FXML private Toggle toggleSession; -fx-background-color: transparent; <?import javafx.scene.paint.*?> -fx-border-color: #7C5FDD; @FXML private ProgressIndicator progressIndicator; <?import javafx.scene.shape.*?> @FXML private ListView searchResultList; -fx-text-fill: #D99C10; -fx-prompt-text-fill: #7C5FDD; <SplitPane dividerPositions="0.3" focusTraversable="true" -fx-cursor: text; private final Service<Collection<?>> dataFetcher = new xmlns:fx="http://javafx.com/fxml" Service<Collection<?>>() { } fx:controller="com.oracle.conferenceplanner.controller.MainScreen"> @Override <items> .toggle-button { protected Task<Collection<?>> createTask() { <AnchorPane> -fx-background-color: #7C5FDD; final String currentSearchString = searchField.getText(); <children> final boolean getSessions = -fx-background-radius: 0; <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0" -fx-text-fill: black; toggleSearch.getSelectedToggle().equals(toggleSession); AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" -fx-alignment: CENTER; return new Task<Collection<?>>() { AnchorPane.topAnchor="0.0"> @Override -fx-content-display: LEFT; <children> protected Collection<?> }call() throws Exception { <TextField fx:id="searchField" minHeight="-Infinity" return getSessions? onKeyTyped="#handleSearchBoxTyped" promptText="Search" /> .toggle-button:selected { Session.findLike(Env.getInstance <HBox spacing="10.0"> ().getWebResource(), currentSearchString) -fx-background-color: #D99C10; <children> } : Speaker.findLike(Env.getInstance <ToggleButton fx:id="toggleSession" selected="true" ().getWebResource(), currentSearchString); text="Session"> } .list-view { <toggleGroup> }; -fx-background-color: transparent; <ToggleGroup fx:id="toggleSearch" /> } } </toggleGroup> </ToggleButton> @Override .list-view:vertical .list-cell { <ToggleButton fx:id="toggleSpeaker" text="Speaker" -fx-background-insets: 0, 5 0, 10 15, 0 25; toggleGroup="$toggleSearch" /> -fx-padding: 15 20; </children> } </HBox> <StackPane VBox.vgrow="ALWAYS"> .list-view:horizontal .list-cell { <children> -fx-background-insets: 0, 0 5, 5 20, 0 30; <ListView fx:id="searchResultList" /> -fx-padding: 10 25; <ProgressIndicator fx:id="progressIndicator" } maxHeight="-Infinity" maxWidth="-Infinity" visible="false" /> </children> .list-cell { </StackPane> -fx-background-color: black, #7C5FDD, black, black; </children> -fx-background-radius: 0, 10, 5, 0; </VBox> } </children> <padding> .list-cell .label { <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> -fx-text-fill: #7C5FDD; </padding> } </AnchorPane> <AnchorPane> .list-cell .title { <children> -fx-text-fill: #D99C10; <StackPane fx:id="detailsPane" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> <fx:include source="session_details.fxml"/> <fx:include source="speaker_details.fxml"/> </children> UX Graphical JavaFX Designer Designer Freitag, 8. Juni 2012
  • 58. • http://blog.netopyr.com, @net0pyr • JavaFX Website http://javafx.com • OTN Forum http://forums.oracle.com • Bugs and Feature Requests http://javafx-jira.kenai.com • API Discussions openjfx-dev@openjdk.java.net Freitag, 8. Juni 2012

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n