title: Radio Button Change Event JavaFx
body: <p>i have a lot of HBoxes with some different components inside ( RadioButton, Labels, Buttons ...).
  The RadioButtons are in a ToggleGroup, so only 1 Radio Button can be selected.</p>
  
  <p>I want to add a OnChange - Event to the Radio Button. If the RadioButton would be unselected there should be a Event-Trigger. How can i add the Event to the Radio-Button?</p>
  
  <p>At the moment i have a code like this, but it doesn't have the function i want to have.</p>
  
  <pre><code>radio.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
  
          @Override
          public void handle(ActionEvent arg0) {
              if(!radio.isSelected()){
                  ivTriangleImg.setRotate(iRotateCoord2);
                  btnTriangle.setGraphic(ivTriangleImg);
              }
  
              if(group!=null){
                  group.selectedToggleProperty().addListener(new ChangeListener&lt;Toggle&gt;() {
  
                      @Override
                      public void changed(
                              ObservableValue&lt;? extends Toggle&gt; arg0,
                              Toggle arg1, Toggle arg2) {
  
                      }
                  });
              }
          }
      });
  </code></pre>
  
  <p>I use JavaFX 2.0 and Java 1.7 so i can not use Lambda Functions or the special component functions of JavaFx8 / Java 1.8</p>