|
Quick Lists
|
|
Bug ID:
|
4116464
|
|
Votes
|
1
|
|
Synopsis
|
JDK 1.2 issue: NEED TO BE ABLE TO REPLACE THE FOCUSMANAGER
|
|
Category
|
java:classes_awt
|
|
Reported Against
|
1.1beta3
, 1.2beta2
|
|
Release Fixed
|
|
|
State
|
11-Closed, duplicate of 4290675,
request for enhancement
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
4032586
,
4290675
|
|
Submit Date
|
02-MAR-1998
|
|
Description
|
This is from xxxxx , a Java licensee.
We need to have the following bug addressed in
JDK 1.2.
The xxxxx bug number is 627754.
Window should have a method, setFocusManager that allows us to replace
the default FocusManager with our own implementation. Focusmanager needs to
be a public class and it's methods need to be protected, so that we can
subclass it effectively.
(Review ID: 25805)
======================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
Currently planning to implement this functionality, or equivalent
functionality, in the merlin focus enhancements.
xxxxx@xxxxx 1999-12-14
|
|
Comments
|
Submitted On 23-NOV-1998
olywa
Please see my comments on bug 4154399
Submitted On 17-FEB-1999
olywa
Subject: Tweaks to support swapping FocusManagers
Date: Mon, 01 Feb 1999 15:22:42 -0800
From: Steve Barrett
To: swing@eos.dk, swing-feedback@java.sun.com
I submitted the following feature request, if it makes to bug parade
you
may want to add your 2 cents.
Bug Description:
1) Swing has no provision for swapping focus managers while
traversing containers and
2) Keyboard focus traversal can loop if first component is
pointed at by some other component (in other words, you don't
want the default first component in a container to really
be the first component)
These two bugs prevent useful collections of components from
easily being made into container beans.
Work Around:
Tweaks to support swapping FocusManagers, and fix looping bug:
1) Add setNextFocusableComponent(
Component startingComponent, Component nextComponent)
and
getNextFocusableComponent(Component startingComponent)
to FocusManager.
2) Have JComponent.setNextFocusableComponent() and
getNextFocusableComponent()to call
FocusManager.getCurrentManager().setNextFocusableComponent()
and
FocusManager.getCurrentManager().getNextFocusableComponent()
What this achieves is that the focus manager can now identify and
take action on the order component focus is to be traversed.
FocusManagers could then detect if the default first component
in a container is being recursively pointed to and fix it. To
complete the fix:
3) Add to FocusManager
setFirstComponent(Container aContainer, Component component)
and
setLastComponent(Container aContainer, Component component)
4) Have FocusManager
getFirstComponent(Container aContainer)
and
getLastComponent(Container aContainer)
check and see if component(s) have been explicitly set to be
either the first or the last.
5) Add to FocusManager
setFocusManager(Contianer aContainer, FocusManager fm)
and
getFocusManager(Contianer aContainer)
6) Have getFirstComponent() and getLastComponent() check to see
if a FocusManager has been set in any of its parent containers
that is different from the current FocusManager. If so then
setCurrentManager(getFocusManager(Contianer aContainer))
(yeah, I know that logic needs work)
This all preserves developer's existing code (I think) and only
adds clientProperties when these features are used, so JComponent
isn't being made even bigger. The only real overhead are the
several additional calls to focus manager.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |