SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Substance look and feel
JavaOne 2007 Community Corner
An application before Substance
Same application with Substance
Same application with Substance
Using Substance in you app
 Go to https://substance.dev.java.net
 Download the latest substance.jar
 Use one of the three options:
    ◦ UIManager.setLookAndFeel(
        new SubstanceLookAndFeel())
    ◦ UIManager.setLookAndFeel(
        “org.jvnet.substance.SubstanceLookAndFeel”)
    ◦ -Dswing.defaultlaf=
        org.jvnet.substance.SubstanceLookAndFeel
Substance themes
 Contains information on control colors
  for different visual states (disabled,
  default, active)
 Base class – SubstanceTheme
 Use bundled core themes
 Use APIs to create derived themes
 Extend and create a custom theme
Substance simple themes



  SubstanceAquaTheme     SubstanceBottleGreenTheme




  SubstancePurpleTheme      SubstanceOliveTheme
Substance derived themes
   Invert, negate, saturate, hue-shift and
    color-blind
Example of hue-shift:
SubstanceTheme theme = SubstanceLookAndFeel.getTheme();
SubstanceTheme shifted = theme.hueShift(-0.5);
SubstanceLookAndFeel.setCurrentTheme(shifted);
Substance watermarks
 Simple watermarks
 Image-based watermarks




    SubstanceBinaryWatermark          SubstanceWoodWatermark




               SubstanceImageWatermark + APP_TILE
Substance skins
 A collection of various settings (theme,
  watermark, painters, shapers etc).
 In org.jvnet.substance.skin
  package
 Can set as
    ◦ SubstanceLookAndFeel.setSkin(…)
    ◦ Derived look and feel classes based on a
      specific skin (set with UIManager or VM
      flag)
Substance toned-down skins



  SubstanceBusinessLookAndFeel   SubstanceBusinessBlackSteelLookAndFeel




   SubstanceCremeLookAndFeel          SubstanceSaharaLookAndFeel
Substance dark skins



 SubstanceRavenGraphiteLookAndFeel       SubstanceRavenLookAndFeel




 SubstanceEmeraldDuskLookAndFeel     SubstanceChallengerDeepLookAndFeel
Substance saturated skins



 SubstanceOfficeBlue2007LookAndFeel   SubstanceFieldOfWheatLookAndFeel




  SubstanceGreenMagicLookAndFeel      SubstanceFindingNemoLookAndFeel
Configuring animations
 LafWidget.ANIMATION_KIND –
  controls animation speed (0.5 sec for
  a transition by default)
 FadeConfigurationManager APIs –
  to enable / disable animations
    ◦ On a specific control
    ◦ On control class (JTree, for example)
    ◦ Globally
Custom appearance
 Theme – extend SubstanceTheme or
  use derivation APIs
 Watermark – implement
  SubstanceWatermark
 Skin – implement SubstanceSkin or
  extend SubstanceAbstractSkin
  (provides basic functionality)
 See existing core implementation and
  test app for examples
Additional UI elements
 Substance provides additional “feel”
  part for some Swing components
 These are called widgets
 Some widgets are turned on by default
 Most widgets are configurable
 Some widgets are not visible –
  behavior only
Widget examples
 Menu search panel on big menus
 Lock icon on non-editable text
  components
 Auto-completion on editable
  comboboxes
 Password strength checker
 Tab overview panel
 Tree smart scroll
Substance plugins
 Substance provides a plugin
  mechanism for third-party components
 No need to change the code – just
  drop the plugin jar in the classpath
 Available plugins for:
    ◦ NetBeans – module supports 5.0 and 5.5
    ◦ SwingX at https://swingx.dev.java.net
    ◦ Flamingo at https://flamingo.dev.java.net
SwingX plugin
   Provides consistent appearance
    (colors, fonts, animation) for
    ◦   Task pane container and task panes
    ◦   Status bar
    ◦   Month view
    ◦   Date picker
    ◦   Translucency on JXPanel
   More to come as SwingX matures and
    reaches the first release
Q&A
Visit https://substance.dev.java.net

Mail kirillcool@yahoo.com

See http://javootoo.com for a list of
 other third-party look and feels

Weitere ähnliche Inhalte

Ähnlich wie Substance Java One 2007 Community Corner

Ähnlich wie Substance Java One 2007 Community Corner (20)

Zepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksZepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-Frameworks
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Java AWT and Java FX
Java AWT and Java FXJava AWT and Java FX
Java AWT and Java FX
 
GITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React Native
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
Java Course 14: Beans, Applets, GUI
Java Course 14: Beans, Applets, GUIJava Course 14: Beans, Applets, GUI
Java Course 14: Beans, Applets, GUI
 
Swing
SwingSwing
Swing
 
Swing
SwingSwing
Swing
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
 
Jdk Tools For Performance Diagnostics
Jdk Tools For Performance DiagnosticsJdk Tools For Performance Diagnostics
Jdk Tools For Performance Diagnostics
 
Report swings
Report swingsReport swings
Report swings
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Abap proxies
Abap proxiesAbap proxies
Abap proxies
 

Mehr von Kirill Grouchnikov (8)

Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practice
 
Responsive mobile design
Responsive mobile designResponsive mobile design
Responsive mobile design
 
Designing for the mobile form factor
Designing for the mobile form factorDesigning for the mobile form factor
Designing for the mobile form factor
 
Flamingo Ribbon component
Flamingo Ribbon componentFlamingo Ribbon component
Flamingo Ribbon component
 
Party of One
Party of OneParty of One
Party of One
 
Advanced Effects Oscon 2007
Advanced Effects   Oscon 2007Advanced Effects   Oscon 2007
Advanced Effects Oscon 2007
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 
On The Shoulders Of Giants
On The Shoulders Of GiantsOn The Shoulders Of Giants
On The Shoulders Of Giants
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Substance Java One 2007 Community Corner

  • 1. Substance look and feel JavaOne 2007 Community Corner
  • 5. Using Substance in you app  Go to https://substance.dev.java.net  Download the latest substance.jar  Use one of the three options: ◦ UIManager.setLookAndFeel( new SubstanceLookAndFeel()) ◦ UIManager.setLookAndFeel( “org.jvnet.substance.SubstanceLookAndFeel”) ◦ -Dswing.defaultlaf= org.jvnet.substance.SubstanceLookAndFeel
  • 6. Substance themes  Contains information on control colors for different visual states (disabled, default, active)  Base class – SubstanceTheme  Use bundled core themes  Use APIs to create derived themes  Extend and create a custom theme
  • 7. Substance simple themes SubstanceAquaTheme SubstanceBottleGreenTheme SubstancePurpleTheme SubstanceOliveTheme
  • 8. Substance derived themes  Invert, negate, saturate, hue-shift and color-blind Example of hue-shift: SubstanceTheme theme = SubstanceLookAndFeel.getTheme(); SubstanceTheme shifted = theme.hueShift(-0.5); SubstanceLookAndFeel.setCurrentTheme(shifted);
  • 9. Substance watermarks  Simple watermarks  Image-based watermarks SubstanceBinaryWatermark SubstanceWoodWatermark SubstanceImageWatermark + APP_TILE
  • 10. Substance skins  A collection of various settings (theme, watermark, painters, shapers etc).  In org.jvnet.substance.skin package  Can set as ◦ SubstanceLookAndFeel.setSkin(…) ◦ Derived look and feel classes based on a specific skin (set with UIManager or VM flag)
  • 11. Substance toned-down skins SubstanceBusinessLookAndFeel SubstanceBusinessBlackSteelLookAndFeel SubstanceCremeLookAndFeel SubstanceSaharaLookAndFeel
  • 12. Substance dark skins SubstanceRavenGraphiteLookAndFeel SubstanceRavenLookAndFeel SubstanceEmeraldDuskLookAndFeel SubstanceChallengerDeepLookAndFeel
  • 13. Substance saturated skins SubstanceOfficeBlue2007LookAndFeel SubstanceFieldOfWheatLookAndFeel SubstanceGreenMagicLookAndFeel SubstanceFindingNemoLookAndFeel
  • 14. Configuring animations  LafWidget.ANIMATION_KIND – controls animation speed (0.5 sec for a transition by default)  FadeConfigurationManager APIs – to enable / disable animations ◦ On a specific control ◦ On control class (JTree, for example) ◦ Globally
  • 15. Custom appearance  Theme – extend SubstanceTheme or use derivation APIs  Watermark – implement SubstanceWatermark  Skin – implement SubstanceSkin or extend SubstanceAbstractSkin (provides basic functionality)  See existing core implementation and test app for examples
  • 16. Additional UI elements  Substance provides additional “feel” part for some Swing components  These are called widgets  Some widgets are turned on by default  Most widgets are configurable  Some widgets are not visible – behavior only
  • 17. Widget examples  Menu search panel on big menus  Lock icon on non-editable text components  Auto-completion on editable comboboxes  Password strength checker  Tab overview panel  Tree smart scroll
  • 18. Substance plugins  Substance provides a plugin mechanism for third-party components  No need to change the code – just drop the plugin jar in the classpath  Available plugins for: ◦ NetBeans – module supports 5.0 and 5.5 ◦ SwingX at https://swingx.dev.java.net ◦ Flamingo at https://flamingo.dev.java.net
  • 19. SwingX plugin  Provides consistent appearance (colors, fonts, animation) for ◦ Task pane container and task panes ◦ Status bar ◦ Month view ◦ Date picker ◦ Translucency on JXPanel  More to come as SwingX matures and reaches the first release
  • 20. Q&A Visit https://substance.dev.java.net Mail kirillcool@yahoo.com See http://javootoo.com for a list of other third-party look and feels