You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2009/04/28 04:32:30 UTC

[jira] Assigned: (HARMONY-2304) [classlib][swing] j.s.text.CompositeView.getNextVisualPositionFrom should use another algorithm

     [ https://issues.apache.org/jira/browse/HARMONY-2304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Beyer reassigned HARMONY-2304:
-------------------------------------

    Assignee:     (was: Nathan Beyer)

Unassigning, so someone else can pick up this issue.

> [classlib][swing] j.s.text.CompositeView.getNextVisualPositionFrom should use another algorithm
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2304
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2304
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Attachments: H2304-test-exclusion.patch, H2304-visual_position_tests.patch
>
>
> In javax.swing.text.CompositeView, getNextVisualPositionFrom is divided into two methods: getNextEastWestVisualPositionFrom() and getNextNorthSouthVisualPositionFrom(), i.e. horizontal and vertical correspondingly. The implementation of both is to call Utilities.getNextVisualPositionFrom() at the moment.
> The method in Utilities calculates the position and returns it. During the calculation Utilities traverses the Element hierarchy in the document rather than the View hierarchy, which is wrong. The View hierarchy should be traversed, and getNextVisualPositionFrom should be called on several views while calculating. For example, this approach works incorrectly if some views are not visible, like in HTML.
> My vision here is as follows. When getNextVisualPositionFrom() is called on a container (i.e. CompositeView), the container should find child view
> representing the offset from where to find the next visual position. And then the container calls getNextVisualPositionFrom() on the child it found on the
> previous step. If the method returns -1, the container has to provide alternative solution, i.e. move to the next child or something like that. Also it should provide an algorithm for the case where a child view representing the given offset is not found.
> Additionaly, when moving to another child, the container should use flipEastAndWestAtEnds() to select the direction in which children were laid out (i.e. next child is at +1 index or -1 index from the current one).
> The implementation of View.getNextVisualPositionFrom() should be revised as well. (Currently it also forwards to Utilities.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.