SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
JFXtras
JavaFX Controls, Layouts, Services, and More


Stephen Chin          Dean Iverson
GXS                   Virginia Tech Transportation Institute
steve@widgetfx.org    deanriverson@gmail.com
tweet: @steveonjava   tweet: @deanriverson
Meet the Presenters…
              Steve                               Dean

                                     Family Man


 Family Man




                      Motorcyclist



                                                         Robotics
                                                          Coach


                                                                    2
Agenda
> JFXtras 0.7 Summary
> JavaFX 2.0 Recap

> The Future of JFXtras

> A Little Announcement…




                           3
JFXtras 0.7 Summary




     Layouts          Borders




     Shapes           Controls
                                 4
JFXtras Grid

        Row

         Row


               5
JFXtras Grid
Grid {
  effect: Reflection {}
  border: 20
  vgap: 12
  hgap: 12
  rows: bind [
    row([text, progressBar]),
    row([navigator, mediaGrid])
  ]
}
                                  6
JFXtras Borders




                  7
JFXtras Borders
Function:
override function create() {
  TitledBorder {
    id: "imageTitle"
    title: file.getName()
    content: FrameBorder {
      id: "imageFrame"
      node: ResizableImageView {
        preserveRatio: true
        smooth: true
        image: bind image
      }
    }
  }
}
                                   8
Border and Grid Example




                          9
MigLayout for JavaFX




                       10
Flexible Grid Layout


         Flow          Wrap




                              11
XMigLayout {
  constraints: "fill, wrap"
  columns: "[][]"
  rows: "[][]4mm[]push[]"
  content: [
    Label {
      text: "Email"
      layoutInfo: nodeConstraints( "ax right" )
    }
    TextBox {
      layoutInfo: nodeConstraints( "growx, pushx" )
    }
    Label {
      text: "Password"
      layoutInfo: nodeConstraints( "ax right" )
    }
    TextBox {
      layoutInfo: nodeConstraints( "growx, pushx" )
    }
    Button {
      text: "Login“, layoutInfo: nodeConstraints( "skip, right" )
    }
    Label {
      text: "This text is 'pushed' to the bottom“, layoutInfo: nodeConstraints( "span" )
}]}
                                                                                           12
Flexible Border Layout

Stage {
  title: "Mig Docking Test"
  scene: XScene {
      width: 400, height: 400
      fill: Color.LEMONCHIFFON
      content: XMigLayout {
           constraints: "fill"
           content: [
              migNode( createLabel( Color.KHAKI, "North" ), "north" ),
              migNode( createLabel( Color.GOLDENROD, "South" ), "south" ),
              migNode( createLabel( Color.GOLD, "East" ),   "east" ),
              migNode( createLabel( Color.DARKKHAKI, "West" ), "west" ),
            ]
      }
  }
}
                                                                             13
Inflexible Absolute Layout

function createLabel( color:Color, label:String ) {
   XMigLayout {
     constraints: "fill"
     content: [
        ResizableRectangle {
           fill: color
           layoutInfo: nodeConstraints( "pos 0 0 container.x2 container.y2" )
        }
        Text {
           content: label
           font: Font { size: 18 }
           layoutInfo: nodeConstraints( "center, grow" )
        }
     ]
   }
}
                                                                                14
JFXtras Shapes

    Almond     Intersection of two circles (Vesica Piscis)   centerX, centerY, width

    Arrow      Arrow shape x, y, width, height, depth, rise


    Asterisk   Asterisk with rounded corners                 centerX, centerY, width, radius, beams, roundness


    Astroid    Hypocloid with four cusps      centerX, centerY, radius

    Balloon    Rectangular shape with a tab x, y, width, height, arc, anglePosition, tabWidth,
                                            tabHeight, tabLocation, tabDisplacement


    Cross      Symmetrical cross shape        centerX, centerY, width, radius, roundness

    Donut      Regular polygon with a hole centerX, centerY, innerRadius, outerRadius, sides

    Lauburu    Four comma-shaped heads centerX, centerY, radius



                                                                                            Continued…
                                                                                                                 15
JFXtras Shapes (continued)
   MultiRoundRectangle       Rectangle with configurable corners     x, y, width, height, topLeftWidth/Height,
                                                                      topRightWidth/Height, bottomLeftWidth/Height,
                                                                      bottomRightWidth/Height
   Rays        Multiple rays extend from center         centerX, centerY, rays, radius, extent, rounded

   RegularPolygon            Polygon with equal sides   centerX, centerY, sides, radius


   ReuleauxTriangle          Curved triangle shape      centerX, centerY, radius

   RoundPin    Cone with rounded top      centerX, centerY, height, radius

   Star2       Multipoint star            centerX, centerY, innerRadius, outerRadius, count


   ETriangle   Equilateral triangle          x, y, width
   ITriangle   Isosceles triangle            x, y, width, height
   RTriangle   Right triangle x, y, width, height, anglePosition




                                                                                                            16
JFXtras Shapes




                 17
Sphere Challenge
                                                                          Andres Almiray’s Weblog




             http://www.jroller.com/aalmiray/entry/griffon_gfxbuilder_fxbuilder_side_by


“The following snapshot shows a couple of
spheres drawn with GfxBuilder and
FxBuilder, can you guess which one is
which?
…
This is by no means a post to bash JavaFX
rather to point out some of its deficiencies”
                            -- Andres Almiray
                    (taken completely out of context)


                                                                                               18
Sphere Challenge – JavaFX Response
>   Composition:
     RadialGradient for the Sphere

     Three additional RadialGradients for
      the light sources
     A blurred shadow underneath

>   Features:
     All Bound/Relative Coordinates

     Configurable –

           Base, Ambient, Specular, Shine Colors
           Shadow Size and Height
       Uses New JFXtras ColorUtil Library
       JavaFX Caching for High Performance
                                                    19
JFXtras Spheres Demo




                       20
JFXtras Controls
>   Simple Controls
       XHyperlink
       XEtchedButton
       XPane
>   Complex Controls
       XPicker
       XCalendarPicker
       XShelfView
       XTableView


                          21
Hyperlinks and Etched Buttons
XHyperlink {
  text: "Oracle's Homepage",
  url: "http://oracle.com/"
}

var hposSeq = [ HPos.LEFT, HPos.CENTER, HPos.RIGHT ];
HBox {
  spacing: -1
  content: for (i in [0..2]) {
     XEtchedButton {
       graphic: ImageView { image: images[i] }
       buttonGroupHPos: hposSeq[i]
     }
  }
}
                                                        22
XPane




        23
XPane

 XPane {
  title: "Default Titled XPane”
  contentNode: Label { text: "Default XPane with a Label" }
  layoutInfo: LayoutInfo { width: 200, height: 200 }
}




                                                              24
XPicker
>   Multiple Picker Types
       Side Scroll
       Drop Down
       Thumb Wheel
       Side/Thumb Nudge
>   Supports All Events
       Mouse Clicks
       Mouse Wheel
       Keyboard


                            25
XCalendarPicker
>   Configurable Locale
>   Multiple Selection Modes
       Single
       Multiple
       Range
>   Completely Skinnable




                               26
XShelfView
>   High Performance
>   Features:
       Scrollbar
       Image Title
       Reflection Effect
       Aspect Ratio
       Infinite Repeat
>   Integrates With JFXtras Data Providers
>   Automatically Updates on Model Changes

                                             27
XTableView
>   Insanely Scalable
       Up to 16 million rows
>   Extreme Performance
       Pools rendered nodes
       Caches images
       Optimized scene graph
>   Features:
       Drag-and-Drop Column Reordering
       Dynamic Updating from Model
       Automatically Populates Column Headers
                                                 28
BandMatesFX - JSONHandler in 3 Steps
              public class FreebaseResult {
                public var code: String;
    1           public var result: Result;
                public var status: String;
   POJO         public var transactionId: String;
              }

              var albumHandler:JSONHandler = JSONHandler {

    2           rootClass: "javafxpert.FreebaseResult“
                onDone: function(obj, isSequence): Void {
JSONHandler      freebaseResult = obj as FreebaseResult;
              }}

              req = HttpRequest {

    3           location: queryUrl
                onInput: function(is: java.io.InputStream) {
HttpRequest       albumHandler.parse(is);
              }}
                                                               29
http://jfxtras.org/   30
JavaFX 2.0 Recap
>   The Good
       JavaFX is here to stay
       Controls will be open source
       Calling JavaFX code from different language is
        pretty cool!
>   The Bad
       We have to wait a bit… (next summer)
       Mobile is no longer on the radar
>   The Ugly
       JavaFX Script was a pretty nice language…
                                                         31
The Future of JFXtras
>   Mission:
       Provide Quality JavaFX Add-ons
>   Going Forward:
       Migrate Non-Overlapping Functionality
       Support Java APIs For All Components
       Continue to Fill the Gaps
>   Reality:
       Migration Will Be Challenging
       Release Dates Will Trail Oracle
           (until they are fully open source)

                                                 32
How about JavaFX on… Java
public class HelloStage implements Runnable {
    public void run() {
      Stage stage = new Stage();
      stage.setTitle("Hello Stage");
      stage.setWidth(600);
      stage.setHeight(450);
        Scene scene = new Scene();
        scene.setFill(Color.LIGHTGREEN);
        stage.setScene(scene);
        stage.setVisible(true);
    }
    public static void main(String[] args) {
      FX.start(new HelloStage());
    }
}
How about JavaFX on… Clojure
(defn javafxapp []
  (doto (Stage. "JavaFX Stage")
    (.setWidth 600)
    (.setHeight 450)
    (.setScene (doto (Scene.)
      (.setFill Color/LIGHTGREEN)
      (.setContent (list (doto (Rectangle.)
        (.setX 25)
        (.setY 40)
        (.setWidth 100)
        (.setHeight 50)
        (.setFill Color/RED))))))
    (.setVisible true)))
(javafxapp)

                                              34
How about JavaFX on… Groovy
FxBuilder.build {
    stage = stage(
        title: "Hello Rectangle (Groovy FxBuilder 2)",
        width: 600,
        height: 450,
        scene: scene(fill: Color.LIGHTSKYBLUE) {
            rectangle(
                x: 25, y: 40,
                width: 100, height: 50,
                fill: Color.RED
            )
        }
    )
    stage.visible = true;
}
How about JavaFX on… Scala
object HelloJavaFX extends JavaFXApplication {
  def stage = new Stage {
    title = "Hello Stage"
    width = 600
    height = 450
    scene = new Scene {
      fill = Color.LIGHTGREEN
      content = List(new Rectangle {
         x = 25
         y = 40
         width = 100
         height = 50
         fill = Color.RED
      })
    }
  }
}
                                                 36
How about JavaFX on… Visage
Stage {
  title: "Hello Stage"
  width: 600
  height: 450
  scene: Scene {
    fill: Color.LIGHTGREEN
    content: Rectangle {
      x: 25
      y: 40
      width: 100
      height: 50
      fill: Color.RED
    }
  }
}

                              37
Announcing Project Visage
>   “Visage is a domain specific language (DSL)
    designed for the express purpose of writing
    user interfaces.”

>   Visage project goals:
       Compile to JavaFX Java APIs
       Evolve the Language (Annotations, Maps, etc.)
       Support Other Toolkits

>   Come join the team!
>   For more info: http://visage-lang.org/
                                                        38
Stephen Chin          Dean Iverson
steve@widgetfx.org    deanriverson@gmail.com
tweet: @steveonjava   tweet: @deanriverson




                                               39

Weitere ähnliche Inhalte

Ähnlich wie JFXtras - JavaFX Controls, Layout, Services, and More

Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXStephen Chin
 
Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Charles Ferentchak
 
C# v8 new features - raimundas banevicius
C# v8 new features - raimundas baneviciusC# v8 new features - raimundas banevicius
C# v8 new features - raimundas baneviciusRaimundas Banevičius
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...confluent
 
Graph computation
Graph computationGraph computation
Graph computationSigmoid
 
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15Vasia Kalavri
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...Sencha
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationAnthony Starks
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFXEugene Bogaart
 
Scala clojure techday_2011
Scala clojure techday_2011Scala clojure techday_2011
Scala clojure techday_2011Thadeu Russo
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and ReduxGlib Kechyn
 
JCD 2012 JavaFX 2
JCD 2012 JavaFX 2JCD 2012 JavaFX 2
JCD 2012 JavaFX 2益裕 張
 

Ähnlich wie JFXtras - JavaFX Controls, Layout, Services, and More (20)

Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Building Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFXBuilding Data Rich Interfaces with JavaFX
Building Data Rich Interfaces with JavaFX
 
Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02
 
W-JAX 09 - Lift
W-JAX 09 - LiftW-JAX 09 - Lift
W-JAX 09 - Lift
 
C# v8 new features - raimundas banevicius
C# v8 new features - raimundas baneviciusC# v8 new features - raimundas banevicius
C# v8 new features - raimundas banevicius
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
 
Graph computation
Graph computationGraph computation
Graph computation
 
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15
Large-scale graph processing with Apache Flink @GraphDevroom FOSDEM'15
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
Groovy's Builder
Groovy's BuilderGroovy's Builder
Groovy's Builder
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generation
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFX
 
Scala clojure techday_2011
Scala clojure techday_2011Scala clojure techday_2011
Scala clojure techday_2011
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and Redux
 
SVGo workshop
SVGo workshopSVGo workshop
SVGo workshop
 
JCD 2012 JavaFX 2
JCD 2012 JavaFX 2JCD 2012 JavaFX 2
JCD 2012 JavaFX 2
 

Mehr von Stephen Chin

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2Stephen Chin
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java CommunityStephen Chin
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideStephen Chin
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java DevelopersStephen Chin
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCStephen Chin
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleStephen Chin
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)Stephen Chin
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Stephen Chin
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopStephen Chin
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Stephen Chin
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistStephen Chin
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic ShowStephen Chin
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadStephen Chin
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java WorkshopStephen Chin
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids WorkshopStephen Chin
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and DevicesStephen Chin
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi LabStephen Chin
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosStephen Chin
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopStephen Chin
 

Mehr von Stephen Chin (20)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java Workshop
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
DukeScript
DukeScriptDukeScript
DukeScript
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 

Kürzlich hochgeladen

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
[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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
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
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Kürzlich hochgeladen (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
[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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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 ...
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

JFXtras - JavaFX Controls, Layout, Services, and More

  • 1. JFXtras JavaFX Controls, Layouts, Services, and More Stephen Chin Dean Iverson GXS Virginia Tech Transportation Institute steve@widgetfx.org deanriverson@gmail.com tweet: @steveonjava tweet: @deanriverson
  • 2. Meet the Presenters… Steve Dean Family Man Family Man Motorcyclist Robotics Coach 2
  • 3. Agenda > JFXtras 0.7 Summary > JavaFX 2.0 Recap > The Future of JFXtras > A Little Announcement… 3
  • 4. JFXtras 0.7 Summary Layouts Borders Shapes Controls 4
  • 5. JFXtras Grid Row Row 5
  • 6. JFXtras Grid Grid { effect: Reflection {} border: 20 vgap: 12 hgap: 12 rows: bind [ row([text, progressBar]), row([navigator, mediaGrid]) ] } 6
  • 8. JFXtras Borders Function: override function create() { TitledBorder { id: "imageTitle" title: file.getName() content: FrameBorder { id: "imageFrame" node: ResizableImageView { preserveRatio: true smooth: true image: bind image } } } } 8
  • 9. Border and Grid Example 9
  • 11. Flexible Grid Layout Flow Wrap 11
  • 12. XMigLayout { constraints: "fill, wrap" columns: "[][]" rows: "[][]4mm[]push[]" content: [ Label { text: "Email" layoutInfo: nodeConstraints( "ax right" ) } TextBox { layoutInfo: nodeConstraints( "growx, pushx" ) } Label { text: "Password" layoutInfo: nodeConstraints( "ax right" ) } TextBox { layoutInfo: nodeConstraints( "growx, pushx" ) } Button { text: "Login“, layoutInfo: nodeConstraints( "skip, right" ) } Label { text: "This text is 'pushed' to the bottom“, layoutInfo: nodeConstraints( "span" ) }]} 12
  • 13. Flexible Border Layout Stage { title: "Mig Docking Test" scene: XScene { width: 400, height: 400 fill: Color.LEMONCHIFFON content: XMigLayout { constraints: "fill" content: [ migNode( createLabel( Color.KHAKI, "North" ), "north" ), migNode( createLabel( Color.GOLDENROD, "South" ), "south" ), migNode( createLabel( Color.GOLD, "East" ), "east" ), migNode( createLabel( Color.DARKKHAKI, "West" ), "west" ), ] } } } 13
  • 14. Inflexible Absolute Layout function createLabel( color:Color, label:String ) { XMigLayout { constraints: "fill" content: [ ResizableRectangle { fill: color layoutInfo: nodeConstraints( "pos 0 0 container.x2 container.y2" ) } Text { content: label font: Font { size: 18 } layoutInfo: nodeConstraints( "center, grow" ) } ] } } 14
  • 15. JFXtras Shapes Almond Intersection of two circles (Vesica Piscis) centerX, centerY, width Arrow Arrow shape x, y, width, height, depth, rise Asterisk Asterisk with rounded corners centerX, centerY, width, radius, beams, roundness Astroid Hypocloid with four cusps centerX, centerY, radius Balloon Rectangular shape with a tab x, y, width, height, arc, anglePosition, tabWidth, tabHeight, tabLocation, tabDisplacement Cross Symmetrical cross shape centerX, centerY, width, radius, roundness Donut Regular polygon with a hole centerX, centerY, innerRadius, outerRadius, sides Lauburu Four comma-shaped heads centerX, centerY, radius Continued… 15
  • 16. JFXtras Shapes (continued) MultiRoundRectangle Rectangle with configurable corners x, y, width, height, topLeftWidth/Height, topRightWidth/Height, bottomLeftWidth/Height, bottomRightWidth/Height Rays Multiple rays extend from center centerX, centerY, rays, radius, extent, rounded RegularPolygon Polygon with equal sides centerX, centerY, sides, radius ReuleauxTriangle Curved triangle shape centerX, centerY, radius RoundPin Cone with rounded top centerX, centerY, height, radius Star2 Multipoint star centerX, centerY, innerRadius, outerRadius, count ETriangle Equilateral triangle x, y, width ITriangle Isosceles triangle x, y, width, height RTriangle Right triangle x, y, width, height, anglePosition 16
  • 18. Sphere Challenge Andres Almiray’s Weblog http://www.jroller.com/aalmiray/entry/griffon_gfxbuilder_fxbuilder_side_by “The following snapshot shows a couple of spheres drawn with GfxBuilder and FxBuilder, can you guess which one is which? … This is by no means a post to bash JavaFX rather to point out some of its deficiencies” -- Andres Almiray (taken completely out of context) 18
  • 19. Sphere Challenge – JavaFX Response > Composition:  RadialGradient for the Sphere  Three additional RadialGradients for the light sources  A blurred shadow underneath > Features:  All Bound/Relative Coordinates  Configurable –  Base, Ambient, Specular, Shine Colors  Shadow Size and Height  Uses New JFXtras ColorUtil Library  JavaFX Caching for High Performance 19
  • 21. JFXtras Controls > Simple Controls  XHyperlink  XEtchedButton  XPane > Complex Controls  XPicker  XCalendarPicker  XShelfView  XTableView 21
  • 22. Hyperlinks and Etched Buttons XHyperlink { text: "Oracle's Homepage", url: "http://oracle.com/" } var hposSeq = [ HPos.LEFT, HPos.CENTER, HPos.RIGHT ]; HBox { spacing: -1 content: for (i in [0..2]) { XEtchedButton { graphic: ImageView { image: images[i] } buttonGroupHPos: hposSeq[i] } } } 22
  • 23. XPane 23
  • 24. XPane XPane { title: "Default Titled XPane” contentNode: Label { text: "Default XPane with a Label" } layoutInfo: LayoutInfo { width: 200, height: 200 } } 24
  • 25. XPicker > Multiple Picker Types  Side Scroll  Drop Down  Thumb Wheel  Side/Thumb Nudge > Supports All Events  Mouse Clicks  Mouse Wheel  Keyboard 25
  • 26. XCalendarPicker > Configurable Locale > Multiple Selection Modes  Single  Multiple  Range > Completely Skinnable 26
  • 27. XShelfView > High Performance > Features:  Scrollbar  Image Title  Reflection Effect  Aspect Ratio  Infinite Repeat > Integrates With JFXtras Data Providers > Automatically Updates on Model Changes 27
  • 28. XTableView > Insanely Scalable  Up to 16 million rows > Extreme Performance  Pools rendered nodes  Caches images  Optimized scene graph > Features:  Drag-and-Drop Column Reordering  Dynamic Updating from Model  Automatically Populates Column Headers 28
  • 29. BandMatesFX - JSONHandler in 3 Steps public class FreebaseResult { public var code: String; 1 public var result: Result; public var status: String; POJO public var transactionId: String; } var albumHandler:JSONHandler = JSONHandler { 2 rootClass: "javafxpert.FreebaseResult“ onDone: function(obj, isSequence): Void { JSONHandler freebaseResult = obj as FreebaseResult; }} req = HttpRequest { 3 location: queryUrl onInput: function(is: java.io.InputStream) { HttpRequest albumHandler.parse(is); }} 29
  • 31. JavaFX 2.0 Recap > The Good  JavaFX is here to stay  Controls will be open source  Calling JavaFX code from different language is pretty cool! > The Bad  We have to wait a bit… (next summer)  Mobile is no longer on the radar > The Ugly  JavaFX Script was a pretty nice language… 31
  • 32. The Future of JFXtras > Mission:  Provide Quality JavaFX Add-ons > Going Forward:  Migrate Non-Overlapping Functionality  Support Java APIs For All Components  Continue to Fill the Gaps > Reality:  Migration Will Be Challenging  Release Dates Will Trail Oracle  (until they are fully open source) 32
  • 33. How about JavaFX on… Java public class HelloStage implements Runnable { public void run() { Stage stage = new Stage(); stage.setTitle("Hello Stage"); stage.setWidth(600); stage.setHeight(450); Scene scene = new Scene(); scene.setFill(Color.LIGHTGREEN); stage.setScene(scene); stage.setVisible(true); } public static void main(String[] args) { FX.start(new HelloStage()); } }
  • 34. How about JavaFX on… Clojure (defn javafxapp [] (doto (Stage. "JavaFX Stage") (.setWidth 600) (.setHeight 450) (.setScene (doto (Scene.) (.setFill Color/LIGHTGREEN) (.setContent (list (doto (Rectangle.) (.setX 25) (.setY 40) (.setWidth 100) (.setHeight 50) (.setFill Color/RED)))))) (.setVisible true))) (javafxapp) 34
  • 35. How about JavaFX on… Groovy FxBuilder.build { stage = stage( title: "Hello Rectangle (Groovy FxBuilder 2)", width: 600, height: 450, scene: scene(fill: Color.LIGHTSKYBLUE) { rectangle( x: 25, y: 40, width: 100, height: 50, fill: Color.RED ) } ) stage.visible = true; }
  • 36. How about JavaFX on… Scala object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } 36
  • 37. How about JavaFX on… Visage Stage { title: "Hello Stage" width: 600 height: 450 scene: Scene { fill: Color.LIGHTGREEN content: Rectangle { x: 25 y: 40 width: 100 height: 50 fill: Color.RED } } } 37
  • 38. Announcing Project Visage > “Visage is a domain specific language (DSL) designed for the express purpose of writing user interfaces.” > Visage project goals:  Compile to JavaFX Java APIs  Evolve the Language (Annotations, Maps, etc.)  Support Other Toolkits > Come join the team! > For more info: http://visage-lang.org/ 38
  • 39. Stephen Chin Dean Iverson steve@widgetfx.org deanriverson@gmail.com tweet: @steveonjava tweet: @deanriverson 39