package be.iminds.ilabt.jfed.experimenter_gui.util.ui;

import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.cell.TextFieldTableCell;
import javafx.util.Callback;
import javafx.util.converter.DefaultStringConverter;

/**
 * User: twalcari
 * Date: 2/27/2015
 * Time: 10:49
 */
public class ReadOnlyTextFieldTableCell {

    public static <S> Callback<TableColumn<S,String>, TableCell<S,String>> forTableColumn(){

        return list -> new TextFieldTableCell<S, String>(new DefaultStringConverter()){
            @Override
            public void commitEdit(String newValue) {
                //ignore the new value
            }
        } ;


    }
}
