Issue Details (XML | Word | Printable)

Key: UBA-7602
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Marcel Rüedi
Reporter: Daniel Grob
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ULCBase

UlcUtilities methods should correctly handle menus

Created: 13/Nov/08 10:28 AM   Updated: 20/Jan/09 05:08 PM
Component/s: components
Affects Version/s: None
Fix Version/s: UltraLightClient '08 Update 2


 Description  « Hide
Adding a child to the menu does add the child to a hidden popup menu. As a consequence the parent of a menu child is the hidden popup menu and not the menu. As the parent of the hidden popup menu is null all UlcUtilities methods return null. The parent of the hidden popup menu is not stored in the parent property but in the invoker property.

Check if any utility methods on ULCComponent are affected as well (e.g. ULCComponent.getRootPane()).



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Daniel Grob added a comment - 05/Jan/09 04:45 PM - edited
After some discussion we decided that the UlcUtilities methods should use the invoker property for menu items (even if this is not the same as in Swing).
We think that Swing's behavior is not intuitive and that a developer expects that for example the root of a selected menu item is always the frame and never the special heavyweight popup menu that Swing uses sometimes (e.g. on Mac or when the popup menu is not completely contained in the frame).

Marcel Rüedi added a comment - 14/Jan/09 10:37 AM
Calling UlcUtilities.getRoot() and UlcUtilities.getRootPane() with a ULCMenuItem does return the same rootpane as if called with any other component.