Re: Detecting keys while showing a context menu [message #1060201] |
Thu, 23 May 2013 13:33 |
Christophe Bouhier Messages: 937 Registered: July 2009 |
Senior Member |
|
|
On 23-05-13 15:09, Vijay Raj wrote:
> When you get a selection event on a menu item, the SelectionEvent object
> contains a variable called stateMask, this represents the keybord states
> if any..
>
> /**
> * The state of the keyboard modifier keys at the time
> * the event was generated.
> */
> public int stateMask;
Great, this could be usefull. I am afraid however this gets lost on the
JFace abstraction of a SelectionChangedEvent. Are there any ways around
this? (CC Jface forum)
*** from StructuredViewer
/**
* Handles a select event from the widget.
* <p>
* This method is internal to the framework; subclassers should not call
* this method.
* </p>
*
* @param event
* the SWT selection event
*/
protected void handleSelect(SelectionEvent event) {
// handle case where an earlier selection listener disposed the control.
Control control = getControl();
if (control != null && !control.isDisposed()) {
updateSelection(getSelection());
}
}
>
|
|
|
Powered by
FUDForum. Page generated in 0.02790 seconds