diff options
Diffstat (limited to 'src/swing/doc/README')
-rw-r--r-- | src/swing/doc/README | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/swing/doc/README b/src/swing/doc/README new file mode 100644 index 0000000000..df3565e276 --- /dev/null +++ b/src/swing/doc/README @@ -0,0 +1,33 @@ +scala.swing + +This is a UI library that will wrap most of Java Swing for Scala in a straightforward manner. +The widget class hierarchy loosely resembles that of Java Swing. In a few places we decided +to chose to depart from Java Swing's architecture. The main differences are: + + In Java Swing all components are containers per default. This doesn't make much sense for + a number of components, like TextField, CheckBox, RadioButton, and so on. Our guess is that + this architecture was chosen because Java lacks multiple inheritance. + In scala.swing, components that can have child components extend the Container trait. + + Layout managers and panels are coupled. There is no way to exchange the layout manager + of a panel. As a result, the layout constraints for widgets can be typed. + (Note that you gain more type-safety and don't loose much flexibility here. Besides + that it is not a common operation, exchanging the layout manager of a panel in Java + Swing almost always leads to exchanging the layout constraints for every of the panel's + child component. In the end, it is not more work to move all children to a newly created + panel.) + + The event system. TODO + + +The library comprises three main packages: + + scala.swing + All essential widget classes and traits. + + scala.swing.event + The event hierarchy. + + scala.swing.test + A set of demos. + |