package com.hmsoft.common.cell;

import javafx.beans.value.ObservableValue;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TableCell;

public class CheckBoxButtonTableCell<S, T> extends TableCell<S, T> {

	private CheckBox chebox;
	private ObservableValue<T> ov;
	
    public CheckBoxButtonTableCell() {
        this.chebox = new CheckBox();
        setGraphic(chebox);
    }
    
    @Override
    protected void updateItem(T item, boolean empty) {
        //System.out.println("empty---" + empty);
        super.updateItem(item, empty);
        if (empty) {
            setText(null);
            setGraphic(null);
        } else {
            chebox.setSelected(false);
            setGraphic(chebox);
           
        }
    }
}
