| Summary: | RTL orientation problem in AbstractFlowLayoutEditPolicy | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Dolev Dori <dolevd> | ||||
| Component: | WindowBuilder | Assignee: | Konstantin Scheglov <Konstantin.Scheglov> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | clayberg, wayne.beaton | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Implemented in trunk. (In reply to Konstantin Scheglov from comment #1) > Implemented in trunk. If the patch has been applied, the corresponding attachment should be marked iplog+ so that it appears in the IP Log as a contribution. |
Created attachment 202714 [details] Patch for enabling RTL support in flow based layouts We are in the process of writing a custom UI toolkit for an XML based Swing UI language. Since most of our customers speak Hebrew, we require RTL support in most of the screens we build, which led us to discover the following bug: When adding or moving components in a container with FlowLayout and RTL orientation (also when reordering tabs in a tabbed pane), the insertion point for the new component is incorrect. For example, if we look at a container with one component, trying to insert a new component to its left results in the component being placed to the right (this is because WindowBuilder thinks we are trying to add the component as the first child, but in fact, in RTL the left-most position is the position of the last child). So, in the above example, the ordering of the container: C ^ N Becomes: C N instead of: N C Reproducible: Always Proposed solution: Add an abstract method isRTL to AbstractFlowLayoutEditPolicy (similar to isHorizontal), and fix getInsertionReference to return the correct reference for RTL (proposed patch included as attachment). Thanks in advance