At the recent JavaOneSM Conference, the JavaTM Foundation Classes
(JFC) and Swing Technology API team from Sun presented two technical
sessions that showed developers how to build several striking client
applications using the JavaTM 2 Platform, Standard Edition
(J2SETM). Thomas Ulrich reported on the technical sessions.
"Rich JavaTM Technology-Based Clients for Web Services, The Sequel"
continued last year's session, which showed how easily developers can
create a compelling client for the iPlanetTM Calendar Server. This
year, Sun's Hans Muller, Leif Samuelsson and Igor Kushnirskiy unveiled
three clients: a new version of the calendar desktop client, a client
for a large PDA (the Compaq iPAQ) and a small Mobile Information Device
Profile (MIDP) client that runs on a mobile phone.
During a related session, "How to Build an Awesome Swing Client," Sun's
Norbert Lindenberg, Josh Outwater and Scott Violet led developers on a
tour of an end-to-end application that showed how several designers can
collaborate to arrange furniture in a room. This application
demonstrated all of the J2SE platform client features: user interface, 2-D
graphics, accessibility and internationalization.
Calendar
The three rich calendar clients from the sequel to last year's session
demonstrated a live connection to the iPlanet Calendar Server. "These
clients really show the breadth of JavaTM technology support for
clients," said Kushnirskiy. "The desktop calendar client makes heavy
use of Swing's configurability to give the entire application a highly
custom look."
Developers created most of the effects contained in the screenshots
without new classes or a custom look and feel. They configured
standard Swing components with backgrounds, borders and other
properties.
Furniture
Violet, Lindenberg and Outwater created yet another example of a rich
client for a Web Service. Arranging furniture has never been easier.
The Web Service provides shared data about the location of the
furniture and the chat stream, visualization, communication and
authoring of the client.
The application demonstrates several techniques that any Swing
application can deploy: graphics, visually compelling user interfaces
and internationalization.
Each designer shares a complete view of the evolving design from a
local perspective. "Localization goes far beyond just substituting
strings," Outwater explains. "Designer dates, currency, distances, even
visual objects like the ruler have been localized. The cost of each
furniture item is always displayed in the locale of the user who's
actually going to take delivery."
This application relies on Java 2DTM APIs. Each visual design element
is defined by the Java 2D API Shape interface that keeps track of the
scale/rotate/zoom transformation for each element and handles selection
and other bookkeeping. The GUI also relies on Java 2D APIs for
anti-aliasing and compositing. "Shapes and text look great at all scales
because they're rendered with anti-aliasing turned on," said Outwater.
"Pop-up panels, like the tool palette, fade in and out because a little
timer loop sets the composite property of the graphics used to paint
the panel."
For additional technical details and illustrations:
http://java.sun.com/features/2002/03/whatdev.html
[...read more...]