Package org.eclipse.gef
Class MouseWheelHandler.KeyGenerator
- java.lang.Object
-
- org.eclipse.gef.MouseWheelHandler.KeyGenerator
-
- Enclosing interface:
- MouseWheelHandler
public static class MouseWheelHandler.KeyGenerator extends java.lang.Object
A utility class used to generate keys from a given stateMask. A MouseWheelHandler registered with such a key would only be asked to handle mouse-wheel events that have the same stateMask as the one that was used to generate the key.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description KeyGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getKey(int stateMask)
The returned String is guaranteed to be equal for two different invocations with the same stateMask.
-
-
-
Method Detail
-
getKey
public static java.lang.String getKey(int stateMask)
The returned String is guaranteed to be equal for two different invocations with the same stateMask.Valid stateMasks are SWT.NONE, SWT.CTRL, SWT.COMMAND, SWT.ALT, SWT.SHIFT, SWT.MOD1, SWT.MOD2, SWT.MOD3, SWT.MOD4, SWT.BUTTON* or any combination thereof.
- Parameters:
stateMask
- the state indicating which buttons/modifiers are active- Returns:
- key for the given stateMask
- Throws:
java.lang.IllegalArgumentException
- if the given stateMask is not valid
-
-