JDK-6450679 : Component needs static void setComponentOrientation
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-07-19
  • Updated: 2013-01-23
Related Reports
Relates :  
Description
For various reasons the default component orientation for components is UNKNOWN. applyComponentOrientation was added to make it easy to change the component orientation for a containment hierarchy. This works, but is extremely inconvenient for the following reasons:

. Many Swing components have components are are not part of the containment hierarchy. For example, cell renderers aren't normally in the containment hierarchy; JComboBox's popup isn't part of the containment hierarchy.
. It's very common to create components when needed. For example, dynamically adding to a tabbedpane. Every time components are added you need to invoke applyComponentOrientation.

There should be a static method on Component that sets the default ComponentOrientation for all Components (app context specific). This way, a developer can set it once and have all subsequently created components honor it.

Comments
EVALUATION it looks like a good idea, but, perhaps, it should be method of Toolkit
20-07-2006