SlideShare a Scribd company logo
Eclipse RCP 4.x and 3.xCSS StylingKai TödterSiemens Corporate Technology6/27/20111© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Who am I?Software Architect/Engineer at Siemens Corporate TechnologyEclipse RCP expertOpen Source advocateCommitter at e4 and Platform UIE-mail: kai.toedter@siemens.comTwitter: twitter.com/kaitoedterBlog: toedter.com/blog6/27/20112© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
UI Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.3Picture from http://www.sxc.hu/photo/1089931
UI StylingIn Eclipse 3.x, UI styling can be done usingThe Presentation APICustom WidgetsThese mechanisms are very limitedIt is not possible to implement a specific UI design, created by a designerOne innovation brought by Eclipse 4.0 was the dynamic styling of the UI using CSSThis new feature can now be used easily in the Eclipse 3.x world© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.46/27/2011
4.x Dark CSS Styling with radial Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.56/27/2011
4.x Gray CSS Styling with linear Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.66/27/2011
4.x Blue CSS Styling with linear Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.76/27/2011
3.x RCP Mail with no CSS Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.8
3.x RCP Mail with CSS Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.9
3.x RCP Mail CSS Color Demonstrator6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.10
3.x RCP Mail with blue CSS Styling© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.116/27/2011
How does the CSS look like?CTabItem, Label, Tree, Text {    font-family: "Arial";}Shell {    font-size: 12;}CTabItem, ToolBar, Button, CBanner, CoolBar {    font-size: 9;    background-color: white;}© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.126/27/2011
Some Things you cannot style (yet)Menu bar backgroundTable headersPartly implemented:Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.136/27/2011
Gradient Examples© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.146/27/2011linear orange blacklinear orange black 60%linear orange black orange 50% 100%radial orange blackradial orange black 60%radial orange black orange 50% 100%
Dynamic Theme SwitchingIt is possible to change the CSS based theme at runtimeGood for accessibilityGood for user preferences6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.15Picture from http://www.sxc.hu/photo/823108
Needed Bundles for 3.x Stylingorg.apache.batik.cssorg.apache.batik.utilorg.apache.batik.util.guiorg.apache.batik.xmlorg.eclipse.e4.ui.css.coreorg.eclipse.e4.ui.css.jfaceorg.eclipse.e4.ui.css.legacyorg.eclipse.e4.ui.css.swtorg.eclipse.e4.ui.css.swt.themeorg.eclipse.e4.ui.examples.css.rcporg.eclipse.e4.ui.widgetsorg.w3c.css.sacorg.w3c.dom.smilorg.w3c.dom.svg6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.16The RCP Mail Demowith CSS Styling
How to get the bundlesCheckout :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/e4/relengImport Project Set /releng/org.eclipse.e4.ui.releng/e4.ui.css.psfCheckout e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.widgetsDelete all projects that are not on the previous slideCleanup org.eclipse.e4.ui.css.swtOrganize ImportsDelete dependencies to org.eclipse.e4.core.*Start the CSS RCP Mail demo6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.17
3.x How to enable CSS StylingProvide a CSS themeProvide an extension to org.exlipse.e4.ui.css.swt.themeEnable theming support in the initialize method of ApplicationWorkbenchAdvisor6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.18
Extension Point for Themes6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.19
3.x ApplicationWorkbenchAdvisorBundle b = FrameworkUtil.getBundle(getClass());BundleContext context = b.getBundleContext();ServiceReference serviceRef = context       .getServiceReference(IThemeManager.class.getName());IThemeManager themeManager =       (IThemeManager) context.getService(serviceRef);final IThemeEngine engine =           themeManager.getEngineForDisplay(Display.getCurrent());engine.setTheme("org.eclipse.e4.ui.examples.css.rcp", true);…6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.20
How to use custom attributes?Java:widget.setData(CSSSWTConstants.CSS_ID_KEY,                                  "navigation"); CSS:#navigation {           color: #595959;           background-color: #f0f1f7;     }© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.216/27/2011
CSS EditorsCSS has a well known syntaxBut which UI elements can be styled?Which CSS attributes does a specific element support?At Eclipse Summit Europe an Xtext-based editor, with content assist for both elements and attributes, was shownTom Schindl is currently working on another Xtext-based editorLet’s see, what Eclipse 4.2 will bring© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.226/27/2011
3.x Dynamic Theme SwitchingBundleContext context = bundle.getBundleContext();ServiceReference ref = context.getServiceReference(IThemeManager.class.getName());IThemeManager manager = (IThemeManager) context.getService(ref);IThemeEngine engine =manager.getEngineForDisplay(PlatformUI.getWorkbench()           .getActiveWorkbenchWindow() == null ? Display.getCurrent()           : PlatformUI.getWorkbench().getActiveWorkbenchWindow()           .getShell().getDisplay());engine.setTheme("org.eclipse.e4.ui.examples.css.rcp");© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.236/27/2011
Discussion6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.24Picture from http://www.sxc.hu/photo/922004
License & AcknowledgementsThis work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany LicenseSee http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_USMany thanks to the authors of the pictureshttp://www.sxc.hu/photo/1089931http://www.sxc.hu/photo/823108http://www.sxc.hu/photo/9220046/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.25
Ad

More Related Content

What's hot (20)

젠킨스 설치 및 설정
젠킨스 설치 및 설정젠킨스 설치 및 설정
젠킨스 설치 및 설정
중선 곽
 
DevOps beyond the Tools
DevOps beyond the ToolsDevOps beyond the Tools
DevOps beyond the Tools
Johann-Peter Hartmann
 
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
KWON JUNHYEOK
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container images
Anthony Dahanne
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
Docker, Inc.
 
Introducción a DevOps workshop
Introducción a DevOps workshopIntroducción a DevOps workshop
Introducción a DevOps workshop
Marco Avendaño
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
Paul Fiore
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
Boden Russell
 
Building Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using TerraformBuilding Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using Terraform
Jeeva Chelladhurai
 
Shared Memory Communications-Direct Memory Access (SMC-D) Overview
Shared Memory Communications-Direct Memory Access (SMC-D) OverviewShared Memory Communications-Direct Memory Access (SMC-D) Overview
Shared Memory Communications-Direct Memory Access (SMC-D) Overview
zOSCommserver
 
유니티 팁&트릭 Unity Tip & Trick
유니티 팁&트릭 Unity Tip & Trick유니티 팁&트릭 Unity Tip & Trick
유니티 팁&트릭 Unity Tip & Trick
MinGeun Park
 
CRI, OCI, and CRI-O
CRI, OCI, and CRI-OCRI, OCI, and CRI-O
CRI, OCI, and CRI-O
Che-Chia Chang
 
What is a Network Hypervisor?
What is a Network Hypervisor?What is a Network Hypervisor?
What is a Network Hypervisor?
ADVA
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
Steve Mactaggart
 
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Xpand IT
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
SeungYong Oh
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
Mark Leith
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
CodeOps Technologies LLP
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
Nilesh Gule
 
젠킨스 설치 및 설정
젠킨스 설치 및 설정젠킨스 설치 및 설정
젠킨스 설치 및 설정
중선 곽
 
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
[Devil's camp 2019] 혹시 Elixir 아십니까? 정.말.갓.언.어.입.니.다
KWON JUNHYEOK
 
Buildpacks: the other way to build container images
Buildpacks: the other way to build container imagesBuildpacks: the other way to build container images
Buildpacks: the other way to build container images
Anthony Dahanne
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
Docker, Inc.
 
Introducción a DevOps workshop
Introducción a DevOps workshopIntroducción a DevOps workshop
Introducción a DevOps workshop
Marco Avendaño
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
Paul Fiore
 
KVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStackKVM and docker LXC Benchmarking with OpenStack
KVM and docker LXC Benchmarking with OpenStack
Boden Russell
 
Building Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using TerraformBuilding Repeatable Infrastructure using Terraform
Building Repeatable Infrastructure using Terraform
Jeeva Chelladhurai
 
Shared Memory Communications-Direct Memory Access (SMC-D) Overview
Shared Memory Communications-Direct Memory Access (SMC-D) OverviewShared Memory Communications-Direct Memory Access (SMC-D) Overview
Shared Memory Communications-Direct Memory Access (SMC-D) Overview
zOSCommserver
 
유니티 팁&트릭 Unity Tip & Trick
유니티 팁&트릭 Unity Tip & Trick유니티 팁&트릭 Unity Tip & Trick
유니티 팁&트릭 Unity Tip & Trick
MinGeun Park
 
What is a Network Hypervisor?
What is a Network Hypervisor?What is a Network Hypervisor?
What is a Network Hypervisor?
ADVA
 
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Red Hat Value Proposition - Red Hat DevOps & Microservices Conference 2017
Xpand IT
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
SeungYong Oh
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
Mark Leith
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
Nilesh Gule
 

Similar to CSS Styling for Eclipse RCP 3.x and 4.x (20)

E4 css
E4 cssE4 css
E4 css
Kai Tödter
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010
Lars Vogel
 
Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010
Lars Vogel
 
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application PlatformEclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Tonny Madsen
 
Dotnet basics
Dotnet basicsDotnet basics
Dotnet basics
Mir Majid
 
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling SocietyEclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
melbats
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
Paxcel Technologies
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
Kai Tödter
 
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Stephan Eberle
 
Kubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 UpdateKubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 Update
Matthew Farina
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
Axway Appcelerator
 
Facets of applied smw
Facets of applied smwFacets of applied smw
Facets of applied smw
Jesse Wang
 
Refining Copyright Oscon 2007
Refining Copyright Oscon 2007Refining Copyright Oscon 2007
Refining Copyright Oscon 2007
Jon Phillips
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillips
oscon2007
 
Trying to Sell PVS-Studio to Google, or New Bugs in Chromium
Trying to Sell PVS-Studio to Google, or New Bugs in ChromiumTrying to Sell PVS-Studio to Google, or New Bugs in Chromium
Trying to Sell PVS-Studio to Google, or New Bugs in Chromium
Andrey Karpov
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
bgrynko
 
Xebia deploy it
Xebia deploy itXebia deploy it
Xebia deploy it
Ben Laarhoven
 
Containerisation and orchestration of mautic application
Containerisation and orchestration of mautic applicationContainerisation and orchestration of mautic application
Containerisation and orchestration of mautic application
Sreekar Achanta
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010
Lars Vogel
 
Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010
Lars Vogel
 
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application PlatformEclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Tonny Madsen
 
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling SocietyEclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
Eclipse DemoCamp Toulouse 2017 - Mr. Robot : The modeling Society
melbats
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
Paxcel Technologies
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
Kai Tödter
 
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Sphinx: An Industrial Strength Tool Platform Fostering Model-driven Developme...
Stephan Eberle
 
Kubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 UpdateKubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 Update
Matthew Farina
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
Axway Appcelerator
 
Facets of applied smw
Facets of applied smwFacets of applied smw
Facets of applied smw
Jesse Wang
 
Refining Copyright Oscon 2007
Refining Copyright Oscon 2007Refining Copyright Oscon 2007
Refining Copyright Oscon 2007
Jon Phillips
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillips
oscon2007
 
Trying to Sell PVS-Studio to Google, or New Bugs in Chromium
Trying to Sell PVS-Studio to Google, or New Bugs in ChromiumTrying to Sell PVS-Studio to Google, or New Bugs in Chromium
Trying to Sell PVS-Studio to Google, or New Bugs in Chromium
Andrey Karpov
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
bgrynko
 
Containerisation and orchestration of mautic application
Containerisation and orchestration of mautic applicationContainerisation and orchestration of mautic application
Containerisation and orchestration of mautic application
Sreekar Achanta
 
Ad

Recently uploaded (20)

Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
Right to liberty and security of a person.pdf
Right to liberty and security of a person.pdfRight to liberty and security of a person.pdf
Right to liberty and security of a person.pdf
danielbraico197
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
User Vision
 
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Preeti Jha
 
RFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdfRFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdf
EnCStore Private Limited
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI and Meaningful Work by Pablo Fernández Vallejo
AI and Meaningful Work by Pablo Fernández VallejoAI and Meaningful Work by Pablo Fernández Vallejo
AI and Meaningful Work by Pablo Fernández Vallejo
UXPA Boston
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Scientific Large Language Models in Multi-Modal Domains
Scientific Large Language Models in Multi-Modal DomainsScientific Large Language Models in Multi-Modal Domains
Scientific Large Language Models in Multi-Modal Domains
syedanidakhader1
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Is Your QA Team Still Working in Silos? Here's What to Do.
Is Your QA Team Still Working in Silos? Here's What to Do.Is Your QA Team Still Working in Silos? Here's What to Do.
Is Your QA Team Still Working in Silos? Here's What to Do.
marketing943205
 
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
UXPA Boston
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptxIn-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
aptyai
 
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Vasileios Komianos
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptxUiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
anabulhac
 
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
Right to liberty and security of a person.pdf
Right to liberty and security of a person.pdfRight to liberty and security of a person.pdf
Right to liberty and security of a person.pdf
danielbraico197
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
Accommodating Neurodiverse Users Online (Global Accessibility Awareness Day 2...
User Vision
 
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Preeti Jha
 
RFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdfRFID in Supply chain management and logistics.pdf
RFID in Supply chain management and logistics.pdf
EnCStore Private Limited
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI and Meaningful Work by Pablo Fernández Vallejo
AI and Meaningful Work by Pablo Fernández VallejoAI and Meaningful Work by Pablo Fernández Vallejo
AI and Meaningful Work by Pablo Fernández Vallejo
UXPA Boston
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Scientific Large Language Models in Multi-Modal Domains
Scientific Large Language Models in Multi-Modal DomainsScientific Large Language Models in Multi-Modal Domains
Scientific Large Language Models in Multi-Modal Domains
syedanidakhader1
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Is Your QA Team Still Working in Silos? Here's What to Do.
Is Your QA Team Still Working in Silos? Here's What to Do.Is Your QA Team Still Working in Silos? Here's What to Do.
Is Your QA Team Still Working in Silos? Here's What to Do.
marketing943205
 
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
Bridging AI and Human Expertise: Designing for Trust and Adoption in Expert S...
UXPA Boston
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptxIn-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
aptyai
 
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Digital Technologies for Culture, Arts and Heritage: Insights from Interdisci...
Vasileios Komianos
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptxUiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
UiPath AgentHack - Build the AI agents of tomorrow_Enablement 1.pptx
anabulhac
 
Ad

CSS Styling for Eclipse RCP 3.x and 4.x

  • 1. Eclipse RCP 4.x and 3.xCSS StylingKai TödterSiemens Corporate Technology6/27/20111© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 2. Who am I?Software Architect/Engineer at Siemens Corporate TechnologyEclipse RCP expertOpen Source advocateCommitter at e4 and Platform UIE-mail: [email protected]: twitter.com/kaitoedterBlog: toedter.com/blog6/27/20112© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 3. UI Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.3Picture from http://www.sxc.hu/photo/1089931
  • 4. UI StylingIn Eclipse 3.x, UI styling can be done usingThe Presentation APICustom WidgetsThese mechanisms are very limitedIt is not possible to implement a specific UI design, created by a designerOne innovation brought by Eclipse 4.0 was the dynamic styling of the UI using CSSThis new feature can now be used easily in the Eclipse 3.x world© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.46/27/2011
  • 5. 4.x Dark CSS Styling with radial Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.56/27/2011
  • 6. 4.x Gray CSS Styling with linear Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.66/27/2011
  • 7. 4.x Blue CSS Styling with linear Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.76/27/2011
  • 8. 3.x RCP Mail with no CSS Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.8
  • 9. 3.x RCP Mail with CSS Styling6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.9
  • 10. 3.x RCP Mail CSS Color Demonstrator6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.10
  • 11. 3.x RCP Mail with blue CSS Styling© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.116/27/2011
  • 12. How does the CSS look like?CTabItem, Label, Tree, Text { font-family: "Arial";}Shell { font-size: 12;}CTabItem, ToolBar, Button, CBanner, CoolBar { font-size: 9; background-color: white;}© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.126/27/2011
  • 13. Some Things you cannot style (yet)Menu bar backgroundTable headersPartly implemented:Gradients© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.136/27/2011
  • 14. Gradient Examples© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.146/27/2011linear orange blacklinear orange black 60%linear orange black orange 50% 100%radial orange blackradial orange black 60%radial orange black orange 50% 100%
  • 15. Dynamic Theme SwitchingIt is possible to change the CSS based theme at runtimeGood for accessibilityGood for user preferences6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.15Picture from http://www.sxc.hu/photo/823108
  • 16. Needed Bundles for 3.x Stylingorg.apache.batik.cssorg.apache.batik.utilorg.apache.batik.util.guiorg.apache.batik.xmlorg.eclipse.e4.ui.css.coreorg.eclipse.e4.ui.css.jfaceorg.eclipse.e4.ui.css.legacyorg.eclipse.e4.ui.css.swtorg.eclipse.e4.ui.css.swt.themeorg.eclipse.e4.ui.examples.css.rcporg.eclipse.e4.ui.widgetsorg.w3c.css.sacorg.w3c.dom.smilorg.w3c.dom.svg6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.16The RCP Mail Demowith CSS Styling
  • 17. How to get the bundlesCheckout :pserver:[email protected]:/cvsroot/eclipse/e4/relengImport Project Set /releng/org.eclipse.e4.ui.releng/e4.ui.css.psfCheckout e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.widgetsDelete all projects that are not on the previous slideCleanup org.eclipse.e4.ui.css.swtOrganize ImportsDelete dependencies to org.eclipse.e4.core.*Start the CSS RCP Mail demo6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.17
  • 18. 3.x How to enable CSS StylingProvide a CSS themeProvide an extension to org.exlipse.e4.ui.css.swt.themeEnable theming support in the initialize method of ApplicationWorkbenchAdvisor6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.18
  • 19. Extension Point for Themes6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.19
  • 20. 3.x ApplicationWorkbenchAdvisorBundle b = FrameworkUtil.getBundle(getClass());BundleContext context = b.getBundleContext();ServiceReference serviceRef = context .getServiceReference(IThemeManager.class.getName());IThemeManager themeManager = (IThemeManager) context.getService(serviceRef);final IThemeEngine engine = themeManager.getEngineForDisplay(Display.getCurrent());engine.setTheme("org.eclipse.e4.ui.examples.css.rcp", true);…6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.20
  • 21. How to use custom attributes?Java:widget.setData(CSSSWTConstants.CSS_ID_KEY, "navigation"); CSS:#navigation { color: #595959; background-color: #f0f1f7; }© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.216/27/2011
  • 22. CSS EditorsCSS has a well known syntaxBut which UI elements can be styled?Which CSS attributes does a specific element support?At Eclipse Summit Europe an Xtext-based editor, with content assist for both elements and attributes, was shownTom Schindl is currently working on another Xtext-based editorLet’s see, what Eclipse 4.2 will bring© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.226/27/2011
  • 23. 3.x Dynamic Theme SwitchingBundleContext context = bundle.getBundleContext();ServiceReference ref = context.getServiceReference(IThemeManager.class.getName());IThemeManager manager = (IThemeManager) context.getService(ref);IThemeEngine engine =manager.getEngineForDisplay(PlatformUI.getWorkbench() .getActiveWorkbenchWindow() == null ? Display.getCurrent() : PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell().getDisplay());engine.setTheme("org.eclipse.e4.ui.examples.css.rcp");© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.236/27/2011
  • 24. Discussion6/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.24Picture from http://www.sxc.hu/photo/922004
  • 25. License & AcknowledgementsThis work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany LicenseSee http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_USMany thanks to the authors of the pictureshttp://www.sxc.hu/photo/1089931http://www.sxc.hu/photo/823108http://www.sxc.hu/photo/9220046/27/2011© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.25