User Tools

Site Tools


Sidebar

Dave Orme muses about agile and functional programming.

My current work emphasizes SOA applications using Scala, Kubernetes, and AWS with a React-based SPA front-end. I'm also interested in progressive web applications and developer tools.


Blog

Scala, Clojure, and FP

Agile

The Cloud

Data-First Development

Older work

Coconut Palm Software home


Donate Bitcoin:

1Ecnr9vtkC8b9FvmQjQaJ9ZsHB127UzVD6

Keywords:

Kubernetes, Docker, Streaming Data, Spark, Scala, Clojure, OSGi, Karaf, GCP, AWS, SQL

Disclaimer:

Everything I say here is my own opinion and not necessarily that of my employer.

blog:new_xscalawt_feature-_assign_to_properties

New XScalaWT feature- Assign to properties

In XScalaWT, to set a layout, you previously would write (same as Java):

setLayout(new FillLayout())

Now, you can write:

layout = new FillLayout()

Most SWT properties now work this way. So for example instead of using setters everywhere you can now write code like:

progressBar(
   minimum = 0,
   maximum = 50,
   selection = 20
)

Which is much cleaner and easier to follow.

Thanks much to Jean-Philippe Pellet for the idea and implementation of this feature!

XScalawt can be found on GitHub at: https://github.com/pieceoftheloaf/XScalaWT/tree/gh-pages

~~LINKBACK~~ ~~DISCUSSION:closed~~

blog/new_xscalawt_feature-_assign_to_properties.txt · Last modified: 2014/10/17 22:08 (external edit)