Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Table Viewer - How to control the Page Up and Page Down behavior(How to overiride the default Page Up and Page Down behavior in a Table Viewer)
Table Viewer - How to control the Page Up and Page Down behavior [message #669341] Tue, 10 May 2011 01:11 Go to next message
Pavan K Immaneni is currently offline Pavan K ImmaneniFriend
Messages: 20
Registered: July 2009
Junior Member
I am using the default Table Viewer Snippets Snippet059CellNavigationIn33 or Snippet058CellNavigationIn34.
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface. snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippe ts/viewers/Snippet059CellNavigationIn33.java?view=markup
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface. snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippe ts/viewers/Snippet058CellNavigationIn34.java?view=markup

In both the case when I hit Page Up or Page Down buttons on the key board the selection in the table widget moves to the top most row (dotted line) or bottom most row (dotted line) respectively leaving the selection to the selected column.

How can I change this behavior such that the selection does not move to the top or bottom row of the table widget ?

In the code snippets, I did not see any explicit code to move the table selection to the top most or bottom most row. Hence I was wondering how is this being done ? How can I overwrite this behavior ?

Please help.

Thank you,
Pavan

[Updated on: Tue, 10 May 2011 01:12]

Report message to a moderator

Re: Table Viewer - How to control the Page Up and Page Down behavior [message #669400 is a reply to message #669341] Tue, 10 May 2011 08:19 Go to previous messageGo to next message
Carsten Habicht is currently offline Carsten HabichtFriend
Messages: 14
Registered: January 2011
Junior Member
Hi Pavan,

just to get it right: Are we talking about selection or focus here?

Without having written code that selects cells (rather than whole rows), I would guess that
1.) key presses move the focus around in a table and
2.) you could set the selection programmatically via v.setSelection(new StructuredSelection(...)).

HTH
Carsten


Sylphen - Ihr Systemhaus in Mittelhessen - http://www.sylphen.com/
Re: Table Viewer - How to control the Page Up and Page Down behavior [message #669520 is a reply to message #669400] Tue, 10 May 2011 14:58 Go to previous message
Pavan K Immaneni is currently offline Pavan K ImmaneniFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Carsten,

I am talking about the focus of the whole table row (dotted line). If you run the snippet and select a cell (lets say row 3, column 2) and then hit Page Up then you would notice that the focus (dotted line) changes to the first row of the table and the selection moves to the cell (row 1 and column 2).

I am looking for overriding this behavior of Page Up and Page Down.

Thanks,
Pavan
Previous Topic:DeferredContentProvider with TreeViewer
Next Topic:Table Viewer - Can the extra padding on each table cell be removed
Goto Forum:
  


Current Time: Fri Nov 28 01:48:49 GMT 2014

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

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