package com.yem.em.bc.list;


import java.util.EventObject;

import kd.bos.filter.FilterContainer;
import kd.bos.list.plugin.AbstractListPlugin;

/**
 * @author 夜子
 * @ClassName BtnTreeHiddenList
 * @description: 表头树结构按钮显示
 * @date 2023年07月11日
 * @version: 1.0
 */
public class BtnTreeHiddenList  extends AbstractListPlugin {

    @Override
    public void registerListener(EventObject e) {
        super.registerListener(e);
        FilterContainer filterContainer = this.getControl("filtercontainerap");
        filterContainer.addAfterSearchClickListener((searchClickEvent) -> this.refreshTreeRootNode());
    }

    private void refreshTreeRootNode() {
        this.getView().setVisible(Boolean.FALSE,
                "btnnew", "btnedit", "btndel", "searchap", "flexpanel_treebtn");
    }

    @Override
    public void afterBindData(EventObject e) {
        super.afterBindData(e);
        this.getView().setVisible(Boolean.FALSE,
                "btnnew", "btnedit", "btndel", "searchap", "flexpanel_treebtn");
    }
}
