Whats New in Java Client Technology?
The J2SE Platform on the Client
Mature
In-production
- Small shops to Global 2000
Sun continues to invest
- Java HotSpot client VM
- AWT, JFC API, 2D, I18N, Accessibility
- Deployment
- Java Plug-In software, Java
Web Start software
The J2SE Platform Today
J2SE 1.3.1 platform shipping now
J2SE 1.4 platform beta shipping now
- Rich Clients for Web Services
- More GUI performance
- Unicode 3.0
- Mouse Wheel support!
- Java Web Start software
Agenda
Enhancements to AWT
- Eric Hawkes, AWT Engineer
Rounding out the JFC/Swing API
- Scott Violet, Swing Engineer
Richer and Faster Graphics
- Phil Race, Java 2D Engineer
Improving Internationalization
- Brian Beck, Internationalization Engineer
Whats New in AWT?
Overview of New AWT Features
New Focus Architecture (AWT and JFC/Swing)
Full Screen Mode
Headless Mode
Drag & Drop Enhancements
Mouse Wheel Support
Undecorated and Client-Decorated Frames
And more!
Keyboard Focus Enhancements
Centralized focus management
- New class java.awt.KeyboardFocusManager
- Tracks all focus activity
- Replaces javax.swing.FocusManager
New class java.awt.FocusTraversalPolicy
- Lighter-weight than javax.swing.DefaultFocusManager
- Less error-prone than JComponents setNextFocusableComponent
Focus Enhancements (Cont.)
Window/JWindow focus problems solved
Go to the Focus Session for details
- TS-1315, Focus on Focus
Wed., 11:00am, Moscone, Yerba Buena
Full Screen Mode
Gives Java technology-based programs
direct control of the screen
- Games
- Slide shows
- High-performance graphics
Go to the High-Performance Graphics
session for more details
- TS-1314, High Performance Graphics
Tues., 4:00pm, Moscone, Hall B
Headless Mode
For environments without a display,
mouse, or keyboard
- Web servers
- Enterprise servers
- Printers
Printing, 2D, Images still enabled
Headless (Cont.)
Enabled in Suns reference implementation
by using a runtime flag:
- java -Djava.awt.headless=true
Exception thrown in headless mode
- java.awt.HeadlessException
- Thrown by some AWT, JFC/Swing methods when called in headless mode
Data Transfer Enhancements
Clipboard and Drag and Drop on equal footing
Text transfer greatly simplified
- Charsets and encodings are now transparent
to most applications
Image support (finally!)
Better support for custom flavors
Vastly improved stability
Mouse Wheel
AWT and JFC/Swing API are supported
Scrolling behavior is default
Existing apps work unmodified
For custom behavior, use new interface:
- java.awt.event.MouseWheelListener
Undecorated Frames
Native decorations (e.g., Titlebar, borders) disabled
New APIs for Frames/Dialogs
- setUndecorated()
- isUndecorated()
Client-Decorated Frames
Client code decorates an Undecorated Frame
Swing PLAF can provide decorations so
top-level JFrames/JDialogs look like
child components
New APIs for JFrames/JDialogs
- setDefaultLookAndFeelDecorated()
AWT Summary
Other features
- JAWT (native interface)
- Dynamic Layout during Resize
- GetListeners()
Many bug fixes
Go to the AWT BOF for more details
Related Information
TS-1314, High Performance Graphics
Tues., 4:00pm, Moscone, Hall B
TS-1315, Focus on Focus
Wed., 11:00am, Moscone, Yerba Buena
BOF-2800, AWT BOF
Wed., 8:00pm, Argent, Metro Ballroom II
Whats New in the Java Foundation Classes
(JFCSwing) API?
Overview of New
JFC/Swing API Features
JFC/Swing specific Drag and Drop API
Indeterminate JProgressBar
Windows Look and Feel enhancements
JFileChooser improvements
Scrollable tabs in JTabbedPane
JSpinner and JFormattedTextField
Numerous minor API additions to
existing classes
Drag And Drop
Drag support for JTree, JList, JTable, JColorChooser, JFileChooser, JTextComponent
Drop support for JTextComponent
Custom TransferHandler
TransferHandler property on JComponent
- Maps model data to Transferable
Indeterminate JProgressBar
Windows Look And Feel
Emulation determined from OS
Numerous minor improvements
- Fonts picked up from desktop
- Rollover
- Pixel tweaking
- Spacing
- Mnemonics
- Sounds
1.3 Windows Look And Feel
1.4 Windows Look And Feel
1.4 Windows Look and Feel II
JFileChooser Update
JFileChooser Update II
JFileChooser Update III
JFileChooser Update IV
Scrollable JTabbedPane
JSpinner And JFormattedTextField
JSpinner
- Numbers
- Dates
- Sets of Objects
JFormattedTextField
- Numbers
- Dates
- Mask specifying legal data
JSpinner And JFormattedTextField
Related Information
TS-2734, Rich Clients for Web Services
Mon., 3:30pm, Moscone, Hall B
Tues., 11:00am, Moscone, Hall B
BOF-1325, JFC/Swing API BOF
Wed., 7:00pm, Argent, Metro Ballroom II
BOF-1334, Beans BOF
Wed., 10:00pm, Argent, Metro Ballroom III
The JFC/Swing API Connection:
- http://java.sun.com/products/jfc/tsc
Whats New in the
Java 2D API?
Whats New in the Java 2D API?
Java Print Service API
Image I/O API
Graphics Performance improvements
Text and font enhancements
Printing Enhancements:
Java Print Service API
New javax.print package
Java Community ProcessSM initiative: JSR-06
API derives from work on JiniTM printing API
Integrates tightly with Java 2DTM printing API
- (java.awt.print.PrinterJob)
Printing Enhancements:
Java Print Service API (Cont.)
Adds missing printing APIs to the platform
- To enumerate printers
- To specify how and where to print a job
- To describe printer and its capabilities
using Attributes
Uses IPP/1.1 model for printing attributes
and job submission
Can export graphics as a document
Printing Enhancements:
Java Print Service API (Cont.)
Stream Print Services
- Can export Java 2D API-based graphics as a document. e.g., for web publishing
Service Provider Interface for plugging in non-platform native printer support
Attributes for specifying 2-sided printing, media sizes, color, resolution, collation etc.
DocFlavors for describing print data,
e.g., text, html, images
Printing Enhancements:
Java Print Service API (Cont.)
Supports server (headless) printing as
well as client printing
New cross-platform (JFC/Swing API) print and page setup dialogs
More information:
- TS-595, Java Platform Printing
Wed, 4:00pm, Moscone, Hall B
Image I/O API
New core API in Merlin for reading
and writing sampled images
- E.g., JPEG, PNG reading and writing support is part of core standard
- javax.imageio packages
JCPJSR-15 expert group
Image I/O API (Cont.)
Key features
- Integrates with Java 2D image APIs
- Supports image reading, writing, transcoding
- Supports access to image metadata
- Support for advanced applications
- Support for server image reading and writing
- Pluggable architecture
Image I/O API (Cont.)
Designed for casual use by non image-oriented applications as well as more sophisticated packages
E.g., simple API for reading images
- ImageIO.read(<image source>);
- Automatically recognizes image format based on file name or image data and invokes suitable image reader plug-in
Image I/O API (Cont.)
Metadata
- Access to non-pixel data in images
- E.g., compression scheme, color space, transparency info, text annotations etc.
- Important for reading and transcoding images with minimal loss
- Metadata structures may be complex
and format-specific
- Represented using XML DOM tree
- Standard format for interchange
Image I/O API (Cont.)
Pluggable architecture
- Many image formats exist
- Impossible to support all
- Developers can create their own image format plug-ins
- Support image reading and/or writing
- Install in JRE or at runtime
- Automatic discovery by the API
Image I/O API (Cont.)
More information
- TS-600, The Java Image I/O API
Tues., 2:45pm, Sheraton, Grand Ballroom
- BOF-601, The Java Image I/O API BOF Tues., 7:00pm, Marriott, Salon 1-2
- JCP Website
http://java.sun.com/aboutJava/
communityprocess/review/jsr015/index.html
- J2SETM SDK 1.4 documentation
Graphics Performance
New VolatileImage interface
- Created in accelerated memory (VRAM)
- Accelerates copies and fills
- Good for back buffers
- Used internally by JFC/Swing API in 1.4
Graphics Performance (Cont.)
Acceleration of legacy image APIs
- Component.createImage(w,h)
- Toolkit.getImage()
- internally created and managed as accelerated VRAM image
- good for images that are updated infrequently (e.g. sprites)
Graphics Performance (Cont.)
Other performance improvements
- Internal re-architecture of Java 2D technology
- Greatly reduces overhead for typical apps
- New remote X surfaces
- Improve performance of JFC/Swing
API 1.1 image operations
Graphics Performance (Cont.)
More information
- TS-1314, High Performance Graphics
Tues., 4:00pm, Moscone, Hall B
- BOF-1328, Java 2D API BOF
Thurs., 7:00pm, Marriott, Salon 12-13
Text and Font Enhancements
OpenType font support
- Thai and Hindi text display
- Contributed by IBM
TrueType rasteriser supports hinting
Fonts shipped with SDK updated with hints and additional glyphs
Whats New in Internationalization?
Overview of New Features
Unicode 3.0
Thai Support
Hindi Support
Input Method Enhancements
Other Improvements
Thai Support
Thai script
Dictionary based word breaking
Collation handles Thai reordering
Buddhist Calendar
Formatting: dates, numbers, currency
Hindi Support
Devanagari script
Devanagari input method
Hindi formats: date, numbers, currency
Partial support for 8 additional Indic scripts
Input Method Enhancements
Persistent input method preference
Input method hot key support
Focus management improvements
Other Improvements
Expanded localization
- Messages translated to 10 languages
Historical Time Zone data
Expanded Component Orientation support
Access to Unicode bidirectional algorithm
New character converter API / SPI
Related Information
TS-1320, The Complete Client,
Tues., 12:15pm, Moscone, Hall B
BOF-1336, Internationalization Q&A
Thurs., 8:00pm, Marriott, Salon 12-13
TS-2448, New I/O APIs
Mon., 6:00pm, Moscone, Hall A
BOF-2461, New I/O APIs Q&A
Wed., 7:00pm, Argent, Metro Ballroom II
Summary
Improved Performance
Richer Toolkit
- Mouse Wheel
- Richer printing APIs
- Expanded internationalization
Serious bugs addressed
- Focus rearchitecture
- Remote X hosting close to local performance
- DnD really works!