Maps a key to an action.
<p>
One action can be associated with N keys. However, each key can only
have one action (key:action is N:1 relation).
</p>
@param key a key code defined in SWT.java or a character.
Optionally ORd with a state mask. Preferred state masks are one or more of
SWT.MOD1, SWT.MOD2, SWT.MOD3, since these masks account for modifier platform
differences. However, there may be cases where using the specific state masks
(i.e., SWT.CTRL, SWT.SHIFT, SWT.ALT, SWT.COMMAND) makes sense.
@param action one of the predefined actions defined in ST.java.
Use SWT.NULL to remove a key binding.
@exception SWTException <ul>
<li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
<li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
</ul>
Maps a key to an action. <p> One action can be associated with N keys. However, each key can only have one action (key:action is N:1 relation). </p>
@param key a key code defined in SWT.java or a character. Optionally ORd with a state mask. Preferred state masks are one or more of SWT.MOD1, SWT.MOD2, SWT.MOD3, since these masks account for modifier platform differences. However, there may be cases where using the specific state masks (i.e., SWT.CTRL, SWT.SHIFT, SWT.ALT, SWT.COMMAND) makes sense. @param action one of the predefined actions defined in ST.java. Use SWT.NULL to remove a key binding. @exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>