Example usage for javafx.scene.control RadioButton setId

List of usage examples for javafx.scene.control RadioButton setId

Introduction

In this page you can find the example usage for javafx.scene.control RadioButton setId.

Prototype

public final void setId(String value) 

Source Link

Usage

From source file:dpfmanager.shell.interfaces.gui.component.dessign.DessignView.java

public void addConfigFile(String text, String description, boolean selected) {
    RadioButton radio = new RadioButton();
    radio.setId("radioConfig" + vBoxConfig.getChildren().size());
    radio.setText(text);/* w w  w .j av a 2  s . c o  m*/
    radio.setToggleGroup(group);
    radio.setSelected(selected);
    if (description != null && !description.isEmpty()) {
        radio.setTooltip(new Tooltip(description));
    }
    radio.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent event) {
            selectedButton = radio;
        }
    });
    vBoxConfig.getChildren().add(radio);
    if (selected) {
        selectedButton = radio;
    }
}