Example usage for javafx.scene AccessibleRole TOGGLE_BUTTON

List of usage examples for javafx.scene AccessibleRole TOGGLE_BUTTON

Introduction

In this page you can find the example usage for javafx.scene AccessibleRole TOGGLE_BUTTON.

Prototype

AccessibleRole TOGGLE_BUTTON

To view the source code for javafx.scene AccessibleRole TOGGLE_BUTTON.

Click Source Link

Document

Toggle Button role.

Usage

From source file:com.github.vatbub.tictactoe.view.Main.java

private void setAccessibleTextsForNodesThatDoNotChange() {
    player1AIToggle.setAccessibleRole(AccessibleRole.TOGGLE_BUTTON);
    player2AIToggle.setAccessibleRole(AccessibleRole.TOGGLE_BUTTON);

    aiLevelLabelHBox.getChildren().get(0).setAccessibleText(accessibilityBundle.getString("aiStupid"));
    aiLevelLabelHBox.getChildren().get(1).setAccessibleText(accessibilityBundle.getString("aiMedium"));
    aiLevelLabelHBox.getChildren().get(2).setAccessibleText(accessibilityBundle.getString("aiGood"));
    aiLevelLabelHBox.getChildren().get(3).setAccessibleText(accessibilityBundle.getString("aiUnbeatable"));
}