Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Table Viewer - Entering any character on the key board would produce a beep sound(Table Viewer - How to avoid this beep sound when a cell is highlighted and any character is entered on the key board ?)
Table Viewer - Entering any character on the key board would produce a beep sound [message #671376] Tue, 17 May 2011 16:45
Pavan K Immaneni is currently offline Pavan K Immaneni
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

I changed the code as follows to enable cell editing when any character is entered on the key board.

ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(v) {
protected boolean isEditorActivationEvent(
ColumnViewerEditorActivationEvent event) {
return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
|| event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTI ON
|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.F2)
|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR)
|| (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode > 31 && event.keyCode < 127)
|| event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
}
};

Now with the above code change, when ever a cell is highlighted in the table widget and any key is entered on the key board the table cell is put into edit mode but I am getting a beep sound. What does the beep in this case trying to tell me ? Any way I can avoid the beep ? Is this a feature or bug ?

Thanks in advance for providing your thoughts.

Cheers,
Pavan
Previous Topic:How do I scroll to an ExpandItem in an ExpandBar?
Next Topic:Can (Should) TableViewer be extended?
Goto Forum:
  


Current Time: Sun Sep 21 10:14:00 GMT 2014

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

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