SlideShare a Scribd company logo
1 of 30
NetBeans Rich Client Platform



                  Branding & Internationalisation




NetBeans Rich Client Platform
Branding & Internationalisation

          Anton Epple
       Eppleton IT Consulting
NetBeans Rich Client Platform



                                  Agenda




Internationalisation
     Branding
    Accessibility
NetBeans Rich Client Platform



                                  Branding & Internationalisation


Internationalisable Resources:
  String values in source files
  String values in manifest
  Help pages
  Graphics
  Files
  Layer.xml ( e.g. Folders)
NetBeans Rich Client Platform



                               Branding & Internationalisation


NbBundle:
 Similar to java.util.PropertyResourceBundle
 Extends the functionality of the default Java resource
 support
 Better Integration with Module System (multiple
 classloaders)
 nbresloc protocol for localized files
NetBeans Rich Client Platform



                                                  Branding & Internationalisation

Text constants in Source Files:
  Special ResourceBundle: NbBundle
  Bundle.properties File in package:
   CTL_MyTopComponent = My Window
   Nachricht_Parameter = This is my {0}. Window


  Call from Java:
   ResourceBundle bundle = NbBundle.getBundle(MyTopComponent.class);
   String msg = bundle.getString(„CTL_MyTopComponent“);
   // oder
   String msg = NbBundle.getMessage(MyTopComponent.class, „CTL_MyTopComponent“);
   // bis zu 3 Einzel Parameter
   String msg = NbBundle.getMessage(MyTopComponent.class, „Nachricht_Parameter“,
   New Integer(3));
NetBeans Rich Client Platform



                                     Branding & Internationalisation

Externalize String Constants to .properties Files
•   Tools → Internationalization →     Internationalization Wizard
NetBeans Rich Client Platform



                                               Branding & Internationalisation

String values in manifests
  Manifest file:
   Manifest-Version: 1.0
   OpenIDE-Module: de.eppleton.language
   OpenIDE-Module-Localizing-Bundle: de/eppleton/language/Bundle.properties

  Bundle.properties:
   OpenIDE-Module-Name=Language Switch


  Bundle_de.properties Datei:
   OpenIDE-Module-Name=Sprach Wechsel
NetBeans Rich Client Platform



                         Branding & Internationalisation

Search order:
  Locale US:
      1. Bundle_en_US.properties
      2. Bundle_en.properties
      3. Bundle.properties
NetBeans Rich Client Platform



                                                Branding & Internationalisation

Other Resources:
    Help Pages: Attach locale-extension ( _de ) to
    resources (html files, etc.)
    Load graphics via localised String, or use extension
    (icon.gif, icon_de.gif):
    Image img = Utilities.loadImage(„resources/icon.gif“, true);


•   System FileSystem (Menu):
                Folder Attribute
                SystemFileSystem.localizingBundle
NetBeans Rich Client Platform



                                               Branding & Internationalisation

nbresloc Protocol
  Load localized Version of File:
  URL u = new URL(„nbresloc:/de/eppleton/netbeans/modules/icon.png“);
  ImageIcon icon = newImageIcon(u);


  Can load resources from all Modules:
               also be used to reduce redundancy e.g.
               central repository for icons
NetBeans Rich Client Platform



                             Branding & Internationalisation

Bundling localization resources in Folder „locale“:
  Example NetBeans platform9 Modules:
NetBeans Rich Client Platform



                                Branding & Internationalisation

Simplify Localization by externalizing defaults:
  Translator sees only localizable resources:
NetBeans Rich Client Platform



                            Branding & Internationalisation

Localisation Bundles as Modules:
  Localization can also be packaged as installable
  Plugin
  User can install Language pack for his Locale:
http://www.sepix.de/blogs/blogrittner/blog/archive/2008/augu
http://blogs.kiyut.com/tonny/2008/08/06/netbeans-platform-lo
NetBeans Rich Client Platform



                             Branding & Internationalisation

  OmegaT Translation Tool:
http://sf.net/projects/omegat/
   http://translatedfiles.netbeans.org/docs/HOWTOs/How-to-trans
NetBeans Rich Client Platform



                                         Branding & Internationalisation

 Change language on-the-fly (1): MenuItems
   Not officially supported (but useful for Support →
   zh_CN)
   but most MenuItems react to changing Locale:
     public String getName() {
         return NbBundle.getMessage(SaveAction.class, "Save");
       }

   Some don't (SaveAsAction):
AbstractAction instance =
Lookups.forPath("Actions/System").lookup(AbstractAction.class);
instance.putValue(Action.NAME, NbBundle.getMessage(DataObject.class,
"CTL_SaveAsAction"));
NetBeans Rich Client Platform



                                  Branding & Internationalisation

 Change language on-the-fly (2): Menus
   1. Possibility: MenuBar
Frame main = WindowManager.getDefault().getMainWindow();
assert main != null;
if (main instanceof JFrame) {
  Component [] c = ((Jframe)main).getJMenuBar().getComponents();
  [....](Jmenu)c[i].setText(„internationalisiert...“);
} // Error-prone...
NetBeans Rich Client Platform



                                   Branding & Internationalisation

  2. Possibility: Force Refresh
FileSystem sfs = Repository.getDefault().getDefaultFileSystem();
FileObject menus = sfs.findResource("Menu");
  FileObject[] children = menus.getChildren();
  for (int i = 0; i < children.length; i++) {
    FileObject fileObject = children[i];
    FileLock lock = null;
    try {
      lock = fileObject.lock();
      String oldname= fileObject.getName();
      fileObject.rename(lock, File.createTempFile("bla",
"bla").getName(), null);
      fileObject.rename(lock, oldname, null);
     } catch (FileAlreadyLockedException es) { }
     lock.releaseLock();}


     Demo
NetBeans Rich Client Platform



                                  Agenda




Internationalisation
     Branding
    Accessibility
NetBeans Rich Client Platform



                     Einfaches Branding einer Anwendung
Properties Dialog:
NetBeans Rich Client Platform



                                  Basic Branding
Properties Dialog:
NetBeans Rich Client Platform



                                  Basic Branding

Properties Dialog:
NetBeans Rich Client Platform



                                                 Replacing Icons

Find Resources:
  Use „This layer in context“ to find module of an Action
  Identify Icon Path in Source Files
  Put in Suite's branding Folder
in a folder named like the module
JAR, under the same package:
NetBeans Rich Client Platform



                                              Replacing Icons


Even Icons that don't exist in the original can be „replaced“
for a better Look & Feel
Example add rollover or disabled icons:
NetBeans Rich Client Platform



                                               Replacing Icons

Picture Formats
  What to do when your Icon collection has different Picture
  Format (e.g. gif instead png required)?
  Rename your image.png to image.gif
  No conversion needed
NetBeans Rich Client Platform



                          Branding von Texten

Branding token:
NetBeans Rich Client Platform



                                           Branding Strings

Branding token is used in addition to locale
Resources stored in „locale“ folder
Search order example, Locale US:
     1.   Bundle_token_en_US.properties
     –    Bundle_token_en.properties
     –    Bundle_token.properties
     4.   Bundle_en_US.properties
     5.   Bundle_en.properties
     6.   Bundle.properties
NetBeans Rich Client Platform



                                                  Look & Feel

  Dynamically changing Swing L&F at Runtime
  Need to get Hold of Application Frame:
UIManager.setLookAndFeel(new MetalLookAndFeel());
Frame frame =
  WindowManager.getDefault().getMainWindow();
SwingUtilities.updateComponentTreeUI(frame);
frame.pack();

  UIDelegates need (e.g. Tabs) to be available or created for
  Third-party L&F (e.g. Synthetica, Substance)
NetBeans Rich Client Platform



                                  Agenda




Internationalisation
     Branding
    Accessibility
NetBeans Rich Client Platform



                                               Accessibility

  Resources:
http://a11y.netbeans.org/
  a11y Checker Module:
           This module checks designed forms online, in
           design time.
           Provides sortable error list
           Highlights affected components
           Assists with fixes
           Cooperates with i18n
NetBeans Rich Client Platform



                Accessibility

More Related Content

What's hot

Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...shesmer
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)Carles Farré
 
Wp8.5 p06 themes basics
Wp8.5 p06 themes basicsWp8.5 p06 themes basics
Wp8.5 p06 themes basicstestkiller
 
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5SoftEngine
 
Test111
Test111Test111
Test111bbnlal
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.suranisaunak
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overviewodedns
 
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaNiraj Bharambe
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsBen Combee
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfoliocummings49
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content RepositoryGabriel Walt
 
IBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersIBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersShubham Gupta
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)Saltlux zinyus
 
Web Center Services and Framework
Web Center Services and  FrameworkWeb Center Services and  Framework
Web Center Services and FrameworkJaime Cid
 
0012
00120012
0012none
 

What's hot (20)

Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (2/3)
 
Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)
 
Wp8.5 p06 themes basics
Wp8.5 p06 themes basicsWp8.5 p06 themes basics
Wp8.5 p06 themes basics
 
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
 
Test111
Test111Test111
Test111
 
Unit 05: Physical Architecture Design
Unit 05: Physical Architecture DesignUnit 05: Physical Architecture Design
Unit 05: Physical Architecture Design
 
Webapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh guptaWebapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh gupta
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overview
 
Ecom lec3 16_ej_bs
Ecom lec3 16_ej_bsEcom lec3 16_ej_bs
Ecom lec3 16_ej_bs
 
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of java
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.js
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
IBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersIBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginners
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
 
Web Center Services and Framework
Web Center Services and  FrameworkWeb Center Services and  Framework
Web Center Services and Framework
 
0012
00120012
0012
 

Similar to Branding & Internationalization with the NetBeans Platform

Build Python CMS The Plone Way
Build Python CMS The Plone WayBuild Python CMS The Plone Way
Build Python CMS The Plone WayTsungWei Hu
 
VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011djmichael156
 
Office 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft TeamsOffice 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft TeamsDavid Schneider
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Tony Frame
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsAlexander Meijers
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitPascal Rapicault
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKDominik Renzel
 
Nasdanika Foundation Server
Nasdanika Foundation ServerNasdanika Foundation Server
Nasdanika Foundation ServerPavel Vlasov
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 DavidRohit Ray
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasVikash Chandra Das
 
Presentation kaushal
Presentation kaushalPresentation kaushal
Presentation kaushalAjay Yadav
 
Switch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandSwitch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandAlfresco Software
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternDerek Novavi
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platformNelson Kopliku
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabricMark Ginnebaugh
 
Net Beans61 Platform
Net Beans61 PlatformNet Beans61 Platform
Net Beans61 Platformsatyajit_t
 
THE CLR AND THE .NET FRAMEWORK, C#
THE CLR AND THE .NET FRAMEWORK, C#THE CLR AND THE .NET FRAMEWORK, C#
THE CLR AND THE .NET FRAMEWORK, C#MANOJ BURI
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first appAlessio Ricco
 

Similar to Branding & Internationalization with the NetBeans Platform (20)

Build Python CMS The Plone Way
Build Python CMS The Plone WayBuild Python CMS The Plone Way
Build Python CMS The Plone Way
 
VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011VRE Cancer Imaging BL RIC Workshop 22032011
VRE Cancer Imaging BL RIC Workshop 22032011
 
Office 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft TeamsOffice 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft Teams
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point Solutions
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
 
WebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data LoadWebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data Load
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
 
Nasdanika Foundation Server
Nasdanika Foundation ServerNasdanika Foundation Server
Nasdanika Foundation Server
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 David
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra das
 
Presentation kaushal
Presentation kaushalPresentation kaushal
Presentation kaushal
 
Switch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New ZealandSwitch to Alfresco with Seed in Australia and New Zealand
Switch to Alfresco with Seed in Australia and New Zealand
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel Pattern
 
High quality ap is with api platform
High quality ap is with api platformHigh quality ap is with api platform
High quality ap is with api platform
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
Net Beans61 Platform
Net Beans61 PlatformNet Beans61 Platform
Net Beans61 Platform
 
THE CLR AND THE .NET FRAMEWORK, C#
THE CLR AND THE .NET FRAMEWORK, C#THE CLR AND THE .NET FRAMEWORK, C#
THE CLR AND THE .NET FRAMEWORK, C#
 
Dineshotham Kumar Khambhammettu
Dineshotham Kumar KhambhammettuDineshotham Kumar Khambhammettu
Dineshotham Kumar Khambhammettu
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first app
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Branding & Internationalization with the NetBeans Platform

  • 1. NetBeans Rich Client Platform Branding & Internationalisation NetBeans Rich Client Platform Branding & Internationalisation Anton Epple Eppleton IT Consulting
  • 2. NetBeans Rich Client Platform Agenda Internationalisation Branding Accessibility
  • 3. NetBeans Rich Client Platform Branding & Internationalisation Internationalisable Resources: String values in source files String values in manifest Help pages Graphics Files Layer.xml ( e.g. Folders)
  • 4. NetBeans Rich Client Platform Branding & Internationalisation NbBundle: Similar to java.util.PropertyResourceBundle Extends the functionality of the default Java resource support Better Integration with Module System (multiple classloaders) nbresloc protocol for localized files
  • 5. NetBeans Rich Client Platform Branding & Internationalisation Text constants in Source Files: Special ResourceBundle: NbBundle Bundle.properties File in package: CTL_MyTopComponent = My Window Nachricht_Parameter = This is my {0}. Window Call from Java: ResourceBundle bundle = NbBundle.getBundle(MyTopComponent.class); String msg = bundle.getString(„CTL_MyTopComponent“); // oder String msg = NbBundle.getMessage(MyTopComponent.class, „CTL_MyTopComponent“); // bis zu 3 Einzel Parameter String msg = NbBundle.getMessage(MyTopComponent.class, „Nachricht_Parameter“, New Integer(3));
  • 6. NetBeans Rich Client Platform Branding & Internationalisation Externalize String Constants to .properties Files • Tools → Internationalization → Internationalization Wizard
  • 7. NetBeans Rich Client Platform Branding & Internationalisation String values in manifests Manifest file: Manifest-Version: 1.0 OpenIDE-Module: de.eppleton.language OpenIDE-Module-Localizing-Bundle: de/eppleton/language/Bundle.properties Bundle.properties: OpenIDE-Module-Name=Language Switch Bundle_de.properties Datei: OpenIDE-Module-Name=Sprach Wechsel
  • 8. NetBeans Rich Client Platform Branding & Internationalisation Search order: Locale US: 1. Bundle_en_US.properties 2. Bundle_en.properties 3. Bundle.properties
  • 9. NetBeans Rich Client Platform Branding & Internationalisation Other Resources: Help Pages: Attach locale-extension ( _de ) to resources (html files, etc.) Load graphics via localised String, or use extension (icon.gif, icon_de.gif): Image img = Utilities.loadImage(„resources/icon.gif“, true); • System FileSystem (Menu): Folder Attribute SystemFileSystem.localizingBundle
  • 10. NetBeans Rich Client Platform Branding & Internationalisation nbresloc Protocol Load localized Version of File: URL u = new URL(„nbresloc:/de/eppleton/netbeans/modules/icon.png“); ImageIcon icon = newImageIcon(u); Can load resources from all Modules: also be used to reduce redundancy e.g. central repository for icons
  • 11. NetBeans Rich Client Platform Branding & Internationalisation Bundling localization resources in Folder „locale“: Example NetBeans platform9 Modules:
  • 12. NetBeans Rich Client Platform Branding & Internationalisation Simplify Localization by externalizing defaults: Translator sees only localizable resources:
  • 13. NetBeans Rich Client Platform Branding & Internationalisation Localisation Bundles as Modules: Localization can also be packaged as installable Plugin User can install Language pack for his Locale: http://www.sepix.de/blogs/blogrittner/blog/archive/2008/augu http://blogs.kiyut.com/tonny/2008/08/06/netbeans-platform-lo
  • 14. NetBeans Rich Client Platform Branding & Internationalisation OmegaT Translation Tool: http://sf.net/projects/omegat/ http://translatedfiles.netbeans.org/docs/HOWTOs/How-to-trans
  • 15. NetBeans Rich Client Platform Branding & Internationalisation Change language on-the-fly (1): MenuItems Not officially supported (but useful for Support → zh_CN) but most MenuItems react to changing Locale: public String getName() { return NbBundle.getMessage(SaveAction.class, "Save"); } Some don't (SaveAsAction): AbstractAction instance = Lookups.forPath("Actions/System").lookup(AbstractAction.class); instance.putValue(Action.NAME, NbBundle.getMessage(DataObject.class, "CTL_SaveAsAction"));
  • 16. NetBeans Rich Client Platform Branding & Internationalisation Change language on-the-fly (2): Menus 1. Possibility: MenuBar Frame main = WindowManager.getDefault().getMainWindow(); assert main != null; if (main instanceof JFrame) { Component [] c = ((Jframe)main).getJMenuBar().getComponents(); [....](Jmenu)c[i].setText(„internationalisiert...“); } // Error-prone...
  • 17. NetBeans Rich Client Platform Branding & Internationalisation 2. Possibility: Force Refresh FileSystem sfs = Repository.getDefault().getDefaultFileSystem(); FileObject menus = sfs.findResource("Menu"); FileObject[] children = menus.getChildren(); for (int i = 0; i < children.length; i++) { FileObject fileObject = children[i]; FileLock lock = null; try { lock = fileObject.lock(); String oldname= fileObject.getName(); fileObject.rename(lock, File.createTempFile("bla", "bla").getName(), null); fileObject.rename(lock, oldname, null); } catch (FileAlreadyLockedException es) { } lock.releaseLock();} Demo
  • 18. NetBeans Rich Client Platform Agenda Internationalisation Branding Accessibility
  • 19. NetBeans Rich Client Platform Einfaches Branding einer Anwendung Properties Dialog:
  • 20. NetBeans Rich Client Platform Basic Branding Properties Dialog:
  • 21. NetBeans Rich Client Platform Basic Branding Properties Dialog:
  • 22. NetBeans Rich Client Platform Replacing Icons Find Resources: Use „This layer in context“ to find module of an Action Identify Icon Path in Source Files Put in Suite's branding Folder in a folder named like the module JAR, under the same package:
  • 23. NetBeans Rich Client Platform Replacing Icons Even Icons that don't exist in the original can be „replaced“ for a better Look & Feel Example add rollover or disabled icons:
  • 24. NetBeans Rich Client Platform Replacing Icons Picture Formats What to do when your Icon collection has different Picture Format (e.g. gif instead png required)? Rename your image.png to image.gif No conversion needed
  • 25. NetBeans Rich Client Platform Branding von Texten Branding token:
  • 26. NetBeans Rich Client Platform Branding Strings Branding token is used in addition to locale Resources stored in „locale“ folder Search order example, Locale US: 1. Bundle_token_en_US.properties – Bundle_token_en.properties – Bundle_token.properties 4. Bundle_en_US.properties 5. Bundle_en.properties 6. Bundle.properties
  • 27. NetBeans Rich Client Platform Look & Feel Dynamically changing Swing L&F at Runtime Need to get Hold of Application Frame: UIManager.setLookAndFeel(new MetalLookAndFeel()); Frame frame = WindowManager.getDefault().getMainWindow(); SwingUtilities.updateComponentTreeUI(frame); frame.pack(); UIDelegates need (e.g. Tabs) to be available or created for Third-party L&F (e.g. Synthetica, Substance)
  • 28. NetBeans Rich Client Platform Agenda Internationalisation Branding Accessibility
  • 29. NetBeans Rich Client Platform Accessibility Resources: http://a11y.netbeans.org/ a11y Checker Module: This module checks designed forms online, in design time. Provides sortable error list Highlights affected components Assists with fixes Cooperates with i18n
  • 30. NetBeans Rich Client Platform Accessibility