Package KeyBoard
Class ShortCut
java.lang.Object
KeyBoard.ShortCut
public class ShortCut
extends java.lang.Object
wrap a single shortcut - the keys that will activate it and the function that will be called
- Author:
- Itay Finci
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ShortCut(int key, int modifier, java.util.function.Function<java.lang.Object,java.lang.Object> function)create a new shortcut -
Method Summary
Modifier and Type Method Description voidrun(java.lang.Object o)run the function on action requested
-
Field Details
-
Constructor Details
-
ShortCut
public ShortCut(int key, int modifier, java.util.function.Function<java.lang.Object,java.lang.Object> function)create a new shortcut- Parameters:
key- the key that will activate the shortcutmodifier- the modifies that required for this shortcutfunction- the function that will be called when the shortcut is requested
-
-
Method Details
-
run
public void run(java.lang.Object o)run the function on action requested- Parameters:
o- the object that is passed with the action
-