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

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 FresherRemote DBA Services
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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 TerraformAndrey Devyatkin
 
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 textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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...Enterprise Knowledge
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

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
 
[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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 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