JDK-4229173 : Need to add a DEFAULT value to ComponentOrientation
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0,1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-04-13
  • Updated: 2000-05-10
  • Resolved: 2000-05-10
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description

Name: clC74495			Date: 04/13/99


Please add a member variable "DEFAULT" to ComponentOrientation
(ComponentOrientation.DEFAULT). DEFAULT should be interpreted at
runtime to RIGHT_TO_LEFT or LEFT_TO_RIGHT based on the orientation 
of component's parent. If the component has no parent, DEFAULT 
should be interpreted based on the locale, i.e it should be 
interpreted to RIGHT_TO_LEFT if the locale is Arabic or Hebrew 
and LEFT_TO_RIGHT otherwise.

This is very important because it makes BIDI support completely 
transparent for Swing developers. If the developer builds his 
application using only Swing components, all components will
appear in RIGHT_TO_LEFT mode for Arabic and Hebrew locale and
LEFT_TO_RIGHT otherwise, without requiring him to do any special 
coding to support BIDI.
(Review ID: 56872)
======================================================================

Comments
EVALUATION The problem described by this bug is that programmers must explicilty control the ComponentOrientation property of each of their components in order to have an internationalized app. It is not likely that many programmers will actually remember to do this. A mechanism needs to be added that will link ComponentOrientation default settings to locale settings. Then most programmers can forget about ComponentOrientation and still have internationalized programs. While the problem described by this bug is valid, I do not think the solution proposed in the Description is the best approach. I also think the original severity value of 5 is too low. brian.beck@Eng 1999-09-17 A new RFE has been entered to track this problem. It uses the problem statement above rather than the solution proposed by this RFE's description. See 4337186. brian.beck@Eng 2000-05-10
10-05-2000