Please note that the Scala wikis are in a state of flux. We strongly encourage you to add content but avoid creating permanent links. URLs will frequently change. For our long-term plans see this post by the doc czar.
Skip to end of metadata
Go to start of metadata

ScalaGUI

A Scala framework wrapping Swing.

  • It uses event loops to solve the inversion-of-control problem of Swing's callback events.
  • It uses multiple-inheritance for clean composition of widget properties.
  • It uses Scala's capability for embedding domain-specific-language-like elements to provide an easy layout mechanism based on the new "Matisse" layout library.

An example of a simple application follows. Notice amongst others the following.

  • How the event loops are used for reacting to events.
    • How path-based pattern matching is used to segregate between events from different sources.
    • And how these event loops can be put in any element allowing true separation of concerns.
  • How the window is laid-out, by simply specifying constraints between widgets.

The Tutorial on Writing Modular Programs in Scala uses ScalaGUI to write a spreadsheet application. The tutorial also demonstrates pattern matching, mixin composition, and other things.

If you want to try out ScalaGUI, you can get it directly (with examples etc.) from the SVN repository.

  • No labels