background preloader

Scala

Facebook Twitter

GlennSilverman/democritus - GitHub. Programming Scala. The scala.swing package in 2.8 and beyond. Scala.swing is a Scala wrapper library for Java Swing and select AWT classes. For interoperability reasons, our wrappers are transparent in the sense that clients can get the underlying Java Swing component (the peer) of every wrapper. As a consequence, wrappers must not rely on additional state unless it is kept in sync with the peer's state. Scala's swing API has undergone a few changes since Scala 2.7. Besides the obvious bugfixes, we added more wrappers, a more comprehensive component caching mechanism, and revised the window base hierarchy.

I'll go into details of the most important changes in 2.8 below, assuming you are familiar with Java Swing and the basics of scala.swing. Window hierarchy This is how the Java AWT/Swing window hierarchy looks like: While AWT's Frame and Dialog share the common base class Window, the Swing extensions have no subclass relationship or extend a common interface even though they share common functionality not present in AWT. Dialogs Events Wrapper caches. Scala 2.8 Collections API ← Decodified. Scala Days 2010 - Videos | Scala Days 2010. An Introduction To Scala for Java Programmers.