-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
sparc
-
solaris_8
The AWT Focus spec, section Pogrammatic Traversal, states:
Also note that hiding or disabling the focus owner, directly or indirectly
via an ancestor, or making the focus owner non-displayable or non-focusable,
initiates an automatic, forward focus traversal. While hiding any ancestor,
lightweight or heavyweight, will always indirectly hide its children, only
disabling a heavyweight ancestor will disable its children. Thus, disabling
a lightweight ancestor of the focus owner does not automatically initiate a
focus traversal.
There are several questions about this section:
- It's unclear why disabling the focus owner initiates a traversal, because
according to the spec, "A disabled Component may be the focus owner" (see
section Requesting Focus).
- It states an important difference between disabling a lightweight container
and disabling a heavyweight one. Is it really true? I couldn't find anything
about it in the javadoc. However, the Chan/Lee book (2nd Edition) doesn't
mention any differences. What's more confusing, this book (p.422) states
that children of a disabled container will not receive any input events
yet retain the enabled appearance.
It would be very useful to clarify behavior for enabling/disabling containers
for all possible scenarios (lightwight/heavyweight ancestors, lightweight/
heavyweight children). I realize this may look like a different issue, but
the Focus spec is the only place so far that mentions it.
###@###.### 2004-10-01
Also note that hiding or disabling the focus owner, directly or indirectly
via an ancestor, or making the focus owner non-displayable or non-focusable,
initiates an automatic, forward focus traversal. While hiding any ancestor,
lightweight or heavyweight, will always indirectly hide its children, only
disabling a heavyweight ancestor will disable its children. Thus, disabling
a lightweight ancestor of the focus owner does not automatically initiate a
focus traversal.
There are several questions about this section:
- It's unclear why disabling the focus owner initiates a traversal, because
according to the spec, "A disabled Component may be the focus owner" (see
section Requesting Focus).
- It states an important difference between disabling a lightweight container
and disabling a heavyweight one. Is it really true? I couldn't find anything
about it in the javadoc. However, the Chan/Lee book (2nd Edition) doesn't
mention any differences. What's more confusing, this book (p.422) states
that children of a disabled container will not receive any input events
yet retain the enabled appearance.
It would be very useful to clarify behavior for enabling/disabling containers
for all possible scenarios (lightwight/heavyweight ancestors, lightweight/
heavyweight children). I realize this may look like a different issue, but
the Focus spec is the only place so far that mentions it.
###@###.### 2004-10-01
- duplicates
-
JDK-6449894 AWT spec update for mustang (stage 2)
-
- Resolved
-