Search in sources :

Example 1 with ScriptEventHandler

use of org.develnext.jphp.ext.javafx.support.ScriptEventHandler in project jphp by jphp-compiler.

the class UXKeyboardManager method onDown.

@Signature
public void onDown(KeyCombination keys, Invoker handler, String group, Environment env) {
    EventHandler<KeyEvent> onDown = getWrappedObject().getOnDown(keys);
    if (onDown == null) {
        onDown = new ScriptEventHandler<>(env);
        getWrappedObject().setOnDown(keys, onDown);
    }
    ScriptEventHandler eventHandler = (ScriptEventHandler) onDown;
    eventHandler.set(handler, group);
}
Also used : KeyEvent(javafx.scene.input.KeyEvent) ScriptEventHandler(org.develnext.jphp.ext.javafx.support.ScriptEventHandler) Signature(php.runtime.annotation.Reflection.Signature)

Example 2 with ScriptEventHandler

use of org.develnext.jphp.ext.javafx.support.ScriptEventHandler in project jphp by jphp-compiler.

the class UXKeyboardManager method onUp.

@Signature
public void onUp(KeyCombination keys, Invoker handler, String group, Environment env) {
    EventHandler<KeyEvent> onUp = getWrappedObject().getOnUp(keys);
    if (onUp == null) {
        onUp = new ScriptEventHandler<>(env);
        getWrappedObject().setOnUp(keys, onUp);
    }
    ScriptEventHandler eventHandler = (ScriptEventHandler) onUp;
    eventHandler.set(handler, group);
}
Also used : KeyEvent(javafx.scene.input.KeyEvent) ScriptEventHandler(org.develnext.jphp.ext.javafx.support.ScriptEventHandler) Signature(php.runtime.annotation.Reflection.Signature)

Example 3 with ScriptEventHandler

use of org.develnext.jphp.ext.javafx.support.ScriptEventHandler in project jphp by jphp-compiler.

the class UXKeyboardManager method onPress.

@Signature
public void onPress(KeyCombination keys, Invoker handler, String group, Environment env) {
    EventHandler<KeyEvent> onPress = getWrappedObject().getOnPress(keys);
    if (onPress == null) {
        onPress = new ScriptEventHandler<>(env);
        getWrappedObject().setOnPress(keys, onPress);
    }
    ScriptEventHandler eventHandler = (ScriptEventHandler) onPress;
    eventHandler.set(handler, group);
}
Also used : KeyEvent(javafx.scene.input.KeyEvent) ScriptEventHandler(org.develnext.jphp.ext.javafx.support.ScriptEventHandler) Signature(php.runtime.annotation.Reflection.Signature)

Aggregations

KeyEvent (javafx.scene.input.KeyEvent)3 ScriptEventHandler (org.develnext.jphp.ext.javafx.support.ScriptEventHandler)3 Signature (php.runtime.annotation.Reflection.Signature)3