You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Greg Brown (JIRA)" <ji...@apache.org> on 2010/03/03 14:10:27 UTC

[jira] Created: (PIVOT-427) Rename Direction enum to FocusTraversalDirection

Rename Direction enum to FocusTraversalDirection
------------------------------------------------

                 Key: PIVOT-427
                 URL: https://issues.apache.org/jira/browse/PIVOT-427
             Project: Pivot
          Issue Type: Improvement
          Components: wtk
            Reporter: Greg Brown
            Assignee: Greg Brown
            Priority: Minor
             Fix For: 1.4.1


It is somewhat arbitrary to define direction as "forward" and "backward", and this enum is used almost exclusively for focus traversal. The only other place it is used is in the delete() method of TextArea and TextInput, which uses Direction.BACKWARD to represent "backspace". This makes some sense, but Direction.FORWARD doesn't really correspond to "delete". This method should instead take a boolean "backspace" argument that would be used to distinguish between backspace and delete. Then the only use of the Direction enum would truly be focus traversal, and the name "FocusTraversalDirection" is more appropriate.


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


[jira] Resolved: (PIVOT-427) Rename Direction enum to FocusTraversalDirection

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown resolved PIVOT-427.
------------------------------

    Resolution: Fixed

> Rename Direction enum to FocusTraversalDirection
> ------------------------------------------------
>
>                 Key: PIVOT-427
>                 URL: https://issues.apache.org/jira/browse/PIVOT-427
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Greg Brown
>            Assignee: Greg Brown
>            Priority: Minor
>             Fix For: 1.4.1
>
>
> It is somewhat arbitrary to define direction as "forward" and "backward", and this enum is used almost exclusively for focus traversal. The only other place it is used is in the delete() method of TextArea and TextInput, which uses Direction.BACKWARD to represent "backspace". This makes some sense, but Direction.FORWARD doesn't really correspond to "delete". This method should instead take a boolean "backspace" argument that would be used to distinguish between backspace and delete. Then the only use of the Direction enum would truly be focus traversal, and the name "FocusTraversalDirection" is more appropriate.

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