Articles Index
The New AWT
Toward a Truly User-Friendly Interface
Lisa Stapleton
Ever talk to a Java applet over the telephone? You will, says
Javasoft's Tom Ball. And it will be an upcoming version of Java's
Advanced Windowing Toolkit (AWT) that will let you do it, says Ball.
This means that developers and end users will all have more choice than
ever as to the look-and-feel of user interfaces, all without
sacrificing portability across multiple machines.
"The new UI framework will be customizable," Ball told a large audience of
JavaOne attendees on Thursday. "You can replace the entire UI if you want,
or you can do branding, or you can give your company systems the
same corporate look-and-feel."
The upshot? Something the AWT team calls "pluggable look-and-feel," which
is a part of the new lightweight UI framework. Lightweight components are
those that don't need to be in a native window.
"You'll be able to do interesting user interfaces. You'll be able to create
watermarks, use alternative IO devices such as Braille or speech-synthesis
and speech-recognition software," says Ball. "Or you could do something
really radical, like talking with applets over the phone. And with
pluggable look-and-feel, you can load pluggable classes or subclasses of
code that handle look-and-feel."
Crucial to the new AWT is the UI factory, which separates a component's UI
from its state. "The UI factory provides a component's UI at runtime.
This is different from the peer-to-peer framework, which was a good first
hack that separated the common stuff from the platform-dependent stuff,"
says Ball. "The new architecture let's you say at runtime, 'Give me a UI
componnent,' and the right one will be selected, regardless of platform,"
says Ball. "And ultimately, we'd like the UI factories to be Beans, so you
can adjust properties after a product has shipped."
Ball says that in the future, java.awt.Component will get lighter, and will
have "less cruft in it." What does that mean?
"We're also making Java smaller. So, we'll have to shed some of the
baggage that's in there," says Ball, who recently told an internal JavaSoft
audience, "Those of you who are looking for CORBA on lightswitches are
going to be disappointed."
Other technical changes and plans include the following:
-
A Java-to-native-windowing-system drag-and-drop capability. Using such a
feature, (which will be availabe in the next major release of the JDK,
probably later this summer), users will be able to drag from Java to
non-native windows such as Windows and Motif.
-
In the future, users of the AWT will use composition and containers
instead of inheritance, and interfaces instead of subclasses. The
advantage: faster testing and time-to-market, because once you've tested a
higher-level component, you know that the lower-level components in
containersare also OK. "We've used these techniques here, and they have
really sped up our development cycle, and also probably increased our
quality," says Brown.
-
New components, including high-level components such as: TreeView,
TableView, ListView, PaneSplitter, ToolBar, TabbedFolder, ColorChooser,
FontChooser, and StyledText. Low-level components include icon, ToolTip,
StatusBar, and MessageBox, as well as sliders, gauges, and spinners.
-
Dynamic and virtual views of some components, such as TreeView, so that
when you have a lot of data in a tree, you don't have to display one icon
per item, which would result in a huge display that would force users to
scroll down for a long time.
-
Support for better displays and typefaces. JavaSoft has worked with
Adobe to create a web-based, Postscript-like system for displaying web
pages and applets. Transformations will also be supported. "If you want a
slanted window, you can have one," says Ball. Printing is, however, still
somewhat of a problem because printers vary widely in the fonts they use,
and even worse, they usually require device drivers written in native code.
Finally, the group has posted documentation on the JavaSoft Website, and
will also post early realeases there, as well, and Ball is requesting
developer feedback on the new AWT. You can send comments to the team at
Java-awt@java.sun.com. (Ball says the team reads and takes into
consideration all comments sent to this address, but sometimes they can't
reply to all of them because of the volume of e-mail.) The time for
comment has been extended for the next three weeks, until the end of April.
|
|