AWT BOF
Engineering Manager: Lara Bunni
- Engineering Team:
- Brent Christian
- Hania Gajewska
- Eric Hawkes
- Michael Martak
- Steve McGrath
- Dave Mendenhall
- Richard Ray
- Lee Ann Rucker
Sun Microsystems Inc
Contents
GetListeners
Keyboard Focus
Full Screen Mode
Headless Mode
Data Transfer Enhancements
Mouse Wheel
Undecorated Frames & Dialogs
Frame State API
Multiscreen
Q&A
GetListeners Enhancements
Improvement to getListeners() API
As per changes to the Beans specification
getFooListeners() to match addFooListener() and removeFooListener()
Support for listeners with additional arguments
PropertyChangeListeners (property name arg)
AWTEventListeners (event mask arg)
Used by long-term persistence API (JSR-057)
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 JComponent's setNextFocusableComponent
Window/JWindow focus problems solved
Full Screen Mode
Gives Java programs direct control of the screen
Games
Slide shows
High-performance graphics
Headless Mode
For environments without a display, mouse, or keyboard
Web servers, Enterprise servers & printers
Printing, 2D, Images still enabled
Enabled in Sun's reference implementation by using a runtime flag: java -Djava.awt.headless=true
Exception thrown in headless mode
java.awt.HeadlessException
Thrown by some AWT, 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 Swing are supported
Scrolling behavior is default
Existing apps work unmodified
For custom behavior, use new interface:
java.awt.event.MouseWheelListener
Undecorated Frames & Dialogs
Native decorations (e.g. Titlebar, borders) disabled
New APIs for Frames/Dialogs
setUndecorated()
isUndecorated()
Client can decorate or have Swing decorate
Frame State API
Minimize, Maximize frames
java.awt.Frame.setExtendedState(...)
Platform support detection
java.awt.Toolkit.isFrameStateAvailable(...)
New WindowStateChanged event
java.awt.event.WindowStateListener
Improved Multiscreen Support
Many bug fixes
Dragging between screens
Display settings changes
Improved hardward acceleration support
Xinerama-aware