Example usage for javafx.scene.input KeyCode ALT

List of usage examples for javafx.scene.input KeyCode ALT

Introduction

In this page you can find the example usage for javafx.scene.input KeyCode ALT.

Prototype

KeyCode ALT

To view the source code for javafx.scene.input KeyCode ALT.

Click Source Link

Document

Constant for the Alt key.

Usage

From source file:org.eclipse.jubula.rc.javafx.driver.RobotJavaFXImpl.java

/**
 * @param clickModifier/*  ww w. j av a 2s .com*/
 *            the click modifier to use for this click
 * @return an array of modifiers to press before click and release after
 *         click
 */
private int[] getModifierMask(ClickModifier clickModifier) {
    int[] modifier = new int[0];
    if (clickModifier.hasModifiers(ClickModifier.M1)) {
        modifier = ArrayUtils.add(modifier, KeyCode.CONTROL.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M2)) {
        modifier = ArrayUtils.add(modifier, KeyCode.SHIFT.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M3)) {
        modifier = ArrayUtils.add(modifier, KeyCode.ALT.impl_getCode());
    }
    if (clickModifier.hasModifiers(ClickModifier.M4)) {
        modifier = ArrayUtils.add(modifier, KeyCode.META.impl_getCode());
    }
    return modifier;
}