package com.ecep.contract.controller.tab;

import com.ecep.contract.controller.contract.ContractInvoiceWindowController;
import com.ecep.contract.vm.ContractInvoiceViewModel;
import com.ecep.contract.vo.ContractInvoiceVo;
import javafx.scene.control.Tab;

/**
 * 合同发票基础信息标签页皮肤
 */
public class ContractInvoiceTabSkinBase
        extends AbstEntityBasedTabSkin<ContractInvoiceWindowController, ContractInvoiceVo, ContractInvoiceViewModel>
        implements TabSkin {

    public ContractInvoiceTabSkinBase(ContractInvoiceWindowController controller) {
        super(controller);
    }

    @Override
    public Tab getTab() {
        return controller.baseInfoTab;
    }

    @Override
    public void initializeTab() {
        // 可以在这里进行标签页的初始化工作
        controller.codeField.textProperty().bindBidirectional(viewModel.getCode());
        controller.nameField.textProperty().bindBidirectional(viewModel.getName());
        controller.remarkField.textProperty().bindBidirectional(viewModel.getRemark());
    }
}