Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Incorrect showItem behaviour (got problem with TreeViewerEditor)
Incorrect showItem behaviour (got problem with TreeViewerEditor) [message #540770] Thu, 17 June 2010 09:50 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5463
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 Go to previous message
Eclipse UserFriend
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?)?
Previous Topic:[Databinding] TableViewer not updated when using EditorPart
Next Topic:Using EditingSupport Class with the table viewer
Goto Forum:
  


Current Time: Mon Nov 24 08:25:50 GMT 2014

Powered by FUDForum. Page generated in 0.13546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software