public class SwtKeyListener extends java.lang.Object implements GralKeySpecial_ifc, org.eclipse.swt.events.KeyListener
SwtMng.
A Widget can be completed with this key listener. On all keys
the GralUserAction given in the GralWidget#getActionChange() is called
GralMng#getRegisteredUserAction(String)
for "keyAction" is tried to get and then invoked with cmd = "key" and the key code in params[0].
This central keyAction may be used for application centralized keys without association to the table itself.GralKeyListener| Modifier and Type | Field and Description |
|---|---|
private GralKeyListener |
keyAction |
static int |
version
Version and history
2011-12-03 Hartmut created.
|
| Constructor and Description |
|---|
SwtKeyListener(GralKeyListener keyAction) |
| Modifier and Type | Method and Description |
|---|---|
void |
keyPressed(org.eclipse.swt.events.KeyEvent keyEv) |
void |
keyReleased(org.eclipse.swt.events.KeyEvent arg0) |
boolean |
specialKeysOfWidgetType(int key,
GralWidget_ifc widgg,
java.lang.Object widgImpl)
This method can be overridden by specialized classes of this.
|
public static final int version
private final GralKeyListener keyAction
public SwtKeyListener(GralKeyListener keyAction)
public void keyPressed(org.eclipse.swt.events.KeyEvent keyEv)
keyPressed in interface org.eclipse.swt.events.KeyListenerpublic void keyReleased(org.eclipse.swt.events.KeyEvent arg0)
keyReleased in interface org.eclipse.swt.events.KeyListenerpublic boolean specialKeysOfWidgetType(int key, GralWidget_ifc widgg, java.lang.Object widgImpl)
GralKeySpecial_ifcGralWidget#getActionChange()
then this special handling should be programmed in the derived class.
If this method returns true, the key is not applied to the action and not applied to the common handling.specialKeysOfWidgetType in interface GralKeySpecial_ifc