Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TableViewer scrollbar do not move when traversing with tab key
TableViewer scrollbar do not move when traversing with tab key [message #509123] Thu, 21 January 2010 13:04 Go to next message
Edin Edin is currently offline Edin EdinFriend
Messages: 101
Registered: January 2010
Senior Member
Hello,

first sorry for my bad english, but i hope you can understand my problem:

i created a tableviewer inside a IEditorPart which is editable and should jump to next cell right to the current one to edit it when you press the tab key. so far its working well, but when the tableviewer has horizontal and vertical scrollbars, they do not move coresponding to the tab event. i have manually to move them to the actual editing cell, to see and edit it. that is of course subotpimal, cause i want to get focus on the actual editing cell to see the content of the cell to edit it without moving the scrollbar manually. here is the code i have written:

TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(tableViewer, new FocusCellOwnerDrawHighlighter(tableViewer));
	
ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(tableVierwer               {
          protected boolean isEditorActivationEvent(	
ColumnViewerEditorActivationEvent event) {
				
return event.eventType==
ColumnViewerEditorActivationEvent.TRAVERSAL || 
event.eventType ==
ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION || 
(event.eventType ==
ColumnViewerEditorActivationEvent.KEY_PRESSED &&
event.keyCode == SWT.CR) || 
event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
}};

TableViewerEditor.create(tableViewer, focusCellManager, actSupport,	ColumnViewerEditor.TABBING_HORIZONTAL
| ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.KEYBOARD_ACTIVATION);
Re: TableViewer scrollbar do not move when traversing with tab key [message #509137 is a reply to message #509123] Thu, 21 January 2010 08:44 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

for me this sounds similar to the case described in this bug:
289437: [Table] the arrow key couldn't move the table scrollbar
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289437
RAP is currently using JFace 3.4 code base and
ViewerCell#scrollIntoView() and TableViewerRow#scrollCellIntoView( int )
are introduced in JFace 3.5. As Table#showColumn() has been added to RAP
in 1.3M2 ( see bug 279798 ), maybe it's possible to do this scrolling
yourself with RAP 1.3.

HTH,
Ivan

On 1/21/2010 3:05 PM, ededagic wrote:
> Hello,
>
> first sorry for my bad english, but i hope you can understand my problem:
>
> i created a tableviewer inside a IEditorPart which is editable and
> should jump to next cell right to the current one to edit it when you
> press the tab key. so far its working well, but when the tableviewer
> has horizontal and vertical scrollbars, they do not move coresponding
> to the tab event. i have manually to move them to the actual editing
> cell, to see and edit it. that is of course subotpimal, cause i want
> to get focus on the actual editing cell to see the content of the cell
> to edit it without moving the scrollbar manually. here is the code i
> have written:
>
>
> TableViewerFocusCellManager focusCellManager = new
> TableViewerFocusCellManager(tableViewer, new
> FocusCellOwnerDrawHighlighter(tableViewer));
>
> ColumnViewerEditorActivationStrategy actSupport = new
> ColumnViewerEditorActivationStrategy(tableVierwer {
> protected boolean isEditorActivationEvent(
> ColumnViewerEditorActivationEvent event) {
>
> return event.eventType==
> ColumnViewerEditorActivationEvent.TRAVERSAL || event.eventType ==
> ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION ||
> (event.eventType ==
> ColumnViewerEditorActivationEvent.KEY_PRESSED &&
> event.keyCode == SWT.CR) || event.eventType ==
> ColumnViewerEditorActivationEvent.PROGRAMMATIC;
> }};
>
> TableViewerEditor.create(tableViewer, focusCellManager, actSupport,
> ColumnViewerEditor.TABBING_HORIZONTAL
> | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
> ColumnViewerEditor.TABBING_VERTICAL |
> ColumnViewerEditor.KEYBOARD_ACTIVATION);
>
Re: TableViewer scrollbar do not move when traversing with tab key [message #509185 is a reply to message #509137] Thu, 21 January 2010 15:42 Go to previous messageGo to next message
Edin Edin is currently offline Edin EdinFriend
Messages: 101
Registered: January 2010
Senior Member
Thx. Any idea how to use that? i tried the following:

if (event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
|| event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION
|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR)
|| event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC) {
viewer.getTable().showColumn(viewer.getTable().getColumn(vie wer.getColumnViewerEditor().getFocusCell().getColumnIndex()) ); return true;
} else
return false;

now the scrollbar is moving but with sideeffects: depending on what columnindex i give there is other effect: not jump to next row, or stop 2 columns before the end. how should i write the red line to get it work?
or finally asked how do i get the actual selected column in the editor. TableCursor is not supported bei RAP, is it ?

[Updated on: Thu, 21 January 2010 16:28]

Report message to a moderator

Re: TableViewer scrollbar do not move when traversing with tab key [message #509376 is a reply to message #509185] Fri, 22 January 2010 04:56 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

If you think that you found a bug, please file a bugzilla [1] with a
snippet to reproduce it.

[1] http://wiki.eclipse.org/RAP_Bug_Reporting_Howto
Best,
Ivan

On 1/21/2010 5:42 PM, ededagic wrote:
> Thx. Any idea how to use that? i tried the following:
>
> if (event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
> || event.eventType ==
> ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION
> || (event.eventType ==
> ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR)
> || event.eventType ==
> ColumnViewerEditorActivationEvent.PROGRAMMATIC) {
>
> viewer.getTable().showColumn(viewer.getTable().getColumn(vie
> wer.getColumnViewerEditor().getFocusCell().getColumnIndex())
> ); return true;
> } else
> return false;
>
> now the scrollbar is moving but with sideeffects: depending on what
> columnindex i give there is other effect: not jump to next row, or
> stop 2 columns before the end. how should i write the red line to get
> it work?
Previous Topic:Form Heading Issue
Next Topic:table column resize/move problem - RAP 1.2.1 and Firefox 3.6.0
Goto Forum:
  


Current Time: Tue Dec 07 16:35:36 GMT 2021

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

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

Back to the top