Incorrect showItem behaviour (got problem with TreeViewerEditor) [message #540770] |
Thu, 17 June 2010 09:50 |
Eclipse User |
|
|
|
Originally posted by: gemaspecial.yahoo.com.hk
Tree.showItem() states in the java doc that,
".... If the item is already showing in the receiver, this method simply
returns...."
However, it takes the top left to determine if an item is showing or
not. So as long as the very left point of the item is not out of
vision, the tree will scroll everything to the very left (except a few
pixels for the expand node button)
This makes a big problem when using with TreeViewerEditor.
When user scroll the tree a bit to the right and click on a cell, the
tree will auto-scroll. Depends on how close the column being clicked to
the end of the tree, it may results in totally unexpected position.
This is how I initialize the tree.
treeViewer = new TreeViewer(...);
TreeViewerEditor.create(treeViewer, new
TreeViewerFocusCellManager(treeViewer, new
FocusCellHighlighter(treeViewer)), strategy,
ColumnViewerEditor.KEYBOARD_ACTIVATION |
ColumnViewerEditor.TABBING_HORIZONTAL);
//create tree columns...
Thanks
|
|
|
Re: Incorrect showItem behaviour (got problem with TreeViewerEditor) [message #540771 is a reply to message #540770] |
Thu, 17 June 2010 10:43 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
IIRC we fixed this in 3.6. What's your version?
Tom
Am 17.06.10 11:50, schrieb Leung Wang Hei:
> Tree.showItem() states in the java doc that,
>
> ".... If the item is already showing in the receiver, this method simply
> returns...."
>
> However, it takes the top left to determine if an item is showing or
> not. So as long as the very left point of the item is not out of
> vision, the tree will scroll everything to the very left (except a few
> pixels for the expand node button)
>
> This makes a big problem when using with TreeViewerEditor.
>
> When user scroll the tree a bit to the right and click on a cell, the
> tree will auto-scroll. Depends on how close the column being clicked to
> the end of the tree, it may results in totally unexpected position.
>
> This is how I initialize the tree.
>
> treeViewer = new TreeViewer(...);
>
> TreeViewerEditor.create(treeViewer, new
> TreeViewerFocusCellManager(treeViewer, new
> FocusCellHighlighter(treeViewer)), strategy,
> ColumnViewerEditor.KEYBOARD_ACTIVATION |
> ColumnViewerEditor.TABBING_HORIZONTAL);
>
> //create tree columns...
>
>
> Thanks
|
|
|
Re: Incorrect showItem behaviour (got problem with TreeViewerEditor) [message #541417 is a reply to message #540771] |
Mon, 21 June 2010 04:58 |
Eclipse User |
|
|
|
Originally posted by: gemaspecial.yahoo.com.hk
On 6/17/2010 6:43 PM, Tom Schindl wrote:
> IIRC we fixed this in 3.6. What's your version?
>
> Tom
>
> Am 17.06.10 11:50, schrieb Leung Wang Hei:
>> Tree.showItem() states in the java doc that,
>>
>> ".... If the item is already showing in the receiver, this method simply
>> returns...."
>>
>> However, it takes the top left to determine if an item is showing or
>> not. So as long as the very left point of the item is not out of
>> vision, the tree will scroll everything to the very left (except a few
>> pixels for the expand node button)
>>
>> This makes a big problem when using with TreeViewerEditor.
>>
>> When user scroll the tree a bit to the right and click on a cell, the
>> tree will auto-scroll. Depends on how close the column being clicked to
>> the end of the tree, it may results in totally unexpected position.
>>
>> This is how I initialize the tree.
>>
>> treeViewer = new TreeViewer(...);
>>
>> TreeViewerEditor.create(treeViewer, new
>> TreeViewerFocusCellManager(treeViewer, new
>> FocusCellHighlighter(treeViewer)), strategy,
>> ColumnViewerEditor.KEYBOARD_ACTIVATION |
>> ColumnViewerEditor.TABBING_HORIZONTAL);
>>
>> //create tree columns...
>>
>>
>> Thanks
>
My version is 3.5 (Build id: 20100218-1602)
Glad to hear there is a fix but sadly a pre-stable release might not be
an option for me. Do you think if there is a workaround?
Do you think 3.6 will be on time coming out in late June this year (just
a couple of days?)?
|
|
|
Powered by
FUDForum. Page generated in 0.03689 seconds