SlideShare una empresa de Scribd logo
1 de 25
Eclipse RCP 4.x and 3.xCSS Styling Kai Tödter Siemens Corporate Technology 6/27/2011 1 © 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 Technology Eclipse RCP expert Open Source advocate Committer at e4 and Platform UI E-mail: kai.toedter@siemens.com Twitter: twitter.com/kaitoedter Blog: toedter.com/blog 6/27/2011 2 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
UI Styling 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 3 Picture from http://www.sxc.hu/photo/1089931
UI Styling In Eclipse 3.x, UI styling can be done using The Presentation API Custom Widgets These mechanisms are very limited It is not possible to implement a specific UI design, created by a designer One innovation brought by Eclipse 4.0 was the dynamic styling of the UI using CSS This 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. 4 6/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. 5 6/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. 6 6/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. 7 6/27/2011
3.x RCP Mail with no CSS Styling 6/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 Styling 6/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 Demonstrator 6/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. 11 6/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. 12 6/27/2011
Some Things you cannot style (yet) Menu bar background Table headers Partly implemented: Gradients © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 13 6/27/2011
Gradient Examples © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 14 6/27/2011 linear orange black linear orange black 60% linear orange black orange 50% 100% radial orange black radial orange black 60% radial orange black orange 50% 100%
Dynamic Theme Switching It is possible to change the CSS based theme at runtime Good for accessibility Good for user preferences 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 15 Picture from http://www.sxc.hu/photo/823108
Needed Bundles for 3.x Styling org.apache.batik.css org.apache.batik.util org.apache.batik.util.gui org.apache.batik.xml org.eclipse.e4.ui.css.core org.eclipse.e4.ui.css.jface org.eclipse.e4.ui.css.legacy org.eclipse.e4.ui.css.swt org.eclipse.e4.ui.css.swt.theme org.eclipse.e4.ui.examples.css.rcp org.eclipse.e4.ui.widgets org.w3c.css.sac org.w3c.dom.smil org.w3c.dom.svg 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 16 The RCP Mail Demowith CSS Styling
How to get the bundles Checkout :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/e4/releng Import Project Set /releng/org.eclipse.e4.ui.releng/e4.ui.css.psf Checkout e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.widgets Delete all projects that are not on the previous slide Cleanup org.eclipse.e4.ui.css.swt Organize Imports Delete dependencies to org.eclipse.e4.core.* Start the CSS RCP Mail demo 6/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 Styling Provide a CSS theme Provide an extension to org.exlipse.e4.ui.css.swt.theme Enable theming support in the initialize method of ApplicationWorkbenchAdvisor 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 18
Extension Point for Themes 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 19
3.x ApplicationWorkbenchAdvisor Bundle 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. 21 6/27/2011
CSS Editors CSS has a well known syntax But 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 shown Tom Schindl is currently working on another Xtext-based editor Let’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. 22 6/27/2011
3.x Dynamic Theme Switching BundleContext 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. 23 6/27/2011
Discussion 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 24 Picture from http://www.sxc.hu/photo/922004
License & Acknowledgements This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License See http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US Many thanks to the authors of the pictures http://www.sxc.hu/photo/1089931 http://www.sxc.hu/photo/823108 http://www.sxc.hu/photo/922004 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 25

Más contenido relacionado

La actualidad más candente

젠킨스 설치 및 설정
젠킨스 설치 및 설정젠킨스 설치 및 설정
젠킨스 설치 및 설정중선 곽
 
Rancher Rodeo
Rancher RodeoRancher Rodeo
Rancher RodeoSUSE
 
Designing High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWSDesigning High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWS☁ Bryan Krausen
 
Installing and Running Postfix within a Docker Container
Installing and Running Postfix within a Docker ContainerInstalling and Running Postfix within a Docker Container
Installing and Running Postfix within a Docker ContainerDocker, Inc.
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Zero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesZero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesWojciech Barczyński
 
今だからこそ知りたい Docker Compose/Swarm 入門
今だからこそ知りたい Docker Compose/Swarm 入門今だからこそ知りたい Docker Compose/Swarm 入門
今だからこそ知りたい Docker Compose/Swarm 入門Masahito Zembutsu
 
VMware Virtualization
VMware Virtualization VMware Virtualization
VMware Virtualization Ashwani Kumar
 
Alphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes ArchitectureKnoldus Inc.
 
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into ContainerdAkihiro Suda
 
Choose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesChoose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesYusuf Hadiwinata Sutandar
 
Re:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS IntegrationRe:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS Integrationaspyker
 

La actualidad más candente (20)

Hypervisors
HypervisorsHypervisors
Hypervisors
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
Podman rootless containers
Podman rootless containersPodman rootless containers
Podman rootless containers
 
젠킨스 설치 및 설정
젠킨스 설치 및 설정젠킨스 설치 및 설정
젠킨스 설치 및 설정
 
Rancher Rodeo
Rancher RodeoRancher Rodeo
Rancher Rodeo
 
Designing High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWSDesigning High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWS
 
Installing and Running Postfix within a Docker Container
Installing and Running Postfix within a Docker ContainerInstalling and Running Postfix within a Docker Container
Installing and Running Postfix within a Docker Container
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Zero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesZero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with Kubernetes
 
今だからこそ知りたい Docker Compose/Swarm 入門
今だからこそ知りたい Docker Compose/Swarm 入門今だからこそ知りたい Docker Compose/Swarm 入門
今だからこそ知りたい Docker Compose/Swarm 入門
 
VMware Virtualization
VMware Virtualization VMware Virtualization
VMware Virtualization
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Alphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et Configuration
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
SELinux Basic Usage
SELinux Basic UsageSELinux Basic Usage
SELinux Basic Usage
 
Choose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesChoose the Right Container Storage for Kubernetes
Choose the Right Container Storage for Kubernetes
 
Re:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS IntegrationRe:invent 2016 Container Scheduling, Execution and AWS Integration
Re:invent 2016 Container Scheduling, Execution and AWS Integration
 

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

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 2010Lars Vogel
 
Developing Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformDeveloping Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformKai Tödter
 
Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Lars 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 PlatformTonny 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 Societymelbats
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Paxcel 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 VaadinKai 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 UpdateMatthew 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 platformTonny Madsen
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open SourceAxway Appcelerator
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium TutorialKevin Whinnery
 
Facets of applied smw
Facets of applied smwFacets of applied smw
Facets of applied smwJesse Wang
 
Refining Copyright Oscon 2007
Refining Copyright Oscon 2007Refining Copyright Oscon 2007
Refining Copyright Oscon 2007Jon Phillips
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillipsoscon2007
 
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 ChromiumAndrey Karpov
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvcbgrynko
 

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

E4 css
E4 cssE4 css
E4 css
 
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
 
Developing Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformDeveloping Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application Platform
 
Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010
 
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
 
Dotnet basics
Dotnet basicsDotnet basics
Dotnet basics
 
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
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
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
 
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...
 
Kubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 UpdateKubecon SIG Apps December 2017 Update
Kubecon SIG Apps December 2017 Update
 
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
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Facets of applied smw
Facets of applied smwFacets of applied smw
Facets of applied smw
 
Refining Copyright Oscon 2007
Refining Copyright Oscon 2007Refining Copyright Oscon 2007
Refining Copyright Oscon 2007
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillips
 
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
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
 
Xebia deploy it
Xebia deploy itXebia deploy it
Xebia deploy it
 

Último

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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 

Último (20)

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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 

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

  • 1. Eclipse RCP 4.x and 3.xCSS Styling Kai Tödter Siemens Corporate Technology 6/27/2011 1 © 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 Technology Eclipse RCP expert Open Source advocate Committer at e4 and Platform UI E-mail: kai.toedter@siemens.com Twitter: twitter.com/kaitoedter Blog: toedter.com/blog 6/27/2011 2 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 3. UI Styling 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 3 Picture from http://www.sxc.hu/photo/1089931
  • 4. UI Styling In Eclipse 3.x, UI styling can be done using The Presentation API Custom Widgets These mechanisms are very limited It is not possible to implement a specific UI design, created by a designer One innovation brought by Eclipse 4.0 was the dynamic styling of the UI using CSS This 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. 4 6/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. 5 6/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. 6 6/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. 7 6/27/2011
  • 8. 3.x RCP Mail with no CSS Styling 6/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 Styling 6/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 Demonstrator 6/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. 11 6/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. 12 6/27/2011
  • 13. Some Things you cannot style (yet) Menu bar background Table headers Partly implemented: Gradients © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 13 6/27/2011
  • 14. Gradient Examples © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 14 6/27/2011 linear orange black linear orange black 60% linear orange black orange 50% 100% radial orange black radial orange black 60% radial orange black orange 50% 100%
  • 15. Dynamic Theme Switching It is possible to change the CSS based theme at runtime Good for accessibility Good for user preferences 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 15 Picture from http://www.sxc.hu/photo/823108
  • 16. Needed Bundles for 3.x Styling org.apache.batik.css org.apache.batik.util org.apache.batik.util.gui org.apache.batik.xml org.eclipse.e4.ui.css.core org.eclipse.e4.ui.css.jface org.eclipse.e4.ui.css.legacy org.eclipse.e4.ui.css.swt org.eclipse.e4.ui.css.swt.theme org.eclipse.e4.ui.examples.css.rcp org.eclipse.e4.ui.widgets org.w3c.css.sac org.w3c.dom.smil org.w3c.dom.svg 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 16 The RCP Mail Demowith CSS Styling
  • 17. How to get the bundles Checkout :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/e4/releng Import Project Set /releng/org.eclipse.e4.ui.releng/e4.ui.css.psf Checkout e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.widgets Delete all projects that are not on the previous slide Cleanup org.eclipse.e4.ui.css.swt Organize Imports Delete dependencies to org.eclipse.e4.core.* Start the CSS RCP Mail demo 6/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 Styling Provide a CSS theme Provide an extension to org.exlipse.e4.ui.css.swt.theme Enable theming support in the initialize method of ApplicationWorkbenchAdvisor 6/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 Themes 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 19
  • 20. 3.x ApplicationWorkbenchAdvisor Bundle 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. 21 6/27/2011
  • 22. CSS Editors CSS has a well known syntax But 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 shown Tom Schindl is currently working on another Xtext-based editor Let’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. 22 6/27/2011
  • 23. 3.x Dynamic Theme Switching BundleContext 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. 23 6/27/2011
  • 24. Discussion 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 24 Picture from http://www.sxc.hu/photo/922004
  • 25. License & Acknowledgements This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License See http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US Many thanks to the authors of the pictures http://www.sxc.hu/photo/1089931 http://www.sxc.hu/photo/823108 http://www.sxc.hu/photo/922004 6/27/2011 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 25