public void toggleExpanded(int index){
  SimpleBooleanProperty expanded=(SimpleBooleanProperty)getCellObservableValue(index);
  expanded.setValue(!expanded.getValue());
}

public void toggleExpanded ( int index ) { SimpleBooleanProperty expanded = ( SimpleBooleanProperty ) getCellObservableValue ( index ) ; expanded . setValue ( ! expanded . getValue ( ) ) ; }
toggle the expanded state of the row at the given index .
