SlideShare a Scribd company logo
1 
SWT : Technical Deep Dive 
“Eclipse Day Bangalore 2014” 
Niraj Modi 
Eclipse SWT Committer @ IBM Software Labs 
niraj.modi@in.ibm.com 
Arun Kumar Thondapu 
Eclipse SWT Co-Lead @ IBM Software Labs 
arunkumar.thondapu@in.ibm.com
2 
Agenda 
 10 features you may not know! 
 What have we been doing? 
 Useful Tools in the SWT world… 
 How to “Contribute” to SWT? 
 What’s next?
3 
10 features you may not 
know! 
 SWT as a stand-alone application 
 independent download (swt.jar is ~6MB) 
 SWT as a Java Web Start application 
 www.eclipse.org/swt/jws/controlexample.jnlp 
 Display#syncExec,Display#asyncExe 
c 
 special access methods to allow non-UI threads to 
perform operations on objects belonging to the UI-thread 
 SWT implements a single threaded UI model 
called apartment threading
4 
10 features you may not 
know! 
 Browser widget: Embeds native renderers based 
on creation style and native OS 
 Windows – Trident (IE), Gecko 
(mozilla/XULRunner) and WebKit 
 Mac OS X – WebKit, Gecko 
 Linux – WebKitGTK, Gecko
5 
10 features you may not 
know! 
 OLE/ActiveX support 
 OLE Documents, such as Word, Excel or 
PowerPoint can be embedded into SWT 
applications (using COM) 
 ActiveX Controls (can be used to embed IE) 
 Accessibility APIs for making applications 
accessible to Assistive Technology products 
on all major platforms
6 
10 features you may not 
know! 
 Custom widgets 
 StyledText 
 CCombo 
 CLabel 
 CTabFolder 
 SashForm
7 
10 features you may not 
know! 
 OpenGL support 
 OpenGL is a vendor-neutral, multi-platform standard for 
creating high-performance 2D and 3D graphics. 
 Touch and gesture support 
 If your hardware supports it, you can listen for touches or 
gestures on SWT controls. Four standard gestures are 
supported: two-finger panning, rotation, magnification, and 
swipe (three fingers on Mac OS X, flicks on Windows). 
 You can also listen for 'raw' touches.
8 
10 features you may not 
know! 
 Custom draw for Table and Tree Items 
 allows clients to create items with custom appearances 
 custom drawing is done on a per-cell basis 
 SWT.MeasureItem: allows a client to specify the dimensions 
of a cell's content 
 SWT.EraseItem: allows a client to custom draw a cell's 
background and/or selection, and to influence whether the cell's 
foreground should be drawn 
 SWT.PaintItem: allows a client to custom draw or augment a 
cell's foreground and/or focus rectangle
9 
10 features you may not 
know! 
Custom draw examples
10 
10 features you may not 
know! 
 Virtual Tables/Trees 
 virtual Tables and Trees allow developers to 
quickly create Tables and Trees with large 
amounts of data and populate them efficiently. 
 items are created on an on-demand basis. 
 reduces computational effort and memory 
footprint, preserves UI responsiveness for large 
data sets.
11 
What have we been doing? 
 CSS styling support for widgets (partial) 
 Added support for Mozilla/XULRunner 24.x 
and 64-bit support on Windows 
 Experimental support for WebKit2 on Linux is 
available 
 Default Browser renderer setting has been 
introduced
12 
Eclipse in Dark Theme
13 
What have we been doing? 
 Various BiDi text and widget orientation 
related enhancements 
 SWT#isLoadable () API 
 UI timing API 
 SWT.PreEvent and SWT.PostEvent which are 
sent before and after all events and async 
runnables.
14 
What have we been doing? 
 Porting SWT to GTK+ 3.x 
 GTK+ 3.x is API and binary incompatible 
with GTK+ 2.x 
 A number of functions, and in some cases, 
entire widgets have been deprecated 
 Uses GIO for launching applications 
 Uses cairo for all drawing
15 
Useful Tools in the SWT 
world… 
 Sleak 
 Sleak is a simple tool that monitors the creation 
and disposal of SWT graphics resources. 
 SWT Spy 
 SWT Spy plug-in for Eclipse is a simple tool that 
prints out information about the widget under the 
cursor. 
 style, layout and parent information
16 
Useful Tools in the SWT 
world… 
 SWTBot 
 UI/functional testing tool for testing SWT, 
Eclipse and GEF based applications. 
 integrates with Eclipse PDE, Eclipse 
headless testing framework, Ant and Tycho 
 WindowBuilder 
 WYSIWYG visual GUI designer
17 
How to contribute to SWT: 
 SWT dev environment setup 
 Channels to contribute 
 Creating a fix patch for any of the bugzilla 
request
18 
SWT dev environment setup: 
 Instructions to setup SWT code 
http://eclipse.org/swt/git.php 
 SWT Code snippets/Examples 
http://eclipse.org/swt/snippets/ 
 SWT sources Git repositories: 
http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git 
http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.binaries.git
19 
SWT dev environment setup:
20 
Channels to contribute 
 Report any SWT 
bug/enhancement@Bugzilla: 
http://www.eclipse.org/swt/bugs.php 
 Contribute to existing issue 
 Analyze the issue & come up with code snippet to 
reproduce it(if missing) or point to existing snippet 
 Identify problem area in the SWT code if any 
 Participate in bug discussion 
 Try to come up with a fix 
 Participate in SWT community discussions: 
http://www.eclipse.org/forums/index.php/f/100/
21 
Creating a fix patch for any of 
the Bugzilla request: 
 There are two ways to create a fix patch: 
 A less recommended (but straight forward) way is to attach an 
standard Eclipse patch to the Bugzilla bug:
22 
Creating a fix patch for any of 
the Bugzilla request: 
 Preferred way is a Gerrit patch with review support: 
http://www.vogella.com/tutorials/Gerrit/article.html
23 
What’s next? 
 Interoperability with JavaFX 
 Continue adding support for newer 
Browser runtimes 
 Enhance support for Retina and other 
high-resolution displays 
 Wayland - a display server protocol that 
is intended to replace the X Window 
System
24 
Interoperability with JavaFX?

More Related Content

PPSX
Swt vs swing
PPT
Java GUI Toolkits - Swing vs. SWT vs. Jambi
PPT
Eclipse Training - SWT & JFace
PDF
6 swt programming
PDF
Lecture 19
PDF
Framework dynamic par Simone Sivetta
PDF
Victor CG Erofeev - Metro UI
PPTX
Android application development the basics (2)
Swt vs swing
Java GUI Toolkits - Swing vs. SWT vs. Jambi
Eclipse Training - SWT & JFace
6 swt programming
Lecture 19
Framework dynamic par Simone Sivetta
Victor CG Erofeev - Metro UI
Android application development the basics (2)

What's hot (20)

PDF
What's new in ios 7.0
PDF
Multitasking in iOS 7
PDF
Mastering Interface Builder
PPTX
Continuous integration by Rémy Virin
PDF
Parse par Nicolas Lauquin
PPTX
Android
PDF
Revue des annonces WWDC2015
PDF
Mobile Day - Intel XDK & Testing
PDF
Common Client Rich Client Platforms
PDF
The Brainify App - JavaFx
PDF
Accessors Vs Direct access to properties & Design Pattern
PPTX
Introduction to android studio 2.0 and data binding library
PDF
Android Overview
PPTX
Project a day 2 introduction to android studio
PDF
Android Presentation
PPTX
Introduction to android coding
PDF
Installing And Configuring Java Me Tools
PPTX
Angular js 2.0 beta
ODP
JavaFX in Action Part I
PDF
Tips & Tricks Android
What's new in ios 7.0
Multitasking in iOS 7
Mastering Interface Builder
Continuous integration by Rémy Virin
Parse par Nicolas Lauquin
Android
Revue des annonces WWDC2015
Mobile Day - Intel XDK & Testing
Common Client Rich Client Platforms
The Brainify App - JavaFx
Accessors Vs Direct access to properties & Design Pattern
Introduction to android studio 2.0 and data binding library
Android Overview
Project a day 2 introduction to android studio
Android Presentation
Introduction to android coding
Installing And Configuring Java Me Tools
Angular js 2.0 beta
JavaFX in Action Part I
Tips & Tricks Android
Ad

Similar to SWT - Technical Deep Dive (20)

ODP
Swt 2009
PDF
Powerful tools for building web solutions
PPTX
Android Programming made easy
PDF
Hacking the Kinect with GAFFTA Day 1
PDF
Flutter vs Java Graphical User Interface Frameworks - text
PPTX
O futuro do .NET : O que eu preciso saber
PDF
Add the power of the Web to your embedded devices with WPE WebKit
PDF
Flux Security & Scalability using VS Code GitOps Extension
PPT
Csharp dot net
PDF
Smalltalk for the Web & Beyond (ESUG 2025)
PPT
Mobile Java
PDF
tybsc it asp.net full unit 1,2,3,4,5,6 notes
PPTX
DevNation
DOCX
Bhavin_Resume
PDF
"Write once, run everywhere", Oleksii Levzhynskyi
PPT
Introduction to Google Web Toolkit
PDF
DIY: Computer Vision with GWT.
PDF
DIY- computer vision with GWT
PDF
Swt qt ese2010
PPTX
Cross Platform Mobile Technologies
Swt 2009
Powerful tools for building web solutions
Android Programming made easy
Hacking the Kinect with GAFFTA Day 1
Flutter vs Java Graphical User Interface Frameworks - text
O futuro do .NET : O que eu preciso saber
Add the power of the Web to your embedded devices with WPE WebKit
Flux Security & Scalability using VS Code GitOps Extension
Csharp dot net
Smalltalk for the Web & Beyond (ESUG 2025)
Mobile Java
tybsc it asp.net full unit 1,2,3,4,5,6 notes
DevNation
Bhavin_Resume
"Write once, run everywhere", Oleksii Levzhynskyi
Introduction to Google Web Toolkit
DIY: Computer Vision with GWT.
DIY- computer vision with GWT
Swt qt ese2010
Cross Platform Mobile Technologies
Ad

More from Eclipse Day India (20)

PPTX
Java Performance Testing for Everyone - Shelley Lambert
PDF
Eclipse IDE Tips and Tricks - Lakshmi Priya Shanmugam
PDF
Pattern Matching in Java - Srikanth Sankaran
PDF
Machine Learning for Java Developers - Nasser Ebrahim
PPTX
Scaling Eclipse on HiDPI Monitors - Niraj Modi
PPTX
Please Behave Yourself: BDD and automating Eclipse RCP applications using JBe...
PDF
Supporting Java™ 9 in Eclipse - A critical perspective - Stephan Herrmann
PDF
Eclipse Day India 2015 - Rest with Java (jax rs) and jersey
PDF
Eclipse Day India 2015 - Java bytecode analysis and JIT
PPTX
Eclipse Day India 2015 - Java 8 Overview
ODP
Eclipse Day India 2015 - Java 9
PDF
Eclipse Day India 2015 - Keynote - Stephan Herrmann
PDF
Eclipse Day India 2015 - Eclipse RCP testing using Jubula based automation
PDF
Eclipse Day India 2015 - Oomph
PDF
Eclipse Day India 2015 - Keynote (Mike Milinkovich)
PDF
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
PDF
IDS and Bluemix
PPTX
PDE builds or Maven
PPT
Orion - IDE on the cloud
Java Performance Testing for Everyone - Shelley Lambert
Eclipse IDE Tips and Tricks - Lakshmi Priya Shanmugam
Pattern Matching in Java - Srikanth Sankaran
Machine Learning for Java Developers - Nasser Ebrahim
Scaling Eclipse on HiDPI Monitors - Niraj Modi
Please Behave Yourself: BDD and automating Eclipse RCP applications using JBe...
Supporting Java™ 9 in Eclipse - A critical perspective - Stephan Herrmann
Eclipse Day India 2015 - Rest with Java (jax rs) and jersey
Eclipse Day India 2015 - Java bytecode analysis and JIT
Eclipse Day India 2015 - Java 8 Overview
Eclipse Day India 2015 - Java 9
Eclipse Day India 2015 - Keynote - Stephan Herrmann
Eclipse Day India 2015 - Eclipse RCP testing using Jubula based automation
Eclipse Day India 2015 - Oomph
Eclipse Day India 2015 - Keynote (Mike Milinkovich)
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
IDS and Bluemix
PDE builds or Maven
Orion - IDE on the cloud

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Electronic commerce courselecture one. Pdf
Programs and apps: productivity, graphics, security and other tools
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
sap open course for s4hana steps from ECC to s4
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity

SWT - Technical Deep Dive

  • 1. 1 SWT : Technical Deep Dive “Eclipse Day Bangalore 2014” Niraj Modi Eclipse SWT Committer @ IBM Software Labs niraj.modi@in.ibm.com Arun Kumar Thondapu Eclipse SWT Co-Lead @ IBM Software Labs arunkumar.thondapu@in.ibm.com
  • 2. 2 Agenda  10 features you may not know!  What have we been doing?  Useful Tools in the SWT world…  How to “Contribute” to SWT?  What’s next?
  • 3. 3 10 features you may not know!  SWT as a stand-alone application  independent download (swt.jar is ~6MB)  SWT as a Java Web Start application  www.eclipse.org/swt/jws/controlexample.jnlp  Display#syncExec,Display#asyncExe c  special access methods to allow non-UI threads to perform operations on objects belonging to the UI-thread  SWT implements a single threaded UI model called apartment threading
  • 4. 4 10 features you may not know!  Browser widget: Embeds native renderers based on creation style and native OS  Windows – Trident (IE), Gecko (mozilla/XULRunner) and WebKit  Mac OS X – WebKit, Gecko  Linux – WebKitGTK, Gecko
  • 5. 5 10 features you may not know!  OLE/ActiveX support  OLE Documents, such as Word, Excel or PowerPoint can be embedded into SWT applications (using COM)  ActiveX Controls (can be used to embed IE)  Accessibility APIs for making applications accessible to Assistive Technology products on all major platforms
  • 6. 6 10 features you may not know!  Custom widgets  StyledText  CCombo  CLabel  CTabFolder  SashForm
  • 7. 7 10 features you may not know!  OpenGL support  OpenGL is a vendor-neutral, multi-platform standard for creating high-performance 2D and 3D graphics.  Touch and gesture support  If your hardware supports it, you can listen for touches or gestures on SWT controls. Four standard gestures are supported: two-finger panning, rotation, magnification, and swipe (three fingers on Mac OS X, flicks on Windows).  You can also listen for 'raw' touches.
  • 8. 8 10 features you may not know!  Custom draw for Table and Tree Items  allows clients to create items with custom appearances  custom drawing is done on a per-cell basis  SWT.MeasureItem: allows a client to specify the dimensions of a cell's content  SWT.EraseItem: allows a client to custom draw a cell's background and/or selection, and to influence whether the cell's foreground should be drawn  SWT.PaintItem: allows a client to custom draw or augment a cell's foreground and/or focus rectangle
  • 9. 9 10 features you may not know! Custom draw examples
  • 10. 10 10 features you may not know!  Virtual Tables/Trees  virtual Tables and Trees allow developers to quickly create Tables and Trees with large amounts of data and populate them efficiently.  items are created on an on-demand basis.  reduces computational effort and memory footprint, preserves UI responsiveness for large data sets.
  • 11. 11 What have we been doing?  CSS styling support for widgets (partial)  Added support for Mozilla/XULRunner 24.x and 64-bit support on Windows  Experimental support for WebKit2 on Linux is available  Default Browser renderer setting has been introduced
  • 12. 12 Eclipse in Dark Theme
  • 13. 13 What have we been doing?  Various BiDi text and widget orientation related enhancements  SWT#isLoadable () API  UI timing API  SWT.PreEvent and SWT.PostEvent which are sent before and after all events and async runnables.
  • 14. 14 What have we been doing?  Porting SWT to GTK+ 3.x  GTK+ 3.x is API and binary incompatible with GTK+ 2.x  A number of functions, and in some cases, entire widgets have been deprecated  Uses GIO for launching applications  Uses cairo for all drawing
  • 15. 15 Useful Tools in the SWT world…  Sleak  Sleak is a simple tool that monitors the creation and disposal of SWT graphics resources.  SWT Spy  SWT Spy plug-in for Eclipse is a simple tool that prints out information about the widget under the cursor.  style, layout and parent information
  • 16. 16 Useful Tools in the SWT world…  SWTBot  UI/functional testing tool for testing SWT, Eclipse and GEF based applications.  integrates with Eclipse PDE, Eclipse headless testing framework, Ant and Tycho  WindowBuilder  WYSIWYG visual GUI designer
  • 17. 17 How to contribute to SWT:  SWT dev environment setup  Channels to contribute  Creating a fix patch for any of the bugzilla request
  • 18. 18 SWT dev environment setup:  Instructions to setup SWT code http://eclipse.org/swt/git.php  SWT Code snippets/Examples http://eclipse.org/swt/snippets/  SWT sources Git repositories: http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.binaries.git
  • 19. 19 SWT dev environment setup:
  • 20. 20 Channels to contribute  Report any SWT bug/enhancement@Bugzilla: http://www.eclipse.org/swt/bugs.php  Contribute to existing issue  Analyze the issue & come up with code snippet to reproduce it(if missing) or point to existing snippet  Identify problem area in the SWT code if any  Participate in bug discussion  Try to come up with a fix  Participate in SWT community discussions: http://www.eclipse.org/forums/index.php/f/100/
  • 21. 21 Creating a fix patch for any of the Bugzilla request:  There are two ways to create a fix patch:  A less recommended (but straight forward) way is to attach an standard Eclipse patch to the Bugzilla bug:
  • 22. 22 Creating a fix patch for any of the Bugzilla request:  Preferred way is a Gerrit patch with review support: http://www.vogella.com/tutorials/Gerrit/article.html
  • 23. 23 What’s next?  Interoperability with JavaFX  Continue adding support for newer Browser runtimes  Enhance support for Retina and other high-resolution displays  Wayland - a display server protocol that is intended to replace the X Window System

Editor's Notes

  • #4: Java Web Start application - Demo
  • #5: Demo – IE – Mozilla using ControlExample
  • #6: Excel - Snippet261.java Word - Snippet262.java PPT - Snippet263.java
  • #7: TextEditor… Uniform behavior on all platforms.. StyleText underlying editor for any Default dev editor.
  • #8: Snippet195
  • #9: Snippet229
  • #12: Dark theme.. Eclipse
  • #13: Dark theme.. Eclipse
  • #14: In platform UI.. Plugin to monitor UI events .. To identify events taking lot of time.. Performance monitoring
  • #16: Could Demo a simple view of these plugins in Eclipse.
  • #19: Git view
  • #20: Git view
  • #22: Optional Demo
  • #23: https://git.eclipse.org/r/#/q/reviewer:self,n,z
  • #24: TwoButton.java
  • #25: Demo