SlideShare a Scribd company logo
From Shabby To Chic
Jasper Potts & Richard Bair
Oracle
Why Design Matters
Good Design Makes People Happy
3
-- Don Norman, UX Week, Jan 26, 2009
So you don’t need to have everything perfect…
they do a really good job of making the lines [at
Disneyland] as bearable as possible. And that’s
what user experience design is about, it’s about
memories… that in the end, you love it.
-- Don Norman, UX Week, Jan 26, 2009
Our Project For Today: JIRA
5
Our Project For Today: JIRA
6
Dashboard
7
Dashboard
8
Search Results
9
Search Results
10
Detail Page
11
Detail Page
12
Demo
CSS In JavaFX 2.0
Why CSS?
• CSS is a domain specific language
–Very good for declaring visual states
• CSS empowers designers
• CSS is a standard
• CSS is widely adopted
• Separation of concerns
• Interoperability
–Ability to use a single HTML stylesheet and have it
apply to the page + the applet
–Ability to have a single JavaFX stylesheet and have it
apply to the app + embedded HTML 15
What Is A Scene Graph?
• A directed acyclic graph (or tree)
–Each parent has 0 or more children
–Each child has at most a single parent
–There are no cycles (i.e. a-> b->a)
• Each node represents a visual element
–Rectangle
–Button
–Text
• Each node has visual state
–Transforms
–Paints 16
17
Scene
Button “Cancel”
Button “First”
Group
Button “Second” Button “Third”
The DOM vs. The Scene Graph
• The DOM is also a directed acyclic graph
• DOM nodes also have visual stat
• DOM mixes up semantic & visuals
–<div> vs. <b> vs. <em>
• The scene graph has custom layouts
–The DOM only uses the HTML Box model
• The APIs are quite different
–We like to think the scene graph is significantly better
18
19
BODY
INPUT “Cancel”
INPUT
“First”
DIV
INPUT “Second”
INPUT
“Third”
JavaFX and CSS
Stage stage = new Stage();
Label label = new Label();
label.setText(“Hello World”);
stage.getScene().getContent().add(label);
stage.setVisible(true);
20
Showing The Label
21
Adding The CSS File
Stage stage = new Stage();
Label label = new Label();
label.setText(“Hello World”);
Scene scene = stage.getScene();
scene.getContent().add(label);
scene.getStylesheets().add(“/example.css”);
stage.setVisible(true);
22
The example.css File
.label {
-fx-font: bold 20pt “Amble”;
-fx-text-fill:
linear (0%, 0%) to (0%, 100%)
stops (0.0, red) (1.0, black);
}
23
Showing The Styled Label
24
CSS Primer: Syntax
25
Rule Selector DeclarationPseudoclass
.label : hover {
-fx-font: bold 20pt “Amble”;
-fx-text-fill:
linear (0%, 0%) to (0%, 100%)
stops (0.0, red) (1.0, black);
}
Syntax Of A Declaration
26
Attribute Value
-fx-font: bold 20pt “Amble”
What Is A “selector”?
• A pattern used to match a Node in the scene
–Match against the Node’s class, styleClass, id, and
pseudo-class state (hover, pressed, selected,
focused, etc)
27
Label { … } Matches any Node with class Label
(but not subclasses!)
.label { … } Matches any Node with styleClass “label”
#title { … } Matches any Node with id “title”
* { … } Matches any Node
.label:hover { … } Matches any Node with styleClass “label”
and “hover” equal to true
Adding A Button
Stage stage = new Stage();
Label label = new Label();
label.setText(“Hello World”);
Scene scene = stage.getScene();
scene.getContent().add(label);
Button button = new Button();
button.setText(“About”);
button.setGraphic(image(“/about_32.png”));
scene.getContent().add(button);
scene.getStylesheets().add(“/example.css”);
stage.setVisible(true); 28
Showing The Styled Label
29
Attributes => Node Properties
• CSS attribute names map 1:1 with a property on
a scene graph node
–Names are “css-ized”
–All names are prefixed with –fx-
30
-fx-text-fill setTextFill(Paint p)
-fx-fill setFill(Paint p)
-fx-font setFont(Font font)
-fx-scale-x setScaleX(float value)
Deviations From HTML CSS
• Attribute names differ
–HTML CSS has HTML specific attribute names
–JavaFX CSS has JavaFX specific attribute names
• JavaFX has more pseudoclasses
–Controls sometimes have custom pseudoclasses
–ToggleButton, Cell has a “selected” pseudoclass
–Cell has “even” and “odd” pseudoclasses
31
Additions To HTML CSS
• Lookup
• Color Functions
–derive
–ladder
• Gradients
• Multiple background fills
• Multiple borders
• Effects
–dropshadow
–innershadow
32
33
34
Styling The Login Screen
#login-dialog {   
-fx-background-image: "images/login-background.png";   
-fx-background-size: cover;   
-fx-font-size: 24;
}
35
Styling The Login Screen
#login-background-logo {   
-fx-background-image: "images/javafx-logo-ghost.png";   
-fx-background-position: right 180px bottom 210px;
}
36
Styling The Login Screen
#login-box {   
-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 25, 0.0 , 0 , 0 );   
-fx-background-color:   
linear (0%,0%) to (0%,100%) stops (0%, #b6b467) (100%, #bcba62),
         white,                           
linear (0%,0%) to (0%,100%) stops (0%, #fdfba8) (100%, #dcda77);
-fx-background-insets: 0, 1, 2;   
-fx-background-radius: 15, 14, 13;   
-fx-padding: 20px;
}
37
Styling The Login Screen
#login-dialog-title {   
-fx-padding: 40 0 20 0; /* padding to give space for user pic
*/   
-fx-font-size: 50;   
-fx-font-weight: bold;   
-fx-text-fill: #717252;   
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
}
38
Styling The Login Screen
#login-dialog-label {   
-fx-text-fill: #717252;   
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
}
39
Styling The Login Screen
#login-dialog-button {   
-fx-padding: 8 15 8 15;   
-fx-background-radius: 8, 8, 7, 6;   
-fx-text-fill: white;
}
40
41
42
43
Parting Shots
dribbble.com
45
beautifulpixels.com
46
smashingmagazine.com
47
The Design Of Everyday Things
48
typography.com
49
960.gs
50
The End.

More Related Content

What's hot

CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
Denise Jacobs
 
Colors In CSS3
Colors In CSS3Colors In CSS3
Colors In CSS3
Lea Verou
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers
Justin Lee
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
Christopher Schmitt
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
joilrahat
 
Rebol VID STYLE CREATION AND DESIGN
Rebol VID STYLE CREATION AND DESIGNRebol VID STYLE CREATION AND DESIGN
Rebol VID STYLE CREATION AND DESIGN
crazyaxe
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
Denise Jacobs
 
CSS3 - is everything we used to do wrong?
CSS3 - is everything we used to do wrong? CSS3 - is everything we used to do wrong?
CSS3 - is everything we used to do wrong?
Russ Weakley
 
Dive into HTML5: SVG and Canvas
Dive into HTML5: SVG and CanvasDive into HTML5: SVG and Canvas
Dive into HTML5: SVG and Canvas
Doris Chen
 
MS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome BitsMS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome BitsSpiffy
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
Cloudinary
 
9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi
Jessica Smith
 
Sass, Compass and the new tools - Open Web Camp IV
Sass, Compass and the new tools - Open Web Camp IVSass, Compass and the new tools - Open Web Camp IV
Sass, Compass and the new tools - Open Web Camp IVDirk Ginader
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
David Engel
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
Yoeung Vibol
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
Daniel Hölbling
 
Css3 and gwt in perfect harmony
Css3 and gwt in perfect harmonyCss3 and gwt in perfect harmony
Css3 and gwt in perfect harmony
jdramaix
 
Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!
Gill Cleeren
 

What's hot (20)

CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
 
Colors In CSS3
Colors In CSS3Colors In CSS3
Colors In CSS3
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Rebol VID STYLE CREATION AND DESIGN
Rebol VID STYLE CREATION AND DESIGNRebol VID STYLE CREATION AND DESIGN
Rebol VID STYLE CREATION AND DESIGN
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
 
CSS3 - is everything we used to do wrong?
CSS3 - is everything we used to do wrong? CSS3 - is everything we used to do wrong?
CSS3 - is everything we used to do wrong?
 
Dive into HTML5: SVG and Canvas
Dive into HTML5: SVG and CanvasDive into HTML5: SVG and Canvas
Dive into HTML5: SVG and Canvas
 
CSS and Layout
CSS and LayoutCSS and Layout
CSS and Layout
 
MS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome BitsMS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome Bits
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi9 Months Web Development Diploma Course in North Delhi
9 Months Web Development Diploma Course in North Delhi
 
Sass, Compass and the new tools - Open Web Camp IV
Sass, Compass and the new tools - Open Web Camp IVSass, Compass and the new tools - Open Web Camp IV
Sass, Compass and the new tools - Open Web Camp IV
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
 
Css3 and gwt in perfect harmony
Css3 and gwt in perfect harmonyCss3 and gwt in perfect harmony
Css3 and gwt in perfect harmony
 
Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!
 

Viewers also liked

Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
Richard Bair
 
Home electronics trade show
Home electronics trade showHome electronics trade show
Home electronics trade show
canadianwireless
 
sundarban soil carbon
sundarban soil carbonsundarban soil carbon
sundarban soil carbon
Abhijit Mitra
 
indicador coleqty
indicador coleqtyindicador coleqty
IDEAS psychiatry
IDEAS psychiatryIDEAS psychiatry
IDEAS psychiatry
niranjan hebbar
 
Презентація Корнинської ОТГ Житомирської області
Презентація Корнинської ОТГ Житомирської областіПрезентація Корнинської ОТГ Житомирської області
Презентація Корнинської ОТГ Житомирської області
CSIUKRAINE
 
Презентація Попільнянської ОТГ Житомирської області
Презентація Попільнянської ОТГ Житомирської областіПрезентація Попільнянської ОТГ Житомирської області
Презентація Попільнянської ОТГ Житомирської області
CSIUKRAINE
 
Acidification of Sundarban water
Acidification of Sundarban waterAcidification of Sundarban water
Acidification of Sundarban water
Abhijit Mitra
 
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Curso de teclado (COMPLETO) - Aprenda a Tocar TecladoCurso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Cleber Lucas
 
Role of customer executive in an it company
Role of customer executive in an it companyRole of customer executive in an it company
Role of customer executive in an it company
Emipro Technologies Pvt. Ltd.
 
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
Jorge Amarante
 
Основні поняття та засоби комп'ютерної графіки
Основні поняття та засоби комп'ютерної графікиОсновні поняття та засоби комп'ютерної графіки
Основні поняття та засоби комп'ютерної графіки
Сергій Каляфіцький
 
Результаты деятельности МБДОУ "Детский сад №260"
Результаты деятельности МБДОУ "Детский сад №260"Результаты деятельности МБДОУ "Детский сад №260"
Результаты деятельности МБДОУ "Детский сад №260"
denchk
 
Vacation tour packages panama
Vacation tour packages panamaVacation tour packages panama
Vacation tour packages panama
panamatravelcrop
 
Mitochodria
MitochodriaMitochodria
Mitochodria
vels university
 

Viewers also liked (15)

Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
 
Home electronics trade show
Home electronics trade showHome electronics trade show
Home electronics trade show
 
sundarban soil carbon
sundarban soil carbonsundarban soil carbon
sundarban soil carbon
 
indicador coleqty
indicador coleqtyindicador coleqty
indicador coleqty
 
IDEAS psychiatry
IDEAS psychiatryIDEAS psychiatry
IDEAS psychiatry
 
Презентація Корнинської ОТГ Житомирської області
Презентація Корнинської ОТГ Житомирської областіПрезентація Корнинської ОТГ Житомирської області
Презентація Корнинської ОТГ Житомирської області
 
Презентація Попільнянської ОТГ Житомирської області
Презентація Попільнянської ОТГ Житомирської областіПрезентація Попільнянської ОТГ Житомирської області
Презентація Попільнянської ОТГ Житомирської області
 
Acidification of Sundarban water
Acidification of Sundarban waterAcidification of Sundarban water
Acidification of Sundarban water
 
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Curso de teclado (COMPLETO) - Aprenda a Tocar TecladoCurso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
 
Role of customer executive in an it company
Role of customer executive in an it companyRole of customer executive in an it company
Role of customer executive in an it company
 
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
 
Основні поняття та засоби комп'ютерної графіки
Основні поняття та засоби комп'ютерної графікиОсновні поняття та засоби комп'ютерної графіки
Основні поняття та засоби комп'ютерної графіки
 
Результаты деятельности МБДОУ "Детский сад №260"
Результаты деятельности МБДОУ "Детский сад №260"Результаты деятельности МБДОУ "Детский сад №260"
Результаты деятельности МБДОУ "Детский сад №260"
 
Vacation tour packages panama
Vacation tour packages panamaVacation tour packages panama
Vacation tour packages panama
 
Mitochodria
MitochodriaMitochodria
Mitochodria
 

Similar to From Shabby to Chic

The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
Stephen Hay
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
Denise Jacobs
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application DesignBryce Kerley
 
Incremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentIncremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend Development
Akihiro Ikezoe
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSSChris Coyier
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
Lohith Goudagere Nagaraj
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
Marc D Anderson
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
Amir Barylko
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
Fwdays
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
Rachael L Moore
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
Thomas Fuchs
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
Chris Love
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
bensmithett
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
Lohith Goudagere Nagaraj
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
Jake Johnson
 

Similar to From Shabby to Chic (20)

The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 
Incremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend DevelopmentIncremental DOM and Recent Trend of Frontend Development
Incremental DOM and Recent Trend of Frontend Development
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSS
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
SEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePointSEF2013 - A jQuery Primer for SharePoint
SEF2013 - A jQuery Primer for SharePoint
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
 
OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
The Future of CSS
The Future of CSSThe Future of CSS
The Future of CSS
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 

More from Richard Bair

Building Amazing Applications with JavaFX
Building Amazing Applications with JavaFXBuilding Amazing Applications with JavaFX
Building Amazing Applications with JavaFX
Richard Bair
 
Practical Experience Building JavaFX Rich Clients
Practical Experience Building JavaFX Rich ClientsPractical Experience Building JavaFX Rich Clients
Practical Experience Building JavaFX Rich Clients
Richard Bair
 
Java Rich Clients with JavaFX 2.0
Java Rich Clients with JavaFX 2.0Java Rich Clients with JavaFX 2.0
Java Rich Clients with JavaFX 2.0
Richard Bair
 
JavaFX 101
JavaFX 101JavaFX 101
JavaFX 101
Richard Bair
 
Gaming JavaFX
Gaming JavaFXGaming JavaFX
Gaming JavaFX
Richard Bair
 
JavaFX Deployment
JavaFX DeploymentJavaFX Deployment
JavaFX Deployment
Richard Bair
 
JavaFX In Practice
JavaFX In PracticeJavaFX In Practice
JavaFX In Practice
Richard Bair
 

More from Richard Bair (7)

Building Amazing Applications with JavaFX
Building Amazing Applications with JavaFXBuilding Amazing Applications with JavaFX
Building Amazing Applications with JavaFX
 
Practical Experience Building JavaFX Rich Clients
Practical Experience Building JavaFX Rich ClientsPractical Experience Building JavaFX Rich Clients
Practical Experience Building JavaFX Rich Clients
 
Java Rich Clients with JavaFX 2.0
Java Rich Clients with JavaFX 2.0Java Rich Clients with JavaFX 2.0
Java Rich Clients with JavaFX 2.0
 
JavaFX 101
JavaFX 101JavaFX 101
JavaFX 101
 
Gaming JavaFX
Gaming JavaFXGaming JavaFX
Gaming JavaFX
 
JavaFX Deployment
JavaFX DeploymentJavaFX Deployment
JavaFX Deployment
 
JavaFX In Practice
JavaFX In PracticeJavaFX In Practice
JavaFX In Practice
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 

From Shabby to Chic

  • 1. From Shabby To Chic Jasper Potts & Richard Bair Oracle
  • 3. Good Design Makes People Happy 3 -- Don Norman, UX Week, Jan 26, 2009
  • 4. So you don’t need to have everything perfect… they do a really good job of making the lines [at Disneyland] as bearable as possible. And that’s what user experience design is about, it’s about memories… that in the end, you love it. -- Don Norman, UX Week, Jan 26, 2009
  • 5. Our Project For Today: JIRA 5
  • 6. Our Project For Today: JIRA 6
  • 13. Demo
  • 15. Why CSS? • CSS is a domain specific language –Very good for declaring visual states • CSS empowers designers • CSS is a standard • CSS is widely adopted • Separation of concerns • Interoperability –Ability to use a single HTML stylesheet and have it apply to the page + the applet –Ability to have a single JavaFX stylesheet and have it apply to the app + embedded HTML 15
  • 16. What Is A Scene Graph? • A directed acyclic graph (or tree) –Each parent has 0 or more children –Each child has at most a single parent –There are no cycles (i.e. a-> b->a) • Each node represents a visual element –Rectangle –Button –Text • Each node has visual state –Transforms –Paints 16
  • 18. The DOM vs. The Scene Graph • The DOM is also a directed acyclic graph • DOM nodes also have visual stat • DOM mixes up semantic & visuals –<div> vs. <b> vs. <em> • The scene graph has custom layouts –The DOM only uses the HTML Box model • The APIs are quite different –We like to think the scene graph is significantly better 18
  • 20. JavaFX and CSS Stage stage = new Stage(); Label label = new Label(); label.setText(“Hello World”); stage.getScene().getContent().add(label); stage.setVisible(true); 20
  • 22. Adding The CSS File Stage stage = new Stage(); Label label = new Label(); label.setText(“Hello World”); Scene scene = stage.getScene(); scene.getContent().add(label); scene.getStylesheets().add(“/example.css”); stage.setVisible(true); 22
  • 23. The example.css File .label { -fx-font: bold 20pt “Amble”; -fx-text-fill: linear (0%, 0%) to (0%, 100%) stops (0.0, red) (1.0, black); } 23
  • 24. Showing The Styled Label 24
  • 25. CSS Primer: Syntax 25 Rule Selector DeclarationPseudoclass .label : hover { -fx-font: bold 20pt “Amble”; -fx-text-fill: linear (0%, 0%) to (0%, 100%) stops (0.0, red) (1.0, black); }
  • 26. Syntax Of A Declaration 26 Attribute Value -fx-font: bold 20pt “Amble”
  • 27. What Is A “selector”? • A pattern used to match a Node in the scene –Match against the Node’s class, styleClass, id, and pseudo-class state (hover, pressed, selected, focused, etc) 27 Label { … } Matches any Node with class Label (but not subclasses!) .label { … } Matches any Node with styleClass “label” #title { … } Matches any Node with id “title” * { … } Matches any Node .label:hover { … } Matches any Node with styleClass “label” and “hover” equal to true
  • 28. Adding A Button Stage stage = new Stage(); Label label = new Label(); label.setText(“Hello World”); Scene scene = stage.getScene(); scene.getContent().add(label); Button button = new Button(); button.setText(“About”); button.setGraphic(image(“/about_32.png”)); scene.getContent().add(button); scene.getStylesheets().add(“/example.css”); stage.setVisible(true); 28
  • 29. Showing The Styled Label 29
  • 30. Attributes => Node Properties • CSS attribute names map 1:1 with a property on a scene graph node –Names are “css-ized” –All names are prefixed with –fx- 30 -fx-text-fill setTextFill(Paint p) -fx-fill setFill(Paint p) -fx-font setFont(Font font) -fx-scale-x setScaleX(float value)
  • 31. Deviations From HTML CSS • Attribute names differ –HTML CSS has HTML specific attribute names –JavaFX CSS has JavaFX specific attribute names • JavaFX has more pseudoclasses –Controls sometimes have custom pseudoclasses –ToggleButton, Cell has a “selected” pseudoclass –Cell has “even” and “odd” pseudoclasses 31
  • 32. Additions To HTML CSS • Lookup • Color Functions –derive –ladder • Gradients • Multiple background fills • Multiple borders • Effects –dropshadow –innershadow 32
  • 33. 33
  • 34. 34
  • 35. Styling The Login Screen #login-dialog {    -fx-background-image: "images/login-background.png";    -fx-background-size: cover;    -fx-font-size: 24; } 35
  • 36. Styling The Login Screen #login-background-logo {    -fx-background-image: "images/javafx-logo-ghost.png";    -fx-background-position: right 180px bottom 210px; } 36
  • 37. Styling The Login Screen #login-box {    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 25, 0.0 , 0 , 0 );    -fx-background-color:    linear (0%,0%) to (0%,100%) stops (0%, #b6b467) (100%, #bcba62),          white,                            linear (0%,0%) to (0%,100%) stops (0%, #fdfba8) (100%, #dcda77); -fx-background-insets: 0, 1, 2;    -fx-background-radius: 15, 14, 13;    -fx-padding: 20px; } 37
  • 38. Styling The Login Screen #login-dialog-title {    -fx-padding: 40 0 20 0; /* padding to give space for user pic */    -fx-font-size: 50;    -fx-font-weight: bold;    -fx-text-fill: #717252;    -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 ); } 38
  • 39. Styling The Login Screen #login-dialog-label {    -fx-text-fill: #717252;    -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 ); } 39
  • 40. Styling The Login Screen #login-dialog-button {    -fx-padding: 8 15 8 15;    -fx-background-radius: 8, 8, 7, 6;    -fx-text-fill: white; } 40
  • 41. 41
  • 42. 42
  • 43. 43
  • 48. The Design Of Everyday Things 48