title: Get/Set ToggleButton state in TableView JavaFX2.2
body: <p>I am using TableView to display some data. Sample table is shown in the picture below:</p>
  
  <p><img src="https://i.stack.imgur.com/5yToj.jpg" alt="Editable TableView"></p>
  
  <p>Only the items in 2nd column are editable. Third column contains a ToggleButton which basically displays the TextField when 'Edit' button is clicked.</p>
  
  <p>What I want is to toggle the state of the corresponding ToggleButton in the following event handler function (See the comments in the code snippet below). </p>
  
  <pre><code>textField.setOnKeyReleased(new EventHandler&lt;KeyEvent&gt;() {
              @Override
              public void handle(KeyEvent t) {
                  if (t.getCode() == KeyCode.ENTER) {
                      commitEdit(textField.getText());
                      //Toggle the state of Edit button here
                  } else if (t.getCode() == KeyCode.ESCAPE) {
                      cancelEdit();
                      //Toggle the state of Edit button here
                  }
              }
          });
  </code></pre>
  
  <p>I have tried my level best to get the corresponding edit button object in the selected row but nothing helped and I couldn't find any related article.</p>
  
  <p>Is it something achievable? If so how can it be done.</p>